Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-core-js

Package Overview
Dependencies
Maintainers
4
Versions
561
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.5.3 to 2.5.4

4

browser/applicationinsights-core-js.min.js
/*!
* Application Insights JavaScript SDK - Core, 2.5.3
* Application Insights JavaScript SDK - Core, 2.5.4
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(c){"use strict";var n={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},i=function(e,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function e(e,n){function t(){this.constructor=e}i(e,n),e.prototype=null===n?function(e){var n=Object.create;if(n)return n(e);if(null==e)return{};var t=typeof e;if("object"!=t&&"function"!=t)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(n):(t.prototype=n.prototype,new t)}var t="undefined",r="object",f="prototype",g="function",o="window",a="JSON";function s(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function l(e){var n=s();return n&&n[e]?n[e]:e===o&&u()?window:null}function u(){return!(typeof window!==r||!window)}function d(){return u()?window:l(o)}function p(){return!(typeof document!==r||!document)}function h(){return p()?document:l("document")}function v(){return!(typeof navigator!==r||!navigator)}function y(){return!(typeof history!==r||!history)}function m(){return!!(typeof JSON===r&&JSON||null!==l(a))}function x(){return m()?JSON||l(a):null}var C=t,T="attachEvent",I="addEventListener",w="detachEvent",N="removeEventListener";function S(e,n){return typeof e===n}function b(e){return S(e,t)||e===undefined}function _(e){return b(e)||null===e}function L(e,n){return e&&Object[f].hasOwnProperty.call(e,n)}function E(e){return S(e,r)}function F(e){return S(e,g)}function M(e,n,t,i){void 0===i&&(i=!1);var r=!1;if(!_(e))try{_(e[I])?_(e[T])||(e[T]("on"+n,t),r=!0):(e[I](n,t,i),r=!0)}catch(o){}return r}function P(e,n,t,i){if(void 0===i&&(i=!1),!_(e))try{_(e[N])?_(e[w])||e[w]("on"+n,t):e[N](n,t,i)}catch(r){}}var O=(A.isDate=function(e){return"[object Date]"===Object[f].toString.call(e)},A.isString=function(e){return S(e,"string")},A.isNumber=function(e){return S(e,"number")},A.isBoolean=function(e){return S(e,"boolean")},A.disableCookies=function(){A._canUseCookies=!1},A.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(j,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},A.toISOString=function(e){if(A.isDate(e)){var n=function(e){var n=e+"";return 1===n.length&&(n="0"+n),n};return e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},A.arrForEach=function(e,n,t){for(var i=e.length,r=0;r<i;++r)r in e&&n.call(t||e,e[r],r,e)},A.arrIndexOf=function(e,n,t){for(var i=e.length,r=t||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===n)return o;return-1},A.arrMap=function(e,n,t){for(var i=e.length,r=t||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=n.call(r,e[a],e));return o},A.arrReduce=function(e,n,t){var i,r=e.length,o=0;if(3<=arguments.length)i=t;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=n(i,e[o],o,e)),o++;return i},A.objCreate=function(e){if(null==e)return{};if(!E(e)&&!F(e))throw new TypeError("Object prototype may only be an Object: "+e);function n(){}return n[f]=e,new n},A.objKeys=function(e){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(F(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var t=[];for(var i in e)L(e,i)&&t.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)L(e,r[a])&&t.push(r[a]);return t},A.objDefineAccessors=function(e,n,t,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return t&&(o.get=t),i&&(o.set=i),r(e,n,o),!0}catch(a){}return!1},A.addEventHandler=function(e,n){var t=!1,i=d();i&&(t=M(i,e,n),t=M(i.body,e,n)||t);var r=h();return r&&(t=U.Attach(r,e,n)||t),t},A.isTypeof=S,A.isUndefined=b,A.isNullOrUndefined=_,A.hasOwnProperty=L,A.isFunction=F,A.isObject=E,A);function A(){}var D,j=/[xy]/g,U=(R.Attach=M,R.AttachEvent=M,R.Detach=P,R.DetachEvent=P,R);function R(){}(D=c.LoggingSeverity||(c.LoggingSeverity={}))[D.CRITICAL=1]="CRITICAL",D[D.WARNING=2]="WARNING";var k={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73},z=(B.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},B.dataType="MessageData",B.AiNonUserActionablePrefix="AI (Internal): ",B.AiUserActionablePrefix="AI: ",B);function B(e,n,t,i){void 0===t&&(t=!1),this.messageId=e,this.message=(t?B.AiUserActionablePrefix:B.AiNonUserActionablePrefix)+e;var r="";m()&&(r=x().stringify(i));var o=(n?" message:"+B.sanitizeDiagnosticText(n):"")+(i?" props:"+B.sanitizeDiagnosticText(r):"");this.message+=o}var Q=(V.prototype.throwInternal=function(e,n,t,i,r){void 0===r&&(r=!1);var o=new z(n,t,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!O.isUndefined(o)&&o&&!O.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},V.prototype.warnToConsole=function(e){!O.isUndefined(console)&&console&&(O.isFunction(console.warn)?console.warn(e):O.isFunction(console.log)&&console.log(e))},V.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},V.prototype.logInternalMessage=function(e,n){var t=this;if(!t._areInternalMessagesThrottled()){var i=!0,r=t.AIInternalMessagePrefix+n.messageId;if(t._messageLogged[r]?i=!1:t._messageLogged[r]=!0,i&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(n),t._messageCount++),t._messageCount===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",a=new z(k.MessageLimitPerPVExceeded,o,!1);t.queue.push(a),t.warnToConsole(o)}}},V.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},V);function V(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},O.isNullOrUndefined(e)||(O.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),O.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),O.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),O.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var W=O.isFunction,H=function(r,o){var a=this,s=null,l=W(r.processTelemetry),u=W(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,n){if(n=n||o,r&&l){a._hasRun=!0;try{n.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,n)}catch(i){var t=s&&s._hasRun;s&&t||n.diagLog().throwInternal(c.LoggingSeverity.CRITICAL,k.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!t&&s.processTelemetry(e,n)}}else s&&(a._hasRun=!0,s.processTelemetry(e,n))}},K=O.isNullOrUndefined;function q(e,n){var t=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&O.isFunction(o.processTelemetry)){var a=new H(o,n);t.push(a),i&&i.setNext(a),i=a}}return 0<t.length?t[0]:null}var G=function _e(e,o,t,n){var i,r,a,s,l=this,u=null;null!==n&&(e&&O.isFunction(e.getPlugin)?u=function(e,n,t){var i=[],r=!t;if(e)for(;e;){var o=e.getPlugin();!r&&o!==t||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(t),q(i,n)}(e,l,n||e.getPlugin()):n?(i=l,a=e,s=!1,(r=n)&&e&&(a=[],O.arrForEach(e,function(e){!s&&e!==r||(s=!0,a.push(e))})),r&&!s&&(a=a||[]).push(r),u=q(a,i)):O.isUndefined(n)&&(u=q(e,l))),l.core=function(){return t},l.diagLog=function(){return(t||{}).logger||new Q(o||{})},l.getCfg=function(){return o},l.getExtCfg=function(e,n){var t;if(void 0===n&&(n={}),o){var i=o.extensionConfig;i&&e&&(t=i[e])}return t||n},l.getConfig=function(e,n,t){var i;void 0===t&&(t=!1);var r=l.getExtCfg(e,null);return r&&!K(r[n])?i=r[n]:o&&!K(o[n])&&(i=o[n]),K(i)?t:i},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var n=u;n&&(u=n.getNext(),n.processTelemetry(e,l))},l.createNew=function(e,n){return void 0===e&&(e=null),new _e(e||u,o,t,n)}},J=O.isFunction,Z="getPlugin",Y=($.prototype.initialize=function(e,n,t,i){this._baseTelInit(e,n,t,i)},$);function $(){var o=this,a=!1,s=null,l=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){l=e},o.processNext=function(e,n){n?n.processNext(e):l&&J(l.processTelemetry)&&l.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var n=e;if(!n){var t=s||new G(null,{},o.core);n=l&&l[Z]?t.createNew(null,l[Z]):t.createNew(null,l)}return n},o._baseTelInit=function(e,n,t,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&n&&(i=n.getProcessTelContext().getNext());var r=l;l&&l[Z]&&(r=l[Z]()),o.core=n,s=new G(i,e,n,r),a=!0}}var X=O.isFunction,ee="processTelemetry",ne="priority",te="setNextPlugin",ie="isInitialized";function re(n,t){for(var e=[],i=null,r=n.getNext();r;){var o=r.getPlugin();o&&(i&&X(i[te])&&X(o[ee])&&i[te](o),X(o[ie])&&o[ie]()||e.push(o),i=o,r=r.getNext())}O.arrForEach(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function oe(e){return e.sort(function(e,n){var t=0,i=X(n[ee]);return X(e[ee])?t=i?e[ne]-n[ne]:1:i&&(t=-1),t})}var ae=O.arrForEach,se=O.objDefineAccessors;function le(e,n){var t;n&&0<n.length&&(t=n=n.sort(function(e,n){return e.priority-n.priority}),ae(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(n))}var ue,ce=(e(fe,ue=Y),fe.prototype.processTelemetry=function(n,t){var i=this;this._channelQueue&&ae(this._channelQueue,function(e){0<e.length&&i._getTelCtx(t).createNew(e).processNext(n)})},fe.prototype.getChannelControls=function(){return this._channelQueue},fe.prototype.initialize=function(n,t,i){if(!this.isInitialized()){ue.prototype.initialize.call(this,n,t,i),n.isCookieUseDisabled&&O.disableCookies();var e=this._channelQueue=function(e,n){var t=[];if(e&&ae(e,function(e){return le(t,e)}),n){var i=[];ae(n,function(e){500<e.priority&&i.push(e)}),le(t,i)}return t}((n||{}).channels,i);ae(e,function(e){return re(new G(e,n,t),i)})}},fe._staticInit=(se(fe.prototype,"ChannelControls",fe.prototype.getChannelControls),void se(fe.prototype,"channelQueue",fe.prototype.getChannelControls)),fe);function fe(){var e=null!==ue&&ue.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var ge=O.arrForEach,de=O.isNullOrUndefined,pe=(he.prototype.initialize=function(e,n,i,t){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||de(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;t=t||O.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){}}),r._notificationManager=t,e.extensions=de(e.extensions)?[]:e.extensions,(e.extensionConfig=de(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=t,i=i||O.objCreate({throwInternal:function(e,n,t,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,n.concat(e.extensions)),a=oe(a);var s=[],l={};if(ge(a,function(e){if(de(e)||de(e.initialize))throw Error("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(de(l[n])?l[n]=t:i.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+t)),(!n||n<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=oe(a),r._extensions=a,re(new G([o],e,r),a),re(new G(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw Error("No channels available");r._setInit(!0)},he.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},he.prototype.track=function(e){var n=this;e.iKey||(e.iKey=n.config.instrumentationKey),e.time||(e.time=O.toISOString(new Date)),de(e.ver)&&(e.ver="4.0"),n.isInitialized()?(0<n._eventQueue.length&&(ge(n._eventQueue,function(e){n.getProcessTelContext().processNext(e)}),n._eventQueue=[]),n.getProcessTelContext().processNext(e)):n._eventQueue.push(e)},he.prototype.getProcessTelContext=function(){var e=this._extensions,n=e;return e&&0!==e.length||(n=[this._channelController]),new G(n,this.config,this)},he);function he(){var n=!1,e=this;e._extensions=[],e._channelController=new ce,e.isInitialized=function(){return n},e._setInit=function(e){n=e},e._eventQueue=[]}var ve=(ye.prototype.addNotificationListener=function(e){this.listeners.push(e)},ye.prototype.removeNotificationListener=function(e){for(var n=O.arrIndexOf(this.listeners,e);-1<n;)this.listeners.splice(n,1),n=O.arrIndexOf(this.listeners,e)},ye.prototype.eventsSent=function(n){for(var t=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return t.listeners[e].eventsSent(n)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},ye.prototype.eventsDiscarded=function(n,t){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(n,t)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},ye);function ye(){this.listeners=[]}var me,xe=(e(Ce,me=pe),Ce.prototype.initialize=function(e,n){var t=this;t._notificationManager=new ve,t.logger=new Q(e),t.config=e,me.prototype.initialize.call(this,e,n,t.logger,t._notificationManager)},Ce.prototype.getTransmissionControls=function(){return me.prototype.getTransmissionControls.call(this)},Ce.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),me.prototype.track.call(this,e)},Ce.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ce.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ce.prototype.pollInternalLogs=function(i){var n=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var t=n,e=t.logger?t.logger.queue:[];O.arrForEach(e,function(e){var n={name:i||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:O.toISOString(new Date),baseType:z.dataType,baseData:{message:e.message}};t.track(n)}),e.length=0},e)},Ce.prototype._validateTelemetryItem=function(e){if(O.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ce.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n.InvalidEvent)},Ce);function Ce(){return me.call(this)||this}var Te="_aiHooks",Ie=["req","rsp","hkErr","fnErr"];function we(e,n){if(e)for(var t=0;t<e.length&&!n(e[t],t);t++);}function Ne(e,l,u,c,f){0<=f&&f<=2&&we(e,function(e,n){var t=e.cbks,i=t[Ie[f]];if(i){l.ctx=function(){return c[n]=c[n]||{}};try{i.apply(l.inst,u)}catch(a){var r=l.err;try{var o=t[Ie[2]];o&&(l.err=a,o.apply(l.inst,u))}catch(s){}finally{l.err=r}}}})}function Se(e,n,t,i){if(void 0===i&&(i=!0),e&&n&&t){var r=function c(e,n,t){var i=null;return e&&(O.hasOwnProperty(e,n)?i=e:t&&(i=c(e[f],n,!1))),i}(e,n,i),o=r[n];if(typeof o===g){var a=o[Te];if(!a){var s=(u=a={i:0,n:n,f:o,h:[]},function(){var e=arguments,n=u.h,t={name:u.n,inst:this,ctx:null},i=[],r=[t];we(e,function(e){r.push(e)}),Ne(n,t,r,i,0);var o=u.f;try{t.rslt=o.apply(this,e)}catch(a){throw t.err=a,Ne(n,t,r,i,3),a}return Ne(n,t,r,i,1),t.rslt});s[Te]=a,r[n]=s}var l={id:a.i,cbks:t,rm:function(){var t=this.id;we(a.h,function(e,n){return e.id===t&&(a.h.splice(n,1),1)})}};return a.i++,a.h.push(l),l}}var u;return null}function be(t,e,i,r){void 0===r&&(r=!0);var o=null;return we(e,function(e){var n=Se(t,e,i,r);n&&(o=o||[]).push(n)}),o}c.MinChannelPriorty=100,c.EventsDiscardedReason=n,c.AppInsightsCore=xe,c.BaseCore=pe,c.BaseTelemetryPlugin=Y,c.CoreUtils=O,c.EventHelper=U,c.Undefined=C,c.normalizeJsName=function(e){var n=e,t=/([^\w\d_$])/g;return t.test(e)&&(n=e.replace(t,"_")),n},c.getGlobal=s,c.getGlobalInst=l,c.hasWindow=u,c.getWindow=d,c.hasDocument=p,c.getDocument=h,c.hasNavigator=v,c.getNavigator=function(){return v()?navigator:l("navigator")},c.hasHistory=y,c.getHistory=function(){return y()?history:l("history")},c.getLocation=function(){return typeof location===r&&location?location:l("location")},c.getPerformance=function(){return l("performance")},c.hasJSON=m,c.getJSON=x,c.strUndefined=t,c.strObject=r,c.strPrototype=f,c.strFunction=g,c.NotificationManager=ve,c.DiagnosticLogger=Q,c._InternalLogMessage=z,c.ProcessTelemetryContext=G,c.initializePlugins=re,c.sortPlugins=oe,c._InternalMessageId=k,c.InstrumentProto=function(e,n,t){return e?Se(e[f],n,t,!1):null},c.InstrumentProtos=function(e,n,t){return e?be(e[f],n,t,!1):null},c.InstrumentFunc=Se,c.InstrumentFuncs=be,function(e,n,t){var i=Object.defineProperty;if(i)try{return i(e,n,t)}catch(r){}typeof t.value!==undefined&&(e[n]=t.value)}(c,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(c){"use strict";var n={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},i=function(e,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function e(e,n){function t(){this.constructor=e}i(e,n),e.prototype=null===n?function(e){var n=Object.create;if(n)return n(e);if(null==e)return{};var t=typeof e;if("object"!=t&&"function"!=t)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(n):(t.prototype=n.prototype,new t)}var t="undefined",r="object",f="prototype",g="function",o="window",a="JSON";function s(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function l(e){var n=s();return n&&n[e]?n[e]:e===o&&u()?window:null}function u(){return!(typeof window!==r||!window)}function d(){return u()?window:l(o)}function p(){return!(typeof document!==r||!document)}function h(){return p()?document:l("document")}function v(){return!(typeof navigator!==r||!navigator)}function y(){return!(typeof history!==r||!history)}function m(){return!!(typeof JSON===r&&JSON||null!==l(a))}function x(){return m()?JSON||l(a):null}var C=t,T="attachEvent",I="addEventListener",w="detachEvent",N="removeEventListener";function S(e,n){return typeof e===n}function b(e){return S(e,t)||e===undefined}function _(e){return b(e)||null===e}function L(e,n){return e&&Object[f].hasOwnProperty.call(e,n)}function E(e){return S(e,r)}function F(e){return S(e,g)}function M(e,n,t,i){void 0===i&&(i=!1);var r=!1;if(!_(e))try{_(e[I])?_(e[T])||(e[T]("on"+n,t),r=!0):(e[I](n,t,i),r=!0)}catch(o){}return r}function P(e,n,t,i){if(void 0===i&&(i=!1),!_(e))try{_(e[N])?_(e[w])||e[w]("on"+n,t):e[N](n,t,i)}catch(r){}}var O=(A.isDate=function(e){return"[object Date]"===Object[f].toString.call(e)},A.isString=function(e){return S(e,"string")},A.isNumber=function(e){return S(e,"number")},A.isBoolean=function(e){return S(e,"boolean")},A.disableCookies=function(){A._canUseCookies=!1},A.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(j,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},A.toISOString=function(e){if(A.isDate(e)){var n=function(e){var n=e+"";return 1===n.length&&(n="0"+n),n};return e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},A.arrForEach=function(e,n,t){for(var i=e.length,r=0;r<i;++r)r in e&&n.call(t||e,e[r],r,e)},A.arrIndexOf=function(e,n,t){for(var i=e.length,r=t||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===n)return o;return-1},A.arrMap=function(e,n,t){for(var i=e.length,r=t||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=n.call(r,e[a],e));return o},A.arrReduce=function(e,n,t){var i,r=e.length,o=0;if(3<=arguments.length)i=t;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=n(i,e[o],o,e)),o++;return i},A.objCreate=function(e){if(null==e)return{};if(!E(e)&&!F(e))throw new TypeError("Object prototype may only be an Object: "+e);function n(){}return n[f]=e,new n},A.objKeys=function(e){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(F(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var t=[];for(var i in e)L(e,i)&&t.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)L(e,r[a])&&t.push(r[a]);return t},A.objDefineAccessors=function(e,n,t,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return t&&(o.get=t),i&&(o.set=i),r(e,n,o),!0}catch(a){}return!1},A.addEventHandler=function(e,n){var t=!1,i=d();i&&(t=M(i,e,n),t=M(i.body,e,n)||t);var r=h();return r&&(t=U.Attach(r,e,n)||t),t},A.isTypeof=S,A.isUndefined=b,A.isNullOrUndefined=_,A.hasOwnProperty=L,A.isFunction=F,A.isObject=E,A);function A(){}var D,j=/[xy]/g,U=(R.Attach=M,R.AttachEvent=M,R.Detach=P,R.DetachEvent=P,R);function R(){}(D=c.LoggingSeverity||(c.LoggingSeverity={}))[D.CRITICAL=1]="CRITICAL",D[D.WARNING=2]="WARNING";var k={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73},z=(B.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},B.dataType="MessageData",B.AiNonUserActionablePrefix="AI (Internal): ",B.AiUserActionablePrefix="AI: ",B);function B(e,n,t,i){void 0===t&&(t=!1),this.messageId=e,this.message=(t?B.AiUserActionablePrefix:B.AiNonUserActionablePrefix)+e;var r="";m()&&(r=x().stringify(i));var o=(n?" message:"+B.sanitizeDiagnosticText(n):"")+(i?" props:"+B.sanitizeDiagnosticText(r):"");this.message+=o}var Q=(V.prototype.throwInternal=function(e,n,t,i,r){void 0===r&&(r=!1);var o=new z(n,t,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!O.isUndefined(o)&&o&&!O.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},V.prototype.warnToConsole=function(e){!O.isUndefined(console)&&console&&(O.isFunction(console.warn)?console.warn(e):O.isFunction(console.log)&&console.log(e))},V.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},V.prototype.logInternalMessage=function(e,n){var t=this;if(!t._areInternalMessagesThrottled()){var i=!0,r=t.AIInternalMessagePrefix+n.messageId;if(t._messageLogged[r]?i=!1:t._messageLogged[r]=!0,i&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(n),t._messageCount++),t._messageCount===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",a=new z(k.MessageLimitPerPVExceeded,o,!1);t.queue.push(a),t.warnToConsole(o)}}},V.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},V);function V(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},O.isNullOrUndefined(e)||(O.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),O.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),O.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),O.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var W=O.isFunction,H=function(r,o){var a=this,s=null,l=W(r.processTelemetry),u=W(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,n){if(n=n||o,r&&l){a._hasRun=!0;try{n.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,n)}catch(i){var t=s&&s._hasRun;s&&t||n.diagLog().throwInternal(c.LoggingSeverity.CRITICAL,k.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!t&&s.processTelemetry(e,n)}}else s&&(a._hasRun=!0,s.processTelemetry(e,n))}},K=O.isNullOrUndefined;function q(e,n){var t=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&O.isFunction(o.processTelemetry)){var a=new H(o,n);t.push(a),i&&i.setNext(a),i=a}}return 0<t.length?t[0]:null}var G=function _e(e,o,t,n){var i,r,a,s,l=this,u=null;null!==n&&(e&&O.isFunction(e.getPlugin)?u=function(e,n,t){var i=[],r=!t;if(e)for(;e;){var o=e.getPlugin();!r&&o!==t||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(t),q(i,n)}(e,l,n||e.getPlugin()):n?(i=l,a=e,s=!1,(r=n)&&e&&(a=[],O.arrForEach(e,function(e){!s&&e!==r||(s=!0,a.push(e))})),r&&!s&&(a=a||[]).push(r),u=q(a,i)):O.isUndefined(n)&&(u=q(e,l))),l.core=function(){return t},l.diagLog=function(){return(t||{}).logger||new Q(o||{})},l.getCfg=function(){return o},l.getExtCfg=function(e,n){var t;if(void 0===n&&(n={}),o){var i=o.extensionConfig;i&&e&&(t=i[e])}return t||n},l.getConfig=function(e,n,t){var i;void 0===t&&(t=!1);var r=l.getExtCfg(e,null);return r&&!K(r[n])?i=r[n]:o&&!K(o[n])&&(i=o[n]),K(i)?t:i},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var n=u;n&&(u=n.getNext(),n.processTelemetry(e,l))},l.createNew=function(e,n){return void 0===e&&(e=null),new _e(e||u,o,t,n)}},J=O.isFunction,Z="getPlugin",Y=($.prototype.initialize=function(e,n,t,i){this._baseTelInit(e,n,t,i)},$);function $(){var o=this,a=!1,s=null,l=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){l=e},o.processNext=function(e,n){n?n.processNext(e):l&&J(l.processTelemetry)&&l.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var n=e;if(!n){var t=s||new G(null,{},o.core);n=l&&l[Z]?t.createNew(null,l[Z]):t.createNew(null,l)}return n},o._baseTelInit=function(e,n,t,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&n&&(i=n.getProcessTelContext().getNext());var r=l;l&&l[Z]&&(r=l[Z]()),o.core=n,s=new G(i,e,n,r),a=!0}}var X=O.isFunction,ee="processTelemetry",ne="priority",te="setNextPlugin",ie="isInitialized";function re(n,t){for(var e=[],i=null,r=n.getNext();r;){var o=r.getPlugin();o&&(i&&X(i[te])&&X(o[ee])&&i[te](o),X(o[ie])&&o[ie]()||e.push(o),i=o,r=r.getNext())}O.arrForEach(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function oe(e){return e.sort(function(e,n){var t=0,i=X(n[ee]);return X(e[ee])?t=i?e[ne]-n[ne]:1:i&&(t=-1),t})}var ae=O.arrForEach,se=O.objDefineAccessors;function le(e,n){var t;n&&0<n.length&&(t=n=n.sort(function(e,n){return e.priority-n.priority}),ae(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(n))}var ue,ce=(e(fe,ue=Y),fe.prototype.processTelemetry=function(n,t){var i=this;this._channelQueue&&ae(this._channelQueue,function(e){0<e.length&&i._getTelCtx(t).createNew(e).processNext(n)})},fe.prototype.getChannelControls=function(){return this._channelQueue},fe.prototype.initialize=function(n,t,i){if(!this.isInitialized()){ue.prototype.initialize.call(this,n,t,i),n.isCookieUseDisabled&&O.disableCookies();var e=this._channelQueue=function(e,n){var t=[];if(e&&ae(e,function(e){return le(t,e)}),n){var i=[];ae(n,function(e){500<e.priority&&i.push(e)}),le(t,i)}return t}((n||{}).channels,i);ae(e,function(e){return re(new G(e,n,t),i)})}},fe._staticInit=(se(fe.prototype,"ChannelControls",fe.prototype.getChannelControls),void se(fe.prototype,"channelQueue",fe.prototype.getChannelControls)),fe);function fe(){var e=null!==ue&&ue.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var ge=O.arrForEach,de=O.isNullOrUndefined,pe=(he.prototype.initialize=function(e,n,i,t){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||de(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;t=t||O.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){}}),r._notificationManager=t,e.extensions=de(e.extensions)?[]:e.extensions,(e.extensionConfig=de(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=t,i=i||O.objCreate({throwInternal:function(e,n,t,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,n.concat(e.extensions)),a=oe(a);var s=[],l={};if(ge(a,function(e){if(de(e)||de(e.initialize))throw Error("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(de(l[n])?l[n]=t:i.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+t)),(!n||n<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=oe(a),r._extensions=a,re(new G([o],e,r),a),re(new G(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw Error("No channels available");r._setInit(!0)},he.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},he.prototype.track=function(e){var n=this;e.iKey||(e.iKey=n.config.instrumentationKey),e.time||(e.time=O.toISOString(new Date)),de(e.ver)&&(e.ver="4.0"),n.isInitialized()?(0<n._eventQueue.length&&(ge(n._eventQueue,function(e){n.getProcessTelContext().processNext(e)}),n._eventQueue=[]),n.getProcessTelContext().processNext(e)):n._eventQueue.push(e)},he.prototype.getProcessTelContext=function(){var e=this._extensions,n=e;return e&&0!==e.length||(n=[this._channelController]),new G(n,this.config,this)},he);function he(){var n=!1,e=this;e._extensions=[],e._channelController=new ce,e.isInitialized=function(){return n},e._setInit=function(e){n=e},e._eventQueue=[]}var ve=(ye.prototype.addNotificationListener=function(e){this.listeners.push(e)},ye.prototype.removeNotificationListener=function(e){for(var n=O.arrIndexOf(this.listeners,e);-1<n;)this.listeners.splice(n,1),n=O.arrIndexOf(this.listeners,e)},ye.prototype.eventsSent=function(n){for(var t=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return t.listeners[e].eventsSent(n)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},ye.prototype.eventsDiscarded=function(n,t){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(n,t)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},ye);function ye(){this.listeners=[]}var me,xe=(e(Ce,me=pe),Ce.prototype.initialize=function(e,n){var t=this;t._notificationManager=new ve,t.logger=new Q(e),t.config=e,me.prototype.initialize.call(this,e,n,t.logger,t._notificationManager)},Ce.prototype.getTransmissionControls=function(){return me.prototype.getTransmissionControls.call(this)},Ce.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),me.prototype.track.call(this,e)},Ce.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ce.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ce.prototype.pollInternalLogs=function(i){var n=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var t=n,e=t.logger?t.logger.queue:[];O.arrForEach(e,function(e){var n={name:i||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:O.toISOString(new Date),baseType:z.dataType,baseData:{message:e.message}};t.track(n)}),e.length=0},e)},Ce.prototype._validateTelemetryItem=function(e){if(O.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ce.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n.InvalidEvent)},Ce);function Ce(){return me.call(this)||this}var Te="_aiHooks",Ie=["req","rsp","hkErr","fnErr"];function we(e,n){if(e)for(var t=0;t<e.length&&!n(e[t],t);t++);}function Ne(e,l,u,c,f){0<=f&&f<=2&&we(e,function(e,n){var t=e.cbks,i=t[Ie[f]];if(i){l.ctx=function(){return c[n]=c[n]||{}};try{i.apply(l.inst,u)}catch(a){var r=l.err;try{var o=t[Ie[2]];o&&(l.err=a,o.apply(l.inst,u))}catch(s){}finally{l.err=r}}}})}function Se(e,n,t,i){if(void 0===i&&(i=!0),e&&n&&t){var r=function c(e,n,t){var i=null;return e&&(O.hasOwnProperty(e,n)?i=e:t&&(i=c(e[f],n,!1))),i}(e,n,i),o=r[n];if(typeof o===g){var a=o[Te];if(!a){var s=(u=a={i:0,n:n,f:o,h:[]},function(){var t=arguments,e=u.h,i={name:u.n,inst:this,ctx:null,set:function(e,n){(t=o([],t))[e]=n,r=o([i],t)}},n=[],r=o([i],t);function o(n,e){return we(e,function(e){n.push(e)}),n}Ne(e,i,r,n,0);var a=u.f;try{i.rslt=a.apply(this,t)}catch(s){throw i.err=s,Ne(e,i,r,n,3),s}return Ne(e,i,r,n,1),i.rslt});s[Te]=a,r[n]=s}var l={id:a.i,cbks:t,rm:function(){var t=this.id;we(a.h,function(e,n){return e.id===t&&(a.h.splice(n,1),1)})}};return a.i++,a.h.push(l),l}}var u;return null}function be(t,e,i,r){void 0===r&&(r=!0);var o=null;return we(e,function(e){var n=Se(t,e,i,r);n&&(o=o||[]).push(n)}),o}c.MinChannelPriorty=100,c.EventsDiscardedReason=n,c.AppInsightsCore=xe,c.BaseCore=pe,c.BaseTelemetryPlugin=Y,c.CoreUtils=O,c.EventHelper=U,c.Undefined=C,c.normalizeJsName=function(e){var n=e,t=/([^\w\d_$])/g;return t.test(e)&&(n=e.replace(t,"_")),n},c.getGlobal=s,c.getGlobalInst=l,c.hasWindow=u,c.getWindow=d,c.hasDocument=p,c.getDocument=h,c.hasNavigator=v,c.getNavigator=function(){return v()?navigator:l("navigator")},c.hasHistory=y,c.getHistory=function(){return y()?history:l("history")},c.getLocation=function(){return typeof location===r&&location?location:l("location")},c.getPerformance=function(){return l("performance")},c.hasJSON=m,c.getJSON=x,c.strUndefined=t,c.strObject=r,c.strPrototype=f,c.strFunction=g,c.NotificationManager=ve,c.DiagnosticLogger=Q,c._InternalLogMessage=z,c.ProcessTelemetryContext=G,c.initializePlugins=re,c.sortPlugins=oe,c._InternalMessageId=k,c.InstrumentProto=function(e,n,t){return e?Se(e[f],n,t,!1):null},c.InstrumentProtos=function(e,n,t){return e?be(e[f],n,t,!1):null},c.InstrumentFunc=Se,c.InstrumentFuncs=be,function(e,n,t){var i=Object.defineProperty;if(i)try{return i(e,n,t)}catch(r){}typeof t.value!==undefined&&(e[n]=t.value)}(c,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-core-js.min.js.map

@@ -68,9 +68,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

inst: funcThis,
ctx: null
ctx: null,
set: _replaceArg
};
var hookCtx = [];
var cbArgs = [funcArgs];
_arrLoop(orgArgs, function (arg) {
cbArgs.push(arg);
});
var cbArgs = _createArgs([funcArgs], orgArgs);
function _createArgs(target, theArgs) {
_arrLoop(theArgs, function (arg) {
target.push(arg);
});
return target;
}
function _replaceArg(idx, value) {
orgArgs = _createArgs([], orgArgs);
orgArgs[idx] = value;
cbArgs = _createArgs([funcArgs], orgArgs);
}
// Call the pre-request hooks

@@ -77,0 +86,0 @@ _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 /* Request */);

/*!
* Application Insights JavaScript SDK - Core, 2.5.3
* Application Insights JavaScript SDK - Core, 2.5.4
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(c){"use strict";var n={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},i=function(e,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function e(e,n){function t(){this.constructor=e}i(e,n),e.prototype=null===n?function(e){var n=Object.create;if(n)return n(e);if(null==e)return{};var t=typeof e;if("object"!=t&&"function"!=t)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(n):(t.prototype=n.prototype,new t)}var t="undefined",r="object",f="prototype",g="function",o="window",a="JSON";function s(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function l(e){var n=s();return n&&n[e]?n[e]:e===o&&u()?window:null}function u(){return!(typeof window!==r||!window)}function d(){return u()?window:l(o)}function p(){return!(typeof document!==r||!document)}function h(){return p()?document:l("document")}function v(){return!(typeof navigator!==r||!navigator)}function y(){return!(typeof history!==r||!history)}function m(){return!!(typeof JSON===r&&JSON||null!==l(a))}function x(){return m()?JSON||l(a):null}var C=t,T="attachEvent",I="addEventListener",w="detachEvent",N="removeEventListener";function S(e,n){return typeof e===n}function b(e){return S(e,t)||e===undefined}function _(e){return b(e)||null===e}function L(e,n){return e&&Object[f].hasOwnProperty.call(e,n)}function E(e){return S(e,r)}function F(e){return S(e,g)}function M(e,n,t,i){void 0===i&&(i=!1);var r=!1;if(!_(e))try{_(e[I])?_(e[T])||(e[T]("on"+n,t),r=!0):(e[I](n,t,i),r=!0)}catch(o){}return r}function P(e,n,t,i){if(void 0===i&&(i=!1),!_(e))try{_(e[N])?_(e[w])||e[w]("on"+n,t):e[N](n,t,i)}catch(r){}}var O=(A.isDate=function(e){return"[object Date]"===Object[f].toString.call(e)},A.isString=function(e){return S(e,"string")},A.isNumber=function(e){return S(e,"number")},A.isBoolean=function(e){return S(e,"boolean")},A.disableCookies=function(){A._canUseCookies=!1},A.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(j,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},A.toISOString=function(e){if(A.isDate(e)){var n=function(e){var n=e+"";return 1===n.length&&(n="0"+n),n};return e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},A.arrForEach=function(e,n,t){for(var i=e.length,r=0;r<i;++r)r in e&&n.call(t||e,e[r],r,e)},A.arrIndexOf=function(e,n,t){for(var i=e.length,r=t||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===n)return o;return-1},A.arrMap=function(e,n,t){for(var i=e.length,r=t||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=n.call(r,e[a],e));return o},A.arrReduce=function(e,n,t){var i,r=e.length,o=0;if(3<=arguments.length)i=t;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=n(i,e[o],o,e)),o++;return i},A.objCreate=function(e){if(null==e)return{};if(!E(e)&&!F(e))throw new TypeError("Object prototype may only be an Object: "+e);function n(){}return n[f]=e,new n},A.objKeys=function(e){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(F(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var t=[];for(var i in e)L(e,i)&&t.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)L(e,r[a])&&t.push(r[a]);return t},A.objDefineAccessors=function(e,n,t,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return t&&(o.get=t),i&&(o.set=i),r(e,n,o),!0}catch(a){}return!1},A.addEventHandler=function(e,n){var t=!1,i=d();i&&(t=M(i,e,n),t=M(i.body,e,n)||t);var r=h();return r&&(t=U.Attach(r,e,n)||t),t},A.isTypeof=S,A.isUndefined=b,A.isNullOrUndefined=_,A.hasOwnProperty=L,A.isFunction=F,A.isObject=E,A);function A(){}var D,j=/[xy]/g,U=(R.Attach=M,R.AttachEvent=M,R.Detach=P,R.DetachEvent=P,R);function R(){}(D=c.LoggingSeverity||(c.LoggingSeverity={}))[D.CRITICAL=1]="CRITICAL",D[D.WARNING=2]="WARNING";var k={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73},z=(B.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},B.dataType="MessageData",B.AiNonUserActionablePrefix="AI (Internal): ",B.AiUserActionablePrefix="AI: ",B);function B(e,n,t,i){void 0===t&&(t=!1),this.messageId=e,this.message=(t?B.AiUserActionablePrefix:B.AiNonUserActionablePrefix)+e;var r="";m()&&(r=x().stringify(i));var o=(n?" message:"+B.sanitizeDiagnosticText(n):"")+(i?" props:"+B.sanitizeDiagnosticText(r):"");this.message+=o}var Q=(V.prototype.throwInternal=function(e,n,t,i,r){void 0===r&&(r=!1);var o=new z(n,t,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!O.isUndefined(o)&&o&&!O.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},V.prototype.warnToConsole=function(e){!O.isUndefined(console)&&console&&(O.isFunction(console.warn)?console.warn(e):O.isFunction(console.log)&&console.log(e))},V.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},V.prototype.logInternalMessage=function(e,n){var t=this;if(!t._areInternalMessagesThrottled()){var i=!0,r=t.AIInternalMessagePrefix+n.messageId;if(t._messageLogged[r]?i=!1:t._messageLogged[r]=!0,i&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(n),t._messageCount++),t._messageCount===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",a=new z(k.MessageLimitPerPVExceeded,o,!1);t.queue.push(a),t.warnToConsole(o)}}},V.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},V);function V(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},O.isNullOrUndefined(e)||(O.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),O.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),O.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),O.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var W=O.isFunction,H=function(r,o){var a=this,s=null,l=W(r.processTelemetry),u=W(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,n){if(n=n||o,r&&l){a._hasRun=!0;try{n.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,n)}catch(i){var t=s&&s._hasRun;s&&t||n.diagLog().throwInternal(c.LoggingSeverity.CRITICAL,k.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!t&&s.processTelemetry(e,n)}}else s&&(a._hasRun=!0,s.processTelemetry(e,n))}},K=O.isNullOrUndefined;function q(e,n){var t=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&O.isFunction(o.processTelemetry)){var a=new H(o,n);t.push(a),i&&i.setNext(a),i=a}}return 0<t.length?t[0]:null}var G=function _e(e,o,t,n){var i,r,a,s,l=this,u=null;null!==n&&(e&&O.isFunction(e.getPlugin)?u=function(e,n,t){var i=[],r=!t;if(e)for(;e;){var o=e.getPlugin();!r&&o!==t||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(t),q(i,n)}(e,l,n||e.getPlugin()):n?(i=l,a=e,s=!1,(r=n)&&e&&(a=[],O.arrForEach(e,function(e){!s&&e!==r||(s=!0,a.push(e))})),r&&!s&&(a=a||[]).push(r),u=q(a,i)):O.isUndefined(n)&&(u=q(e,l))),l.core=function(){return t},l.diagLog=function(){return(t||{}).logger||new Q(o||{})},l.getCfg=function(){return o},l.getExtCfg=function(e,n){var t;if(void 0===n&&(n={}),o){var i=o.extensionConfig;i&&e&&(t=i[e])}return t||n},l.getConfig=function(e,n,t){var i;void 0===t&&(t=!1);var r=l.getExtCfg(e,null);return r&&!K(r[n])?i=r[n]:o&&!K(o[n])&&(i=o[n]),K(i)?t:i},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var n=u;n&&(u=n.getNext(),n.processTelemetry(e,l))},l.createNew=function(e,n){return void 0===e&&(e=null),new _e(e||u,o,t,n)}},J=O.isFunction,Z="getPlugin",Y=($.prototype.initialize=function(e,n,t,i){this._baseTelInit(e,n,t,i)},$);function $(){var o=this,a=!1,s=null,l=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){l=e},o.processNext=function(e,n){n?n.processNext(e):l&&J(l.processTelemetry)&&l.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var n=e;if(!n){var t=s||new G(null,{},o.core);n=l&&l[Z]?t.createNew(null,l[Z]):t.createNew(null,l)}return n},o._baseTelInit=function(e,n,t,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&n&&(i=n.getProcessTelContext().getNext());var r=l;l&&l[Z]&&(r=l[Z]()),o.core=n,s=new G(i,e,n,r),a=!0}}var X=O.isFunction,ee="processTelemetry",ne="priority",te="setNextPlugin",ie="isInitialized";function re(n,t){for(var e=[],i=null,r=n.getNext();r;){var o=r.getPlugin();o&&(i&&X(i[te])&&X(o[ee])&&i[te](o),X(o[ie])&&o[ie]()||e.push(o),i=o,r=r.getNext())}O.arrForEach(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function oe(e){return e.sort(function(e,n){var t=0,i=X(n[ee]);return X(e[ee])?t=i?e[ne]-n[ne]:1:i&&(t=-1),t})}var ae=O.arrForEach,se=O.objDefineAccessors;function le(e,n){var t;n&&0<n.length&&(t=n=n.sort(function(e,n){return e.priority-n.priority}),ae(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(n))}var ue,ce=(e(fe,ue=Y),fe.prototype.processTelemetry=function(n,t){var i=this;this._channelQueue&&ae(this._channelQueue,function(e){0<e.length&&i._getTelCtx(t).createNew(e).processNext(n)})},fe.prototype.getChannelControls=function(){return this._channelQueue},fe.prototype.initialize=function(n,t,i){if(!this.isInitialized()){ue.prototype.initialize.call(this,n,t,i),n.isCookieUseDisabled&&O.disableCookies();var e=this._channelQueue=function(e,n){var t=[];if(e&&ae(e,function(e){return le(t,e)}),n){var i=[];ae(n,function(e){500<e.priority&&i.push(e)}),le(t,i)}return t}((n||{}).channels,i);ae(e,function(e){return re(new G(e,n,t),i)})}},fe._staticInit=(se(fe.prototype,"ChannelControls",fe.prototype.getChannelControls),void se(fe.prototype,"channelQueue",fe.prototype.getChannelControls)),fe);function fe(){var e=null!==ue&&ue.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var ge=O.arrForEach,de=O.isNullOrUndefined,pe=(he.prototype.initialize=function(e,n,i,t){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||de(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;t=t||O.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){}}),r._notificationManager=t,e.extensions=de(e.extensions)?[]:e.extensions,(e.extensionConfig=de(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=t,i=i||O.objCreate({throwInternal:function(e,n,t,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,n.concat(e.extensions)),a=oe(a);var s=[],l={};if(ge(a,function(e){if(de(e)||de(e.initialize))throw Error("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(de(l[n])?l[n]=t:i.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+t)),(!n||n<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=oe(a),r._extensions=a,re(new G([o],e,r),a),re(new G(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw Error("No channels available");r._setInit(!0)},he.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},he.prototype.track=function(e){var n=this;e.iKey||(e.iKey=n.config.instrumentationKey),e.time||(e.time=O.toISOString(new Date)),de(e.ver)&&(e.ver="4.0"),n.isInitialized()?(0<n._eventQueue.length&&(ge(n._eventQueue,function(e){n.getProcessTelContext().processNext(e)}),n._eventQueue=[]),n.getProcessTelContext().processNext(e)):n._eventQueue.push(e)},he.prototype.getProcessTelContext=function(){var e=this._extensions,n=e;return e&&0!==e.length||(n=[this._channelController]),new G(n,this.config,this)},he);function he(){var n=!1,e=this;e._extensions=[],e._channelController=new ce,e.isInitialized=function(){return n},e._setInit=function(e){n=e},e._eventQueue=[]}var ve=(ye.prototype.addNotificationListener=function(e){this.listeners.push(e)},ye.prototype.removeNotificationListener=function(e){for(var n=O.arrIndexOf(this.listeners,e);-1<n;)this.listeners.splice(n,1),n=O.arrIndexOf(this.listeners,e)},ye.prototype.eventsSent=function(n){for(var t=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return t.listeners[e].eventsSent(n)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},ye.prototype.eventsDiscarded=function(n,t){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(n,t)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},ye);function ye(){this.listeners=[]}var me,xe=(e(Ce,me=pe),Ce.prototype.initialize=function(e,n){var t=this;t._notificationManager=new ve,t.logger=new Q(e),t.config=e,me.prototype.initialize.call(this,e,n,t.logger,t._notificationManager)},Ce.prototype.getTransmissionControls=function(){return me.prototype.getTransmissionControls.call(this)},Ce.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),me.prototype.track.call(this,e)},Ce.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ce.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ce.prototype.pollInternalLogs=function(i){var n=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var t=n,e=t.logger?t.logger.queue:[];O.arrForEach(e,function(e){var n={name:i||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:O.toISOString(new Date),baseType:z.dataType,baseData:{message:e.message}};t.track(n)}),e.length=0},e)},Ce.prototype._validateTelemetryItem=function(e){if(O.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ce.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n.InvalidEvent)},Ce);function Ce(){return me.call(this)||this}var Te="_aiHooks",Ie=["req","rsp","hkErr","fnErr"];function we(e,n){if(e)for(var t=0;t<e.length&&!n(e[t],t);t++);}function Ne(e,l,u,c,f){0<=f&&f<=2&&we(e,function(e,n){var t=e.cbks,i=t[Ie[f]];if(i){l.ctx=function(){return c[n]=c[n]||{}};try{i.apply(l.inst,u)}catch(a){var r=l.err;try{var o=t[Ie[2]];o&&(l.err=a,o.apply(l.inst,u))}catch(s){}finally{l.err=r}}}})}function Se(e,n,t,i){if(void 0===i&&(i=!0),e&&n&&t){var r=function c(e,n,t){var i=null;return e&&(O.hasOwnProperty(e,n)?i=e:t&&(i=c(e[f],n,!1))),i}(e,n,i),o=r[n];if(typeof o===g){var a=o[Te];if(!a){var s=(u=a={i:0,n:n,f:o,h:[]},function(){var e=arguments,n=u.h,t={name:u.n,inst:this,ctx:null},i=[],r=[t];we(e,function(e){r.push(e)}),Ne(n,t,r,i,0);var o=u.f;try{t.rslt=o.apply(this,e)}catch(a){throw t.err=a,Ne(n,t,r,i,3),a}return Ne(n,t,r,i,1),t.rslt});s[Te]=a,r[n]=s}var l={id:a.i,cbks:t,rm:function(){var t=this.id;we(a.h,function(e,n){return e.id===t&&(a.h.splice(n,1),1)})}};return a.i++,a.h.push(l),l}}var u;return null}function be(t,e,i,r){void 0===r&&(r=!0);var o=null;return we(e,function(e){var n=Se(t,e,i,r);n&&(o=o||[]).push(n)}),o}c.MinChannelPriorty=100,c.EventsDiscardedReason=n,c.AppInsightsCore=xe,c.BaseCore=pe,c.BaseTelemetryPlugin=Y,c.CoreUtils=O,c.EventHelper=U,c.Undefined=C,c.normalizeJsName=function(e){var n=e,t=/([^\w\d_$])/g;return t.test(e)&&(n=e.replace(t,"_")),n},c.getGlobal=s,c.getGlobalInst=l,c.hasWindow=u,c.getWindow=d,c.hasDocument=p,c.getDocument=h,c.hasNavigator=v,c.getNavigator=function(){return v()?navigator:l("navigator")},c.hasHistory=y,c.getHistory=function(){return y()?history:l("history")},c.getLocation=function(){return typeof location===r&&location?location:l("location")},c.getPerformance=function(){return l("performance")},c.hasJSON=m,c.getJSON=x,c.strUndefined=t,c.strObject=r,c.strPrototype=f,c.strFunction=g,c.NotificationManager=ve,c.DiagnosticLogger=Q,c._InternalLogMessage=z,c.ProcessTelemetryContext=G,c.initializePlugins=re,c.sortPlugins=oe,c._InternalMessageId=k,c.InstrumentProto=function(e,n,t){return e?Se(e[f],n,t,!1):null},c.InstrumentProtos=function(e,n,t){return e?be(e[f],n,t,!1):null},c.InstrumentFunc=Se,c.InstrumentFuncs=be,function(e,n,t){var i=Object.defineProperty;if(i)try{return i(e,n,t)}catch(r){}typeof t.value!==undefined&&(e[n]=t.value)}(c,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(c){"use strict";var n={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},i=function(e,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function e(e,n){function t(){this.constructor=e}i(e,n),e.prototype=null===n?function(e){var n=Object.create;if(n)return n(e);if(null==e)return{};var t=typeof e;if("object"!=t&&"function"!=t)throw new TypeError("Object prototype may only be an Object:"+e);function i(){}return i.prototype=e,new i}(n):(t.prototype=n.prototype,new t)}var t="undefined",r="object",f="prototype",g="function",o="window",a="JSON";function s(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function l(e){var n=s();return n&&n[e]?n[e]:e===o&&u()?window:null}function u(){return!(typeof window!==r||!window)}function d(){return u()?window:l(o)}function p(){return!(typeof document!==r||!document)}function h(){return p()?document:l("document")}function v(){return!(typeof navigator!==r||!navigator)}function y(){return!(typeof history!==r||!history)}function m(){return!!(typeof JSON===r&&JSON||null!==l(a))}function x(){return m()?JSON||l(a):null}var C=t,T="attachEvent",I="addEventListener",w="detachEvent",N="removeEventListener";function S(e,n){return typeof e===n}function b(e){return S(e,t)||e===undefined}function _(e){return b(e)||null===e}function L(e,n){return e&&Object[f].hasOwnProperty.call(e,n)}function E(e){return S(e,r)}function F(e){return S(e,g)}function M(e,n,t,i){void 0===i&&(i=!1);var r=!1;if(!_(e))try{_(e[I])?_(e[T])||(e[T]("on"+n,t),r=!0):(e[I](n,t,i),r=!0)}catch(o){}return r}function P(e,n,t,i){if(void 0===i&&(i=!1),!_(e))try{_(e[N])?_(e[w])||e[w]("on"+n,t):e[N](n,t,i)}catch(r){}}var O=(A.isDate=function(e){return"[object Date]"===Object[f].toString.call(e)},A.isString=function(e){return S(e,"string")},A.isNumber=function(e){return S(e,"number")},A.isBoolean=function(e){return S(e,"boolean")},A.disableCookies=function(){A._canUseCookies=!1},A.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(j,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},A.toISOString=function(e){if(A.isDate(e)){var n=function(e){var n=e+"";return 1===n.length&&(n="0"+n),n};return e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},A.arrForEach=function(e,n,t){for(var i=e.length,r=0;r<i;++r)r in e&&n.call(t||e,e[r],r,e)},A.arrIndexOf=function(e,n,t){for(var i=e.length,r=t||0,o=Math.max(0<=r?r:i-Math.abs(r),0);o<i;o++)if(o in e&&e[o]===n)return o;return-1},A.arrMap=function(e,n,t){for(var i=e.length,r=t||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=n.call(r,e[a],e));return o},A.arrReduce=function(e,n,t){var i,r=e.length,o=0;if(3<=arguments.length)i=t;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=n(i,e[o],o,e)),o++;return i},A.objCreate=function(e){if(null==e)return{};if(!E(e)&&!F(e))throw new TypeError("Object prototype may only be an Object: "+e);function n(){}return n[f]=e,new n},A.objKeys=function(e){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(F(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var t=[];for(var i in e)L(e,i)&&t.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)L(e,r[a])&&t.push(r[a]);return t},A.objDefineAccessors=function(e,n,t,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return t&&(o.get=t),i&&(o.set=i),r(e,n,o),!0}catch(a){}return!1},A.addEventHandler=function(e,n){var t=!1,i=d();i&&(t=M(i,e,n),t=M(i.body,e,n)||t);var r=h();return r&&(t=U.Attach(r,e,n)||t),t},A.isTypeof=S,A.isUndefined=b,A.isNullOrUndefined=_,A.hasOwnProperty=L,A.isFunction=F,A.isObject=E,A);function A(){}var D,j=/[xy]/g,U=(R.Attach=M,R.AttachEvent=M,R.Detach=P,R.DetachEvent=P,R);function R(){}(D=c.LoggingSeverity||(c.LoggingSeverity={}))[D.CRITICAL=1]="CRITICAL",D[D.WARNING=2]="WARNING";var k={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73},z=(B.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},B.dataType="MessageData",B.AiNonUserActionablePrefix="AI (Internal): ",B.AiUserActionablePrefix="AI: ",B);function B(e,n,t,i){void 0===t&&(t=!1),this.messageId=e,this.message=(t?B.AiUserActionablePrefix:B.AiNonUserActionablePrefix)+e;var r="";m()&&(r=x().stringify(i));var o=(n?" message:"+B.sanitizeDiagnosticText(n):"")+(i?" props:"+B.sanitizeDiagnosticText(r):"");this.message+=o}var Q=(V.prototype.throwInternal=function(e,n,t,i,r){void 0===r&&(r=!1);var o=new z(n,t,r,i),a=this;if(a.enableDebugExceptions())throw o;if(!O.isUndefined(o)&&o&&!O.isUndefined(o.message)){if(r){var s=+o.messageId;!a._messageLogged[s]&&a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&(a.warnToConsole(o.message),a._messageLogged[s]=!0)}else a.consoleLoggingLevel()>=c.LoggingSeverity.WARNING&&a.warnToConsole(o.message);a.logInternalMessage(e,o)}},V.prototype.warnToConsole=function(e){!O.isUndefined(console)&&console&&(O.isFunction(console.warn)?console.warn(e):O.isFunction(console.log)&&console.log(e))},V.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},V.prototype.logInternalMessage=function(e,n){var t=this;if(!t._areInternalMessagesThrottled()){var i=!0,r=t.AIInternalMessagePrefix+n.messageId;if(t._messageLogged[r]?i=!1:t._messageLogged[r]=!0,i&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(n),t._messageCount++),t._messageCount===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",a=new z(k.MessageLimitPerPVExceeded,o,!1);t.queue.push(a),t.warnToConsole(o)}}},V.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},V);function V(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},O.isNullOrUndefined(e)||(O.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),O.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),O.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),O.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var W=O.isFunction,H=function(r,o){var a=this,s=null,l=W(r.processTelemetry),u=W(r.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return r},a.getNext=function(){return s},a.setNext=function(e){s=e},a.processTelemetry=function(e,n){if(n=n||o,r&&l){a._hasRun=!0;try{n.setNext(s),u&&r.setNextPlugin(s),s&&(s._hasRun=!1),r.processTelemetry(e,n)}catch(i){var t=s&&s._hasRun;s&&t||n.diagLog().throwInternal(c.LoggingSeverity.CRITICAL,k.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+i),s&&!t&&s.processTelemetry(e,n)}}else s&&(a._hasRun=!0,s.processTelemetry(e,n))}},K=O.isNullOrUndefined;function q(e,n){var t=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];if(o&&O.isFunction(o.processTelemetry)){var a=new H(o,n);t.push(a),i&&i.setNext(a),i=a}}return 0<t.length?t[0]:null}var G=function _e(e,o,t,n){var i,r,a,s,l=this,u=null;null!==n&&(e&&O.isFunction(e.getPlugin)?u=function(e,n,t){var i=[],r=!t;if(e)for(;e;){var o=e.getPlugin();!r&&o!==t||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(t),q(i,n)}(e,l,n||e.getPlugin()):n?(i=l,a=e,s=!1,(r=n)&&e&&(a=[],O.arrForEach(e,function(e){!s&&e!==r||(s=!0,a.push(e))})),r&&!s&&(a=a||[]).push(r),u=q(a,i)):O.isUndefined(n)&&(u=q(e,l))),l.core=function(){return t},l.diagLog=function(){return(t||{}).logger||new Q(o||{})},l.getCfg=function(){return o},l.getExtCfg=function(e,n){var t;if(void 0===n&&(n={}),o){var i=o.extensionConfig;i&&e&&(t=i[e])}return t||n},l.getConfig=function(e,n,t){var i;void 0===t&&(t=!1);var r=l.getExtCfg(e,null);return r&&!K(r[n])?i=r[n]:o&&!K(o[n])&&(i=o[n]),K(i)?t:i},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var n=u;n&&(u=n.getNext(),n.processTelemetry(e,l))},l.createNew=function(e,n){return void 0===e&&(e=null),new _e(e||u,o,t,n)}},J=O.isFunction,Z="getPlugin",Y=($.prototype.initialize=function(e,n,t,i){this._baseTelInit(e,n,t,i)},$);function $(){var o=this,a=!1,s=null,l=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){l=e},o.processNext=function(e,n){n?n.processNext(e):l&&J(l.processTelemetry)&&l.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var n=e;if(!n){var t=s||new G(null,{},o.core);n=l&&l[Z]?t.createNew(null,l[Z]):t.createNew(null,l)}return n},o._baseTelInit=function(e,n,t,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&n&&(i=n.getProcessTelContext().getNext());var r=l;l&&l[Z]&&(r=l[Z]()),o.core=n,s=new G(i,e,n,r),a=!0}}var X=O.isFunction,ee="processTelemetry",ne="priority",te="setNextPlugin",ie="isInitialized";function re(n,t){for(var e=[],i=null,r=n.getNext();r;){var o=r.getPlugin();o&&(i&&X(i[te])&&X(o[ee])&&i[te](o),X(o[ie])&&o[ie]()||e.push(o),i=o,r=r.getNext())}O.arrForEach(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function oe(e){return e.sort(function(e,n){var t=0,i=X(n[ee]);return X(e[ee])?t=i?e[ne]-n[ne]:1:i&&(t=-1),t})}var ae=O.arrForEach,se=O.objDefineAccessors;function le(e,n){var t;n&&0<n.length&&(t=n=n.sort(function(e,n){return e.priority-n.priority}),ae(t,function(e){if(e.priority<500)throw Error("Channel has invalid priority"+e.identifier)}),e.push(n))}var ue,ce=(e(fe,ue=Y),fe.prototype.processTelemetry=function(n,t){var i=this;this._channelQueue&&ae(this._channelQueue,function(e){0<e.length&&i._getTelCtx(t).createNew(e).processNext(n)})},fe.prototype.getChannelControls=function(){return this._channelQueue},fe.prototype.initialize=function(n,t,i){if(!this.isInitialized()){ue.prototype.initialize.call(this,n,t,i),n.isCookieUseDisabled&&O.disableCookies();var e=this._channelQueue=function(e,n){var t=[];if(e&&ae(e,function(e){return le(t,e)}),n){var i=[];ae(n,function(e){500<e.priority&&i.push(e)}),le(t,i)}return t}((n||{}).channels,i);ae(e,function(e){return re(new G(e,n,t),i)})}},fe._staticInit=(se(fe.prototype,"ChannelControls",fe.prototype.getChannelControls),void se(fe.prototype,"channelQueue",fe.prototype.getChannelControls)),fe);function fe(){var e=null!==ue&&ue.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=500,e}var ge=O.arrForEach,de=O.isNullOrUndefined,pe=(he.prototype.initialize=function(e,n,i,t){var r=this;if(r.isInitialized())throw Error("Core should not be initialized more than once");if(!e||de(e.instrumentationKey))throw Error("Please provide instrumentation key");r.config=e;var o=r._channelController;t=t||O.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){}}),r._notificationManager=t,e.extensions=de(e.extensions)?[]:e.extensions,(e.extensionConfig=de(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=t,i=i||O.objCreate({throwInternal:function(e,n,t,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),r.logger=i;var a=[];a.push.apply(a,n.concat(e.extensions)),a=oe(a);var s=[],l={};if(ge(a,function(e){if(de(e)||de(e.initialize))throw Error("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(de(l[n])?l[n]=t:i.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+t)),(!n||n<o.priority)&&s.push(e)}),a.push(o),s.push(o),a=oe(a),r._extensions=a,re(new G([o],e,r),a),re(new G(s,e,r),a),r._extensions=s,0===r.getTransmissionControls().length)throw Error("No channels available");r._setInit(!0)},he.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},he.prototype.track=function(e){var n=this;e.iKey||(e.iKey=n.config.instrumentationKey),e.time||(e.time=O.toISOString(new Date)),de(e.ver)&&(e.ver="4.0"),n.isInitialized()?(0<n._eventQueue.length&&(ge(n._eventQueue,function(e){n.getProcessTelContext().processNext(e)}),n._eventQueue=[]),n.getProcessTelContext().processNext(e)):n._eventQueue.push(e)},he.prototype.getProcessTelContext=function(){var e=this._extensions,n=e;return e&&0!==e.length||(n=[this._channelController]),new G(n,this.config,this)},he);function he(){var n=!1,e=this;e._extensions=[],e._channelController=new ce,e.isInitialized=function(){return n},e._setInit=function(e){n=e},e._eventQueue=[]}var ve=(ye.prototype.addNotificationListener=function(e){this.listeners.push(e)},ye.prototype.removeNotificationListener=function(e){for(var n=O.arrIndexOf(this.listeners,e);-1<n;)this.listeners.splice(n,1),n=O.arrIndexOf(this.listeners,e)},ye.prototype.eventsSent=function(n){for(var t=this,e=function(e){i.listeners[e].eventsSent&&setTimeout(function(){return t.listeners[e].eventsSent(n)},0)},i=this,r=0;r<this.listeners.length;++r)e(r)},ye.prototype.eventsDiscarded=function(n,t){for(var i=this,e=function(e){r.listeners[e].eventsDiscarded&&setTimeout(function(){return i.listeners[e].eventsDiscarded(n,t)},0)},r=this,o=0;o<this.listeners.length;++o)e(o)},ye);function ye(){this.listeners=[]}var me,xe=(e(Ce,me=pe),Ce.prototype.initialize=function(e,n){var t=this;t._notificationManager=new ve,t.logger=new Q(e),t.config=e,me.prototype.initialize.call(this,e,n,t.logger,t._notificationManager)},Ce.prototype.getTransmissionControls=function(){return me.prototype.getTransmissionControls.call(this)},Ce.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),me.prototype.track.call(this,e)},Ce.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ce.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ce.prototype.pollInternalLogs=function(i){var n=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var t=n,e=t.logger?t.logger.queue:[];O.arrForEach(e,function(e){var n={name:i||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:O.toISOString(new Date),baseType:z.dataType,baseData:{message:e.message}};t.track(n)}),e.length=0},e)},Ce.prototype._validateTelemetryItem=function(e){if(O.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ce.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],n.InvalidEvent)},Ce);function Ce(){return me.call(this)||this}var Te="_aiHooks",Ie=["req","rsp","hkErr","fnErr"];function we(e,n){if(e)for(var t=0;t<e.length&&!n(e[t],t);t++);}function Ne(e,l,u,c,f){0<=f&&f<=2&&we(e,function(e,n){var t=e.cbks,i=t[Ie[f]];if(i){l.ctx=function(){return c[n]=c[n]||{}};try{i.apply(l.inst,u)}catch(a){var r=l.err;try{var o=t[Ie[2]];o&&(l.err=a,o.apply(l.inst,u))}catch(s){}finally{l.err=r}}}})}function Se(e,n,t,i){if(void 0===i&&(i=!0),e&&n&&t){var r=function c(e,n,t){var i=null;return e&&(O.hasOwnProperty(e,n)?i=e:t&&(i=c(e[f],n,!1))),i}(e,n,i),o=r[n];if(typeof o===g){var a=o[Te];if(!a){var s=(u=a={i:0,n:n,f:o,h:[]},function(){var t=arguments,e=u.h,i={name:u.n,inst:this,ctx:null,set:function(e,n){(t=o([],t))[e]=n,r=o([i],t)}},n=[],r=o([i],t);function o(n,e){return we(e,function(e){n.push(e)}),n}Ne(e,i,r,n,0);var a=u.f;try{i.rslt=a.apply(this,t)}catch(s){throw i.err=s,Ne(e,i,r,n,3),s}return Ne(e,i,r,n,1),i.rslt});s[Te]=a,r[n]=s}var l={id:a.i,cbks:t,rm:function(){var t=this.id;we(a.h,function(e,n){return e.id===t&&(a.h.splice(n,1),1)})}};return a.i++,a.h.push(l),l}}var u;return null}function be(t,e,i,r){void 0===r&&(r=!0);var o=null;return we(e,function(e){var n=Se(t,e,i,r);n&&(o=o||[]).push(n)}),o}c.MinChannelPriorty=100,c.EventsDiscardedReason=n,c.AppInsightsCore=xe,c.BaseCore=pe,c.BaseTelemetryPlugin=Y,c.CoreUtils=O,c.EventHelper=U,c.Undefined=C,c.normalizeJsName=function(e){var n=e,t=/([^\w\d_$])/g;return t.test(e)&&(n=e.replace(t,"_")),n},c.getGlobal=s,c.getGlobalInst=l,c.hasWindow=u,c.getWindow=d,c.hasDocument=p,c.getDocument=h,c.hasNavigator=v,c.getNavigator=function(){return v()?navigator:l("navigator")},c.hasHistory=y,c.getHistory=function(){return y()?history:l("history")},c.getLocation=function(){return typeof location===r&&location?location:l("location")},c.getPerformance=function(){return l("performance")},c.hasJSON=m,c.getJSON=x,c.strUndefined=t,c.strObject=r,c.strPrototype=f,c.strFunction=g,c.NotificationManager=ve,c.DiagnosticLogger=Q,c._InternalLogMessage=z,c.ProcessTelemetryContext=G,c.initializePlugins=re,c.sortPlugins=oe,c._InternalMessageId=k,c.InstrumentProto=function(e,n,t){return e?Se(e[f],n,t,!1):null},c.InstrumentProtos=function(e,n,t){return e?be(e[f],n,t,!1):null},c.InstrumentFunc=Se,c.InstrumentFuncs=be,function(e,n,t){var i=Object.defineProperty;if(i)try{return i(e,n,t)}catch(r){}typeof t.value!==undefined&&(e[n]=t.value)}(c,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-core-js.min.js.map
{
"name": "@microsoft/applicationinsights-core-js",
"author": "Microsoft Corporation",
"version": "2.5.3",
"version": "2.5.4",
"description": "Microsoft Application Insights Core Javascript SDK",

@@ -50,4 +50,4 @@ "keywords": [

"@microsoft/dynamicproto-js": "^0.5.2",
"tslib": "1.10.0"
"tslib": "^1.11.1"
}
}

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

/**
* Allows the hook functions to replace the original arguments
* @param idx - The argument index (0 based)
* @param value - The new value for the argument
*/
set: (idx:number, value:any) => void;
/**
* The result of the original method, only populated after the original method has returned

@@ -75,0 +82,0 @@ */

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

export interface ICustomProperties {
[key: string]: any;
}

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

// Capture the original arguments passed to the method
let orgArgs = arguments;
let orgArgs = arguments as any;
let hooks = aiHook.h;

@@ -87,11 +87,23 @@

inst: funcThis,
ctx: null
ctx: null,
set: _replaceArg
};
let hookCtx: any[] = [];
let cbArgs: any[] = [funcArgs];
_arrLoop((orgArgs as any), (arg) => {
cbArgs.push(arg);
});
let cbArgs = _createArgs([funcArgs], orgArgs);
function _createArgs(target:any[], theArgs:any[]): any[] {
_arrLoop((theArgs as any), (arg) => {
target.push(arg);
});
return target;
}
function _replaceArg(idx:number, value:any) {
orgArgs = _createArgs([], orgArgs);
orgArgs[idx] = value;
cbArgs = _createArgs([funcArgs], orgArgs);
}
// Call the pre-request hooks

@@ -98,0 +110,0 @@ _doCallbacks(hooks, funcArgs, cbArgs, hookCtx, CallbackType.Request);

@@ -58,2 +58,8 @@ /**

/**
* Allows the hook functions to replace the original arguments
* @param idx - The argument index (0 based)
* @param value - The new value for the argument
*/
set: (idx: number, value: any) => void;
/**
* The result of the original method, only populated after the original method has returned

@@ -60,0 +66,0 @@ */

@@ -50,2 +50,3 @@ /**

export interface ICustomProperties {
[key: string]: any;
}

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 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