New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/applicationinsights-analytics-js

Package Overview
Dependencies
Maintainers
5
Versions
605
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.4.4 to 2.5.0

4

browser/applicationinsights-analytics-js.min.js
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.4.4
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function T(){return y()?window:v(f)}function I(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=I();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=I();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(T(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=I()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=I()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.arrMap(this.parsedStack,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||undefined}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),Kt.CreateFromInterface=function(e){return new Kt(e,null)},Kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Kt.baseSize=58,Kt);function Kt(e,t){var n=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.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 kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=I();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=I();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=I();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=I();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(I()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=T(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v="onunhandledrejection",y=f[v];f[v]=function(e){var t=y&&y.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var I=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(I.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange"))}),f.addEventListener(I.config.namePrefix+"locationchange",function(){I._properties&&I._properties.context&&I._properties.context.telemetryTrace&&(I._properties.context.telemetryTrace.traceID=ht.generateW3CId(),I._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){I.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),I.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.4",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var u=2,l="undefined",f="object",g="prototype",p="window",h="document",m="location",v="JSON";function y(){return typeof globalThis!==l&&globalThis?globalThis:typeof self!==l&&self?self:typeof window!==l&&window?window:typeof global!==l&&global?global:null}function T(e){var t=y();return t&&t[e]?t[e]:e===p&&I()?window:null}function I(){return Boolean(typeof window===f&&window)}function S(){return I()?window:T(p)}function w(){return function e(){return Boolean(typeof document===f&&document)}()?document:T(h)}function N(){return function e(){return Boolean(typeof navigator===f&&navigator)}()?navigator:T("navigator")}function _(){return function e(){return Boolean(typeof history===f&&history)}()?history:T("history")}function x(){return typeof location===f&&location?location:T(m)}function E(){return T("performance")}function b(){return Boolean(typeof JSON===f&&JSON||null!==T(v))}function D(){return b()?JSON||T(v):null}var C="attachEvent",k="addEventListener",P="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,l)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[g].hasOwnProperty.call(e,t)}function R(e){return A(e,f)}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[k])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[k](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[P])||e[P]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[g].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[g]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=S();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=w();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,$=4,Y=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,ue=35,le=36,fe=37,ge=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Te=61,Ie=62,Se=63,we=64,Ne=66,_e=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";b()&&(i=D().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(ke.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},ke.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},ke.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},ke.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},ke.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},ke);function ke(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Pe=j.isFunction,Le=function dr(i,a){var o=this,s=null,c=Pe(i.processTelemetry),u=Pe(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),u&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function hr(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new hr(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function $e(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Ye,Ze=(t(et,Ye=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Ye.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return $e(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),$e(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==Ye&&Ye.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function ct(){return st.call(this)||this}var ut=(lt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=lt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,lt.MAX_NAME_LENGTH-3)+lt.padNumber(a);i=o}return i},lt.sanitizeKey=function(e,t){var n;return t&&(t=lt.trim(t.toString())).length>lt.MAX_NAME_LENGTH&&(n=t.substring(0,lt.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+lt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},lt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=lt.MAX_STRING_LENGTH),t&&(n=n||lt.MAX_STRING_LENGTH,(t=lt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},lt.sanitizeUrl=function(e,t){return lt.sanitizeInput(e,t,lt.MAX_URL_LENGTH,Ne)},lt.sanitizeMessage=function(e,t){var n;return t&&t.length>lt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,lt.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+lt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},lt.sanitizeException=function(e,t){var n;return t&&t.length>lt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,lt.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+lt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},lt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&b())try{i=D().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=lt.sanitizeString(e,i,lt.MAX_PROPERTY_LENGTH),n[r=lt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},lt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=lt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},lt.sanitizeId=function(e,t){return t?lt.sanitizeInput(e,t,lt.MAX_ID_LENGTH,xe).toString():t},lt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=lt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},lt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},lt.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},lt.MAX_NAME_LENGTH=150,lt.MAX_ID_LENGTH=128,lt.MAX_PROPERTY_LENGTH=8192,lt.MAX_STRING_LENGTH=1024,lt.MAX_URL_LENGTH=2048,lt.MAX_MESSAGE_LENGTH=32768,lt.MAX_EXCEPTION_LENGTH=32768,lt);function lt(){}var ft=N(),gt=j.isString,pt=null;var dt=(ht.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=w();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},ht.disableStorage=function(){ht._canUseLocalStorage=!1,ht._canUseSessionStorage=!1},ht._getLocalStorageObject=function(){return ht.canUseLocalStorage()?ht._getVerifiedStorageObject(a.LocalStorage):null},ht._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(y()))return null;n=new Date,(r=e===a.LocalStorage?T("localStorage"):T("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ht.isInternalApplicationInsightsEndpoint=function(e){return-1!==ht._internalEndpoints.indexOf(e.toLowerCase())},ht.canUseLocalStorage=function(){return ht._canUseLocalStorage===undefined&&(ht._canUseLocalStorage=!!ht._getVerifiedStorageObject(a.LocalStorage)),ht._canUseLocalStorage},ht.getStorage=function(e,t){var n=ht._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return null},ht.setStorage=function(e,t,n){var r=ht._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+ht.getExceptionName(i),{exception:ht.dump(i)})}return!1},ht.removeStorage=function(e,t){var n=ht._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed removal of local storage item. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return!1},ht._getSessionStorageObject=function(){return ht.canUseSessionStorage()?ht._getVerifiedStorageObject(a.SessionStorage):null},ht.canUseSessionStorage=function(){return ht._canUseSessionStorage===undefined&&(ht._canUseSessionStorage=!!ht._getVerifiedStorageObject(a.SessionStorage)),ht._canUseSessionStorage},ht.getSessionStorageKeys=function(){var e=[];if(ht.canUseSessionStorage())for(var t in T("sessionStorage"))e.push(t);return e},ht.getSessionStorage=function(e,t){var n=ht._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return null},ht.setSessionStorage=function(e,t,n){var r=ht._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed write to session storage. "+ht.getExceptionName(i),{exception:ht.dump(i)})}return!1},ht.removeSessionStorage=function(e,t){var n=ht._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return!1},ht.disableCookies=function(){j.disableCookies()},ht.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=ht.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,_e,"Cannot access document.cookie - "+ht.getExceptionName(t),{exception:ht.dump(t)})}}return j._canUseCookies},ht.disallowsSameSiteNone=function(e){return!!gt(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},ht.setCookie=function(e,t,n,r){if(ht.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=x();o&&"https:"===o.protocol&&(a=";secure",null===pt&&(pt=ht.disallowsSameSiteNone((N()||{}).userAgent)),pt||(n+=";SameSite=None")),ht.document.cookie=t+"="+n+i+";path=/"+a}},ht.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},ht.getCookie=function(e,t){if(ht.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ht.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ht.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ht.deleteCookie=function(e,t){ht.canUseCookies(e)&&(ht.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ht.trim=function(e){return gt(e)?e.replace(/^\s+|\s+$/g,""):e},ht.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},ht.random32=function(){return 4294967296*Math.random()|0},ht.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ht.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ht.isArray=function(e){return"[object Array]"===Object[g].toString.call(e)},ht.isError=function(e){return"[object Error]"===Object[g].toString.call(e)},ht.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},ht.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ht.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ht.dump=function(e){var t=Object[g].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":b()&&(n=D().stringify(e)),t+n},ht.getExceptionName=function(e){return"[object Error]"===Object[g].toString.call(e)?e.name:""},ht.addEventHandler=function(e,t){return H.Attach(S(),e,t)},ht.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},ht.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ht.document=w()||{},ht._canUseLocalStorage=undefined,ht._canUseSessionStorage=undefined,ht._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ht.NotSpecified="not_specified",ht.isDate=j.isDate,ht.toISOStringForIE8=j.toISOString,ht);function ht(){}var mt=(vt.parseUrl=function(e){return vt.htmlAnchorElement||(vt.htmlAnchorElement=vt.document.createElement?vt.document.createElement("a"):{host:vt.parseHost(e)}),vt.htmlAnchorElement.href=e,vt.htmlAnchorElement},vt.getAbsoluteUrl=function(e){var t,n=vt.parseUrl(e);return n&&(t=n.href),t},vt.getPathName=function(e){var t,n=vt.parseUrl(e);return n&&(t=n.pathname),t},vt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},vt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&gt(t[2])&&0<t[2].length)return t[2]}return null},vt.document=w()||{},vt);function vt(){}var yt=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=mt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=ut.sanitizeString(e,n?n+" "+c:c)}else a=ut.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var It=(St.Now=function(){var e=E();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},St.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},St);function St(){}var wt,Nt=(t(_t,wt=function mr(){}),_t);function _t(){return wt.call(this)||this}var xt;t(Et,xt=function vr(){this.ver=1,this.sampleRate=100,this.tags={}});function Et(e,t,n){var r=xt.call(this)||this;return r.name=ut.sanitizeString(e,n)||dt.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var bt,Dt=function yr(){},Ct=(t(kt,bt=Dt),kt);function kt(){var e=bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Pt,Lt=(t(At,Pt=Ct),At.envelopeType="Microsoft.ApplicationInsights.{0}.Event",At.dataType="EventData",At);function At(e,t,n,r){var i=Pt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=ut.sanitizeString(e,t)||dt.NotSpecified,i.properties=ut.sanitizeProperties(e,n),i.measurements=ut.sanitizeMeasurements(e,r),i}var Mt,Ot=function Tr(){},Ut=(t(Rt,Mt=Dt),Rt);function Rt(){var e=Mt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var zt,Vt=function Ir(){this.hasFullStack=!0,this.parsedStack=[]},Gt=(t(jt,zt=Ut),jt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Bt.CreateFromInterface(t,e)});return new jt(t,c({},e,{exceptions:n}))},jt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},jt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},jt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",jt.dataType="ExceptionData",jt);function jt(e,t,n,r,i,a){var o=zt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Bt(e,t)],o.properties=ut.sanitizeProperties(e,n),o.measurements=ut.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var qt,Bt=(t(Ft,qt=Vt),Ft.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.arrMap(this.parsedStack,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||undefined}},Ft.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Ht.CreateFromInterface(e)})||t.parsedStack;return new Ft(e,c({},t,{parsedStack:n}))},Ft.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Ht.regex.test(o)){var s=new Ht(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,u=t.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=g-f+1;t.splice(f,p);break}f=c,g=u,c++,u--}}return t},Ft);function Ft(e,t){var n=qt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=ut.sanitizeString(e,t.name)||dt.NotSpecified,n.message=ut.sanitizeMessage(e,t.message)||dt.NotSpecified;var r=t.stack;n.parsedStack=Ft.parseStack(r),n.stack=ut.sanitizeException(e,r),n.hasFullStack=dt.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 Wt,Ht=(t(Xt,Wt=Ot),Xt.CreateFromInterface=function(e){return new Xt(e,null)},Xt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Xt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Xt.baseSize=58,Xt);function Xt(e,t){var n=Wt.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=dt.trim(r),n.fileName="",n.line=0;var i=r.match(Xt.regex);i&&5<=i.length&&(n.method=dt.trim(i[2])||n.method,n.fileName=dt.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Xt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Kt,Qt,Jt,$t=(t(Yt,Kt=Dt),Yt);function Yt(){var e=Kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Jt=Qt=Qt||{})[Jt.Measurement=0]="Measurement",Jt[Jt.Aggregation=1]="Aggregation";var Zt,en=(t(tn,Zt=function Sr(){this.kind=Qt.Measurement}),tn);function tn(){var e=null!==Zt&&Zt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var nn,rn=(t(an,nn=$t),an.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",an.dataType="MetricData",an);function an(e,t,n,r,i,a,o,s){var c=nn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new en;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ut.sanitizeString(e,t)||dt.NotSpecified,u.value=n,c.metrics=[u],c.properties=ut.sanitizeProperties(e,o),c.measurements=ut.sanitizeMeasurements(e,s),c}var on,sn=(t(cn,on=Ct),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(t(fn,un=sn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=ut.sanitizeId(e,o),s.url=ut.sanitizeUrl(e,n),s.name=ut.sanitizeString(e,t)||dt.NotSpecified,isNaN(r)||(s.duration=dt.msToTimeSpan(r)),s.properties=ut.sanitizeProperties(e,i),s.measurements=ut.sanitizeMeasurements(e,a),s}var gn,pn=(t(dn,gn=Dt),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var hn,mn=(t(vn,hn=pn),vn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",vn.dataType="RemoteDependencyData",vn);function vn(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=hn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=dt.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=ut.sanitizeString(e,c);var p=yt.ParseDependencyPath(e,n,s,r);return g.data=ut.sanitizeUrl(e,r)||p.data,g.target=ut.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=ut.sanitizeString(e,p.name),g.properties=ut.sanitizeProperties(e,l),g.measurements=ut.sanitizeMeasurements(e,f),g}var yn,Tn=(t(In,yn=Dt),In);function In(){var e=yn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Sn,wn=(t(Nn,Sn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=Sn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||dt.NotSpecified,a.message=ut.sanitizeMessage(e,t),a.properties=ut.sanitizeProperties(e,r),a.measurements=ut.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var _n,xn=(t(En,_n=sn),En);function En(){var e=_n.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var bn,Dn=(t(Cn,bn=xn),Cn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Cn.dataType="PageviewPerformanceData",Cn);function Cn(e,t,n,r,i,a,o){var s=bn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=ut.sanitizeUrl(e,n),s.name=ut.sanitizeString(e,t)||dt.NotSpecified,s.properties=ut.sanitizeProperties(e,i),s.measurements=ut.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 kn,Pn,Ln;t(An,kn=Nt);function An(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(Ln=Pn=Pn||{})[Ln.Verbose=0]="Verbose",Ln[Ln.Information=1]="Information",Ln[Ln.Warning=2]="Warning",Ln[Ln.Error=3]="Error",Ln[Ln.Critical=4]="Critical";var Mn=(On.create=function(e,t,n,r,i,a){if(n=ut.sanitizeString(r,n)||dt.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},On);function On(){}var Un="constructor",Rn="prototype",zn="function",Vn="getPrototypeOf",Gn="_dynInstFuncs",jn="_isDynProxy",qn="_dynClass",Bn="_dynCls$",Fn="_unknown_",Wn=0;function Hn(e,t){return e&&Object[Rn].hasOwnProperty.call(e,t)}function Xn(e){return typeof e===zn}function Kn(e){return e&&(e===Object[Rn]||e===Array[Rn])}function Qn(e){return Kn(e)||e===Function[Rn]}function Jn(e){if(e){if(Object[Vn])return Object[Vn](e);var t="__proto__";if(Kn(e[t]))return e[t];var n=e[Un];if(n)return n[Rn]}return null}function $n(e,t){return t!==Un&&Xn(e[t])&&Hn(e,t)}function Yn(e){throw new TypeError("DynamicProto: "+e)}function Zn(e,t){return Hn(e,Rn)?e.name||t||Fn:((e||{})[Un]||{}).name||t||Fn}function er(e,t,n){Hn(e,Rn)||Yn("theClass is an invalid class definition.");var r=e[Rn];!function o(e,t){for(var n=Jn(t);n&&!Qn(n);){if(n===e)return 1;n=Jn(n)}}(r,t)&&Yn("["+Zn(e)+"] is not in class heirarchy of ["+Zn(t)+"]");var i=null;Hn(r,qn)?i=r[qn]:(i=Bn+Zn(e,"_")+"$"+Wn,Wn++,r[qn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&$n(e,n)&&(t[n]=e[n]);return t}(t);n(t,function c(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=Jn(e);o&&!Qn(o);){for(var a in o)!i[a]&&$n(o,a)&&(i[a]=r(t,o[a]));o=Jn(o)}return i}(r,t,a)),function u(e,t,n,r){function i(n,r){var i=function(){if(this&&Hn(n,qn)){var e=((this[Gn]||{})[n[qn]]||{})[r];if(e)return e.apply(this,arguments);Yn("Missing ["+r+"] "+zn)}var t=n[r];return t===i&&(t=Jn(n)[r]),Xn(t)||Yn("["+r+"] is not a "+zn),t.apply(this,arguments)};return i[jn]=1,i}if(!Kn(e)){var a=n[Gn]=n[Gn]||{},o=a[t]=a[t]||{};for(var s in n)$n(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],Hn(e,s)&&(!e[s]||e[s][jn])||(e[s]=i(e,s)))}}(r,i,t,a)}var tr=function wr(y,T,t,I){er(wr,this,function(e){var f,g=j.arrForEach,p=j.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var a=r.name;if(p(a)||"string"!=typeof a){var e=w();a=r.name=e&&e.title||""}var o=r.uri;if(p(o)||"string"!=typeof o){var t=x();o=r.uri=t&&t.href||""}if(!I.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,n,c=!1,u=I.getPerformanceTiming().navigationStart;s=It.GetDuration(u,+new Date),I.shouldCollectDuration(s)||(s=undefined),p(i)||p(i.duration)||(n=i.duration),!T&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=s),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},function l(e){h.push(e),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}(function(){var e=!1;try{if(I.isPerformanceTimingDataReady()){e=!0;var t={name:a,uri:o};I.populatePageViewPerformanceEvent(t),t.isValid||c?(c||(i.duration=t.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(t,i),m=!0)):(i.duration=s,y.sendPageViewInternal(r,i))}else 6e4<It.GetDuration(u,+new Date)&&(e=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(B.CRITICAL,ge,"trackPageView failed on page load calculation: "+dt.getExceptionName(n),{exception:dt.dump(n)})}return e})}})},nr=(rr.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+dt.dump(r))}},rr.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+dt.dump(r)),null}},rr.prototype.startPageVisitTimer=function(e,t){try{if(dt.canUseSessionStorage()){if(null!=dt.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new ir(e,t),r=D().stringify(n);dt.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+dt.dump(i))}},rr.prototype.stopPageVisitTimer=function(){try{if(dt.canUseSessionStorage()){var e=Date.now(),t=dt.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&b()){var n=D().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,dt.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+dt.dump(r)),null}},rr);function rr(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var ir=function Nr(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},ar=(or.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=It.GetDuration(t.startTime,t.connectEnd),a=It.GetDuration(t.requestStart,t.responseStart),o=It.GetDuration(t.responseStart,t.responseEnd),s=It.GetDuration(t.responseEnd,t.loadEventEnd);else r=It.GetDuration(n.navigationStart,n.loadEventEnd),i=It.GetDuration(n.navigationStart,n.connectEnd),a=It.GetDuration(n.requestStart,n.responseStart),o=It.GetDuration(n.responseStart,n.responseEnd),s=It.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=dt.msToTimeSpan(r),e.networkConnect=dt.msToTimeSpan(i),e.sentRequest=dt.msToTimeSpan(a),e.receivedResponse=dt.msToTimeSpan(o),e.domProcessing=dt.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},or.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?E().timing:null},or.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?E().getEntriesByType("navigation")[0]:null},or.prototype.isPerformanceNavigationTimingSupported=function(){var e=E();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},or.prototype.isPerformanceTimingSupported=function(){var e=E();return e&&e.timing},or.prototype.isPerformanceTimingDataReady=function(){var e=E(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},or.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(N()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},or);function or(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var sr="duration";function cr(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var ur,lr=(t(fr,ur=ze),fr.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=dt.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=dt.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=dt.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=dt.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=dt.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=dt.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=dt.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=dt.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},fr.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+dt.getExceptionName(o),{exception:dt.dump(o)},!0)}}n||this.processNext(e,t)},fr.prototype.trackEvent=function(e,t){try{var n=Mn.create(e,Lt.dataType,Lt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+dt.getExceptionName(t),{exception:dt.dump(t)})}},fr.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackTrace=function(e,t){try{var n=Mn.create(e,wn.dataType,wn.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackMetric=function(e,t){try{var n=Mn.create(e,rn.dataType,rn.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,le,"trackMetric failed, metric will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,fe,"trackPageView failed, page view will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.sendPageViewInternal=function(e,t,n){var r=w();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Mn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},fr.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Mn.create(e,Dn.dataType,Dn.envelopeType,this.diagLog(),t,n);this.core.track(r)},fr.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,fe,"trackPageViewPerformance failed, page view will not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=w();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=w();e=i&&i.title||""}if("string"!=typeof t){var a=x();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+dt.getExceptionName(o),{exception:dt.dump(o)})}},fr.prototype.sendExceptionInternal=function(e,t,n){var r=new Gt(this.diagLog(),e.exception||new Error(dt.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Mn.create(r,Gt.dataType,Gt.envelopeType,this.diagLog(),t,n);this.core.track(i)},fr.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ue,"trackException failed, exception will not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype._onerror=function(e){try{var t={url:e&&e.url||(w()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(dt.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!dt.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Pn.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+dt.getExceptionName(i),{exception:dt.dump(i),errorString:r})}},fr.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},fr.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");ur.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=fr.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&dt.disableCookies(),this.config.isStorageUseDisabled&&dt.disableStorage();var u={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new ar(this.core),this._pageViewManager=new tr(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new nr(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new gr(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[sr]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new gr(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[sr]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g=S(),p=_(),d=x(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&g){var m=g.onerror;g.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&g){var v="onunhandledrejection",y=g[v];g[v]=function(e){var t=y&&y.call(g,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&g&&"undefined"!=typeof Event){var T=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(f=p.pushState,function(){var e=f.apply(this,arguments);return cr(g,dt.createDomEvent(T.config.namePrefix+"pushState")),cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange")),e}),p.replaceState=(l=p.replaceState,function(){var e=l.apply(this,arguments);return cr(g,dt.createDomEvent(T.config.namePrefix+"replaceState")),cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange")),e}),g.addEventListener&&(g.addEventListener(T.config.namePrefix+"popstate",function(){cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange"))}),g.addEventListener(T.config.namePrefix+"locationchange",function(){T._properties&&T._properties.context&&T._properties.context.telemetryTrace&&(T._properties.context.telemetryTrace.traceID=dt.generateW3CId(),T._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){T.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),T.autoRoutePVDelay)}))}this.setInitialized(!0)}},fr.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},fr.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===mn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},fr.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},fr.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=Mn.create(t,Gt.dataType,Gt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},fr.Version="2.5.0",fr);function fr(){var e=ur.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=x();return e._prevUri=t&&t.href||"",e}var gr=(pr.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Ie,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},pr.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=It.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},pr);function pr(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=lr,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map

@@ -1,4 +0,6 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
export { ApplicationInsights } from "./JavaScriptSDK/ApplicationInsights";
//# sourceMappingURL=applicationinsights-analytics-js.js.map

@@ -1,3 +0,5 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
//# sourceMappingURL=ITelemetryConfig.js.map

@@ -0,1 +1,5 @@

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
/**

@@ -6,3 +10,3 @@ * ApplicationInsights.ts

import * as tslib_1 from "tslib";
import { Util, PageViewPerformance, PageView, RemoteDependencyData, Event as EventTelemetry, TelemetryItemCreator, Metric, Exception, SeverityLevel, Trace, DateTimeUtils, PropertiesPluginIdentifier } from "@microsoft/applicationinsights-common";
import { Util, PageViewPerformance, PageView, RemoteDependencyData, Event as EventTelemetry, TelemetryItemCreator, Metric, Exception, SeverityLevel, Trace, DateTimeUtils, PropertiesPluginIdentifier, AnalyticsPluginIdentifier } from "@microsoft/applicationinsights-common";
import { BaseTelemetryPlugin, CoreUtils, LoggingSeverity, _InternalMessageId, getWindow, getDocument, getHistory, getLocation } from "@microsoft/applicationinsights-core-js";

@@ -23,3 +27,3 @@ import { PageViewManager } from "./Telemetry/PageViewManager";

var _this = _super.call(this) || this;
_this.identifier = "ApplicationInsightsAnalytics"; // do not change name or priority
_this.identifier = AnalyticsPluginIdentifier; // do not change name or priority
_this.priority = 180; // take from reserved priority range 100- 200

@@ -396,3 +400,3 @@ _this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place

};
_this.sendPageViewInternal(pageViewItem);
_this.sendPageViewInternal(pageViewItem, properties);
};

@@ -543,3 +547,3 @@ var _window = getWindow();

};
ApplicationInsights.Version = "2.4.4"; // Not currently used anywhere
ApplicationInsights.Version = "2.5.0"; // Not currently used anywhere
return ApplicationInsights;

@@ -546,0 +550,0 @@ }(BaseTelemetryPlugin));

@@ -1,5 +0,8 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
import { DateTimeUtils, Util } from '@microsoft/applicationinsights-common';
import { CoreUtils, LoggingSeverity, _InternalMessageId, getDocument, getLocation } from '@microsoft/applicationinsights-core-js';
import dynamicProto from "@microsoft/dynamicproto-js";
/**

@@ -10,121 +13,147 @@ * Class encapsulates sending page views and page view performance telemetry.

function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {
this.pageViewPerformanceSent = false;
this.overridePageViewDuration = false;
this.overridePageViewDuration = overridePageViewDuration;
this.appInsights = appInsights;
this._pageViewPerformanceManager = pageViewPerformanceManager;
if (core) {
this._channel = function () { return (core.getTransmissionControls()); };
this._logger = core.logger;
}
}
/**
* Currently supported cases:
* 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.
* a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.
* 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.
* 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).
* 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.
*
* In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.
*/
PageViewManager.prototype.trackPageView = function (pageView, customProperties) {
var _this = this;
var name = pageView.name;
if (CoreUtils.isNullOrUndefined(name) || typeof name !== "string") {
var doc = getDocument();
name = pageView.name = doc && doc.title || "";
}
var uri = pageView.uri;
if (CoreUtils.isNullOrUndefined(uri) || typeof uri !== "string") {
var location_1 = getLocation();
uri = pageView.uri = location_1 && location_1.href || "";
}
// case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user
// do not provide the duration, set duration to undefined
// Also this is case 4
if (!this._pageViewPerformanceManager.isPerformanceTimingSupported()) {
this.appInsights.sendPageViewInternal(pageView, customProperties);
CoreUtils.arrForEach(this._channel(), function (queues) { CoreUtils.arrForEach(queues, function (q) { return q.flush(true); }); });
// no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)
this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NavigationTimingNotSupported, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
return;
}
var pageViewSent = false;
var customDuration;
// if the performance timing is supported by the browser, calculate the custom duration
var start = this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;
customDuration = DateTimeUtils.GetDuration(start, +new Date);
if (!this._pageViewPerformanceManager.shouldCollectDuration(customDuration)) {
customDuration = undefined;
}
// if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if
// overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier
var duration;
if (!CoreUtils.isNullOrUndefined(customProperties) &&
!CoreUtils.isNullOrUndefined(customProperties.duration)) {
duration = customProperties.duration;
}
if (this.overridePageViewDuration || !isNaN(duration)) {
if (isNaN(duration)) {
// case 3
if (!customProperties) {
customProperties = {};
dynamicProto(PageViewManager, this, function (_self) {
var arrForEach = CoreUtils.arrForEach;
var isNullOrUndefined = CoreUtils.isNullOrUndefined;
var intervalHandle = null;
var itemQueue = [];
var pageViewPerformanceSent = false;
var _logger;
if (core) {
_logger = core.logger;
}
function _flushChannels() {
if (core) {
arrForEach(core.getTransmissionControls(), function (queues) {
arrForEach(queues, function (q) { return q.flush(true); });
});
}
customProperties["duration"] = customDuration;
}
// case 2
this.appInsights.sendPageViewInternal(pageView, customProperties);
CoreUtils.arrForEach(this._channel(), function (queues) { CoreUtils.arrForEach(queues, function (q) { return q.flush(true); }); });
pageViewSent = true;
}
// now try to send the page view performance telemetry
var maxDurationLimit = 60000;
if (!customProperties) {
customProperties = {};
}
var handle = setInterval((function () {
try {
if (_this._pageViewPerformanceManager.isPerformanceTimingDataReady()) {
clearInterval(handle);
var pageViewPerformance = {
name: name,
uri: uri
};
_this._pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);
if (!pageViewPerformance.isValid && !pageViewSent) {
// If navigation timing gives invalid numbers, then go back to "override page view duration" mode.
// That's the best value we can get that makes sense.
function _addQueue(cb) {
itemQueue.push(cb);
if (!intervalHandle) {
intervalHandle = setInterval((function () {
var allItems = itemQueue.slice(0);
var doFlush = false;
itemQueue = [];
arrForEach(allItems, function (item) {
if (!item()) {
// Not processed so rescheduled
itemQueue.push(item);
}
else {
doFlush = true;
}
});
if (itemQueue.length === 0) {
clearInterval(intervalHandle);
intervalHandle = null;
}
if (doFlush) {
// We process at least one item so flush the queue
_flushChannels();
}
}), 100);
}
}
_self.trackPageView = function (pageView, customProperties) {
var name = pageView.name;
if (isNullOrUndefined(name) || typeof name !== "string") {
var doc = getDocument();
name = pageView.name = doc && doc.title || "";
}
var uri = pageView.uri;
if (isNullOrUndefined(uri) || typeof uri !== "string") {
var location_1 = getLocation();
uri = pageView.uri = location_1 && location_1.href || "";
}
// case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user
// do not provide the duration, set duration to undefined
// Also this is case 4
if (!pageViewPerformanceManager.isPerformanceTimingSupported()) {
appInsights.sendPageViewInternal(pageView, customProperties);
_flushChannels();
// no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)
_logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NavigationTimingNotSupported, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
return;
}
var pageViewSent = false;
var customDuration;
// if the performance timing is supported by the browser, calculate the custom duration
var start = pageViewPerformanceManager.getPerformanceTiming().navigationStart;
customDuration = DateTimeUtils.GetDuration(start, +new Date);
if (!pageViewPerformanceManager.shouldCollectDuration(customDuration)) {
customDuration = undefined;
}
// if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if
// overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier
var duration;
if (!isNullOrUndefined(customProperties) &&
!isNullOrUndefined(customProperties.duration)) {
duration = customProperties.duration;
}
if (overridePageViewDuration || !isNaN(duration)) {
if (isNaN(duration)) {
// case 3
if (!customProperties) {
customProperties = {};
}
customProperties["duration"] = customDuration;
_this.appInsights.sendPageViewInternal(pageView, customProperties);
CoreUtils.arrForEach(_this._channel(), function (queues) { CoreUtils.arrForEach(queues, function (q) { return q.flush(true); }); });
}
else {
if (!pageViewSent) {
customProperties["duration"] = pageViewPerformance.durationMs;
_this.appInsights.sendPageViewInternal(pageView, customProperties);
// case 2
appInsights.sendPageViewInternal(pageView, customProperties);
_flushChannels();
pageViewSent = true;
}
// now try to send the page view performance telemetry
var maxDurationLimit = 60000;
if (!customProperties) {
customProperties = {};
}
// Queue the event for processing
_addQueue(function () {
var processed = false;
try {
if (pageViewPerformanceManager.isPerformanceTimingDataReady()) {
processed = true;
var pageViewPerformance = {
name: name,
uri: uri
};
pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);
if (!pageViewPerformance.isValid && !pageViewSent) {
// If navigation timing gives invalid numbers, then go back to "override page view duration" mode.
// That's the best value we can get that makes sense.
customProperties["duration"] = customDuration;
appInsights.sendPageViewInternal(pageView, customProperties);
}
else {
if (!pageViewSent) {
customProperties["duration"] = pageViewPerformance.durationMs;
appInsights.sendPageViewInternal(pageView, customProperties);
}
if (!pageViewPerformanceSent) {
appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);
pageViewPerformanceSent = true;
}
}
}
if (!_this.pageViewPerformanceSent) {
_this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);
_this.pageViewPerformanceSent = true;
else if (DateTimeUtils.GetDuration(start, +new Date) > maxDurationLimit) {
// if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry
// with the maximum duration limit. Otherwise, keep waiting until performance timings are ready
processed = true;
if (!pageViewSent) {
customProperties["duration"] = maxDurationLimit;
appInsights.sendPageViewInternal(pageView, customProperties);
}
}
CoreUtils.arrForEach(_this._channel(), function (queues) { CoreUtils.arrForEach(queues, function (q) { return q.flush(true); }); });
}
}
else if (DateTimeUtils.GetDuration(start, +new Date) > maxDurationLimit) {
// if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry
// with the maximum duration limit. Otherwise, keep waiting until performance timings are ready
clearInterval(handle);
if (!pageViewSent) {
customProperties["duration"] = maxDurationLimit;
_this.appInsights.sendPageViewInternal(pageView, customProperties);
CoreUtils.arrForEach(_this._channel(), function (queues) { CoreUtils.arrForEach(queues, function (q) { return q.flush(true); }); });
catch (e) {
_logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailedCalc, "trackPageView failed on page load calculation: " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
}
catch (e) {
_this._logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TrackPVFailedCalc, "trackPageView failed on page load calculation: " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}), 100);
};
return processed;
});
};
});
}
// Removed Stub for PageViewManager.prototype.trackPageView.
return PageViewManager;

@@ -131,0 +160,0 @@ }());

@@ -1,3 +0,5 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
import { Util, DateTimeUtils } from '@microsoft/applicationinsights-common';

@@ -4,0 +6,0 @@ import { LoggingSeverity, _InternalMessageId, getNavigator, getPerformance } from '@microsoft/applicationinsights-core-js';

@@ -1,3 +0,5 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
import { Util } from '@microsoft/applicationinsights-common';

@@ -4,0 +6,0 @@ import { hasJSON, getJSON } from '@microsoft/applicationinsights-core-js';

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.4.4
* Application Insights JavaScript SDK - Web Analytics, 2.5.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var l=2,u="undefined",g="object",f="window",p="location",h="JSON";function m(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function v(e){var t=m();return t&&t[e]?t[e]:e===f&&y()?window:null}function y(){return Boolean(typeof window===g&&window)}function T(){return y()?window:v(f)}function I(){return function e(){return Boolean(typeof document===g&&document)}()?document:v("document")}function S(){return function e(){return Boolean(typeof navigator===g&&navigator)}()?navigator:v("navigator")}function w(){return function e(){return Boolean(typeof history===g&&history)}()?history:v("history")}function _(){return typeof location===g&&location?location:v(p)}function N(){return v("performance")}function x(){return Boolean(typeof JSON===g&&JSON||null!==v(h))}function E(){return x()?JSON||v(h):null}var b=u,D="prototype",C="attachEvent",P="addEventListener",k="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,b)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[D].hasOwnProperty.call(e,t)}function R(e){return A(e,"object")}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[P])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[P](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[k])||e[k]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[D].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[D]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=T();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=I();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,Y=4,$=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,le=35,ue=36,ge=37,fe=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Ie=61,Te=62,Se=63,we=64,_e=66,Ne=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";x()&&(i=E().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(Pe.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Pe.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},Pe.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Pe.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Pe.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Pe);function Pe(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var ke=j.isFunction,Le=function Yn(i,a){var o=this,s=null,c=ke(i.processTelemetry),l=ke(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),l&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function $n(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new $n(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function Ye(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var $e,Ze=(t(et,$e=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){$e.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return Ye(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),Ye(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==$e&&$e.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],l)};function ct(){return st.call(this)||this}var lt=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=ut.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(a);i=o}return i},ut.sanitizeKey=function(e,t){var n;return t&&(t=ut.trim(t.toString())).length>ut.MAX_NAME_LENGTH&&(n=t.substring(0,ut.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+ut.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},ut.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=ut.MAX_STRING_LENGTH),t&&(n=n||ut.MAX_STRING_LENGTH,(t=ut.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Ie,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},ut.sanitizeUrl=function(e,t){return ut.sanitizeInput(e,t,ut.MAX_URL_LENGTH,_e)},ut.sanitizeMessage=function(e,t){var n;return t&&t.length>ut.MAX_MESSAGE_LENGTH&&(n=t.substring(0,ut.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+ut.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},ut.sanitizeException=function(e,t){var n;return t&&t.length>ut.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,ut.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&x())try{i=E().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=ut.sanitizeString(e,i,ut.MAX_PROPERTY_LENGTH),n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=ut.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},ut.sanitizeId=function(e,t){return t?ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,xe).toString():t},ut.sanitizeInput=function(e,t,n,r){var i;return t&&(t=ut.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},ut.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},ut.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},ut.MAX_NAME_LENGTH=150,ut.MAX_ID_LENGTH=128,ut.MAX_PROPERTY_LENGTH=8192,ut.MAX_STRING_LENGTH=1024,ut.MAX_URL_LENGTH=2048,ut.MAX_MESSAGE_LENGTH=32768,ut.MAX_EXCEPTION_LENGTH=32768,ut);function ut(){}var gt="prototype",ft=S(),pt=j.isString,dt=null;var ht=(mt.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=I();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},mt.disableStorage=function(){mt._canUseLocalStorage=!1,mt._canUseSessionStorage=!1},mt._getLocalStorageObject=function(){return mt.canUseLocalStorage()?mt._getVerifiedStorageObject(a.LocalStorage):null},mt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(m()))return null;n=new Date,(r=e===a.LocalStorage?v("localStorage"):v("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},mt.isInternalApplicationInsightsEndpoint=function(e){return-1!==mt._internalEndpoints.indexOf(e.toLowerCase())},mt.canUseLocalStorage=function(){return mt._canUseLocalStorage===undefined&&(mt._canUseLocalStorage=!!mt._getVerifiedStorageObject(a.LocalStorage)),mt._canUseLocalStorage},mt.getStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setStorage=function(e,t,n){var r=mt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeStorage=function(e,t){var n=mt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseLocalStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed removal of local storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt._getSessionStorageObject=function(){return mt.canUseSessionStorage()?mt._getVerifiedStorageObject(a.SessionStorage):null},mt.canUseSessionStorage=function(){return mt._canUseSessionStorage===undefined&&(mt._canUseSessionStorage=!!mt._getVerifiedStorageObject(a.SessionStorage)),mt._canUseSessionStorage},mt.getSessionStorageKeys=function(){var e=[];if(mt.canUseSessionStorage())for(var t in v("sessionStorage"))e.push(t);return e},mt.getSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return null},mt.setSessionStorage=function(e,t,n){var r=mt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed write to session storage. "+mt.getExceptionName(i),{exception:mt.dump(i)})}return!1},mt.removeSessionStorage=function(e,t){var n=mt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){mt._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+mt.getExceptionName(r),{exception:mt.dump(r)})}return!1},mt.disableCookies=function(){j.disableCookies()},mt.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=mt.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,Ne,"Cannot access document.cookie - "+mt.getExceptionName(t),{exception:mt.dump(t)})}}return j._canUseCookies&&mt.document&&mt.document.cookie},mt.disallowsSameSiteNone=function(e){return!!pt(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},mt.setCookie=function(e,t,n,r){if(mt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=_();o&&"https:"===o.protocol&&(a=";secure",null===dt&&(dt=mt.disallowsSameSiteNone((S()||{}).userAgent)),dt||(n+=";SameSite=None")),mt.document.cookie=t+"="+n+i+";path=/"+a}},mt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},mt.getCookie=function(e,t){if(mt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=mt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=mt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},mt.deleteCookie=function(e,t){mt.canUseCookies(e)&&(mt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},mt.trim=function(e){return pt(e)?e.replace(/^\s+|\s+$/g,""):e},mt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},mt.random32=function(){return 4294967296*Math.random()|0},mt.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=mt.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},mt.isArray=function(e){return"[object Array]"===Object[gt].toString.call(e)},mt.isError=function(e){return"[object Error]"===Object[gt].toString.call(e)},mt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},mt.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},mt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},mt.dump=function(e){var t=Object[gt].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":x()&&(n=E().stringify(e)),t+n},mt.getExceptionName=function(e){return"[object Error]"===Object[gt].toString.call(e)?e.name:""},mt.addEventHandler=function(e,t){return H.Attach(T(),e,t)},mt.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},mt.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},mt.document=I()||{},mt._canUseLocalStorage=undefined,mt._canUseSessionStorage=undefined,mt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],mt.NotSpecified="not_specified",mt.isDate=j.isDate,mt.toISOStringForIE8=j.toISOString,mt);function mt(){}var vt=(yt.parseUrl=function(e){return yt.htmlAnchorElement||(yt.htmlAnchorElement=yt.document.createElement?yt.document.createElement("a"):{host:yt.parseHost(e)}),yt.htmlAnchorElement.href=e,yt.htmlAnchorElement},yt.getAbsoluteUrl=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.href),t},yt.getPathName=function(e){var t,n=yt.parseUrl(e);return n&&(t=n.pathname),t},yt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},yt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&pt(t[2])&&0<t[2].length)return t[2]}return null},yt.document=I()||{},yt);function yt(){}var It=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=vt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=lt.sanitizeString(e,n?n+" "+c:c)}else a=lt.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var St=(wt.Now=function(){var e=N();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},wt.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},wt);function wt(){}var _t,Nt=(t(xt,_t=function Zn(){}),xt);function xt(){return _t.call(this)||this}var Et;t(bt,Et=function er(){this.ver=1,this.sampleRate=100,this.tags={}});function bt(e,t,n){var r=Et.call(this)||this;return r.name=lt.sanitizeString(e,n)||ht.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var Dt,Ct=function tr(){},Pt=(t(kt,Dt=Ct),kt);function kt(){var e=Dt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt,At=(t(Mt,Lt=Pt),Mt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Mt.dataType="EventData",Mt);function Mt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=lt.sanitizeString(e,t)||ht.NotSpecified,i.properties=lt.sanitizeProperties(e,n),i.measurements=lt.sanitizeMeasurements(e,r),i}var Ot,Ut=function nr(){},Rt=(t(zt,Ot=Ct),zt);function zt(){var e=Ot.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Vt,Gt=function rr(){this.hasFullStack=!0,this.parsedStack=[]},jt=(t(qt,Vt=Rt),qt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new qt(t,c({},e,{exceptions:n}))},qt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},qt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},qt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",qt.dataType="ExceptionData",qt);function qt(e,t,n,r,i,a){var o=Vt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=lt.sanitizeProperties(e,n),o.measurements=lt.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var Bt,Ft=(t(Wt,Bt=Gt),Wt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.arrMap(this.parsedStack,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||undefined}},Wt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Xt.CreateFromInterface(e)})||t.parsedStack;return new Wt(e,c({},t,{parsedStack:n}))},Wt.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Xt.regex.test(o)){var s=new Xt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,l=t.length-1,u=0,g=c,f=l;c<l;){if(32768<(u+=t[c].sizeInBytes+t[l].sizeInBytes)){var p=f-g+1;t.splice(g,p);break}g=c,f=l,c++,l--}}return t},Wt);function Wt(e,t){var n=Bt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=lt.sanitizeString(e,t.name)||ht.NotSpecified,n.message=lt.sanitizeMessage(e,t.message)||ht.NotSpecified;var r=t.stack;n.parsedStack=Wt.parseStack(r),n.stack=lt.sanitizeException(e,r),n.hasFullStack=ht.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 Ht,Xt=(t(Kt,Ht=Ut),Kt.CreateFromInterface=function(e){return new Kt(e,null)},Kt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Kt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Kt.baseSize=58,Kt);function Kt(e,t){var n=Ht.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=ht.trim(r),n.fileName="",n.line=0;var i=r.match(Kt.regex);i&&5<=i.length&&(n.method=ht.trim(i[2])||n.method,n.fileName=ht.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Kt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Qt,Jt,Yt,$t=(t(Zt,Qt=Ct),Zt);function Zt(){var e=Qt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Yt=Jt=Jt||{})[Yt.Measurement=0]="Measurement",Yt[Yt.Aggregation=1]="Aggregation";var en,tn=(t(nn,en=function ir(){this.kind=Jt.Measurement}),nn);function nn(){var e=null!==en&&en.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var rn,an=(t(on,rn=$t),on.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",on.dataType="MetricData",on);function on(e,t,n,r,i,a,o,s){var c=rn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var l=new tn;return l.count=0<r?r:undefined,l.max=isNaN(a)||null===a?undefined:a,l.min=isNaN(i)||null===i?undefined:i,l.name=lt.sanitizeString(e,t)||ht.NotSpecified,l.value=n,c.metrics=[l],c.properties=lt.sanitizeProperties(e,o),c.measurements=lt.sanitizeMeasurements(e,s),c}var sn,cn=(t(ln,sn=Pt),ln);function ln(){var e=sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,gn=(t(fn,un=cn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=lt.sanitizeId(e,o),s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,isNaN(r)||(s.duration=ht.msToTimeSpan(r)),s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.sanitizeMeasurements(e,a),s}var pn,dn=(t(hn,pn=Ct),hn);function hn(){var e=pn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var mn,vn=(t(yn,mn=dn),yn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",yn.dataType="RemoteDependencyData",yn);function yn(e,t,n,r,i,a,o,s,c,l,u,g){void 0===c&&(c="Ajax");var f=mn.call(this)||this;f.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},f.id=t,f.duration=ht.msToTimeSpan(i),f.success=a,f.resultCode=o+"",f.type=lt.sanitizeString(e,c);var p=It.ParseDependencyPath(e,n,s,r);return f.data=lt.sanitizeUrl(e,r)||p.data,f.target=lt.sanitizeString(e,p.target),l&&(f.target=f.target+" | "+l),f.name=lt.sanitizeString(e,p.name),f.properties=lt.sanitizeProperties(e,u),f.measurements=lt.sanitizeMeasurements(e,g),f}var In,Tn=(t(Sn,In=Ct),Sn);function Sn(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var wn,_n=(t(Nn,wn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=wn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||ht.NotSpecified,a.message=lt.sanitizeMessage(e,t),a.properties=lt.sanitizeProperties(e,r),a.measurements=lt.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var xn,En=(t(bn,xn=cn),bn);function bn(){var e=xn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Dn,Cn=(t(Pn,Dn=En),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Pn.dataType="PageviewPerformanceData",Pn);function Pn(e,t,n,r,i,a,o){var s=Dn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=lt.sanitizeUrl(e,n),s.name=lt.sanitizeString(e,t)||ht.NotSpecified,s.properties=lt.sanitizeProperties(e,i),s.measurements=lt.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 kn,Ln,An;t(Mn,kn=Nt);function Mn(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(An=Ln=Ln||{})[An.Verbose=0]="Verbose",An[An.Information=1]="Information",An[An.Warning=2]="Warning",An[An.Error=3]="Error",An[An.Critical=4]="Critical";var On=(Un.create=function(e,t,n,r,i,a){if(n=lt.sanitizeString(r,n)||ht.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Un);function Un(){}var Rn=(zn.prototype.trackPageView=function(n,r){var i=this,a=n.name;if(j.isNullOrUndefined(a)||"string"!=typeof a){var e=I();a=n.name=e&&e.title||""}var o=n.uri;if(j.isNullOrUndefined(o)||"string"!=typeof o){var t=_();o=n.uri=t&&t.href||""}if(!this._pageViewPerformanceManager.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),void this._logger.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,c,l=!1,u=this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;s=St.GetDuration(u,+new Date),this._pageViewPerformanceManager.shouldCollectDuration(s)||(s=undefined),j.isNullOrUndefined(r)||j.isNullOrUndefined(r.duration)||(c=r.duration),!this.overridePageViewDuration&&isNaN(c)||(isNaN(c)&&((r=r||{}).duration=s),this.appInsights.sendPageViewInternal(n,r),j.arrForEach(this._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}),l=!0),r=r||{};var g=setInterval(function(){try{if(i._pageViewPerformanceManager.isPerformanceTimingDataReady()){clearInterval(g);var e={name:a,uri:o};i._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),e.isValid||l?(l||(r.duration=e.durationMs,i.appInsights.sendPageViewInternal(n,r)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,r),i.pageViewPerformanceSent=!0),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})):(r.duration=s,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})}))}else 6e4<St.GetDuration(u,+new Date)&&(clearInterval(g),l||(r.duration=6e4,i.appInsights.sendPageViewInternal(n,r),j.arrForEach(i._channel(),function(e){j.arrForEach(e,function(e){return e.flush(!0)})})))}catch(t){i._logger.throwInternal(B.CRITICAL,fe,"trackPageView failed on page load calculation: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},100)},zn);function zn(e,t,n,r){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,this._pageViewPerformanceManager=r,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}var Vn=(Gn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+ht.dump(r))}},Gn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+ht.dump(r)),null}},Gn.prototype.startPageVisitTimer=function(e,t){try{if(ht.canUseSessionStorage()){if(null!=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new jn(e,t),r=E().stringify(n);ht.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+ht.dump(i))}},Gn.prototype.stopPageVisitTimer=function(){try{if(ht.canUseSessionStorage()){var e=Date.now(),t=ht.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&x()){var n=E().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,ht.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+ht.dump(r)),null}},Gn);function Gn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var jn=function ar(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},qn=(Bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=St.GetDuration(t.startTime,t.connectEnd),a=St.GetDuration(t.requestStart,t.responseStart),o=St.GetDuration(t.responseStart,t.responseEnd),s=St.GetDuration(t.responseEnd,t.loadEventEnd);else r=St.GetDuration(n.navigationStart,n.loadEventEnd),i=St.GetDuration(n.navigationStart,n.connectEnd),a=St.GetDuration(n.requestStart,n.responseStart),o=St.GetDuration(n.responseStart,n.responseEnd),s=St.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=ht.msToTimeSpan(r),e.networkConnect=ht.msToTimeSpan(i),e.sentRequest=ht.msToTimeSpan(a),e.receivedResponse=ht.msToTimeSpan(o),e.domProcessing=ht.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},Bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?N().timing:null},Bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?N().getEntriesByType("navigation")[0]:null},Bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=N();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},Bn.prototype.isPerformanceTimingSupported=function(){var e=N();return e&&e.timing},Bn.prototype.isPerformanceTimingDataReady=function(){var e=N(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},Bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(S()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},Bn);function Bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Fn="duration";function Wn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var Hn,Xn=(t(Kn,Hn=ze),Kn.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=ht.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=ht.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=ht.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=ht.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=ht.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=ht.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=ht.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=ht.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Kn.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+ht.getExceptionName(o),{exception:ht.dump(o)},!0)}}n||this.processNext(e,t)},Kn.prototype.trackEvent=function(e,t){try{var n=On.create(e,At.dataType,At.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+ht.getExceptionName(t),{exception:ht.dump(t)})}},Kn.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackTrace=function(e,t){try{var n=On.create(e,_n.dataType,_n.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackMetric=function(e,t){try{var n=On.create(e,an.dataType,an.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ue,"trackMetric failed, metric will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageView failed, page view will not be collected: "+ht.getExceptionName(r),{exception:ht.dump(r)})}},Kn.prototype.sendPageViewInternal=function(e,t,n){var r=I();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=On.create(e,gn.dataType,gn.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Kn.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=On.create(e,Cn.dataType,Cn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Kn.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ge,"trackPageViewPerformance failed, page view will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=I();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=I();e=i&&i.title||""}if("string"!=typeof t){var a=_();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+ht.getExceptionName(o),{exception:ht.dump(o)})}},Kn.prototype.sendExceptionInternal=function(e,t,n){var r=new jt(this.diagLog(),e.exception||new Error(ht.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=On.create(r,jt.dataType,jt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Kn.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,le,"trackException failed, exception will not be collected: "+ht.getExceptionName(n),{exception:ht.dump(n)})}},Kn.prototype._onerror=function(e){try{var t={url:e&&e.url||(I()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(ht.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!ht.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Ln.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+ht.getExceptionName(i),{exception:ht.dump(i),errorString:r})}},Kn.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");Hn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Kn.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&ht.disableCookies(),this.config.isStorageUseDisabled&&ht.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new qn(this.core),this._pageViewManager=new Rn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new Vn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Qn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Fn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Qn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[Fn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a)};var u,g,f=T(),p=w(),d=_(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var m=f.onerror;f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var v="onunhandledrejection",y=f[v];f[v]=function(e){var t=y&&y.call(f,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&f&&"undefined"!=typeof Event){var I=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(g=p.pushState,function(){var e=g.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"pushState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),p.replaceState=(u=p.replaceState,function(){var e=u.apply(this,arguments);return Wn(f,ht.createDomEvent(I.config.namePrefix+"replaceState")),Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange")),e}),f.addEventListener&&(f.addEventListener(I.config.namePrefix+"popstate",function(){Wn(f,ht.createDomEvent(I.config.namePrefix+"locationchange"))}),f.addEventListener(I.config.namePrefix+"locationchange",function(){I._properties&&I._properties.context&&I._properties.context.telemetryTrace&&(I._properties.context.telemetryTrace.traceID=ht.generateW3CId(),I._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){I.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),I.autoRoutePVDelay)}))}this.setInitialized(!0)}},Kn.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Kn.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===vn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},Kn.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Kn.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=On.create(t,jt.dataType,jt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Kn.Version="2.4.4",Kn);function Kn(){var e=Hn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=_();return e._prevUri=t&&t.href||"",e}var Qn=(Jn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Te,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Jn.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=St.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},Jn);function Jn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=Xn,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if("object"!=n&&"function"!=n)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r.prototype=e,new r}(t):(n.prototype=t.prototype,new n)}var a,n,d,i,o,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};(n=a=a||{})[n.LocalStorage=0]="LocalStorage",n[n.SessionStorage=1]="SessionStorage",(i=d=d||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(s=o=o||{})[s.AI=0]="AI",s[s.AI_AND_W3C=1]="AI_AND_W3C",s[s.W3C=2]="W3C";var u=2,l="undefined",f="object",g="prototype",p="window",h="document",m="location",v="JSON";function y(){return typeof globalThis!==l&&globalThis?globalThis:typeof self!==l&&self?self:typeof window!==l&&window?window:typeof global!==l&&global?global:null}function T(e){var t=y();return t&&t[e]?t[e]:e===p&&I()?window:null}function I(){return Boolean(typeof window===f&&window)}function S(){return I()?window:T(p)}function w(){return function e(){return Boolean(typeof document===f&&document)}()?document:T(h)}function N(){return function e(){return Boolean(typeof navigator===f&&navigator)}()?navigator:T("navigator")}function _(){return function e(){return Boolean(typeof history===f&&history)}()?history:T("history")}function x(){return typeof location===f&&location?location:T(m)}function E(){return T("performance")}function b(){return Boolean(typeof JSON===f&&JSON||null!==T(v))}function D(){return b()?JSON||T(v):null}var C="attachEvent",k="addEventListener",P="detachEvent",L="removeEventListener";function A(e,t){return typeof e===t}function M(e){return e===undefined||A(e,l)}function O(e){return M(e)||null===e}function U(e,t){return e&&Object[g].hasOwnProperty.call(e,t)}function R(e){return A(e,f)}function z(e){return A(e,"function")}function V(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!O(e))try{O(e[k])?O(e[C])||(e[C]("on"+t,n),i=!0):(e[k](t,n,r),i=!0)}catch(a){}return i}function G(e,t,n,r){if(void 0===r&&(r=!1),!O(e))try{O(e[L])?O(e[P])||e[P]("on"+t,n):e[L](t,n,r)}catch(i){}}var j=(q.isDate=function(e){return"[object Date]"===Object[g].toString.call(e)},q.isString=function(e){return A(e,"string")},q.isNumber=function(e){return A(e,"number")},q.isBoolean=function(e){return A(e,"boolean")},q.disableCookies=function(){q._canUseCookies=!1},q.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},q.toISOString=function(e){if(q.isDate(e)){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},q.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;++i)i in e&&t.call(n||e,e[i],i,e)},q.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},q.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=new Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},q.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},q.objCreate=function(e){if(null==e)return{};if(!R(e)&&!z(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[g]=e,new t},q.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(z(e)||R(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)U(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)U(e,i[o])&&n.push(i[o]);return n},q.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},q.addEventHandler=function(e,t){var n=!1,r=S();r&&(n=V(r,e,t),n=V(r.body,e,t)||n);var i=w();return i&&(n=H.Attach(i,e,t)||n),n},q.isTypeof=A,q.isUndefined=M,q.isNullOrUndefined=O,q.hasOwnProperty=U,q.isFunction=z,q.isObject=R,q);function q(){}var B,F,W=/[xy]/g,H=(X.Attach=V,X.AttachEvent=V,X.Detach=G,X.DetachEvent=G,X);function X(){}(F=B=B||{})[F.CRITICAL=1]="CRITICAL",F[F.WARNING=2]="WARNING";var K=1,Q=2,J=3,$=4,Y=5,Z=6,ee=8,te=10,ne=11,re=23,ie=25,ae=29,oe=30,se=31,ce=32,ue=35,le=36,fe=37,ge=38,pe=39,de=45,he=49,me=52,ve=56,ye=57,Te=61,Ie=62,Se=63,we=64,Ne=66,_e=68,xe=69,Ee=73,be=(De.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},De.dataType="MessageData",De.AiNonUserActionablePrefix="AI (Internal): ",De.AiUserActionablePrefix="AI: ",De);function De(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?De.AiUserActionablePrefix:De.AiNonUserActionablePrefix)+e;var i="";b()&&(i=D().stringify(r));var a=(t?" message:"+De.sanitizeDiagnosticText(t):"")+(r?" props:"+De.sanitizeDiagnosticText(i):"");this.message+=a}var Ce=(ke.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new be(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!j.isUndefined(a)&&a&&!j.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=B.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=B.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},ke.prototype.warnToConsole=function(e){!j.isUndefined(console)&&console&&(j.isFunction(console.warn)?console.warn(e):j.isFunction(console.log)&&console.log(e))},ke.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},ke.prototype.logInternalMessage=function(e,t){var n=this;if(!n._areInternalMessagesThrottled()){var r=!0,i=n.AIInternalMessagePrefix+t.messageId;if(n._messageLogged[i]?r=!1:n._messageLogged[i]=!0,r&&(e<=n.telemetryLoggingLevel()&&(n.queue.push(t),n._messageCount++),n._messageCount===n.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",o=new be(re,a,!1);n.queue.push(o),n.warnToConsole(a)}}},ke.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},ke);function ke(e){this.queue=[],this.AIInternalMessagePrefix="AITR_",this._messageCount=0,this._messageLogged={},this.enableDebugExceptions=function(){return!1},this.consoleLoggingLevel=function(){return 0},this.telemetryLoggingLevel=function(){return 1},this.maxInternalMessageLimit=function(){return 25},j.isNullOrUndefined(e)||(j.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),j.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),j.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),j.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Pe=j.isFunction,Le=function dr(i,a){var o=this,s=null,c=Pe(i.processTelemetry),u=Pe(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return s},o.setNext=function(e){s=e},o.processTelemetry=function(e,t){if(t=t||a,i&&c){o._hasRun=!0;try{t.setNext(s),u&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(B.CRITICAL,Ee,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},Ae=j.isNullOrUndefined;function Me(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];if(a&&j.isFunction(a.processTelemetry)){var o=new Le(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var Oe=function hr(e,a,n,t){var o=this,r=null;null!==t&&(e&&j.isFunction(e.getPlugin)?r=function s(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Me(r,t)}(e,o,t||e.getPlugin()):t?r=function c(e,t,n){var r=e,i=!1;return n&&e&&(r=[],j.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Me(r,t)}(e,o,t):j.isUndefined(t)&&(r=Me(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Ce(a||{})},o.getCfg=function(){return a},o.getExtCfg=function(e,t){var n;if(void 0===t&&(t={}),a){var r=a.extensionConfig;r&&e&&(n=r[e])}return n||t},o.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=o.getExtCfg(e,null);return i&&!Ae(i[t])?r=i[t]:a&&!Ae(a[t])&&(r=a[t]),Ae(r)?n:r},o.hasNext=function(){return null!=r},o.getNext=function(){return r},o.setNext=function(e){r=e},o.processNext=function(e){var t=r;t&&(r=t.getNext(),t.processTelemetry(e,o))},o.createNew=function(e,t){return void 0===e&&(e=null),new hr(e||r,a,n,t)}},Ue=j.isFunction,Re="getPlugin",ze=(Ve.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ve);function Ve(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ue(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new Oe(null,{},a.core);t=c&&c[Re]?n.createNew(null,c[Re]):n.createNew(null,c)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Re]&&(i=c[Re]()),a.core=t,s=new Oe(r,e,t,i),o=!0}}var Ge=j.isFunction,je="processTelemetry",qe="priority",Be="setNextPlugin",Fe="isInitialized";function We(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ge(r[Be])&&Ge(a[je])&&r[Be](a),Ge(a[Fe])&&a[Fe]()||e.push(a),r=a,i=i.getNext())}j.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function He(e){return e.sort(function(e,t){var n=0,r=Ge(t[je]);return Ge(e[je])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var Xe=500,Ke="Channel has invalid priority",Qe=j.arrForEach,Je=j.objDefineAccessors;function $e(e,t){t&&0<t.length&&(function n(e){Qe(e,function(e){if(e.priority<Xe)throw Error(Ke+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Ye,Ze=(t(et,Ye=ze),et.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Qe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},et.prototype.getChannelControls=function(){return this._channelQueue},et.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Ye.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&j.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Qe(e,function(e){return $e(n,e)}),t){var r=[];Qe(t,function(e){e.priority>Xe&&r.push(e)}),$e(n,r)}return n}((t||{}).channels,r);Qe(e,function(e){return We(new Oe(e,t,n),r)})}},et._staticInit=(Je(et.prototype,"ChannelControls",et.prototype.getChannelControls),void Je(et.prototype,"channelQueue",et.prototype.getChannelControls)),et);function et(){var e=null!==Ye&&Ye.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=Xe,e}var tt=j.arrForEach,nt=j.isNullOrUndefined,rt=(it.prototype.initialize=function(e,t,r,n){var i=this;if(i.isInitialized())throw Error("Core should not be initialized more than once");if(!e||nt(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||j.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=nt(e.extensions)?[]:e.extensions,(e.extensionConfig=nt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||j.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),i.logger=r;var o=[];o.push.apply(o,t.concat(e.extensions)),o=He(o);var s=[],c={};if(tt(o,function(e){if(nt(e)||nt(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(nt(c[t])?c[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+c[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=He(o),i._extensions=o,We(new Oe([a],e,i),o),We(new Oe(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},it.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},it.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=j.toISOString(new Date)),nt(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(tt(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},it.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new Oe(t,this.config,this)},it);function it(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ze,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var at=(ot.prototype.addNotificationListener=function(e){this.listeners.push(e)},ot.prototype.removeNotificationListener=function(e){for(var t=j.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=j.arrIndexOf(this.listeners,e)},ot.prototype.eventsSent=function(t){for(var n=this,e=function(e){r.listeners[e].eventsSent&&setTimeout(function(){return n.listeners[e].eventsSent(t)},0)},r=this,i=0;i<this.listeners.length;++i)e(i)},ot.prototype.eventsDiscarded=function(t,n){for(var r=this,e=function(e){i.listeners[e].eventsDiscarded&&setTimeout(function(){return r.listeners[e].eventsDiscarded(t,n)},0)},i=this,a=0;a<this.listeners.length;++a)e(a)},ot);function ot(){this.listeners=[]}var st;t(ct,st=rt),ct.prototype.initialize=function(e,t){var n=this;n._notificationManager=new at,n.logger=new Ce(e),n.config=e,st.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},ct.prototype.getTransmissionControls=function(){return st.prototype.getTransmissionControls.call(this)},ct.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),st.prototype.track.call(this,e)},ct.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},ct.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},ct.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return 0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];j.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:j.toISOString(new Date),baseType:be.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},ct.prototype._validateTelemetryItem=function(e){if(j.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},ct.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function ct(){return st.call(this)||this}var ut=(lt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=lt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,lt.MAX_NAME_LENGTH-3)+lt.padNumber(a);i=o}return i},lt.sanitizeKey=function(e,t){var n;return t&&(t=lt.trim(t.toString())).length>lt.MAX_NAME_LENGTH&&(n=t.substring(0,lt.MAX_NAME_LENGTH),e.throwInternal(B.WARNING,ye,"name is too long. It has been truncated to "+lt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},lt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=lt.MAX_STRING_LENGTH),t&&(n=n||lt.MAX_STRING_LENGTH,(t=lt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(B.WARNING,Te,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},lt.sanitizeUrl=function(e,t){return lt.sanitizeInput(e,t,lt.MAX_URL_LENGTH,Ne)},lt.sanitizeMessage=function(e,t){var n;return t&&t.length>lt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,lt.MAX_MESSAGE_LENGTH),e.throwInternal(B.WARNING,ve,"message is too long, it has been truncated to "+lt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},lt.sanitizeException=function(e,t){var n;return t&&t.length>lt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,lt.MAX_EXCEPTION_LENGTH),e.throwInternal(B.WARNING,me,"exception is too long, it has been truncated to "+lt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},lt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(j.isObject(i)&&b())try{i=D().stringify(i)}catch(a){e.throwInternal(B.WARNING,he,"custom property is not valid",{exception:a},!0)}i=lt.sanitizeString(e,i,lt.MAX_PROPERTY_LENGTH),n[r=lt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},lt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=lt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},lt.sanitizeId=function(e,t){return t?lt.sanitizeInput(e,t,lt.MAX_ID_LENGTH,xe).toString():t},lt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=lt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(B.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},lt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},lt.trim=function(e){return j.isString(e)?e.replace(/^\s+|\s+$/g,""):e},lt.MAX_NAME_LENGTH=150,lt.MAX_ID_LENGTH=128,lt.MAX_PROPERTY_LENGTH=8192,lt.MAX_STRING_LENGTH=1024,lt.MAX_URL_LENGTH=2048,lt.MAX_MESSAGE_LENGTH=32768,lt.MAX_EXCEPTION_LENGTH=32768,lt);function lt(){}var ft=N(),gt=j.isString,pt=null;var dt=(ht.createDomEvent=function(e){var t=null;if(j.isFunction(Event))t=new Event(e);else{var n=w();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},ht.disableStorage=function(){ht._canUseLocalStorage=!1,ht._canUseSessionStorage=!1},ht._getLocalStorageObject=function(){return ht.canUseLocalStorage()?ht._getVerifiedStorageObject(a.LocalStorage):null},ht._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(j.isNullOrUndefined(y()))return null;n=new Date,(r=e===a.LocalStorage?T("localStorage"):T("sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ht.isInternalApplicationInsightsEndpoint=function(e){return-1!==ht._internalEndpoints.indexOf(e.toLowerCase())},ht.canUseLocalStorage=function(){return ht._canUseLocalStorage===undefined&&(ht._canUseLocalStorage=!!ht._getVerifiedStorageObject(a.LocalStorage)),ht._canUseLocalStorage},ht.getStorage=function(e,t){var n=ht._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,K,"Browser failed read of local storage. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return null},ht.setStorage=function(e,t,n){var r=ht._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,J,"Browser failed write to local storage. "+ht.getExceptionName(i),{exception:ht.dump(i)})}return!1},ht.removeStorage=function(e,t){var n=ht._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht._canUseLocalStorage=!1,e.throwInternal(B.WARNING,Y,"Browser failed removal of local storage item. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return!1},ht._getSessionStorageObject=function(){return ht.canUseSessionStorage()?ht._getVerifiedStorageObject(a.SessionStorage):null},ht.canUseSessionStorage=function(){return ht._canUseSessionStorage===undefined&&(ht._canUseSessionStorage=!!ht._getVerifiedStorageObject(a.SessionStorage)),ht._canUseSessionStorage},ht.getSessionStorageKeys=function(){var e=[];if(ht.canUseSessionStorage())for(var t in T("sessionStorage"))e.push(t);return e},ht.getSessionStorage=function(e,t){var n=ht._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Q,"Browser failed read of session storage. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return null},ht.setSessionStorage=function(e,t,n){var r=ht._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,$,"Browser failed write to session storage. "+ht.getExceptionName(i),{exception:ht.dump(i)})}return!1},ht.removeSessionStorage=function(e,t){var n=ht._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht._canUseSessionStorage=!1,e.throwInternal(B.WARNING,Z,"Browser failed removal of session storage item. "+ht.getExceptionName(r),{exception:ht.dump(r)})}return!1},ht.disableCookies=function(){j.disableCookies()},ht.canUseCookies=function(e){if(j._canUseCookies===undefined){j._canUseCookies=!1;try{j._canUseCookies=ht.document.cookie!==undefined}catch(t){e.throwInternal(B.WARNING,_e,"Cannot access document.cookie - "+ht.getExceptionName(t),{exception:ht.dump(t)})}}return j._canUseCookies},ht.disallowsSameSiteNone=function(e){return!!gt(e)&&(-1!==e.indexOf("CPU iPhone OS 12")||-1!==e.indexOf("iPad; CPU OS 12")||-1!==e.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==e.indexOf("Version/")&&-1!==e.indexOf("Safari")||!(-1===e.indexOf("Macintosh; Intel Mac OS X 10_14")||!function i(e,t){var n=e.length,r=n-t.length;return e.substring(0<=r?r:0,n)===t}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))||-1!==e.indexOf("Chrome/5")||-1!==e.indexOf("Chrome/6")||-1!==e.indexOf("UnrealEngine")&&-1===e.indexOf("Chrome")||-1!==e.indexOf("UCBrowser/12")||-1!==e.indexOf("UCBrowser/11"))},ht.setCookie=function(e,t,n,r){if(ht.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=x();o&&"https:"===o.protocol&&(a=";secure",null===pt&&(pt=ht.disallowsSameSiteNone((N()||{}).userAgent)),pt||(n+=";SameSite=None")),ht.document.cookie=t+"="+n+i+";path=/"+a}},ht.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},ht.getCookie=function(e,t){if(ht.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ht.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ht.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ht.deleteCookie=function(e,t){ht.canUseCookies(e)&&(ht.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ht.trim=function(e){return gt(e)?e.replace(/^\s+|\s+$/g,""):e},ht.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},ht.random32=function(){return 4294967296*Math.random()|0},ht.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ht.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ht.isArray=function(e){return"[object Array]"===Object[g].toString.call(e)},ht.isError=function(e){return"[object Error]"===Object[g].toString.call(e)},ht.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ft?(ft.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},ht.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r,(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ht.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ht.dump=function(e){var t=Object[g].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":b()&&(n=D().stringify(e)),t+n},ht.getExceptionName=function(e){return"[object Error]"===Object[g].toString.call(e)?e.name:""},ht.addEventHandler=function(e,t){return H.Attach(S(),e,t)},ht.IsBeaconApiSupported=function(){return"sendBeacon"in ft&&ft.sendBeacon},ht.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ht.document=w()||{},ht._canUseLocalStorage=undefined,ht._canUseSessionStorage=undefined,ht._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ht.NotSpecified="not_specified",ht.isDate=j.isDate,ht.toISOStringForIE8=j.toISOString,ht);function ht(){}var mt=(vt.parseUrl=function(e){return vt.htmlAnchorElement||(vt.htmlAnchorElement=vt.document.createElement?vt.document.createElement("a"):{host:vt.parseHost(e)}),vt.htmlAnchorElement.href=e,vt.htmlAnchorElement},vt.getAbsoluteUrl=function(e){var t,n=vt.parseUrl(e);return n&&(t=n.href),t},vt.getPathName=function(e){var t,n=vt.parseUrl(e);return n&&(t=n.pathname),t},vt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},vt.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&gt(t[2])&&0<t[2].length)return t[2]}return null},vt.document=w()||{},vt);function vt(){}var yt=(Tt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=mt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var c=0===s.pathname.length?"/":s.pathname;"/"!==c.charAt(0)&&(c="/"+c),o=s.pathname,a=ut.sanitizeString(e,n?n+" "+c:c)}else a=ut.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},Tt);function Tt(){}var It=(St.Now=function(){var e=E();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},St.GetDuration=function(e,t){var n=null;return 0===e||0===t||j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||(n=t-e),n},St);function St(){}var wt,Nt=(t(_t,wt=function mr(){}),_t);function _t(){return wt.call(this)||this}var xt;t(Et,xt=function vr(){this.ver=1,this.sampleRate=100,this.tags={}});function Et(e,t,n){var r=xt.call(this)||this;return r.name=ut.sanitizeString(e,n)||dt.NotSpecified,r.data=t,r.time=j.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r}var bt,Dt=function yr(){},Ct=(t(kt,bt=Dt),kt);function kt(){var e=bt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Pt,Lt=(t(At,Pt=Ct),At.envelopeType="Microsoft.ApplicationInsights.{0}.Event",At.dataType="EventData",At);function At(e,t,n,r){var i=Pt.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=ut.sanitizeString(e,t)||dt.NotSpecified,i.properties=ut.sanitizeProperties(e,n),i.measurements=ut.sanitizeMeasurements(e,r),i}var Mt,Ot=function Tr(){},Ut=(t(Rt,Mt=Dt),Rt);function Rt(){var e=Mt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var zt,Vt=function Ir(){this.hasFullStack=!0,this.parsedStack=[]},Gt=(t(jt,zt=Ut),jt.CreateFromInterface=function(t,e){var n=e.exceptions&&j.arrMap(e.exceptions,function(e){return Bt.CreateFromInterface(t,e)});return new jt(t,c({},e,{exceptions:n}))},jt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&j.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},jt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},jt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",jt.dataType="ExceptionData",jt);function jt(e,t,n,r,i,a){var o=zt.call(this)||this;return o.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},t instanceof Error?(o.exceptions=[new Bt(e,t)],o.properties=ut.sanitizeProperties(e,n),o.measurements=ut.sanitizeMeasurements(e,r),i&&(o.severityLevel=i),a&&(o.id=a)):(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,j.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var qt,Bt=(t(Ft,qt=Vt),Ft.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&j.arrMap(this.parsedStack,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||undefined}},Ft.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&j.arrMap(t.parsedStack,function(e){return Ht.CreateFromInterface(e)})||t.parsedStack;return new Ft(e,c({},t,{parsedStack:n}))},Ft.parseStack=function(e){var t;if(j.isString(e)){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var o=n[a];if(Ht.regex.test(o)){var s=new Ht(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var c=0,u=t.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var p=g-f+1;t.splice(f,p);break}f=c,g=u,c++,u--}}return t},Ft);function Ft(e,t){var n=qt.call(this)||this;if(n.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},t instanceof Error){n.typeName=ut.sanitizeString(e,t.name)||dt.NotSpecified,n.message=ut.sanitizeMessage(e,t.message)||dt.NotSpecified;var r=t.stack;n.parsedStack=Ft.parseStack(r),n.stack=ut.sanitizeException(e,r),n.hasFullStack=dt.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 Wt,Ht=(t(Xt,Wt=Ot),Xt.CreateFromInterface=function(e){return new Xt(e,null)},Xt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Xt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Xt.baseSize=58,Xt);function Xt(e,t){var n=Wt.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=dt.trim(r),n.fileName="",n.line=0;var i=r.match(Xt.regex);i&&5<=i.length&&(n.method=dt.trim(i[2])||n.method,n.fileName=dt.trim(i[4]),n.line=parseInt(i[5])||0)}else n.level=e.level,n.method=e.method,n.assembly=e.assembly,n.fileName=e.fileName,n.line=e.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=Xt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Kt,Qt,Jt,$t=(t(Yt,Kt=Dt),Yt);function Yt(){var e=Kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Jt=Qt=Qt||{})[Jt.Measurement=0]="Measurement",Jt[Jt.Aggregation=1]="Aggregation";var Zt,en=(t(tn,Zt=function Sr(){this.kind=Qt.Measurement}),tn);function tn(){var e=null!==Zt&&Zt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var nn,rn=(t(an,nn=$t),an.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",an.dataType="MetricData",an);function an(e,t,n,r,i,a,o,s){var c=nn.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new en;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ut.sanitizeString(e,t)||dt.NotSpecified,u.value=n,c.metrics=[u],c.properties=ut.sanitizeProperties(e,o),c.measurements=ut.sanitizeMeasurements(e,s),c}var on,sn=(t(cn,on=Ct),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(t(fn,un=sn),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",fn.dataType="PageviewData",fn);function fn(e,t,n,r,i,a,o){var s=un.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=ut.sanitizeId(e,o),s.url=ut.sanitizeUrl(e,n),s.name=ut.sanitizeString(e,t)||dt.NotSpecified,isNaN(r)||(s.duration=dt.msToTimeSpan(r)),s.properties=ut.sanitizeProperties(e,i),s.measurements=ut.sanitizeMeasurements(e,a),s}var gn,pn=(t(dn,gn=Dt),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var hn,mn=(t(vn,hn=pn),vn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",vn.dataType="RemoteDependencyData",vn);function vn(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=hn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=dt.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=ut.sanitizeString(e,c);var p=yt.ParseDependencyPath(e,n,s,r);return g.data=ut.sanitizeUrl(e,r)||p.data,g.target=ut.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=ut.sanitizeString(e,p.name),g.properties=ut.sanitizeProperties(e,l),g.measurements=ut.sanitizeMeasurements(e,f),g}var yn,Tn=(t(In,yn=Dt),In);function In(){var e=yn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Sn,wn=(t(Nn,Sn=Tn),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Nn.dataType="MessageData",Nn);function Nn(e,t,n,r,i){var a=Sn.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||dt.NotSpecified,a.message=ut.sanitizeMessage(e,t),a.properties=ut.sanitizeProperties(e,r),a.measurements=ut.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var _n,xn=(t(En,_n=sn),En);function En(){var e=_n.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var bn,Dn=(t(Cn,bn=xn),Cn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Cn.dataType="PageviewPerformanceData",Cn);function Cn(e,t,n,r,i,a,o){var s=bn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=ut.sanitizeUrl(e,n),s.name=ut.sanitizeString(e,t)||dt.NotSpecified,s.properties=ut.sanitizeProperties(e,i),s.measurements=ut.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 kn,Pn,Ln;t(An,kn=Nt);function An(e,t){var n=kn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n}(Ln=Pn=Pn||{})[Ln.Verbose=0]="Verbose",Ln[Ln.Information=1]="Information",Ln[Ln.Warning=2]="Warning",Ln[Ln.Error=3]="Error",Ln[Ln.Critical=4]="Critical";var Mn=(On.create=function(e,t,n,r,i,a){if(n=ut.sanitizeString(r,n)||dt.NotSpecified,j.isNullOrUndefined(e)||j.isNullOrUndefined(t)||j.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:j.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!j.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},On);function On(){}var Un="constructor",Rn="prototype",zn="function",Vn="getPrototypeOf",Gn="_dynInstFuncs",jn="_isDynProxy",qn="_dynClass",Bn="_dynCls$",Fn="_unknown_",Wn=0;function Hn(e,t){return e&&Object[Rn].hasOwnProperty.call(e,t)}function Xn(e){return typeof e===zn}function Kn(e){return e&&(e===Object[Rn]||e===Array[Rn])}function Qn(e){return Kn(e)||e===Function[Rn]}function Jn(e){if(e){if(Object[Vn])return Object[Vn](e);var t="__proto__";if(Kn(e[t]))return e[t];var n=e[Un];if(n)return n[Rn]}return null}function $n(e,t){return t!==Un&&Xn(e[t])&&Hn(e,t)}function Yn(e){throw new TypeError("DynamicProto: "+e)}function Zn(e,t){return Hn(e,Rn)?e.name||t||Fn:((e||{})[Un]||{}).name||t||Fn}function er(e,t,n){Hn(e,Rn)||Yn("theClass is an invalid class definition.");var r=e[Rn];!function o(e,t){for(var n=Jn(t);n&&!Qn(n);){if(n===e)return 1;n=Jn(n)}}(r,t)&&Yn("["+Zn(e)+"] is not in class heirarchy of ["+Zn(t)+"]");var i=null;Hn(r,qn)?i=r[qn]:(i=Bn+Zn(e,"_")+"$"+Wn,Wn++,r[qn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&$n(e,n)&&(t[n]=e[n]);return t}(t);n(t,function c(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=Jn(e);o&&!Qn(o);){for(var a in o)!i[a]&&$n(o,a)&&(i[a]=r(t,o[a]));o=Jn(o)}return i}(r,t,a)),function u(e,t,n,r){function i(n,r){var i=function(){if(this&&Hn(n,qn)){var e=((this[Gn]||{})[n[qn]]||{})[r];if(e)return e.apply(this,arguments);Yn("Missing ["+r+"] "+zn)}var t=n[r];return t===i&&(t=Jn(n)[r]),Xn(t)||Yn("["+r+"] is not a "+zn),t.apply(this,arguments)};return i[jn]=1,i}if(!Kn(e)){var a=n[Gn]=n[Gn]||{},o=a[t]=a[t]||{};for(var s in n)$n(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],Hn(e,s)&&(!e[s]||e[s][jn])||(e[s]=i(e,s)))}}(r,i,t,a)}var tr=function wr(y,T,t,I){er(wr,this,function(e){var f,g=j.arrForEach,p=j.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var a=r.name;if(p(a)||"string"!=typeof a){var e=w();a=r.name=e&&e.title||""}var o=r.uri;if(p(o)||"string"!=typeof o){var t=x();o=r.uri=t&&t.href||""}if(!I.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(B.WARNING,ie,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var s,n,c=!1,u=I.getPerformanceTiming().navigationStart;s=It.GetDuration(u,+new Date),I.shouldCollectDuration(s)||(s=undefined),p(i)||p(i.duration)||(n=i.duration),!T&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=s),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},function l(e){h.push(e),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}(function(){var e=!1;try{if(I.isPerformanceTimingDataReady()){e=!0;var t={name:a,uri:o};I.populatePageViewPerformanceEvent(t),t.isValid||c?(c||(i.duration=t.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(t,i),m=!0)):(i.duration=s,y.sendPageViewInternal(r,i))}else 6e4<It.GetDuration(u,+new Date)&&(e=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(B.CRITICAL,ge,"trackPageView failed on page load calculation: "+dt.getExceptionName(n),{exception:dt.dump(n)})}return e})}})},nr=(rr.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+dt.dump(r))}},rr.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+dt.dump(r)),null}},rr.prototype.startPageVisitTimer=function(e,t){try{if(dt.canUseSessionStorage()){if(null!=dt.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new ir(e,t),r=D().stringify(n);dt.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+dt.dump(i))}},rr.prototype.stopPageVisitTimer=function(){try{if(dt.canUseSessionStorage()){var e=Date.now(),t=dt.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&b()){var n=D().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,dt.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+dt.dump(r)),null}},rr);function rr(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var ir=function Nr(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},ar=(or.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(t||n){if(t)var r=t.duration,i=It.GetDuration(t.startTime,t.connectEnd),a=It.GetDuration(t.requestStart,t.responseStart),o=It.GetDuration(t.responseStart,t.responseEnd),s=It.GetDuration(t.responseEnd,t.loadEventEnd);else r=It.GetDuration(n.navigationStart,n.loadEventEnd),i=It.GetDuration(n.navigationStart,n.connectEnd),a=It.GetDuration(n.requestStart,n.responseStart),o=It.GetDuration(n.responseStart,n.responseEnd),s=It.GetDuration(n.responseEnd,n.loadEventEnd);0===r?this._logger.throwInternal(B.WARNING,te,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s}):this.shouldCollectDuration(r,i,a,o,s)?r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)?this._logger.throwInternal(B.WARNING,ee,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s}):(e.durationMs=r,e.perfTotal=e.duration=dt.msToTimeSpan(r),e.networkConnect=dt.msToTimeSpan(i),e.sentRequest=dt.msToTimeSpan(a),e.receivedResponse=dt.msToTimeSpan(o),e.domProcessing=dt.msToTimeSpan(s),e.isValid=!0):this._logger.throwInternal(B.WARNING,de,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}},or.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?E().timing:null},or.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?E().getEntriesByType("navigation")[0]:null},or.prototype.isPerformanceNavigationTimingSupported=function(){var e=E();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},or.prototype.isPerformanceTimingSupported=function(){var e=E();return e&&e.timing},or.prototype.isPerformanceTimingDataReady=function(){var e=E(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},or.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(N()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||-1!==r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},or);function or(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var sr="duration";function cr(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var ur,lr=(t(fr,ur=ze),fr.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=dt.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=dt.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=dt.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=dt.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=dt.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=dt.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=dt.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=dt.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},fr.prototype.processTelemetry=function(e,t){var n=!1,r=this._telemetryInitializers.length;t=this._getTelCtx(t);for(var i=0;i<r;++i){var a=this._telemetryInitializers[i];if(a)try{if(!1===a.apply(null,[e])){n=!0;break}}catch(o){t.diagLog().throwInternal(B.CRITICAL,we,"One of telemetry initializers failed, telemetry item will not be sent: "+dt.getExceptionName(o),{exception:dt.dump(o)},!0)}}n||this.processNext(e,t)},fr.prototype.trackEvent=function(e,t){try{var n=Mn.create(e,Lt.dataType,Lt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(B.CRITICAL,ae,"startTrackEvent failed, event will not be collected: "+dt.getExceptionName(t),{exception:dt.dump(t)})}},fr.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(B.CRITICAL,oe,"stopTrackEvent failed, event will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackTrace=function(e,t){try{var n=Mn.create(e,wn.dataType,wn.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.WARNING,pe,"trackTrace failed, trace will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackMetric=function(e,t){try{var n=Mn.create(e,rn.dataType,rn.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(B.CRITICAL,le,"trackMetric failed, metric will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,c({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(B.CRITICAL,fe,"trackPageView failed, page view will not be collected: "+dt.getExceptionName(r),{exception:dt.dump(r)})}},fr.prototype.sendPageViewInternal=function(e,t,n){var r=w();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Mn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},fr.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Mn.create(e,Dn.dataType,Dn.envelopeType,this.diagLog(),t,n);this.core.track(r)},fr.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,fe,"trackPageViewPerformance failed, page view will not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype.startTrackPage=function(e){try{if("string"!=typeof e){var t=w();e=t&&t.title||""}this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(B.CRITICAL,se,"startTrackPage failed, page view may not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype.stopTrackPage=function(e,t,n,r){try{if("string"!=typeof e){var i=w();e=i&&i.title||""}if("string"!=typeof t){var a=x();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(B.CRITICAL,ce,"stopTrackPage failed, page view will not be collected: "+dt.getExceptionName(o),{exception:dt.dump(o)})}},fr.prototype.sendExceptionInternal=function(e,t,n){var r=new Gt(this.diagLog(),e.exception||new Error(dt.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Mn.create(r,Gt.dataType,Gt.envelopeType,this.diagLog(),t,n);this.core.track(i)},fr.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(B.CRITICAL,ue,"trackException failed, exception will not be collected: "+dt.getExceptionName(n),{exception:dt.dump(n)})}},fr.prototype._onerror=function(e){try{var t={url:e&&e.url||(w()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(dt.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error))this._sendCORSException(t.url);else{if(!dt.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message),e.error.stack=n}this.trackException({exception:e.error,severityLevel:Pn.Error},t)}}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(B.CRITICAL,ne,"_onError threw exception while logging error, error will not be collected: "+dt.getExceptionName(i),{exception:dt.dump(i),errorString:r})}},fr.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},fr.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(j.isNullOrUndefined(t))throw Error("Error initializing");ur.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=fr.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&dt.disableCookies(),this.config.isStorageUseDisabled&&dt.disableStorage();var u={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new ar(this.core),this._pageViewManager=new tr(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new nr(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new gr(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[sr]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new gr(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){j.isNullOrUndefined(r)&&(r={}),r[sr]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g=S(),p=_(),d=x(),h=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&g){var m=g.onerror;g.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);return!0!==a&&h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&g){var v="onunhandledrejection",y=g[v];g[v]=function(e){var t=y&&y.call(g,e);return!0!==t&&h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:d?d.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&p&&j.isFunction(p.pushState)&&j.isFunction(p.replaceState)&&g&&"undefined"!=typeof Event){var T=this;j.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),p.pushState=(f=p.pushState,function(){var e=f.apply(this,arguments);return cr(g,dt.createDomEvent(T.config.namePrefix+"pushState")),cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange")),e}),p.replaceState=(l=p.replaceState,function(){var e=l.apply(this,arguments);return cr(g,dt.createDomEvent(T.config.namePrefix+"replaceState")),cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange")),e}),g.addEventListener&&(g.addEventListener(T.config.namePrefix+"popstate",function(){cr(g,dt.createDomEvent(T.config.namePrefix+"locationchange"))}),g.addEventListener(T.config.namePrefix+"locationchange",function(){T._properties&&T._properties.context&&T._properties.context.telemetryTrace&&(T._properties.context.telemetryTrace.traceID=dt.generateW3CId(),T._properties.context.telemetryTrace.name=d&&d.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=d&&d.href||"",setTimeout(function(e){T.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),T.autoRoutePVDelay)}))}this.setInitialized(!0)}},fr.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},fr.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var r=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===mn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&0<=t.target.indexOf(r[n]))return!1}return!0})}},fr.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},fr.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined},n=Mn.create(t,Gt.dataType,Gt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},fr.Version="2.5.0",fr);function fr(){var e=ur.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=x();return e._prevUri=t&&t.href||"",e}var gr=(pr.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(B.WARNING,Ie,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},pr.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(B.WARNING,Se,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var a=+new Date,o=It.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e],this._events[e]=undefined},pr);function pr(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=lr,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map
{
"name": "@microsoft/applicationinsights-analytics-js",
"version": "2.4.4",
"version": "2.5.0",
"description": "Microsoft Application Insights Javascript SDK apis",

@@ -22,4 +22,5 @@ "main": "dist/applicationinsights-analytics-js.js",

"@microsoft/applicationinsights-rollup-es3" : "1.1.1",
"@microsoft/applicationinsights-properties-js": "2.4.4",
"@microsoft/applicationinsights-properties-js": "2.5.0",
"typescript": "2.5.3",
"globby": "^11.0.0",
"rollup-plugin-node-resolve": "^3.4.0",

@@ -37,7 +38,8 @@ "rollup-plugin-replace": "^2.1.0",

"dependencies": {
"@microsoft/applicationinsights-core-js": "2.4.4",
"@microsoft/applicationinsights-common": "2.4.4",
"tslib": "^1.9.3"
"@microsoft/dynamicproto-js": "^0.5.1",
"@microsoft/applicationinsights-core-js": "2.5.0",
"@microsoft/applicationinsights-common": "2.5.0",
"tslib": "1.10.0"
},
"license": "MIT"
}

@@ -11,3 +11,3 @@ /**

IPageViewTelemetryInternal, IPageViewTelemetry, IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal,
DateTimeUtils, IExceptionInternal, PropertiesPluginIdentifier
DateTimeUtils, IExceptionInternal, PropertiesPluginIdentifier, AnalyticsPluginIdentifier
} from "@microsoft/applicationinsights-common";

@@ -40,3 +40,3 @@

export class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal {
public static Version = "2.4.4"; // Not currently used anywhere
public static Version = "2.5.0"; // Not currently used anywhere

@@ -69,3 +69,3 @@ public static getDefaultConfig(config?: IConfig): IConfig {

public identifier: string = "ApplicationInsightsAnalytics"; // do not change name or priority
public identifier: string = AnalyticsPluginIdentifier; // do not change name or priority
public priority: number = 180; // take from reserved priority range 100- 200

@@ -563,3 +563,3 @@ public config: IConfig;

this.sendPageViewInternal(pageViewItem);
this.sendPageViewInternal(pageViewItem, properties);
}

@@ -566,0 +566,0 @@

@@ -12,2 +12,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { PageViewPerformanceManager } from './PageViewPerformanceManager';
import dynamicProto from "@microsoft/dynamicproto-js";

@@ -26,160 +27,203 @@ /**

export class PageViewManager {
private pageViewPerformanceSent: boolean = false;
private overridePageViewDuration: boolean = false;
private appInsights: IAppInsightsInternal;
private _pageViewPerformanceManager: PageViewPerformanceManager;
private _channel: () => IChannelControls[][];
private _logger: IDiagnosticLogger;
constructor(
appInsights: IAppInsightsInternal,
overridePageViewDuration: boolean, core: IAppInsightsCore, pageViewPerformanceManager: PageViewPerformanceManager) {
this.overridePageViewDuration = overridePageViewDuration;
this.appInsights = appInsights;
this._pageViewPerformanceManager = pageViewPerformanceManager;
if (core) {
this._channel = () => (core.getTransmissionControls()) as IChannelControls[][];
this._logger = core.logger;
}
appInsights: IAppInsightsInternal,
overridePageViewDuration: boolean,
core: IAppInsightsCore,
pageViewPerformanceManager: PageViewPerformanceManager) {
}
/**
* Currently supported cases:
* 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.
* a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.
* 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.
* 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).
* 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.
*
* In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.
*/
public trackPageView(pageView: IPageViewTelemetry, customProperties?: { [key: string]: any }) {
let name = pageView.name;
if (CoreUtils.isNullOrUndefined(name) || typeof name !== "string") {
let doc = getDocument();
name = pageView.name = doc && doc.title || "";
}
let uri = pageView.uri;
if (CoreUtils.isNullOrUndefined(uri) || typeof uri !== "string") {
let location = getLocation();
uri = pageView.uri = location && location.href || "";
}
// case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user
// do not provide the duration, set duration to undefined
// Also this is case 4
if (!this._pageViewPerformanceManager.isPerformanceTimingSupported()) {
this.appInsights.sendPageViewInternal(
pageView,
customProperties
);
CoreUtils.arrForEach(this._channel(), queues => { CoreUtils.arrForEach(queues, q => q.flush(true)) })
// no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)
this._logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.NavigationTimingNotSupported,
"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
return;
}
let pageViewSent = false;
let customDuration;
// if the performance timing is supported by the browser, calculate the custom duration
const start = this._pageViewPerformanceManager.getPerformanceTiming().navigationStart;
customDuration = DateTimeUtils.GetDuration(start, +new Date);
if (!this._pageViewPerformanceManager.shouldCollectDuration(customDuration)) {
customDuration = undefined;
}
// if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if
// overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier
let duration;
if (!CoreUtils.isNullOrUndefined(customProperties) &&
!CoreUtils.isNullOrUndefined(customProperties.duration)) {
duration = customProperties.duration;
}
if (this.overridePageViewDuration || !isNaN(duration)) {
if (isNaN(duration)) {
// case 3
if (!customProperties) {
customProperties = {};
dynamicProto(PageViewManager, this, (_self) => {
let arrForEach = CoreUtils.arrForEach;
let isNullOrUndefined = CoreUtils.isNullOrUndefined;
let intervalHandle: any = null;
let itemQueue: Array<() => boolean> = [];
let pageViewPerformanceSent: boolean = false;
let _logger: IDiagnosticLogger;
if (core) {
_logger = core.logger;
}
function _flushChannels() {
if (core) {
arrForEach(core.getTransmissionControls(), queues => {
arrForEach(queues, q => q.flush(true))
});
}
customProperties["duration"] = customDuration;
}
// case 2
this.appInsights.sendPageViewInternal(
pageView,
customProperties
);
CoreUtils.arrForEach(this._channel(), queues => { CoreUtils.arrForEach(queues, q => q.flush(true)) })
pageViewSent = true;
}
// now try to send the page view performance telemetry
const maxDurationLimit = 60000;
if (!customProperties) {
customProperties = {};
}
const handle = setInterval((() => {
try {
if (this._pageViewPerformanceManager.isPerformanceTimingDataReady()) {
clearInterval(handle);
const pageViewPerformance: IPageViewPerformanceTelemetryInternal = {
name,
uri
};
this._pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);
if (!pageViewPerformance.isValid && !pageViewSent) {
// If navigation timing gives invalid numbers, then go back to "override page view duration" mode.
// That's the best value we can get that makes sense.
customProperties["duration"] = customDuration;
this.appInsights.sendPageViewInternal(
pageView,
customProperties);
CoreUtils.arrForEach(this._channel(), queues => { CoreUtils.arrForEach(queues, q => q.flush(true)) })
} else {
if (!pageViewSent) {
customProperties["duration"] = pageViewPerformance.durationMs;
this.appInsights.sendPageViewInternal(
pageView,
customProperties);
function _addQueue(cb:() => boolean) {
itemQueue.push(cb);
if (!intervalHandle) {
intervalHandle = setInterval((() => {
let allItems = itemQueue.slice(0);
let doFlush = false;
itemQueue = [];
arrForEach(allItems, (item) => {
if (!item()) {
// Not processed so rescheduled
itemQueue.push(item);
} else {
doFlush = true;
}
});
if (itemQueue.length === 0) {
clearInterval(intervalHandle);
intervalHandle = null;
}
if (doFlush) {
// We process at least one item so flush the queue
_flushChannels();
}
}), 100);
}
}
if (!this.pageViewPerformanceSent) {
this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);
this.pageViewPerformanceSent = true;
_self.trackPageView = (pageView: IPageViewTelemetry, customProperties?: { [key: string]: any }) => {
let name = pageView.name;
if (isNullOrUndefined(name) || typeof name !== "string") {
let doc = getDocument();
name = pageView.name = doc && doc.title || "";
}
let uri = pageView.uri;
if (isNullOrUndefined(uri) || typeof uri !== "string") {
let location = getLocation();
uri = pageView.uri = location && location.href || "";
}
// case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user
// do not provide the duration, set duration to undefined
// Also this is case 4
if (!pageViewPerformanceManager.isPerformanceTimingSupported()) {
appInsights.sendPageViewInternal(
pageView,
customProperties
);
_flushChannels();
// no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)
_logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.NavigationTimingNotSupported,
"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
return;
}
let pageViewSent = false;
let customDuration;
// if the performance timing is supported by the browser, calculate the custom duration
const start = pageViewPerformanceManager.getPerformanceTiming().navigationStart;
customDuration = DateTimeUtils.GetDuration(start, +new Date);
if (!pageViewPerformanceManager.shouldCollectDuration(customDuration)) {
customDuration = undefined;
}
// if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if
// overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier
let duration;
if (!isNullOrUndefined(customProperties) &&
!isNullOrUndefined(customProperties.duration)) {
duration = customProperties.duration;
}
if (overridePageViewDuration || !isNaN(duration)) {
if (isNaN(duration)) {
// case 3
if (!customProperties) {
customProperties = {};
}
CoreUtils.arrForEach(this._channel(), queues => { CoreUtils.arrForEach(queues, q => q.flush(true)) })
customProperties["duration"] = customDuration;
}
} else if (DateTimeUtils.GetDuration(start, +new Date) > maxDurationLimit) {
// if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry
// with the maximum duration limit. Otherwise, keep waiting until performance timings are ready
clearInterval(handle);
if (!pageViewSent) {
customProperties["duration"] = maxDurationLimit;
this.appInsights.sendPageViewInternal(
pageView,
customProperties
);
CoreUtils.arrForEach(this._channel(), queues => { CoreUtils.arrForEach(queues, q => q.flush(true)) })
// case 2
appInsights.sendPageViewInternal(
pageView,
customProperties
);
_flushChannels();
pageViewSent = true;
}
// now try to send the page view performance telemetry
const maxDurationLimit = 60000;
if (!customProperties) {
customProperties = {};
}
// Queue the event for processing
_addQueue(() => {
let processed = false;
try {
if (pageViewPerformanceManager.isPerformanceTimingDataReady()) {
processed = true;
const pageViewPerformance: IPageViewPerformanceTelemetryInternal = {
name,
uri
};
pageViewPerformanceManager.populatePageViewPerformanceEvent(pageViewPerformance);
if (!pageViewPerformance.isValid && !pageViewSent) {
// If navigation timing gives invalid numbers, then go back to "override page view duration" mode.
// That's the best value we can get that makes sense.
customProperties["duration"] = customDuration;
appInsights.sendPageViewInternal(
pageView,
customProperties);
} else {
if (!pageViewSent) {
customProperties["duration"] = pageViewPerformance.durationMs;
appInsights.sendPageViewInternal(
pageView,
customProperties);
}
if (!pageViewPerformanceSent) {
appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);
pageViewPerformanceSent = true;
}
}
} else if (DateTimeUtils.GetDuration(start, +new Date) > maxDurationLimit) {
// if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry
// with the maximum duration limit. Otherwise, keep waiting until performance timings are ready
processed = true;
if (!pageViewSent) {
customProperties["duration"] = maxDurationLimit;
appInsights.sendPageViewInternal(
pageView,
customProperties
);
}
}
} catch (e) {
_logger.throwInternal(
LoggingSeverity.CRITICAL,
_InternalMessageId.TrackPVFailedCalc,
"trackPageView failed on page load calculation: " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
} catch (e) {
this._logger.throwInternal(
LoggingSeverity.CRITICAL,
_InternalMessageId.TrackPVFailedCalc,
"trackPageView failed on page load calculation: " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
return processed;
});
}
}), 100);
});
}
/**
* Currently supported cases:
* 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.
* a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.
* 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.
* 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).
* 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.
*
* In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.
*/
public trackPageView(pageView: IPageViewTelemetry, customProperties?: { [key: string]: any }) {
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
}
}

@@ -15,8 +15,2 @@ import { IPageViewTelemetry, IPageViewTelemetryInternal, IPageViewPerformanceTelemetryInternal } from '@microsoft/applicationinsights-common';

export declare class PageViewManager {
private pageViewPerformanceSent;
private overridePageViewDuration;
private appInsights;
private _pageViewPerformanceManager;
private _channel;
private _logger;
constructor(appInsights: IAppInsightsInternal, overridePageViewDuration: boolean, core: IAppInsightsCore, pageViewPerformanceManager: PageViewPerformanceManager);

@@ -23,0 +17,0 @@ /**

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is 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