@microsoft/applicationinsights-dependencies-js
Advanced tools
Comparing version 2.5.1 to 2.5.2
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?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,g,i,k,o,s=function(){return(s=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=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=k=k||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,R="undefined",c="object",U="prototype",f="function",l="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==R&&globalThis?globalThis:typeof self!==R&&self?self:typeof window!==R&&window?window:typeof global!==R&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===l&&v()?window:null}function v(){return Boolean(typeof window===c&&window)}function y(){return v()?window:m(l)}function x(){return function e(){return Boolean(typeof document===c&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===c&&navigator)}()?navigator:m("navigator")}function H(){return typeof location===c&&location?location:m(d)}function j(){return m(p)}function I(){return Boolean(typeof JSON===c&&JSON||null!==m(h))}function C(){return I()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",D="removeEventListener";function _(e,t){return typeof e===t}function w(e){return _(e,R)||e===undefined}function A(e){return w(e)||null===e}function M(e,t){return e&&Object[U].hasOwnProperty.call(e,t)}function E(e){return _(e,c)}function L(e){return _(e,f)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!A(e))try{A(e[b])?A(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function P(e,t,n,r){if(void 0===r&&(r=!1),!A(e))try{A(e[D])?A(e[N])||e[N]("on"+t,n):e[D](t,n,r)}catch(i){}}var z=(F.isDate=function(e){return"[object Date]"===Object[U].toString.call(e)},F.isString=function(e){return _(e,"string")},F.isNumber=function(e){return _(e,"number")},F.isBoolean=function(e){return _(e,"boolean")},F.disableCookies=function(){F._canUseCookies=!1},F.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)})},F.toISOString=function(e){if(F.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"}},F.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)},F.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},F.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},F.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},F.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[U]=e,new t},F.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)M(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++)M(e,i[o])&&n.push(i[o]);return n},F.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},F.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=B.Attach(i,e,t)||n),n},F.isTypeof=_,F.isUndefined=w,F.isNullOrUndefined=A,F.hasOwnProperty=M,F.isFunction=L,F.isObject=E,F);function F(){}var G,X,W=/[xy]/g,B=(K.Attach=q,K.AttachEvent=q,K.Detach=P,K.DetachEvent=P,K);function K(){}(X=G=G||{})[X.CRITICAL=1]="CRITICAL",X[X.WARNING=2]="WARNING";var V=1,Q=2,$=3,J=4,Y=5,Z=6,ee=13,te=14,ne=15,re=16,ie=17,ae=18,oe=23,se=49,ue=52,ce=55,le=56,fe=57,de=61,pe=66,ge=68,he=69,me=71,ve=73,ye=(xe.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},xe.dataType="MessageData",xe.AiNonUserActionablePrefix="AI (Internal): ",xe.AiUserActionablePrefix="AI: ",xe);function xe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?xe.AiUserActionablePrefix:xe.AiNonUserActionablePrefix)+e;var i="";I()&&(i=C().stringify(r));var a=(t?" message:"+xe.sanitizeDiagnosticText(t):"")+(r?" props:"+xe.sanitizeDiagnosticText(i):"");this.message+=a}var Se=(Ie.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new ye(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!z.isUndefined(a)&&a&&!z.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Ie.prototype.warnToConsole=function(e){!z.isUndefined(console)&&console&&(z.isFunction(console.warn)?console.warn(e):z.isFunction(console.log)&&console.log(e))},Ie.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Ie.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 ye(oe,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Ie.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Ie);function Ie(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},z.isNullOrUndefined(e)||(z.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),z.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),z.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),z.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Ce=z.isFunction,Te=function Tr(i,a){var o=this,s=null,u=Ce(i.processTelemetry),c=Ce(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&&u){o._hasRun=!0;try{t.setNext(s),c&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(G.CRITICAL,ve,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},be=z.isNullOrUndefined;function Ne(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&&z.isFunction(a.processTelemetry)){var o=new Te(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var De=function br(e,a,n,t){var o=this,r=null;null!==t&&(e&&z.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),Ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],z.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Ne(r,t)}(e,o,t):z.isUndefined(t)&&(r=Ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Se(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&&!be(i[t])?r=i[t]:a&&!be(a[t])&&(r=a[t]),be(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 br(e||r,a,n,t)}},_e=z.isFunction,we="getPlugin",Ae=(Me.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Me);function Me(){var a=this,o=!1,s=null,u=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){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&_e(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new De(null,{},a.core);t=u&&u[we]?n.createNew(null,u[we]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[we]&&(i=u[we]()),a.core=t,s=new De(r,e,t,i),o=!0}}var Ee=z.isFunction,Le="processTelemetry",qe="priority",ke="setNextPlugin",Re="isInitialized";function Ue(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ee(r[ke])&&Ee(a[Le])&&r[ke](a),Ee(a[Re])&&a[Re]()||e.push(a),r=a,i=i.getNext())}z.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function Oe(e){return e.sort(function(e,t){var n=0,r=Ee(t[Le]);return Ee(e[Le])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var He=500,je="Channel has invalid priority",Pe=z.arrForEach,ze=z.objDefineAccessors;function Fe(e,t){t&&0<t.length&&(function n(e){Pe(e,function(e){if(e.priority<He)throw Error(je+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Ge,Xe=(t(We,Ge=Ae),We.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Pe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},We.prototype.getChannelControls=function(){return this._channelQueue},We.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Ge.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&z.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Pe(e,function(e){return Fe(n,e)}),t){var r=[];Pe(t,function(e){e.priority>He&&r.push(e)}),Fe(n,r)}return n}((t||{}).channels,r);Pe(e,function(e){return Ue(new De(e,t,n),r)})}},We._staticInit=(ze(We.prototype,"ChannelControls",We.prototype.getChannelControls),void ze(We.prototype,"channelQueue",We.prototype.getChannelControls)),We);function We(){var e=null!==Ge&&Ge.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=He,e}var Be=z.arrForEach,Ke=z.isNullOrUndefined,Ve=(Qe.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||Ke(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||z.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=Ke(e.extensions)?[]:e.extensions,(e.extensionConfig=Ke(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||z.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=Oe(o);var s=[],u={};if(Be(o,function(e){if(Ke(e)||Ke(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Ke(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=Oe(o),i._extensions=o,Ue(new De([a],e,i),o),Ue(new De(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Qe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Qe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=z.toISOString(new Date)),Ke(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Be(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Qe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new De(t,this.config,this)},Qe);function Qe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Xe,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var $e=(Je.prototype.addNotificationListener=function(e){this.listeners.push(e)},Je.prototype.removeNotificationListener=function(e){for(var t=z.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=z.arrIndexOf(this.listeners,e)},Je.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)},Je.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)},Je);function Je(){this.listeners=[]}var Ye;t(Ze,Ye=Ve),Ze.prototype.initialize=function(e,t){var n=this;n._notificationManager=new $e,n.logger=new Se(e),n.config=e,Ye.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ze.prototype.getTransmissionControls=function(){return Ye.prototype.getTransmissionControls.call(this)},Ze.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ye.prototype.track.call(this,e)},Ze.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ze.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ze.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];z.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:z.toISOString(new Date),baseType:ye.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ze.prototype._validateTelemetryItem=function(e){if(z.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ze.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function Ze(){return Ye.call(this)||this}var et="_aiHooks",tt=["req","rsp","hkErr","fnErr"];function nt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function rt(e,u,c,l,f){0<=f&&f<=2&&nt(e,function(e,t){var n=e.cbks,r=n[tt[f]];if(r){u.ctx=function(){return l[t]=l[t]||{}};try{r.apply(u.inst,c)}catch(o){var i=u.err;try{var a=n[tt[2]];a&&(u.err=o,a.apply(u.inst,c))}catch(s){}finally{u.err=i}}}})}function it(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function c(e,t,n){var r=null;return e&&(e.hasOwnProperty(t)?r=e:n&&(r=c(e[U],t,!1))),r}(e,t,r),a=i[t];if(typeof a===f){var o=a[et];if(!o){var s=function l(s){return function(){var e=arguments,t=s.h,n={name:s.n,inst:this,ctx:null},r=[],i=[n];nt(e,function(e){i.push(e)}),rt(t,n,i,r,0);var a=s.f;try{n.rslt=a.apply(this,e)}catch(o){throw n.err=o,rt(t,n,i,r,3),o}return rt(t,n,i,r,1),n.rslt}}(o={i:0,n:t,f:a,h:[]});s[et]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;nt(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var at=(ot.requestContextHeader="Request-Context",ot.requestContextTargetKey="appId",ot.requestContextAppIdFormat="appId=cid-v1:",ot.requestIdHeader="Request-Id",ot.traceParentHeader="traceparent",ot.sdkContextHeader="Sdk-Context",ot.sdkContextHeaderAppIdRequest="appId",ot.requestContextHeaderLowerCase="request-context",ot);function ot(){}var st=(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(G.WARNING,fe,"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(G.WARNING,de,"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,pe)},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(G.WARNING,le,"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(G.WARNING,ue,"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(z.isObject(i)&&I())try{i=C().stringify(i)}catch(a){e.throwInternal(G.WARNING,se,"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,he).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(G.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 z.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 ct=S(),lt=z.isString,ft=null;var dt=(pt.createDomEvent=function(e){var t=null;if(z.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},pt.disableStorage=function(){pt._canUseLocalStorage=!1,pt._canUseSessionStorage=!1},pt._getLocalStorageObject=function(){return pt.canUseLocalStorage()?pt._getVerifiedStorageObject(a.LocalStorage):null},pt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(z.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("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},pt.isInternalApplicationInsightsEndpoint=function(e){return-1!==pt._internalEndpoints.indexOf(e.toLowerCase())},pt.canUseLocalStorage=function(){return pt._canUseLocalStorage===undefined&&(pt._canUseLocalStorage=!!pt._getVerifiedStorageObject(a.LocalStorage)),pt._canUseLocalStorage},pt.getStorage=function(e,t){var n=pt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,V,"Browser failed read of local storage. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return null},pt.setStorage=function(e,t,n){var r=pt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,$,"Browser failed write to local storage. "+pt.getExceptionName(i),{exception:pt.dump(i)})}return!1},pt.removeStorage=function(e,t){var n=pt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,Y,"Browser failed removal of local storage item. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return!1},pt._getSessionStorageObject=function(){return pt.canUseSessionStorage()?pt._getVerifiedStorageObject(a.SessionStorage):null},pt.canUseSessionStorage=function(){return pt._canUseSessionStorage===undefined&&(pt._canUseSessionStorage=!!pt._getVerifiedStorageObject(a.SessionStorage)),pt._canUseSessionStorage},pt.getSessionStorageKeys=function(){var e=[];if(pt.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},pt.getSessionStorage=function(e,t){var n=pt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,Q,"Browser failed read of session storage. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return null},pt.setSessionStorage=function(e,t,n){var r=pt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,J,"Browser failed write to session storage. "+pt.getExceptionName(i),{exception:pt.dump(i)})}return!1},pt.removeSessionStorage=function(e,t){var n=pt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,Z,"Browser failed removal of session storage item. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return!1},pt.disableCookies=function(){z.disableCookies()},pt.canUseCookies=function(e){if(z._canUseCookies===undefined){z._canUseCookies=!1;try{z._canUseCookies=pt.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,ge,"Cannot access document.cookie - "+pt.getExceptionName(t),{exception:pt.dump(t)})}}return z._canUseCookies},pt.disallowsSameSiteNone=function(e){return!!lt(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"))},pt.setCookie=function(e,t,n,r){if(pt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=H();o&&"https:"===o.protocol&&(a=";secure",null===ft&&(ft=pt.disallowsSameSiteNone((S()||{}).userAgent)),ft||(n+=";SameSite=None")),pt.document.cookie=t+"="+n+i+";path=/"+a}},pt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},pt.getCookie=function(e,t){if(pt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=pt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=pt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},pt.deleteCookie=function(e,t){pt.canUseCookies(e)&&(pt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},pt.trim=function(e){return lt(e)?e.replace(/^\s+|\s+$/g,""):e},pt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},pt.random32=function(){return 4294967296*Math.random()|0},pt.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=pt.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)},pt.isArray=function(e){return"[object Array]"===Object[U].toString.call(e)},pt.isError=function(e){return"[object Error]"===Object[U].toString.call(e)},pt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ct?(ct.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},pt.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},pt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},pt.dump=function(e){var t=Object[U].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":I()&&(n=C().stringify(e)),t+n},pt.getExceptionName=function(e){return"[object Error]"===Object[U].toString.call(e)?e.name:""},pt.addEventHandler=function(e,t){return B.Attach(y(),e,t)},pt.IsBeaconApiSupported=function(){return"sendBeacon"in ct&&ct.sendBeacon},pt.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},pt.document=x()||{},pt._canUseLocalStorage=undefined,pt._canUseSessionStorage=undefined,pt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],pt.NotSpecified="not_specified",pt.isDate=z.isDate,pt.toISOStringForIE8=z.toISOString,pt);function pt(){}var gt=(ht.parseUrl=function(e){return ht.htmlAnchorElement||(ht.htmlAnchorElement=ht.document.createElement?ht.document.createElement("a"):{host:ht.parseHost(e)}),ht.htmlAnchorElement.href=e,ht.htmlAnchorElement},ht.getAbsoluteUrl=function(e){var t,n=ht.parseUrl(e);return n&&(t=n.href),t},ht.getPathName=function(e){var t,n=ht.parseUrl(e);return n&&(t=n.pathname),t},ht.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ht.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&<(t[2])&&0<t[2].length)return t[2]}return null},ht.document=x()||{},ht);function ht(){}var mt=(vt.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=gt.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(z.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},vt.getCorrelationContext=function(e){if(e){var t=vt.getCorrelationContextValue(e,at.requestContextTargetKey);if(t&&t!==vt.correlationIdPrefix)return t}},vt.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},vt.correlationIdPrefix="cid-v1:",vt);function vt(){}var yt=(xt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=gt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=st.sanitizeString(e,n?n+" "+u:u)}else a=st.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},xt);function xt(){}var St=(It.Now=function(){var e=j();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},It.GetDuration=function(e,t){var n=null;return 0===e||0===t||z.isNullOrUndefined(e)||z.isNullOrUndefined(t)||(n=t-e),n},It);function It(){}var Ct,Tt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",bt=(t(Nt,Ct=function Nr(){}),Nt);function Nt(){return Ct.call(this)||this}var Dt;t(_t,Dt=function Dr(){this.ver=1,this.sampleRate=100,this.tags={}});function _t(e,t,n){var r=Dt.call(this)||this;return r.name=st.sanitizeString(e,n)||dt.NotSpecified,r.data=t,r.time=z.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var wt,At=function _r(){},Mt=(t(Et,wt=At),Et);function Et(){var e=wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt;t(qt,Lt=Mt),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",qt.dataType="EventData";function qt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=st.sanitizeString(e,t)||dt.NotSpecified,i.properties=st.sanitizeProperties(e,n),i.measurements=st.sanitizeMeasurements(e,r),i}var kt,Rt=function wr(){},Ut=(t(Ot,kt=At),Ot);function Ot(){var e=kt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Ht,jt=function Ar(){this.hasFullStack=!0,this.parsedStack=[]};t(Pt,Ht=Ut),Pt.CreateFromInterface=function(t,e){var n=e.exceptions&&z.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new Pt(t,s({},e,{exceptions:n}))},Pt.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&&z.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Pt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Pt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Pt.dataType="ExceptionData";function Pt(e,t,n,r,i,a){var o=Ht.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=st.sanitizeProperties(e,n),o.measurements=st.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,z.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var zt,Ft=(t(Gt,zt=jt),Gt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&z.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}},Gt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&z.arrMap(t.parsedStack,function(e){return Wt.CreateFromInterface(e)})||t.parsedStack;return new Gt(e,s({},t,{parsedStack:n}))},Gt.parseStack=function(e){var t;if(z.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(Wt.regex.test(o)){var s=new Wt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,c=t.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=c,u++,c--}}return t},Gt);function Gt(e,t){var n=zt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=st.sanitizeString(e,t.name)||dt.NotSpecified,n.message=st.sanitizeMessage(e,t.message)||dt.NotSpecified;var r=t.stack;n.parsedStack=Gt.parseStack(r),n.stack=st.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 Xt,Wt=(t(Bt,Xt=Rt),Bt.CreateFromInterface=function(e){return new Bt(e,null)},Bt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Bt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Bt.baseSize=58,Bt);function Bt(e,t){var n=Xt.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.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(Bt.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+=Bt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Kt,Vt,Qt,$t=(t(Jt,Kt=At),Jt);function Jt(){var e=Kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Qt=Vt=Vt||{})[Qt.Measurement=0]="Measurement",Qt[Qt.Aggregation=1]="Aggregation";var Yt,Zt=(t(en,Yt=function Mr(){this.kind=Vt.Measurement}),en);function en(){var e=null!==Yt&&Yt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var tn;t(nn,tn=$t),nn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",nn.dataType="MetricData";function nn(e,t,n,r,i,a,o,s){var u=tn.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new Zt;return c.count=0<r?r:undefined,c.max=isNaN(a)||null===a?undefined:a,c.min=isNaN(i)||null===i?undefined:i,c.name=st.sanitizeString(e,t)||dt.NotSpecified,c.value=n,u.metrics=[c],u.properties=st.sanitizeProperties(e,o),u.measurements=st.sanitizeMeasurements(e,s),u}var rn,an=(t(on,rn=Mt),on);function on(){var e=rn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var sn;t(un,sn=an),un.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",un.dataType="PageviewData";function un(e,t,n,r,i,a,o){var s=sn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=st.sanitizeId(e,o),s.url=st.sanitizeUrl(e,n),s.name=st.sanitizeString(e,t)||dt.NotSpecified,isNaN(r)||(s.duration=dt.msToTimeSpan(r)),s.properties=st.sanitizeProperties(e,i),s.measurements=st.sanitizeMeasurements(e,a),s}var cn,ln=(t(fn,cn=At),fn);function fn(){var e=cn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var dn,pn=(t(gn,dn=ln),gn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",gn.dataType="RemoteDependencyData",gn);function gn(e,t,n,r,i,a,o,s,u,c,l,f){void 0===u&&(u="Ajax");var d=dn.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=dt.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=st.sanitizeString(e,u);var p=yt.ParseDependencyPath(e,n,s,r);return d.data=st.sanitizeUrl(e,r)||p.data,d.target=st.sanitizeString(e,p.target),c&&(d.target=d.target+" | "+c),d.name=st.sanitizeString(e,p.name),d.properties=st.sanitizeProperties(e,l),d.measurements=st.sanitizeMeasurements(e,f),d}var hn,mn=(t(vn,hn=At),vn);function vn(){var e=hn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yn;t(xn,yn=mn),xn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",xn.dataType="MessageData";function xn(e,t,n,r,i){var a=yn.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||dt.NotSpecified,a.message=st.sanitizeMessage(e,t),a.properties=st.sanitizeProperties(e,r),a.measurements=st.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Sn,In=(t(Cn,Sn=an),Cn);function Cn(){var e=Sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Tn;t(bn,Tn=In),bn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",bn.dataType="PageviewPerformanceData";function bn(e,t,n,r,i,a,o){var s=Tn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=st.sanitizeUrl(e,n),s.name=st.sanitizeString(e,t)||dt.NotSpecified,s.properties=st.sanitizeProperties(e,i),s.measurements=st.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 Nn,Dn,_n;t(wn,Nn=bt);function wn(e,t){var n=Nn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(_n=Dn=Dn||{})[_n.Verbose=0]="Verbose",_n[_n.Information=1]="Information",_n[_n.Warning=2]="Warning",_n[_n.Error=3]="Error",_n[_n.Critical=4]="Critical";var An=(Mn.create=function(e,t,n,r,i,a){if(n=st.sanitizeString(r,n)||dt.NotSpecified,z.isNullOrUndefined(e)||z.isNullOrUndefined(t)||z.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:z.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!z.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Mn);function Mn(){}var En="constructor",Ln="prototype",qn="function",kn="getPrototypeOf",Rn="_dynInstFuncs",Un="_isDynProxy",On="_dynClass",Hn="_dynCls$",jn="_unknown_",Pn=0;function zn(e,t){return e&&Object[Ln].hasOwnProperty.call(e,t)}function Fn(e){return typeof e===qn}function Gn(e){return e&&(e===Object[Ln]||e===Array[Ln])}function Xn(e){return Gn(e)||e===Function[Ln]}function Wn(e){if(e){if(Object[kn])return Object[kn](e);var t="__proto__";if(Gn(e[t]))return e[t];var n=e[En];if(n)return n[Ln]}return null}function Bn(e,t){return t!==En&&Fn(e[t])&&zn(e,t)}function Kn(e){throw new TypeError("DynamicProto: "+e)}function Vn(e,t){return zn(e,Ln)?e.name||t||jn:((e||{})[En]||{}).name||t||jn}function Qn(e,t,n){zn(e,Ln)||Kn("theClass is an invalid class definition.");var r=e[Ln];!function o(e,t){for(var n=Wn(t);n&&!Xn(n);){if(n===e)return 1;n=Wn(n)}}(r,t)&&Kn("["+Vn(e)+"] is not in class heirarchy of ["+Vn(t)+"]");var i=null;zn(r,On)?i=r[On]:(i=Hn+Vn(e,"_")+"$"+Pn,Pn++,r[On]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Bn(e,n)&&(t[n]=e[n]);return t}(t);n(t,function u(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=Wn(e);o&&!Xn(o);){for(var a in o)!i[a]&&Bn(o,a)&&(i[a]=r(t,o[a]));o=Wn(o)}return i}(r,t,a)),function c(e,t,n,r){function i(n,r){var i=function(){if(this&&zn(n,On)){var e=((this[Rn]||{})[n[On]]||{})[r];if(e)return e.apply(this,arguments);Kn("Missing ["+r+"] "+qn)}var t=n[r];return t===i&&(t=Wn(n)[r]),Fn(t)||Kn("["+r+"] is not a "+qn),t.apply(this,arguments)};return i[Un]=1,i}if(!Gn(e)){var a=n[Rn]=n[Rn]||{},o=a[t]=a[t]||{};for(var s in n)Bn(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],zn(e,s)&&(!e[s]||e[s][Un])||(e[s]=i(e,s)))}}(r,i,t,a)}var $n="properties",Jn=z.objKeys,Yn=z.arrForEach;function Zn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=St.GetDuration(i,a)),r}function er(e,t,n,r,i){var a=0,o=Zn(n,r,i);return o&&(a=tr(e,t,dt.msToTimeSpan(o))),a}function tr(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function nr(e,t){var n=e.perfTiming,r=t[$n]||{},i=0,a=z.isString,o="Start",s="End",u="domainLookup",c="connect",l="redirect",f="request",d="response",p="duration",g="startTime",h=c+s,m=f+o,v=d+s,y=l+o,x=l=s,S="transferSize",I="encodedBodySize",C="decodedBodySize",T="serverTiming";if(n){i|=er(r,l,n,y,x),i|=er(r,u,n,"domainLookupStart","domainLookupEnd"),i|=er(r,c,n,"connectStart",h),i|=er(r,f,n,m,"requestEnd"),i|=er(r,d,n,"responseStart",v),i|=er(r,"networkConnect",n,g,h),i|=er(r,"sentRequest",n,m,v);var b=n[p];i|=tr(r,p,b=b||(Zn(n,g,v)||0)),i|=tr(r,"perfTotal",b);var N=n[T];if(N){var D={};Yn(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=D[t]||{};Yn(Jn(n),function(e){var t=n[e];("name"!==e&&a(t)||z.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),D[t]=r}),i|=tr(r,T,D)}i|=tr(r,S,n[S]),i|=tr(r,I,n[I]),i|=tr(r,C,n[C])}else e.perfMark&&(i|=tr(r,"missing",e.perfAttempts));i&&(t[$n]=r)}var rr=function Er(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},ir=function Lr(e,t,n){var r=this,i=n,c="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new rr,r.clientFailure=0,r.traceID=e,r.spanID=t,Qn(Lr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?gt.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?st.sanitizeUrl(i,gt.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*St.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[$n]={HttpMethod:u.method},r);if(nr(u,i),t&&0<Jn(u.requestHeaders).length&&(i[$n]=i[$n]||{},i[$n].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<Jn(a.headerMap).length&&(i[$n]=i[$n]||{},i[$n].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[$n]=i[$n]||{},""!==s&&"text"!==s||(i[$n][c]=a[c]?a.statusText+" - "+a[c]:a.statusText),"json"===s&&(i[$n][c]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},ar=(or.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},or.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},or.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},or.DEFAULT_TRACE_FLAG="01",or.DEFAULT_VERSION="00",or);function or(e,t){var n=this;n.traceFlag=or.DEFAULT_TRACE_FLAG,n.version=or.DEFAULT_VERSION,e&&or.isValidTraceId(e)?n.traceId=e:n.traceId=dt.generateW3CId(),t&&or.isValidSpanId(t)?n.spanId=t:n.spanId=dt.generateW3CId().substr(0,16)}var sr="ai.ajxmn.",ur="diagLog",cr="throwInternal",lr="fetch",fr=z.isNullOrUndefined,dr=z.arrForEach,pr=z.objKeys,gr=0;function hr(e){var t="";try{fr(e)||fr(e.ajaxData)||fr(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(n){}return t}function mr(e,t,n,r,i){e[ur]()[cr](G.CRITICAL,t,n,r,i)}function vr(e,t,n,r,i){e[ur]()[cr](G.WARNING,t,n,r,i)}function yr(t,n,r){return function(e){mr(t,n,r,{ajaxDiagnosticsMessage:hr(e.inst),exception:dt.dump(e.err)})}}function xr(e,t){return e&&t?e.indexOf(t):-1}var Sr,Ir=(t(Cr,Sr=Ae),Cr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:k.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},Cr.getEmptyConfig=function(){var t=this.getDefaultConfig();return dr(pr(t),function(e){t[e]=undefined}),t},Cr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Cr.identifier="AjaxDependencyPlugin",Cr);function Cr(){var e=Sr.call(this)||this;e.identifier=Cr.identifier,e.priority=120;var I,C,T,b,N="trackDependencyDataInternal",t=H(),D=!1,_=!1,u=t&&t.host&&t.host.toLowerCase(),w=Cr.getEmptyConfig(),A=!1,i=0,M=!1,E=0,L=!1,q=[],s={};return Qn(Cr,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?it(e[U],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((z.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=xr(i,"?"),o=xr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),fr(e)?fr(t)||(r="object"==typeof t&&!0===t[Tt]||!!n&&!0===n[Tt]):r=!0===e[Tt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=_;return fr(e)||(n=!0===t||!fr(e.ajaxData)),r&&n}function v(e,t){if(t.requestUrl&&b&&M){var n=j();if(n&&z.isFunction(n.mark)){var r=b+e+"#"+ ++gr;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var c=o.perfMark,l=j(),f=w.maxAjaxPerfLookupAttempts,d=w.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(l&&c){g++;for(var e=null,t=l.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===xr(r.name,p)&&-1===xr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===c.name){o.perfTiming=e;break}if(r.startTime<c.startTime-1e3)break}}}!c||o.perfTiming||f<=g||!1===o.async?(c&&z.isFunction(l.clearMarks)&&l.clearMarks(c.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{fr(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){mr(d,ne,"Failed to grab failed fetch diagnostics message",{exception:dt.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=dt.dump(t)),vr(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=St.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",A,r);e?d[N](e):a(te,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(ae,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=Cr.getDefaultConfig();dr(pr(a),function(e){w[e]=i.getConfig(Cr.identifier,e,a[e])});var o=w.distributedTracingMode;if(A=w.enableRequestHeaderTracking,M=w.enableAjaxPerfTracking,E=w.maxAjaxCallsPerView,L=w.enableResponseHeaderTracking,T=o===k.AI||o===k.AI_AND_W3C,C=o===k.AI_AND_W3C||o===k.W3C,M){var s=e.instrumentationKey||"unkwn";b=5<s.length?sr+s.substring(s.length-5)+".":sr+s+"."}if(!1===w.disableAjaxTracking&&!function l(){!function n(){var e=!1;if(typeof XMLHttpRequest!==R&&!fr(XMLHttpRequest)){var t=XMLHttpRequest[U];e=!(fr(t)||fr(t.open)||fr(t.send)||fr(t.abort))}return e}()||_||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i.ajaxData;h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=I&&I.telemetryTrace&&I.telemetryTrace.traceID||dt.generateW3CId(),a=dt.generateW3CId().substr(0,16),o=new ir(i,a,d[ur]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e.ajaxData=o,function s(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=B.Attach(n,"readystatechange",function(){try{n&&4===n.readyState&&m(n)&&!function i(r){var t=r.ajaxData;function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=hr(r),e&&(n.exception=dt.dump(e)),vr(d,te,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}t.responseFinishedTime=St.Now(),t.status=r.status,y("xmlhttprequest",t,function(){try{var e=t.CreateTrackItem("Ajax",A,function(){var e={statusText:r.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==xr(t.toLowerCase(),at.requestContextHeaderLowerCase)){var n=e.getResponseHeader(at.requestContextHeader);return mt.getCorrelationContext(n)}}catch(r){vr(d,ae,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:hr(e),exception:dt.dump(r)})}}(r),type:r.responseType,responseText:r.responseText,response:r.response};if(L){var t=r.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};dr(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):n(null,{requestSentTime:t.requestSentTime,responseFinishedTime:t.responseFinishedTime})}finally{r.ajaxData=null}},function(e){n(e,null)})}(n)}catch(t){var e=dt.dump(t);e&&-1!==xr(e.toLowerCase(),"c00c023f")||mr(d,re,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:hr(n),exception:e})}})}(e)}(i,t,n,r)},hkErr:yr(d,ne,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n.ajaxData;m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=St.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:yr(d,ie,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t.ajaxData;m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:yr(d,ee,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),A&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r.ajaxData.requestHeaders[t]=n)},hkErr:yr(d,me,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),_=!0)}(),function f(){var e=function n(){var e=O();return!e||fr(e.Request)||fr(e.Request[U])||fr(e[lr])?null:e[lr]}();if(!e)return;var t=O();!1===w.disableFetchTracking?(q.push(it(t,lr,{req:function(e,t,n){var r;if(D&&!h(null,t,n)){var i=e.ctx();r=function s(e,t){var n=I&&I.telemetryTrace&&I.telemetryTrace.traceID||dt.generateW3CId(),r=dt.generateW3CId().substr(0,16),i=new ir(n,r,d[ur]());i.requestSentTime=St.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};t&&t.headers&&A&&(o=t.headers);return i.requestHeaders=o,v("fetch",i),i}(t,n),n=d.includeCorrelationHeaders(r,t,n),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(at.requestContextHeader);return mt.getCorrelationContext(t)}catch(n){vr(d,ae,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:dt.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:yr(d,ne,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),D=!0):e.polyfill&&q.push(it(t,lr,{req:function(e,t,n){h(null,t,n)}}))}(),0<n.length&&n){for(var u=void 0,c=0;!u&&c<n.length;)n[c]&&"AppInsightsPropertiesPlugin"===n[c].identifier&&(u=n[c]),c++;u&&(I=u.context)}}},d.teardown=function(){dr(q,function(e){e.rm()}),_=D=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(mt.canIncludeCorrelationHeader(w,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(at.requestIdHeader,a),A&&(e.requestHeaders[at.requestIdHeader]=a)}if((s=w.appId||I&&I.appId())&&(n.headers.set(at.requestContextHeader,at.requestContextAppIdFormat+s),A&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+s)),C){var o=new ar(e.traceID,e.spanID);n.headers.set(at.traceParentHeader,o.toString()),A&&(e.requestHeaders[at.traceParentHeader]=o.toString())}return n}return n}if(r){if(mt.canIncludeCorrelationHeader(w,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(at.requestIdHeader,a),A&&(e.requestHeaders[at.requestIdHeader]=a)}var s;if((s=w.appId||I&&I.appId())&&(r.setRequestHeader(at.requestContextHeader,at.requestContextAppIdFormat+s),A&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+s)),C){o=new ar(e.traceID,e.spanID);r.setRequestHeader(at.traceParentHeader,o.toString()),A&&(e.requestHeaders[at.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){w.distributedTracingMode!==k.W3C&&w.distributedTracingMode!==k.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=An.create(e,pn.dataType,pn.envelopeType,d[ur](),t,n);d.core.track(r)}else i===E&&mr(d,ce,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=Ir,e.ajaxRecord=ir,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,g,i,R,o,s=function(){return(s=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=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=R=R||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,k="undefined",l="object",F="prototype",f="function",c="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==k&&globalThis?globalThis:typeof self!==k&&self?self:typeof window!==k&&window?window:typeof global!==k&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===c&&v()?window:null}function v(){return Boolean(typeof window===l&&window)}function y(){return v()?window:m(c)}function x(){return function e(){return Boolean(typeof document===l&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===l&&navigator)}()?navigator:m("navigator")}function j(){return typeof location===l&&location?location:m(d)}function H(){return m(p)}function C(){return Boolean(typeof JSON===l&&JSON||null!==m(h))}function I(){return C()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",A="removeEventListener";function M(e,t){return typeof e===t}function D(e){return M(e,k)||e===undefined}function w(e){return D(e)||null===e}function _(e,t){return e&&Object[F].hasOwnProperty.call(e,t)}function E(e){return M(e,l)}function L(e){return M(e,f)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!w(e))try{w(e[b])?w(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function U(e,t,n,r){if(void 0===r&&(r=!1),!w(e))try{w(e[A])?w(e[N])||e[N]("on"+t,n):e[A](t,n,r)}catch(i){}}var P=(z.isDate=function(e){return"[object Date]"===Object[F].toString.call(e)},z.isString=function(e){return M(e,"string")},z.isNumber=function(e){return M(e,"number")},z.isBoolean=function(e){return M(e,"boolean")},z.disableCookies=function(){z._canUseCookies=!1},z.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)})},z.toISOString=function(e){if(z.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"}},z.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)},z.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},z.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},z.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},z.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[F]=e,new t},z.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)_(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++)_(e,i[o])&&n.push(i[o]);return n},z.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},z.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=X.Attach(i,e,t)||n),n},z.isTypeof=M,z.isUndefined=D,z.isNullOrUndefined=w,z.hasOwnProperty=_,z.isFunction=L,z.isObject=E,z);function z(){}var G,B,W=/[xy]/g,X=(V.Attach=q,V.AttachEvent=q,V.Detach=U,V.DetachEvent=U,V);function V(){}(B=G=G||{})[B.CRITICAL=1]="CRITICAL",B[B.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},Q=($.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},$.dataType="MessageData",$.AiNonUserActionablePrefix="AI (Internal): ",$.AiUserActionablePrefix="AI: ",$);function $(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?$.AiUserActionablePrefix:$.AiNonUserActionablePrefix)+e;var i="";C()&&(i=I().stringify(r));var a=(t?" message:"+$.sanitizeDiagnosticText(t):"")+(r?" props:"+$.sanitizeDiagnosticText(i):"");this.message+=a}var J=(Y.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new Q(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!P.isUndefined(a)&&a&&!P.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Y.prototype.warnToConsole=function(e){!P.isUndefined(console)&&console&&(P.isFunction(console.warn)?console.warn(e):P.isFunction(console.log)&&console.log(e))},Y.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Y.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 Q(K.MessageLimitPerPVExceeded,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Y.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Y);function Y(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},P.isNullOrUndefined(e)||(P.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),P.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),P.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),P.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Z=P.isFunction,ee=function tr(i,a){var o=this,s=null,u=Z(i.processTelemetry),l=Z(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&&u){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(G.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},te=P.isNullOrUndefined;function ne(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&&P.isFunction(a.processTelemetry)){var o=new ee(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var re=function nr(e,a,n,t){var o=this,r=null;null!==t&&(e&&P.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),ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],P.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),ne(r,t)}(e,o,t):P.isUndefined(t)&&(r=ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new J(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&&!te(i[t])?r=i[t]:a&&!te(a[t])&&(r=a[t]),te(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 nr(e||r,a,n,t)}},ie=P.isFunction,ae="getPlugin",oe=(se.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},se);function se(){var a=this,o=!1,s=null,u=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){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ie(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new re(null,{},a.core);t=u&&u[ae]?n.createNew(null,u[ae]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[ae]&&(i=u[ae]()),a.core=t,s=new re(r,e,t,i),o=!0}}var ue=P.isFunction,le="processTelemetry",ce="priority",fe="setNextPlugin",de="isInitialized";function pe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&ue(r[fe])&&ue(a[le])&&r[fe](a),ue(a[de])&&a[de]()||e.push(a),r=a,i=i.getNext())}P.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ge(e){return e.sort(function(e,t){var n=0,r=ue(t[le]);return ue(e[le])?n=r?e[ce]-t[ce]:1:r&&(n=-1),n})}var he=500,me="Channel has invalid priority",ve=P.arrForEach,ye=P.objDefineAccessors;function xe(e,t){t&&0<t.length&&(function n(e){ve(e,function(e){if(e.priority<he)throw Error(me+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Se,Ce=(t(Ie,Se=oe),Ie.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&ve(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Ie.prototype.getChannelControls=function(){return this._channelQueue},Ie.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Se.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&P.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&ve(e,function(e){return xe(n,e)}),t){var r=[];ve(t,function(e){e.priority>he&&r.push(e)}),xe(n,r)}return n}((t||{}).channels,r);ve(e,function(e){return pe(new re(e,t,n),r)})}},Ie._staticInit=(ye(Ie.prototype,"ChannelControls",Ie.prototype.getChannelControls),void ye(Ie.prototype,"channelQueue",Ie.prototype.getChannelControls)),Ie);function Ie(){var e=null!==Se&&Se.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=he,e}var Te=P.arrForEach,be=P.isNullOrUndefined,Ne=(Ae.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||be(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||P.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=be(e.extensions)?[]:e.extensions,(e.extensionConfig=be(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||P.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=ge(o);var s=[],u={};if(Te(o,function(e){if(be(e)||be(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(be(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=ge(o),i._extensions=o,pe(new re([a],e,i),o),pe(new re(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Ae.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Ae.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=P.toISOString(new Date)),be(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Te(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Ae.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new re(t,this.config,this)},Ae);function Ae(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ce,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Me=(De.prototype.addNotificationListener=function(e){this.listeners.push(e)},De.prototype.removeNotificationListener=function(e){for(var t=P.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=P.arrIndexOf(this.listeners,e)},De.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)},De.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)},De);function De(){this.listeners=[]}var we;t(_e,we=Ne),_e.prototype.initialize=function(e,t){var n=this;n._notificationManager=new Me,n.logger=new J(e),n.config=e,we.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},_e.prototype.getTransmissionControls=function(){return we.prototype.getTransmissionControls.call(this)},_e.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),we.prototype.track.call(this,e)},_e.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},_e.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},_e.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];P.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:P.toISOString(new Date),baseType:Q.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},_e.prototype._validateTelemetryItem=function(e){if(P.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},_e.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function _e(){return we.call(this)||this}var Ee="_aiHooks",Le=["req","rsp","hkErr","fnErr"];function qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Re(e,u,l,c,f){0<=f&&f<=2&&qe(e,function(e,t){var n=e.cbks,r=n[Le[f]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[Le[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function ke(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(e.hasOwnProperty(t)?r=e:n&&(r=l(e[F],t,!1))),r}(e,t,r),a=i[t];if(typeof a===f){var o=a[Ee];if(!o){var s=function c(s){return function(){var e=arguments,t=s.h,n={name:s.n,inst:this,ctx:null},r=[],i=[n];qe(e,function(e){i.push(e)}),Re(t,n,i,r,0);var a=s.f;try{n.rslt=a.apply(this,e)}catch(o){throw n.err=o,Re(t,n,i,r,3),o}return Re(t,n,i,r,1),n.rslt}}(o={i:0,n:t,f:a,h:[]});s[Ee]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;qe(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var Fe=(Oe.requestContextHeader="Request-Context",Oe.requestContextTargetKey="appId",Oe.requestContextAppIdFormat="appId=cid-v1:",Oe.requestIdHeader="Request-Id",Oe.traceParentHeader="traceparent",Oe.sdkContextHeader="Sdk-Context",Oe.sdkContextHeaderAppIdRequest="appId",Oe.requestContextHeaderLowerCase="request-context",Oe);function Oe(){}var je=(He.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=He.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,He.MAX_NAME_LENGTH-3)+He.padNumber(a);i=o}return i},He.sanitizeKey=function(e,t){var n;return t&&(t=He.trim(t.toString())).length>He.MAX_NAME_LENGTH&&(n=t.substring(0,He.MAX_NAME_LENGTH),e.throwInternal(G.WARNING,K.NameTooLong,"name is too long. It has been truncated to "+He.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},He.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=He.MAX_STRING_LENGTH),t&&(n=n||He.MAX_STRING_LENGTH,(t=He.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(G.WARNING,K.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},He.sanitizeUrl=function(e,t){return He.sanitizeInput(e,t,He.MAX_URL_LENGTH,K.UrlTooLong)},He.sanitizeMessage=function(e,t){var n;return t&&t.length>He.MAX_MESSAGE_LENGTH&&(n=t.substring(0,He.MAX_MESSAGE_LENGTH),e.throwInternal(G.WARNING,K.MessageTruncated,"message is too long, it has been truncated to "+He.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},He.sanitizeException=function(e,t){var n;return t&&t.length>He.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,He.MAX_EXCEPTION_LENGTH),e.throwInternal(G.WARNING,K.ExceptionTruncated,"exception is too long, it has been truncated to "+He.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},He.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(P.isObject(i)&&C())try{i=I().stringify(i)}catch(a){e.throwInternal(G.WARNING,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=He.sanitizeString(e,i,He.MAX_PROPERTY_LENGTH),n[r=He.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},He.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=He.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},He.sanitizeId=function(e,t){return t?He.sanitizeInput(e,t,He.MAX_ID_LENGTH,K.IdTooLong).toString():t},He.sanitizeInput=function(e,t,n,r){var i;return t&&(t=He.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(G.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},He.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},He.trim=function(e){return P.isString(e)?e.replace(/^\s+|\s+$/g,""):e},He.MAX_NAME_LENGTH=150,He.MAX_ID_LENGTH=128,He.MAX_PROPERTY_LENGTH=8192,He.MAX_STRING_LENGTH=1024,He.MAX_URL_LENGTH=2048,He.MAX_MESSAGE_LENGTH=32768,He.MAX_EXCEPTION_LENGTH=32768,He);function He(){}var Ue=S(),Pe=P.isString,ze=null;var Ge=(Be.createDomEvent=function(e){var t=null;if(P.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},Be.disableStorage=function(){Be._canUseLocalStorage=!1,Be._canUseSessionStorage=!1},Be._getLocalStorageObject=function(){return Be.canUseLocalStorage()?Be._getVerifiedStorageObject(a.LocalStorage):null},Be._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(P.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("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},Be.isInternalApplicationInsightsEndpoint=function(e){return-1!==Be._internalEndpoints.indexOf(e.toLowerCase())},Be.canUseLocalStorage=function(){return Be._canUseLocalStorage===undefined&&(Be._canUseLocalStorage=!!Be._getVerifiedStorageObject(a.LocalStorage)),Be._canUseLocalStorage},Be.getStorage=function(e,t){var n=Be._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return null},Be.setStorage=function(e,t,n){var r=Be._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+Be.getExceptionName(i),{exception:Be.dump(i)})}return!1},Be.removeStorage=function(e,t){var n=Be._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return!1},Be._getSessionStorageObject=function(){return Be.canUseSessionStorage()?Be._getVerifiedStorageObject(a.SessionStorage):null},Be.canUseSessionStorage=function(){return Be._canUseSessionStorage===undefined&&(Be._canUseSessionStorage=!!Be._getVerifiedStorageObject(a.SessionStorage)),Be._canUseSessionStorage},Be.getSessionStorageKeys=function(){var e=[];if(Be.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},Be.getSessionStorage=function(e,t){var n=Be._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return null},Be.setSessionStorage=function(e,t,n){var r=Be._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Be.getExceptionName(i),{exception:Be.dump(i)})}return!1},Be.removeSessionStorage=function(e,t){var n=Be._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return!1},Be.disableCookies=function(){P.disableCookies()},Be.canUseCookies=function(e){if(P._canUseCookies===undefined){P._canUseCookies=!1;try{P._canUseCookies=Be.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,K.CannotAccessCookie,"Cannot access document.cookie - "+Be.getExceptionName(t),{exception:Be.dump(t)})}}return P._canUseCookies},Be.disallowsSameSiteNone=function(e){return!!Pe(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"))},Be.setCookie=function(e,t,n,r){if(Be.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=j();o&&"https:"===o.protocol&&(a=";secure",null===ze&&(ze=Be.disallowsSameSiteNone((S()||{}).userAgent)),ze||(n+=";SameSite=None")),Be.document.cookie=t+"="+n+i+";path=/"+a}},Be.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},Be.getCookie=function(e,t){if(Be.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Be.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Be.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Be.deleteCookie=function(e,t){Be.canUseCookies(e)&&(Be.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Be.trim=function(e){return Pe(e)?e.replace(/^\s+|\s+$/g,""):e},Be.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Be.random32=function(){return 4294967296*Math.random()|0},Be.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=Be.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)},Be.isArray=function(e){return"[object Array]"===Object[F].toString.call(e)},Be.isError=function(e){return"[object Error]"===Object[F].toString.call(e)},Be.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Ue?(Ue.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},Be.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},Be.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Be.dump=function(e){var t=Object[F].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":C()&&(n=I().stringify(e)),t+n},Be.getExceptionName=function(e){return"[object Error]"===Object[F].toString.call(e)?e.name:""},Be.addEventHandler=function(e,t){return X.Attach(y(),e,t)},Be.IsBeaconApiSupported=function(){return"sendBeacon"in Ue&&Ue.sendBeacon},Be.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},Be.document=x()||{},Be._canUseLocalStorage=undefined,Be._canUseSessionStorage=undefined,Be._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Be.NotSpecified="not_specified",Be.isDate=P.isDate,Be.toISOStringForIE8=P.toISOString,Be);function Be(){}var We=(Xe.parseUrl=function(e){return Xe.htmlAnchorElement||(Xe.htmlAnchorElement=Xe.document.createElement?Xe.document.createElement("a"):{host:Xe.parseHost(e)}),Xe.htmlAnchorElement.href=e,Xe.htmlAnchorElement},Xe.getAbsoluteUrl=function(e){var t,n=Xe.parseUrl(e);return n&&(t=n.href),t},Xe.getPathName=function(e){var t,n=Xe.parseUrl(e);return n&&(t=n.pathname),t},Xe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Xe.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Pe(t[2])&&0<t[2].length)return t[2]}return null},Xe.document=x()||{},Xe);function Xe(){}var Ve=(Ke.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=We.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(P.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},Ke.getCorrelationContext=function(e){if(e){var t=Ke.getCorrelationContextValue(e,Fe.requestContextTargetKey);if(t&&t!==Ke.correlationIdPrefix)return t}},Ke.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},Ke.correlationIdPrefix="cid-v1:",Ke);function Ke(){}var Qe=($e.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=We.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=je.sanitizeString(e,n?n+" "+u:u)}else a=je.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$e);function $e(){}var Je=(Ye.Now=function(){var e=H();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Ye.GetDuration=function(e,t){var n=null;return 0===e||0===t||P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||(n=t-e),n},Ye);function Ye(){}var Ze,et="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",tt=(t(nt,Ze=function rr(){}),nt);function nt(){return Ze.call(this)||this}var rt;t(it,rt=function ir(){this.ver=1,this.sampleRate=100,this.tags={}});function it(e,t,n){var r=rt.call(this)||this;return r.name=je.sanitizeString(e,n)||Ge.NotSpecified,r.data=t,r.time=P.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var at,ot=function ar(){},st=(t(ut,at=ot),ut);function ut(){var e=at.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var lt;t(ct,lt=st),ct.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ct.dataType="EventData";function ct(e,t,n,r){var i=lt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=je.sanitizeString(e,t)||Ge.NotSpecified,i.properties=je.sanitizeProperties(e,n),i.measurements=je.sanitizeMeasurements(e,r),i}var ft,dt=function or(){},pt=(t(gt,ft=ot),gt);function gt(){var e=ft.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var ht,mt=function sr(){this.hasFullStack=!0,this.parsedStack=[]};t(vt,ht=pt),vt.CreateFromInterface=function(t,e){var n=e.exceptions&&P.arrMap(e.exceptions,function(e){return xt.CreateFromInterface(t,e)});return new vt(t,s({},e,{exceptions:n}))},vt.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&&P.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},vt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},vt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",vt.dataType="ExceptionData";function vt(e,t,n,r,i,a){var o=ht.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new xt(e,t)],o.properties=je.sanitizeProperties(e,n),o.measurements=je.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,P.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var yt,xt=(t(St,yt=mt),St.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&P.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}},St.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&P.arrMap(t.parsedStack,function(e){return It.CreateFromInterface(e)})||t.parsedStack;return new St(e,s({},t,{parsedStack:n}))},St.parseStack=function(e){var t;if(P.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(It.regex.test(o)){var s=new It(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,l=t.length-1,c=0,f=u,d=l;u<l;){if(32768<(c+=t[u].sizeInBytes+t[l].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=l,u++,l--}}return t},St);function St(e,t){var n=yt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=je.sanitizeString(e,t.name)||Ge.NotSpecified,n.message=je.sanitizeMessage(e,t.message)||Ge.NotSpecified;var r=t.stack;n.parsedStack=St.parseStack(r),n.stack=je.sanitizeException(e,r),n.hasFullStack=Ge.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 Ct,It=(t(Tt,Ct=dt),Tt.CreateFromInterface=function(e){return new Tt(e,null)},Tt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Tt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Tt.baseSize=58,Tt);function Tt(e,t){var n=Ct.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=Ge.trim(r),n.fileName="",n.line=0;var i=r.match(Tt.regex);i&&5<=i.length&&(n.method=Ge.trim(i[2])||n.method,n.fileName=Ge.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+=Tt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var bt,Nt,At,Mt=(t(Dt,bt=ot),Dt);function Dt(){var e=bt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(At=Nt=Nt||{})[At.Measurement=0]="Measurement",At[At.Aggregation=1]="Aggregation";var wt,_t=(t(Et,wt=function ur(){this.kind=Nt.Measurement}),Et);function Et(){var e=null!==wt&&wt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var Lt;t(qt,Lt=Mt),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",qt.dataType="MetricData";function qt(e,t,n,r,i,a,o,s){var u=Lt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new _t;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=je.sanitizeString(e,t)||Ge.NotSpecified,l.value=n,u.metrics=[l],u.properties=je.sanitizeProperties(e,o),u.measurements=je.sanitizeMeasurements(e,s),u}var Rt,kt=(t(Ft,Rt=st),Ft);function Ft(){var e=Rt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ot;t(jt,Ot=kt),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",jt.dataType="PageviewData";function jt(e,t,n,r,i,a,o){var s=Ot.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=je.sanitizeId(e,o),s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Ge.NotSpecified,isNaN(r)||(s.duration=Ge.msToTimeSpan(r)),s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),s}var Ht,Ut=(t(Pt,Ht=ot),Pt);function Pt(){var e=Ht.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var zt,Gt=(t(Bt,zt=Ut),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Bt.dataType="RemoteDependencyData",Bt);function Bt(e,t,n,r,i,a,o,s,u,l,c,f){void 0===u&&(u="Ajax");var d=zt.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=Ge.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=je.sanitizeString(e,u);var p=Qe.ParseDependencyPath(e,n,s,r);return d.data=je.sanitizeUrl(e,r)||p.data,d.target=je.sanitizeString(e,p.target),l&&(d.target=d.target+" | "+l),d.name=je.sanitizeString(e,p.name),d.properties=je.sanitizeProperties(e,c),d.measurements=je.sanitizeMeasurements(e,f),d}var Wt,Xt=(t(Vt,Wt=ot),Vt);function Vt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Kt;t(Qt,Kt=Xt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Qt.dataType="MessageData";function Qt(e,t,n,r,i){var a=Kt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Ge.NotSpecified,a.message=je.sanitizeMessage(e,t),a.properties=je.sanitizeProperties(e,r),a.measurements=je.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var $t,Jt=(t(Yt,$t=kt),Yt);function Yt(){var e=$t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Zt;t(en,Zt=Jt),en.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",en.dataType="PageviewPerformanceData";function en(e,t,n,r,i,a,o){var s=Zt.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Ge.NotSpecified,s.properties=je.sanitizeProperties(e,i),s.measurements=je.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 tn,nn,rn;t(an,tn=tt);function an(e,t){var n=tn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(rn=nn=nn||{})[rn.Verbose=0]="Verbose",rn[rn.Information=1]="Information",rn[rn.Warning=2]="Warning",rn[rn.Error=3]="Error",rn[rn.Critical=4]="Critical";var on=(sn.create=function(e,t,n,r,i,a){if(n=je.sanitizeString(r,n)||Ge.NotSpecified,P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||P.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:P.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!P.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},sn);function sn(){}var un="constructor",ln="prototype",cn="function",fn="getPrototypeOf",dn="_dynInstFuncs",pn="_isDynProxy",gn="_dynClass",hn="_dynCls$",mn="_unknown_",vn=0;function yn(e,t){return e&&Object[ln].hasOwnProperty.call(e,t)}function xn(e){return typeof e===cn}function Sn(e){return e&&(e===Object[ln]||e===Array[ln])}function Cn(e){return Sn(e)||e===Function[ln]}function In(e){if(e){if(Object[fn])return Object[fn](e);var t="__proto__";if(Sn(e[t]))return e[t];var n=e[un];if(n)return n[ln]}return null}function Tn(e,t){return t!==un&&xn(e[t])&&yn(e,t)}function bn(e){throw new TypeError("DynamicProto: "+e)}function Nn(e,t){return yn(e,ln)?e.name||t||mn:((e||{})[un]||{}).name||t||mn}function An(e,t,n){yn(e,ln)||bn("theClass is an invalid class definition.");var r=e[ln];!function o(e,t){for(var n=In(t);n&&!Cn(n);){if(n===e)return 1;n=In(n)}}(r,t)&&bn("["+Nn(e)+"] is not in class heirarchy of ["+Nn(t)+"]");var i=null;yn(r,gn)?i=r[gn]:(i=hn+Nn(e,"_")+"$"+vn,vn++,r[gn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Tn(e,n)&&(t[n]=e[n]);return t}(t);n(t,function u(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=In(e);o&&!Cn(o);){for(var a in o)!i[a]&&Tn(o,a)&&(i[a]=r(t,o[a]));o=In(o)}return i}(r,t,a)),function l(e,t,n,r){function i(n,r){var i=function(){if(this&&yn(n,gn)){var e=((this[dn]||{})[n[gn]]||{})[r];if(e)return e.apply(this,arguments);bn("Missing ["+r+"] "+cn)}var t=n[r];return t===i&&(t=In(n)[r]),xn(t)||bn("["+r+"] is not a "+cn),t.apply(this,arguments)};return i[pn]=1,i}if(!Sn(e)){var a=n[dn]=n[dn]||{},o=a[t]=a[t]||{};for(var s in n)Tn(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],yn(e,s)&&(!e[s]||e[s][pn])||(e[s]=i(e,s)))}}(r,i,t,a)}var Mn="properties",Dn=P.objKeys,wn=P.arrForEach;function _n(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=Je.GetDuration(i,a)),r}function En(e,t,n,r,i){var a=0,o=_n(n,r,i);return o&&(a=Ln(e,t,Ge.msToTimeSpan(o))),a}function Ln(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function qn(e,t){var n=e.perfTiming,r=t[Mn]||{},i=0,a=P.isString,o="Start",s="End",u="domainLookup",l="connect",c="redirect",f="request",d="response",p="duration",g="startTime",h=l+s,m=f+o,v=d+s,y=c+o,x=c=s,S="transferSize",C="encodedBodySize",I="decodedBodySize",T="serverTiming";if(n){i|=En(r,c,n,y,x),i|=En(r,u,n,"domainLookupStart","domainLookupEnd"),i|=En(r,l,n,"connectStart",h),i|=En(r,f,n,m,"requestEnd"),i|=En(r,d,n,"responseStart",v),i|=En(r,"networkConnect",n,g,h),i|=En(r,"sentRequest",n,m,v);var b=n[p];i|=Ln(r,p,b=b||(_n(n,g,v)||0)),i|=Ln(r,"perfTotal",b);var N=n[T];if(N){var A={};wn(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=A[t]||{};wn(Dn(n),function(e){var t=n[e];("name"!==e&&a(t)||P.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),A[t]=r}),i|=Ln(r,T,A)}i|=Ln(r,S,n[S]),i|=Ln(r,C,n[C]),i|=Ln(r,I,n[I])}else e.perfMark&&(i|=Ln(r,"missing",e.perfAttempts));i&&(t[Mn]=r)}var Rn=function lr(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},kn=function cr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Rn,r.clientFailure=0,r.traceID=e,r.spanID=t,An(cr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?We.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?je.sanitizeUrl(i,We.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*Je.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[Mn]={HttpMethod:u.method},r);if(qn(u,i),t&&0<Dn(u.requestHeaders).length&&(i[Mn]=i[Mn]||{},i[Mn].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<Dn(a.headerMap).length&&(i[Mn]=i[Mn]||{},i[Mn].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[Mn]=i[Mn]||{},""!==s&&"text"!==s||(i[Mn][l]=a[l]?a.statusText+" - "+a[l]:a.statusText),"json"===s&&(i[Mn][l]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},Fn=(On.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},On.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},On.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},On.DEFAULT_TRACE_FLAG="01",On.DEFAULT_VERSION="00",On);function On(e,t){var n=this;n.traceFlag=On.DEFAULT_TRACE_FLAG,n.version=On.DEFAULT_VERSION,e&&On.isValidTraceId(e)?n.traceId=e:n.traceId=Ge.generateW3CId(),t&&On.isValidSpanId(t)?n.spanId=t:n.spanId=Ge.generateW3CId().substr(0,16)}var jn="ai.ajxmn.",Hn="diagLog",Un="ajaxData",Pn="throwInternal",zn="fetch",Gn=P.isNullOrUndefined,Bn=P.arrForEach,Wn=P.objKeys,Xn=0;function Vn(e){var t="";try{Gn(e)||Gn(e[Un])||Gn(e[Un].requestUrl)||(t+="(url: '"+e[Un].requestUrl+"')")}catch(n){}return t}function Kn(e,t,n,r,i){e[Hn]()[Pn](G.CRITICAL,t,n,r,i)}function Qn(e,t,n,r,i){e[Hn]()[Pn](G.WARNING,t,n,r,i)}function $n(t,n,r){return function(e){Kn(t,n,r,{ajaxDiagnosticsMessage:Vn(e.inst),exception:Ge.dump(e.err)})}}function Jn(e,t){return e&&t?e.indexOf(t):-1}var Yn,Zn=(t(er,Yn=oe),er.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:R.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},er.getEmptyConfig=function(){var t=this.getDefaultConfig();return Bn(Wn(t),function(e){t[e]=undefined}),t},er.prototype.processTelemetry=function(e,t){this.processNext(e,t)},er.identifier="AjaxDependencyPlugin",er);function er(){var e=Yn.call(this)||this;e.identifier=er.identifier,e.priority=120;var C,I,T,b,N="trackDependencyDataInternal",t=j(),A=!1,M=!1,u=t&&t.host&&t.host.toLowerCase(),D=er.getEmptyConfig(),w=!1,i=0,_=!1,E=0,L=!1,q=[],s={};return An(er,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?ke(e[F],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((P.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=Jn(i,"?"),o=Jn(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),Gn(e)?Gn(t)||(r="object"==typeof t&&!0===t[et]||!!n&&!0===n[et]):r=!0===e[et]||!0===i[et],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=M;return Gn(e)||(n=!0===t||!Gn(e[Un])),r&&n}function v(e,t){if(t.requestUrl&&b&&_){var n=H();if(n&&P.isFunction(n.mark)){var r=b+e+"#"+ ++Xn;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var l=o.perfMark,c=H(),f=D.maxAjaxPerfLookupAttempts,d=D.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===Jn(r.name,p)&&-1===Jn(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||f<=g||!1===o.async?(l&&P.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{Gn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Kn(d,K.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Ge.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=Ge.dump(t)),Qn(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=Je.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",w,r);e?d[N](e):a(K.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(K.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=er.getDefaultConfig();Bn(Wn(a),function(e){D[e]=i.getConfig(er.identifier,e,a[e])});var o=D.distributedTracingMode;if(w=D.enableRequestHeaderTracking,_=D.enableAjaxPerfTracking,E=D.maxAjaxCallsPerView,L=D.enableResponseHeaderTracking,T=o===R.AI||o===R.AI_AND_W3C,I=o===R.AI_AND_W3C||o===R.W3C,_){var s=e.instrumentationKey||"unkwn";b=5<s.length?jn+s.substring(s.length-5)+".":jn+s+"."}if(!1===D.disableAjaxTracking&&!function c(){!function a(e){var t=!1;if(typeof XMLHttpRequest!==k&&!Gn(XMLHttpRequest)){var n=XMLHttpRequest[F];t=!(Gn(n)||Gn(n.open)||Gn(n.send)||Gn(n.abort))}if(t)try{(new XMLHttpRequest)[Un]={};var r=XMLHttpRequest[F].open;XMLHttpRequest[F].open=r}catch(i){t=!1,Kn(e,K.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Ge.dump(i)})}return t}(d)||M||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i[Un];h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Ge.generateW3CId(),a=Ge.generateW3CId().substr(0,16),o=new kn(i,a,d[Hn]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e[Un]=o,function s(r){r[Un].xhrMonitoringState.stateChangeAttached=X.Attach(r,"readystatechange",function(){try{r&&4===r.readyState&&m(r)&&!function t(o){var n=o[Un];function r(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Vn(o),e&&(n.exception=Ge.dump(e)),Qn(d,K.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}n.responseFinishedTime=Je.Now(),n.status=o.status,y("xmlhttprequest",n,function(){try{var e=n.CreateTrackItem("Ajax",w,function(){var e={statusText:o.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==Jn(t.toLowerCase(),Fe.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Fe.requestContextHeader);return Ve.getCorrelationContext(n)}}catch(r){Qn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Vn(e),exception:Ge.dump(r)})}}(o),type:o.responseType,responseText:function r(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};if(L){var t=o.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};Bn(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):r(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{o[Un]=null}catch(t){}}},function(e){r(e,null)})}(r)}catch(n){var e=Ge.dump(n);e&&-1!==Jn(e.toLowerCase(),"c00c023f")||Kn(d,K.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Vn(r),exception:e})}})}(e)}(i,t,n,r)},hkErr:$n(d,K.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Un];m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=Je.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:$n(d,K.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Un];m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:$n(d,K.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),w&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r[Un].requestHeaders[t]=n)},hkErr:$n(d,K.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),M=!0)}(),function f(){var e=function n(){var e=O();return!e||Gn(e.Request)||Gn(e.Request[F])||Gn(e[zn])?null:e[zn]}();if(!e)return;var t=O(),a=e.polyfill;!1===D.disableFetchTracking?(q.push(ke(t,zn,{req:function(e,t,n){var r;if(A&&!h(null,t,n)&&(!a||!M)){var i=e.ctx();r=function s(e,t){var n=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Ge.generateW3CId(),r=Ge.generateW3CId().substr(0,16),i=new kn(n,r,d[Hn]());i.requestSentTime=Je.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};t&&t.headers&&w&&(o=t.headers);return i.requestHeaders=o,v("fetch",i),i}(t,n),n=d.includeCorrelationHeaders(r,t,n),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(Fe.requestContextHeader);return Ve.getCorrelationContext(t)}catch(n){Qn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:Ge.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:$n(d,K.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),A=!0):a&&q.push(ke(t,zn,{req:function(e,t,n){h(null,t,n)}}));a&&(t[zn].polyfill=a)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&"AppInsightsPropertiesPlugin"===n[l].identifier&&(u=n[l]),l++;u&&(C=u.context)}}},d.teardown=function(){Bn(q,function(e){e.rm()}),M=A=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(Ve.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(Fe.requestIdHeader,a),w&&(e.requestHeaders[Fe.requestIdHeader]=a)}if((s=D.appId||C&&C.appId())&&(n.headers.set(Fe.requestContextHeader,Fe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Fe.requestContextHeader]=Fe.requestContextAppIdFormat+s)),I){var o=new Fn(e.traceID,e.spanID);n.headers.set(Fe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Fe.traceParentHeader]=o.toString())}return n}return n}if(r){if(Ve.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(Fe.requestIdHeader,a),w&&(e.requestHeaders[Fe.requestIdHeader]=a)}var s;if((s=D.appId||C&&C.appId())&&(r.setRequestHeader(Fe.requestContextHeader,Fe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Fe.requestContextHeader]=Fe.requestContextAppIdFormat+s)),I){o=new Fn(e.traceID,e.spanID);r.setRequestHeader(Fe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Fe.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){D.distributedTracingMode!==R.W3C&&D.distributedTracingMode!==R.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=on.create(e,Gt.dataType,Gt.envelopeType,d[Hn](),t,n);d.core.track(r)}else i===E&&Kn(d,K.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=Zn,e.ajaxRecord=kn,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-dependencies-js.min.js.map |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -14,2 +14,3 @@ */ | ||
var strDiagLog = "diagLog"; | ||
var strAjaxData = "ajaxData"; | ||
var strThrowInternal = "throwInternal"; | ||
@@ -38,3 +39,3 @@ var strFetch = "fetch"; | ||
*/ | ||
function _supportsAjaxMonitoring() { | ||
function _supportsAjaxMonitoring(ajaxMonitorInstance) { | ||
var result = false; | ||
@@ -55,2 +56,19 @@ if (typeof XMLHttpRequest !== strUndefined && !_isNullOrUndefined(XMLHttpRequest)) { | ||
} | ||
if (result) { | ||
// Disable if the XmlHttpRequest can't be extended or hooked | ||
try { | ||
var xhr = new XMLHttpRequest(); | ||
xhr[strAjaxData] = {}; | ||
// Check that we can update the prototype | ||
var theOpen = XMLHttpRequest[strPrototype].open; | ||
XMLHttpRequest[strPrototype].open = theOpen; | ||
} | ||
catch (e) { | ||
// We can't decorate the xhr object so disable monitoring | ||
result = false; | ||
_throwInternalCritical(ajaxMonitorInstance, _InternalMessageId.FailedMonitorAjaxOpen, "Failed to enable XMLHttpRequest monitoring, extension is not supported", { | ||
exception: Util.dump(e) | ||
}); | ||
} | ||
} | ||
return result; | ||
@@ -63,5 +81,5 @@ } | ||
if (!_isNullOrUndefined(xhr) && | ||
!_isNullOrUndefined(xhr.ajaxData) && | ||
!_isNullOrUndefined(xhr.ajaxData.requestUrl)) { | ||
result += "(url: '" + xhr.ajaxData.requestUrl + "')"; | ||
!_isNullOrUndefined(xhr[strAjaxData]) && | ||
!_isNullOrUndefined(xhr[strAjaxData].requestUrl)) { | ||
result += "(url: '" + xhr[strAjaxData].requestUrl + "')"; | ||
} | ||
@@ -265,2 +283,3 @@ } | ||
var global = getGlobal(); | ||
var isPolyfill = fetch.polyfill; | ||
if (_config.disableFetchTracking === false) { | ||
@@ -271,3 +290,6 @@ _hooks.push(InstrumentFunc(global, strFetch, { | ||
var fetchData; | ||
if (_fetchInitialized && !_isDisabledRequest(null, input, init)) { | ||
if (_fetchInitialized && | ||
!_isDisabledRequest(null, input, init) && | ||
// If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates | ||
!(isPolyfill && _xhrInitialized)) { | ||
var ctx = callDetails.ctx(); | ||
@@ -311,3 +333,3 @@ fetchData = _createFetchRecord(input, init); | ||
} | ||
else if (fetch.polyfill) { | ||
else if (isPolyfill) { | ||
// If fetch is a polyfill we need to capture the request to ensure that we correctly track | ||
@@ -326,2 +348,7 @@ // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop | ||
} | ||
if (isPolyfill) { | ||
// retag the instrumented fetch with the same polyfill settings this is mostly for testing | ||
// But also supports multiple App Insights usages | ||
global[strFetch].polyfill = isPolyfill; | ||
} | ||
} | ||
@@ -332,3 +359,3 @@ function _hookProto(target, funcName, callbacks) { | ||
function _instrumentXhr() { | ||
if (_supportsAjaxMonitoring() && !_xhrInitialized) { | ||
if (_supportsAjaxMonitoring(_self) && !_xhrInitialized) { | ||
// Instrument open | ||
@@ -338,3 +365,3 @@ _hookProto(XMLHttpRequest, "open", { | ||
var xhr = args.inst; | ||
var ajaxData = xhr.ajaxData; | ||
var ajaxData = xhr[strAjaxData]; | ||
if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true) && | ||
@@ -351,3 +378,3 @@ (!ajaxData || !ajaxData.xhrMonitoringState.openDone)) { | ||
var xhr = args.inst; | ||
var ajaxData = xhr.ajaxData; | ||
var ajaxData = xhr[strAjaxData]; | ||
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.sendDone) { | ||
@@ -366,3 +393,3 @@ _createMarkId("xhr", ajaxData); | ||
var xhr = args.inst; | ||
var ajaxData = xhr.ajaxData; | ||
var ajaxData = xhr[strAjaxData]; | ||
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.abortDone) { | ||
@@ -381,3 +408,3 @@ ajaxData.aborted = 1; | ||
if (_isMonitoredXhrInstance(xhr)) { | ||
xhr.ajaxData.requestHeaders[header] = value; | ||
xhr[strAjaxData].requestHeaders[header] = value; | ||
} | ||
@@ -405,3 +432,4 @@ }, | ||
if (!_isNullOrUndefined(xhr)) { | ||
isDisabled = xhr[DisabledPropertyName] === true; | ||
// Look on the XMLHttpRequest of the URL string value | ||
isDisabled = xhr[DisabledPropertyName] === true || theUrl[DisabledPropertyName] === true; | ||
} | ||
@@ -434,3 +462,3 @@ else if (!_isNullOrUndefined(request)) { | ||
if (!_isNullOrUndefined(xhr)) { | ||
ajaxValidation = excludeAjaxDataValidation === true || !_isNullOrUndefined(xhr.ajaxData); | ||
ajaxValidation = excludeAjaxDataValidation === true || !_isNullOrUndefined(xhr[strAjaxData]); | ||
} | ||
@@ -451,7 +479,7 @@ // checking to see that all interested functions on xhr were instrumented | ||
ajaxData.async = async; | ||
xhr.ajaxData = ajaxData; | ||
xhr[strAjaxData] = ajaxData; | ||
_attachToOnReadyStateChange(xhr); | ||
} | ||
function _attachToOnReadyStateChange(xhr) { | ||
xhr.ajaxData.xhrMonitoringState.stateChangeAttached = EventHelper.Attach(xhr, "readystatechange", function () { | ||
xhr[strAjaxData].xhrMonitoringState.stateChangeAttached = EventHelper.Attach(xhr, "readystatechange", function () { | ||
try { | ||
@@ -474,4 +502,17 @@ if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr)) { | ||
} | ||
function _getResponseText(xhr) { | ||
try { | ||
var responseType = xhr.responseType; | ||
if (responseType === "" || responseType === "text") { | ||
// As per the specification responseText is only valid if the type is an empty string or "text" | ||
return xhr.responseText; | ||
} | ||
} | ||
catch (e) { | ||
// This shouldn't happend because of the above check -- but just in case, so just ignore | ||
} | ||
return null; | ||
} | ||
function _onAjaxComplete(xhr) { | ||
var ajaxData = xhr.ajaxData; | ||
var ajaxData = xhr[strAjaxData]; | ||
ajaxData.responseFinishedTime = DateTimeUtils.Now(); | ||
@@ -495,3 +536,3 @@ ajaxData.status = xhr.status; | ||
type: xhr.responseType, | ||
responseText: xhr.responseText, | ||
responseText: _getResponseText(xhr), | ||
response: xhr.response | ||
@@ -529,3 +570,8 @@ }; | ||
// cleanup telemetry data | ||
xhr.ajaxData = null; | ||
try { | ||
xhr[strAjaxData] = null; | ||
} | ||
catch (e) { | ||
// May throw in environments that prevent extension or freeze xhr | ||
} | ||
} | ||
@@ -532,0 +578,0 @@ }, function (e) { |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.1 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.2 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?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,g,i,k,o,s=function(){return(s=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=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=k=k||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,R="undefined",c="object",U="prototype",f="function",l="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==R&&globalThis?globalThis:typeof self!==R&&self?self:typeof window!==R&&window?window:typeof global!==R&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===l&&v()?window:null}function v(){return Boolean(typeof window===c&&window)}function y(){return v()?window:m(l)}function x(){return function e(){return Boolean(typeof document===c&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===c&&navigator)}()?navigator:m("navigator")}function H(){return typeof location===c&&location?location:m(d)}function j(){return m(p)}function I(){return Boolean(typeof JSON===c&&JSON||null!==m(h))}function C(){return I()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",D="removeEventListener";function _(e,t){return typeof e===t}function w(e){return _(e,R)||e===undefined}function A(e){return w(e)||null===e}function M(e,t){return e&&Object[U].hasOwnProperty.call(e,t)}function E(e){return _(e,c)}function L(e){return _(e,f)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!A(e))try{A(e[b])?A(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function P(e,t,n,r){if(void 0===r&&(r=!1),!A(e))try{A(e[D])?A(e[N])||e[N]("on"+t,n):e[D](t,n,r)}catch(i){}}var z=(F.isDate=function(e){return"[object Date]"===Object[U].toString.call(e)},F.isString=function(e){return _(e,"string")},F.isNumber=function(e){return _(e,"number")},F.isBoolean=function(e){return _(e,"boolean")},F.disableCookies=function(){F._canUseCookies=!1},F.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)})},F.toISOString=function(e){if(F.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"}},F.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)},F.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},F.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},F.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},F.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[U]=e,new t},F.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)M(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++)M(e,i[o])&&n.push(i[o]);return n},F.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},F.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=B.Attach(i,e,t)||n),n},F.isTypeof=_,F.isUndefined=w,F.isNullOrUndefined=A,F.hasOwnProperty=M,F.isFunction=L,F.isObject=E,F);function F(){}var G,X,W=/[xy]/g,B=(K.Attach=q,K.AttachEvent=q,K.Detach=P,K.DetachEvent=P,K);function K(){}(X=G=G||{})[X.CRITICAL=1]="CRITICAL",X[X.WARNING=2]="WARNING";var V=1,Q=2,$=3,J=4,Y=5,Z=6,ee=13,te=14,ne=15,re=16,ie=17,ae=18,oe=23,se=49,ue=52,ce=55,le=56,fe=57,de=61,pe=66,ge=68,he=69,me=71,ve=73,ye=(xe.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},xe.dataType="MessageData",xe.AiNonUserActionablePrefix="AI (Internal): ",xe.AiUserActionablePrefix="AI: ",xe);function xe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?xe.AiUserActionablePrefix:xe.AiNonUserActionablePrefix)+e;var i="";I()&&(i=C().stringify(r));var a=(t?" message:"+xe.sanitizeDiagnosticText(t):"")+(r?" props:"+xe.sanitizeDiagnosticText(i):"");this.message+=a}var Se=(Ie.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new ye(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!z.isUndefined(a)&&a&&!z.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Ie.prototype.warnToConsole=function(e){!z.isUndefined(console)&&console&&(z.isFunction(console.warn)?console.warn(e):z.isFunction(console.log)&&console.log(e))},Ie.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Ie.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 ye(oe,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Ie.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Ie);function Ie(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},z.isNullOrUndefined(e)||(z.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),z.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),z.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),z.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Ce=z.isFunction,Te=function Tr(i,a){var o=this,s=null,u=Ce(i.processTelemetry),c=Ce(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&&u){o._hasRun=!0;try{t.setNext(s),c&&i.setNextPlugin(s),s&&(s._hasRun=!1),i.processTelemetry(e,t)}catch(r){var n=s&&s._hasRun;s&&n||t.diagLog().throwInternal(G.CRITICAL,ve,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},be=z.isNullOrUndefined;function Ne(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&&z.isFunction(a.processTelemetry)){var o=new Te(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var De=function br(e,a,n,t){var o=this,r=null;null!==t&&(e&&z.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),Ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],z.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),Ne(r,t)}(e,o,t):z.isUndefined(t)&&(r=Ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new Se(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&&!be(i[t])?r=i[t]:a&&!be(a[t])&&(r=a[t]),be(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 br(e||r,a,n,t)}},_e=z.isFunction,we="getPlugin",Ae=(Me.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Me);function Me(){var a=this,o=!1,s=null,u=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){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&_e(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new De(null,{},a.core);t=u&&u[we]?n.createNew(null,u[we]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[we]&&(i=u[we]()),a.core=t,s=new De(r,e,t,i),o=!0}}var Ee=z.isFunction,Le="processTelemetry",qe="priority",ke="setNextPlugin",Re="isInitialized";function Ue(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Ee(r[ke])&&Ee(a[Le])&&r[ke](a),Ee(a[Re])&&a[Re]()||e.push(a),r=a,i=i.getNext())}z.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function Oe(e){return e.sort(function(e,t){var n=0,r=Ee(t[Le]);return Ee(e[Le])?n=r?e[qe]-t[qe]:1:r&&(n=-1),n})}var He=500,je="Channel has invalid priority",Pe=z.arrForEach,ze=z.objDefineAccessors;function Fe(e,t){t&&0<t.length&&(function n(e){Pe(e,function(e){if(e.priority<He)throw Error(je+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Ge,Xe=(t(We,Ge=Ae),We.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&Pe(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},We.prototype.getChannelControls=function(){return this._channelQueue},We.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Ge.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&z.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&Pe(e,function(e){return Fe(n,e)}),t){var r=[];Pe(t,function(e){e.priority>He&&r.push(e)}),Fe(n,r)}return n}((t||{}).channels,r);Pe(e,function(e){return Ue(new De(e,t,n),r)})}},We._staticInit=(ze(We.prototype,"ChannelControls",We.prototype.getChannelControls),void ze(We.prototype,"channelQueue",We.prototype.getChannelControls)),We);function We(){var e=null!==Ge&&Ge.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=He,e}var Be=z.arrForEach,Ke=z.isNullOrUndefined,Ve=(Qe.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||Ke(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||z.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=Ke(e.extensions)?[]:e.extensions,(e.extensionConfig=Ke(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||z.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=Oe(o);var s=[],u={};if(Be(o,function(e){if(Ke(e)||Ke(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(Ke(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=Oe(o),i._extensions=o,Ue(new De([a],e,i),o),Ue(new De(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Qe.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Qe.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=z.toISOString(new Date)),Ke(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Be(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Qe.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new De(t,this.config,this)},Qe);function Qe(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Xe,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var $e=(Je.prototype.addNotificationListener=function(e){this.listeners.push(e)},Je.prototype.removeNotificationListener=function(e){for(var t=z.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=z.arrIndexOf(this.listeners,e)},Je.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)},Je.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)},Je);function Je(){this.listeners=[]}var Ye;t(Ze,Ye=Ve),Ze.prototype.initialize=function(e,t){var n=this;n._notificationManager=new $e,n.logger=new Se(e),n.config=e,Ye.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},Ze.prototype.getTransmissionControls=function(){return Ye.prototype.getTransmissionControls.call(this)},Ze.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),Ye.prototype.track.call(this,e)},Ze.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},Ze.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},Ze.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];z.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:z.toISOString(new Date),baseType:ye.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},Ze.prototype._validateTelemetryItem=function(e){if(z.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},Ze.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function Ze(){return Ye.call(this)||this}var et="_aiHooks",tt=["req","rsp","hkErr","fnErr"];function nt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function rt(e,u,c,l,f){0<=f&&f<=2&&nt(e,function(e,t){var n=e.cbks,r=n[tt[f]];if(r){u.ctx=function(){return l[t]=l[t]||{}};try{r.apply(u.inst,c)}catch(o){var i=u.err;try{var a=n[tt[2]];a&&(u.err=o,a.apply(u.inst,c))}catch(s){}finally{u.err=i}}}})}function it(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function c(e,t,n){var r=null;return e&&(e.hasOwnProperty(t)?r=e:n&&(r=c(e[U],t,!1))),r}(e,t,r),a=i[t];if(typeof a===f){var o=a[et];if(!o){var s=function l(s){return function(){var e=arguments,t=s.h,n={name:s.n,inst:this,ctx:null},r=[],i=[n];nt(e,function(e){i.push(e)}),rt(t,n,i,r,0);var a=s.f;try{n.rslt=a.apply(this,e)}catch(o){throw n.err=o,rt(t,n,i,r,3),o}return rt(t,n,i,r,1),n.rslt}}(o={i:0,n:t,f:a,h:[]});s[et]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;nt(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var at=(ot.requestContextHeader="Request-Context",ot.requestContextTargetKey="appId",ot.requestContextAppIdFormat="appId=cid-v1:",ot.requestIdHeader="Request-Id",ot.traceParentHeader="traceparent",ot.sdkContextHeader="Sdk-Context",ot.sdkContextHeaderAppIdRequest="appId",ot.requestContextHeaderLowerCase="request-context",ot);function ot(){}var st=(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(G.WARNING,fe,"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(G.WARNING,de,"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,pe)},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(G.WARNING,le,"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(G.WARNING,ue,"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(z.isObject(i)&&I())try{i=C().stringify(i)}catch(a){e.throwInternal(G.WARNING,se,"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,he).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(G.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 z.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 ct=S(),lt=z.isString,ft=null;var dt=(pt.createDomEvent=function(e){var t=null;if(z.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},pt.disableStorage=function(){pt._canUseLocalStorage=!1,pt._canUseSessionStorage=!1},pt._getLocalStorageObject=function(){return pt.canUseLocalStorage()?pt._getVerifiedStorageObject(a.LocalStorage):null},pt._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(z.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("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},pt.isInternalApplicationInsightsEndpoint=function(e){return-1!==pt._internalEndpoints.indexOf(e.toLowerCase())},pt.canUseLocalStorage=function(){return pt._canUseLocalStorage===undefined&&(pt._canUseLocalStorage=!!pt._getVerifiedStorageObject(a.LocalStorage)),pt._canUseLocalStorage},pt.getStorage=function(e,t){var n=pt._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,V,"Browser failed read of local storage. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return null},pt.setStorage=function(e,t,n){var r=pt._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,$,"Browser failed write to local storage. "+pt.getExceptionName(i),{exception:pt.dump(i)})}return!1},pt.removeStorage=function(e,t){var n=pt._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){pt._canUseLocalStorage=!1,e.throwInternal(G.WARNING,Y,"Browser failed removal of local storage item. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return!1},pt._getSessionStorageObject=function(){return pt.canUseSessionStorage()?pt._getVerifiedStorageObject(a.SessionStorage):null},pt.canUseSessionStorage=function(){return pt._canUseSessionStorage===undefined&&(pt._canUseSessionStorage=!!pt._getVerifiedStorageObject(a.SessionStorage)),pt._canUseSessionStorage},pt.getSessionStorageKeys=function(){var e=[];if(pt.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},pt.getSessionStorage=function(e,t){var n=pt._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,Q,"Browser failed read of session storage. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return null},pt.setSessionStorage=function(e,t,n){var r=pt._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,J,"Browser failed write to session storage. "+pt.getExceptionName(i),{exception:pt.dump(i)})}return!1},pt.removeSessionStorage=function(e,t){var n=pt._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){pt._canUseSessionStorage=!1,e.throwInternal(G.WARNING,Z,"Browser failed removal of session storage item. "+pt.getExceptionName(r),{exception:pt.dump(r)})}return!1},pt.disableCookies=function(){z.disableCookies()},pt.canUseCookies=function(e){if(z._canUseCookies===undefined){z._canUseCookies=!1;try{z._canUseCookies=pt.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,ge,"Cannot access document.cookie - "+pt.getExceptionName(t),{exception:pt.dump(t)})}}return z._canUseCookies},pt.disallowsSameSiteNone=function(e){return!!lt(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"))},pt.setCookie=function(e,t,n,r){if(pt.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=H();o&&"https:"===o.protocol&&(a=";secure",null===ft&&(ft=pt.disallowsSameSiteNone((S()||{}).userAgent)),ft||(n+=";SameSite=None")),pt.document.cookie=t+"="+n+i+";path=/"+a}},pt.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},pt.getCookie=function(e,t){if(pt.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=pt.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=pt.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},pt.deleteCookie=function(e,t){pt.canUseCookies(e)&&(pt.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},pt.trim=function(e){return lt(e)?e.replace(/^\s+|\s+$/g,""):e},pt.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},pt.random32=function(){return 4294967296*Math.random()|0},pt.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=pt.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)},pt.isArray=function(e){return"[object Array]"===Object[U].toString.call(e)},pt.isError=function(e){return"[object Error]"===Object[U].toString.call(e)},pt.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():ct?(ct.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},pt.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},pt.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},pt.dump=function(e){var t=Object[U].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":I()&&(n=C().stringify(e)),t+n},pt.getExceptionName=function(e){return"[object Error]"===Object[U].toString.call(e)?e.name:""},pt.addEventHandler=function(e,t){return B.Attach(y(),e,t)},pt.IsBeaconApiSupported=function(){return"sendBeacon"in ct&&ct.sendBeacon},pt.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},pt.document=x()||{},pt._canUseLocalStorage=undefined,pt._canUseSessionStorage=undefined,pt._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],pt.NotSpecified="not_specified",pt.isDate=z.isDate,pt.toISOStringForIE8=z.toISOString,pt);function pt(){}var gt=(ht.parseUrl=function(e){return ht.htmlAnchorElement||(ht.htmlAnchorElement=ht.document.createElement?ht.document.createElement("a"):{host:ht.parseHost(e)}),ht.htmlAnchorElement.href=e,ht.htmlAnchorElement},ht.getAbsoluteUrl=function(e){var t,n=ht.parseUrl(e);return n&&(t=n.href),t},ht.getPathName=function(e){var t,n=ht.parseUrl(e);return n&&(t=n.pathname),t},ht.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ht.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&<(t[2])&&0<t[2].length)return t[2]}return null},ht.document=x()||{},ht);function ht(){}var mt=(vt.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=gt.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(z.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},vt.getCorrelationContext=function(e){if(e){var t=vt.getCorrelationContextValue(e,at.requestContextTargetKey);if(t&&t!==vt.correlationIdPrefix)return t}},vt.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},vt.correlationIdPrefix="cid-v1:",vt);function vt(){}var yt=(xt.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=gt.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=st.sanitizeString(e,n?n+" "+u:u)}else a=st.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},xt);function xt(){}var St=(It.Now=function(){var e=j();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},It.GetDuration=function(e,t){var n=null;return 0===e||0===t||z.isNullOrUndefined(e)||z.isNullOrUndefined(t)||(n=t-e),n},It);function It(){}var Ct,Tt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",bt=(t(Nt,Ct=function Nr(){}),Nt);function Nt(){return Ct.call(this)||this}var Dt;t(_t,Dt=function Dr(){this.ver=1,this.sampleRate=100,this.tags={}});function _t(e,t,n){var r=Dt.call(this)||this;return r.name=st.sanitizeString(e,n)||dt.NotSpecified,r.data=t,r.time=z.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var wt,At=function _r(){},Mt=(t(Et,wt=At),Et);function Et(){var e=wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Lt;t(qt,Lt=Mt),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",qt.dataType="EventData";function qt(e,t,n,r){var i=Lt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=st.sanitizeString(e,t)||dt.NotSpecified,i.properties=st.sanitizeProperties(e,n),i.measurements=st.sanitizeMeasurements(e,r),i}var kt,Rt=function wr(){},Ut=(t(Ot,kt=At),Ot);function Ot(){var e=kt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Ht,jt=function Ar(){this.hasFullStack=!0,this.parsedStack=[]};t(Pt,Ht=Ut),Pt.CreateFromInterface=function(t,e){var n=e.exceptions&&z.arrMap(e.exceptions,function(e){return Ft.CreateFromInterface(t,e)});return new Pt(t,s({},e,{exceptions:n}))},Pt.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&&z.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Pt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Pt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Pt.dataType="ExceptionData";function Pt(e,t,n,r,i,a){var o=Ht.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new Ft(e,t)],o.properties=st.sanitizeProperties(e,n),o.measurements=st.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,z.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var zt,Ft=(t(Gt,zt=jt),Gt.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&z.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}},Gt.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&z.arrMap(t.parsedStack,function(e){return Wt.CreateFromInterface(e)})||t.parsedStack;return new Gt(e,s({},t,{parsedStack:n}))},Gt.parseStack=function(e){var t;if(z.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(Wt.regex.test(o)){var s=new Wt(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,c=t.length-1,l=0,f=u,d=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=c,u++,c--}}return t},Gt);function Gt(e,t){var n=zt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=st.sanitizeString(e,t.name)||dt.NotSpecified,n.message=st.sanitizeMessage(e,t.message)||dt.NotSpecified;var r=t.stack;n.parsedStack=Gt.parseStack(r),n.stack=st.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 Xt,Wt=(t(Bt,Xt=Rt),Bt.CreateFromInterface=function(e){return new Bt(e,null)},Bt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Bt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Bt.baseSize=58,Bt);function Bt(e,t){var n=Xt.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.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(Bt.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+=Bt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var Kt,Vt,Qt,$t=(t(Jt,Kt=At),Jt);function Jt(){var e=Kt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(Qt=Vt=Vt||{})[Qt.Measurement=0]="Measurement",Qt[Qt.Aggregation=1]="Aggregation";var Yt,Zt=(t(en,Yt=function Mr(){this.kind=Vt.Measurement}),en);function en(){var e=null!==Yt&&Yt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var tn;t(nn,tn=$t),nn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",nn.dataType="MetricData";function nn(e,t,n,r,i,a,o,s){var u=tn.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var c=new Zt;return c.count=0<r?r:undefined,c.max=isNaN(a)||null===a?undefined:a,c.min=isNaN(i)||null===i?undefined:i,c.name=st.sanitizeString(e,t)||dt.NotSpecified,c.value=n,u.metrics=[c],u.properties=st.sanitizeProperties(e,o),u.measurements=st.sanitizeMeasurements(e,s),u}var rn,an=(t(on,rn=Mt),on);function on(){var e=rn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var sn;t(un,sn=an),un.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",un.dataType="PageviewData";function un(e,t,n,r,i,a,o){var s=sn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=st.sanitizeId(e,o),s.url=st.sanitizeUrl(e,n),s.name=st.sanitizeString(e,t)||dt.NotSpecified,isNaN(r)||(s.duration=dt.msToTimeSpan(r)),s.properties=st.sanitizeProperties(e,i),s.measurements=st.sanitizeMeasurements(e,a),s}var cn,ln=(t(fn,cn=At),fn);function fn(){var e=cn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var dn,pn=(t(gn,dn=ln),gn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",gn.dataType="RemoteDependencyData",gn);function gn(e,t,n,r,i,a,o,s,u,c,l,f){void 0===u&&(u="Ajax");var d=dn.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=dt.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=st.sanitizeString(e,u);var p=yt.ParseDependencyPath(e,n,s,r);return d.data=st.sanitizeUrl(e,r)||p.data,d.target=st.sanitizeString(e,p.target),c&&(d.target=d.target+" | "+c),d.name=st.sanitizeString(e,p.name),d.properties=st.sanitizeProperties(e,l),d.measurements=st.sanitizeMeasurements(e,f),d}var hn,mn=(t(vn,hn=At),vn);function vn(){var e=hn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var yn;t(xn,yn=mn),xn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",xn.dataType="MessageData";function xn(e,t,n,r,i){var a=yn.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||dt.NotSpecified,a.message=st.sanitizeMessage(e,t),a.properties=st.sanitizeProperties(e,r),a.measurements=st.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Sn,In=(t(Cn,Sn=an),Cn);function Cn(){var e=Sn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Tn;t(bn,Tn=In),bn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",bn.dataType="PageviewPerformanceData";function bn(e,t,n,r,i,a,o){var s=Tn.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=st.sanitizeUrl(e,n),s.name=st.sanitizeString(e,t)||dt.NotSpecified,s.properties=st.sanitizeProperties(e,i),s.measurements=st.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 Nn,Dn,_n;t(wn,Nn=bt);function wn(e,t){var n=Nn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(_n=Dn=Dn||{})[_n.Verbose=0]="Verbose",_n[_n.Information=1]="Information",_n[_n.Warning=2]="Warning",_n[_n.Error=3]="Error",_n[_n.Critical=4]="Critical";var An=(Mn.create=function(e,t,n,r,i,a){if(n=st.sanitizeString(r,n)||dt.NotSpecified,z.isNullOrUndefined(e)||z.isNullOrUndefined(t)||z.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:z.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!z.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Mn);function Mn(){}var En="constructor",Ln="prototype",qn="function",kn="getPrototypeOf",Rn="_dynInstFuncs",Un="_isDynProxy",On="_dynClass",Hn="_dynCls$",jn="_unknown_",Pn=0;function zn(e,t){return e&&Object[Ln].hasOwnProperty.call(e,t)}function Fn(e){return typeof e===qn}function Gn(e){return e&&(e===Object[Ln]||e===Array[Ln])}function Xn(e){return Gn(e)||e===Function[Ln]}function Wn(e){if(e){if(Object[kn])return Object[kn](e);var t="__proto__";if(Gn(e[t]))return e[t];var n=e[En];if(n)return n[Ln]}return null}function Bn(e,t){return t!==En&&Fn(e[t])&&zn(e,t)}function Kn(e){throw new TypeError("DynamicProto: "+e)}function Vn(e,t){return zn(e,Ln)?e.name||t||jn:((e||{})[En]||{}).name||t||jn}function Qn(e,t,n){zn(e,Ln)||Kn("theClass is an invalid class definition.");var r=e[Ln];!function o(e,t){for(var n=Wn(t);n&&!Xn(n);){if(n===e)return 1;n=Wn(n)}}(r,t)&&Kn("["+Vn(e)+"] is not in class heirarchy of ["+Vn(t)+"]");var i=null;zn(r,On)?i=r[On]:(i=Hn+Vn(e,"_")+"$"+Pn,Pn++,r[On]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Bn(e,n)&&(t[n]=e[n]);return t}(t);n(t,function u(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=Wn(e);o&&!Xn(o);){for(var a in o)!i[a]&&Bn(o,a)&&(i[a]=r(t,o[a]));o=Wn(o)}return i}(r,t,a)),function c(e,t,n,r){function i(n,r){var i=function(){if(this&&zn(n,On)){var e=((this[Rn]||{})[n[On]]||{})[r];if(e)return e.apply(this,arguments);Kn("Missing ["+r+"] "+qn)}var t=n[r];return t===i&&(t=Wn(n)[r]),Fn(t)||Kn("["+r+"] is not a "+qn),t.apply(this,arguments)};return i[Un]=1,i}if(!Gn(e)){var a=n[Rn]=n[Rn]||{},o=a[t]=a[t]||{};for(var s in n)Bn(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],zn(e,s)&&(!e[s]||e[s][Un])||(e[s]=i(e,s)))}}(r,i,t,a)}var $n="properties",Jn=z.objKeys,Yn=z.arrForEach;function Zn(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=St.GetDuration(i,a)),r}function er(e,t,n,r,i){var a=0,o=Zn(n,r,i);return o&&(a=tr(e,t,dt.msToTimeSpan(o))),a}function tr(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function nr(e,t){var n=e.perfTiming,r=t[$n]||{},i=0,a=z.isString,o="Start",s="End",u="domainLookup",c="connect",l="redirect",f="request",d="response",p="duration",g="startTime",h=c+s,m=f+o,v=d+s,y=l+o,x=l=s,S="transferSize",I="encodedBodySize",C="decodedBodySize",T="serverTiming";if(n){i|=er(r,l,n,y,x),i|=er(r,u,n,"domainLookupStart","domainLookupEnd"),i|=er(r,c,n,"connectStart",h),i|=er(r,f,n,m,"requestEnd"),i|=er(r,d,n,"responseStart",v),i|=er(r,"networkConnect",n,g,h),i|=er(r,"sentRequest",n,m,v);var b=n[p];i|=tr(r,p,b=b||(Zn(n,g,v)||0)),i|=tr(r,"perfTotal",b);var N=n[T];if(N){var D={};Yn(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=D[t]||{};Yn(Jn(n),function(e){var t=n[e];("name"!==e&&a(t)||z.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),D[t]=r}),i|=tr(r,T,D)}i|=tr(r,S,n[S]),i|=tr(r,I,n[I]),i|=tr(r,C,n[C])}else e.perfMark&&(i|=tr(r,"missing",e.perfAttempts));i&&(t[$n]=r)}var rr=function Er(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},ir=function Lr(e,t,n){var r=this,i=n,c="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new rr,r.clientFailure=0,r.traceID=e,r.spanID=t,Qn(Lr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?gt.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?st.sanitizeUrl(i,gt.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*St.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[$n]={HttpMethod:u.method},r);if(nr(u,i),t&&0<Jn(u.requestHeaders).length&&(i[$n]=i[$n]||{},i[$n].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<Jn(a.headerMap).length&&(i[$n]=i[$n]||{},i[$n].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[$n]=i[$n]||{},""!==s&&"text"!==s||(i[$n][c]=a[c]?a.statusText+" - "+a[c]:a.statusText),"json"===s&&(i[$n][c]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},ar=(or.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},or.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},or.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},or.DEFAULT_TRACE_FLAG="01",or.DEFAULT_VERSION="00",or);function or(e,t){var n=this;n.traceFlag=or.DEFAULT_TRACE_FLAG,n.version=or.DEFAULT_VERSION,e&&or.isValidTraceId(e)?n.traceId=e:n.traceId=dt.generateW3CId(),t&&or.isValidSpanId(t)?n.spanId=t:n.spanId=dt.generateW3CId().substr(0,16)}var sr="ai.ajxmn.",ur="diagLog",cr="throwInternal",lr="fetch",fr=z.isNullOrUndefined,dr=z.arrForEach,pr=z.objKeys,gr=0;function hr(e){var t="";try{fr(e)||fr(e.ajaxData)||fr(e.ajaxData.requestUrl)||(t+="(url: '"+e.ajaxData.requestUrl+"')")}catch(n){}return t}function mr(e,t,n,r,i){e[ur]()[cr](G.CRITICAL,t,n,r,i)}function vr(e,t,n,r,i){e[ur]()[cr](G.WARNING,t,n,r,i)}function yr(t,n,r){return function(e){mr(t,n,r,{ajaxDiagnosticsMessage:hr(e.inst),exception:dt.dump(e.err)})}}function xr(e,t){return e&&t?e.indexOf(t):-1}var Sr,Ir=(t(Cr,Sr=Ae),Cr.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:k.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},Cr.getEmptyConfig=function(){var t=this.getDefaultConfig();return dr(pr(t),function(e){t[e]=undefined}),t},Cr.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Cr.identifier="AjaxDependencyPlugin",Cr);function Cr(){var e=Sr.call(this)||this;e.identifier=Cr.identifier,e.priority=120;var I,C,T,b,N="trackDependencyDataInternal",t=H(),D=!1,_=!1,u=t&&t.host&&t.host.toLowerCase(),w=Cr.getEmptyConfig(),A=!1,i=0,M=!1,E=0,L=!1,q=[],s={};return Qn(Cr,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?it(e[U],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((z.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=xr(i,"?"),o=xr(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),fr(e)?fr(t)||(r="object"==typeof t&&!0===t[Tt]||!!n&&!0===n[Tt]):r=!0===e[Tt],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=_;return fr(e)||(n=!0===t||!fr(e.ajaxData)),r&&n}function v(e,t){if(t.requestUrl&&b&&M){var n=j();if(n&&z.isFunction(n.mark)){var r=b+e+"#"+ ++gr;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var c=o.perfMark,l=j(),f=w.maxAjaxPerfLookupAttempts,d=w.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(l&&c){g++;for(var e=null,t=l.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===xr(r.name,p)&&-1===xr(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===c.name){o.perfTiming=e;break}if(r.startTime<c.startTime-1e3)break}}}!c||o.perfTiming||f<=g||!1===o.async?(c&&z.isFunction(l.clearMarks)&&l.clearMarks(c.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{fr(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){mr(d,ne,"Failed to grab failed fetch diagnostics message",{exception:dt.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=dt.dump(t)),vr(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=St.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",A,r);e?d[N](e):a(te,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(ae,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=Cr.getDefaultConfig();dr(pr(a),function(e){w[e]=i.getConfig(Cr.identifier,e,a[e])});var o=w.distributedTracingMode;if(A=w.enableRequestHeaderTracking,M=w.enableAjaxPerfTracking,E=w.maxAjaxCallsPerView,L=w.enableResponseHeaderTracking,T=o===k.AI||o===k.AI_AND_W3C,C=o===k.AI_AND_W3C||o===k.W3C,M){var s=e.instrumentationKey||"unkwn";b=5<s.length?sr+s.substring(s.length-5)+".":sr+s+"."}if(!1===w.disableAjaxTracking&&!function l(){!function n(){var e=!1;if(typeof XMLHttpRequest!==R&&!fr(XMLHttpRequest)){var t=XMLHttpRequest[U];e=!(fr(t)||fr(t.open)||fr(t.send)||fr(t.abort))}return e}()||_||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i.ajaxData;h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=I&&I.telemetryTrace&&I.telemetryTrace.traceID||dt.generateW3CId(),a=dt.generateW3CId().substr(0,16),o=new ir(i,a,d[ur]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e.ajaxData=o,function s(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=B.Attach(n,"readystatechange",function(){try{n&&4===n.readyState&&m(n)&&!function i(r){var t=r.ajaxData;function n(e,t){var n=t||{};n.ajaxDiagnosticsMessage=hr(r),e&&(n.exception=dt.dump(e)),vr(d,te,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}t.responseFinishedTime=St.Now(),t.status=r.status,y("xmlhttprequest",t,function(){try{var e=t.CreateTrackItem("Ajax",A,function(){var e={statusText:r.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==xr(t.toLowerCase(),at.requestContextHeaderLowerCase)){var n=e.getResponseHeader(at.requestContextHeader);return mt.getCorrelationContext(n)}}catch(r){vr(d,ae,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:hr(e),exception:dt.dump(r)})}}(r),type:r.responseType,responseText:r.responseText,response:r.response};if(L){var t=r.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};dr(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):n(null,{requestSentTime:t.requestSentTime,responseFinishedTime:t.responseFinishedTime})}finally{r.ajaxData=null}},function(e){n(e,null)})}(n)}catch(t){var e=dt.dump(t);e&&-1!==xr(e.toLowerCase(),"c00c023f")||mr(d,re,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:hr(n),exception:e})}})}(e)}(i,t,n,r)},hkErr:yr(d,ne,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n.ajaxData;m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=St.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:yr(d,ie,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t.ajaxData;m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:yr(d,ee,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),A&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r.ajaxData.requestHeaders[t]=n)},hkErr:yr(d,me,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),_=!0)}(),function f(){var e=function n(){var e=O();return!e||fr(e.Request)||fr(e.Request[U])||fr(e[lr])?null:e[lr]}();if(!e)return;var t=O();!1===w.disableFetchTracking?(q.push(it(t,lr,{req:function(e,t,n){var r;if(D&&!h(null,t,n)){var i=e.ctx();r=function s(e,t){var n=I&&I.telemetryTrace&&I.telemetryTrace.traceID||dt.generateW3CId(),r=dt.generateW3CId().substr(0,16),i=new ir(n,r,d[ur]());i.requestSentTime=St.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};t&&t.headers&&A&&(o=t.headers);return i.requestHeaders=o,v("fetch",i),i}(t,n),n=d.includeCorrelationHeaders(r,t,n),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(at.requestContextHeader);return mt.getCorrelationContext(t)}catch(n){vr(d,ae,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:dt.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:yr(d,ne,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),D=!0):e.polyfill&&q.push(it(t,lr,{req:function(e,t,n){h(null,t,n)}}))}(),0<n.length&&n){for(var u=void 0,c=0;!u&&c<n.length;)n[c]&&"AppInsightsPropertiesPlugin"===n[c].identifier&&(u=n[c]),c++;u&&(I=u.context)}}},d.teardown=function(){dr(q,function(e){e.rm()}),_=D=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(mt.canIncludeCorrelationHeader(w,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(at.requestIdHeader,a),A&&(e.requestHeaders[at.requestIdHeader]=a)}if((s=w.appId||I&&I.appId())&&(n.headers.set(at.requestContextHeader,at.requestContextAppIdFormat+s),A&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+s)),C){var o=new ar(e.traceID,e.spanID);n.headers.set(at.traceParentHeader,o.toString()),A&&(e.requestHeaders[at.traceParentHeader]=o.toString())}return n}return n}if(r){if(mt.canIncludeCorrelationHeader(w,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(at.requestIdHeader,a),A&&(e.requestHeaders[at.requestIdHeader]=a)}var s;if((s=w.appId||I&&I.appId())&&(r.setRequestHeader(at.requestContextHeader,at.requestContextAppIdFormat+s),A&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+s)),C){o=new ar(e.traceID,e.spanID);r.setRequestHeader(at.traceParentHeader,o.toString()),A&&(e.requestHeaders[at.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){w.distributedTracingMode!==k.W3C&&w.distributedTracingMode!==k.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=An.create(e,pn.dataType,pn.envelopeType,d[ur](),t,n);d.core.track(r)}else i===E&&mr(d,ce,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=Ir,e.ajaxRecord=ir,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,g,i,R,o,s=function(){return(s=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=g=g||{})[i.Default=0]="Default",i[i.Required=1]="Required",i[i.Array=2]="Array",i[i.Hidden=4]="Hidden",(o=R=R||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var u=2,k="undefined",l="object",F="prototype",f="function",c="window",d="location",p="performance",h="JSON";function O(){return typeof globalThis!==k&&globalThis?globalThis:typeof self!==k&&self?self:typeof window!==k&&window?window:typeof global!==k&&global?global:null}function m(e){var t=O();return t&&t[e]?t[e]:e===c&&v()?window:null}function v(){return Boolean(typeof window===l&&window)}function y(){return v()?window:m(c)}function x(){return function e(){return Boolean(typeof document===l&&document)}()?document:m("document")}function S(){return function e(){return Boolean(typeof navigator===l&&navigator)}()?navigator:m("navigator")}function j(){return typeof location===l&&location?location:m(d)}function H(){return m(p)}function C(){return Boolean(typeof JSON===l&&JSON||null!==m(h))}function I(){return C()?JSON||m(h):null}var T="attachEvent",b="addEventListener",N="detachEvent",A="removeEventListener";function M(e,t){return typeof e===t}function D(e){return M(e,k)||e===undefined}function w(e){return D(e)||null===e}function _(e,t){return e&&Object[F].hasOwnProperty.call(e,t)}function E(e){return M(e,l)}function L(e){return M(e,f)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!w(e))try{w(e[b])?w(e[T])||(e[T]("on"+t,n),i=!0):(e[b](t,n,r),i=!0)}catch(a){}return i}function U(e,t,n,r){if(void 0===r&&(r=!1),!w(e))try{w(e[A])?w(e[N])||e[N]("on"+t,n):e[A](t,n,r)}catch(i){}}var P=(z.isDate=function(e){return"[object Date]"===Object[F].toString.call(e)},z.isString=function(e){return M(e,"string")},z.isNumber=function(e){return M(e,"number")},z.isBoolean=function(e){return M(e,"boolean")},z.disableCookies=function(){z._canUseCookies=!1},z.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)})},z.toISOString=function(e){if(z.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"}},z.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)},z.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},z.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},z.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},z.objCreate=function(e){if(null==e)return{};if(!E(e)&&!L(e))throw new TypeError("Object prototype may only be an Object: "+e);function t(){}return t[F]=e,new t},z.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(L(e)||E(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)_(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++)_(e,i[o])&&n.push(i[o]);return n},z.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},z.addEventHandler=function(e,t){var n=!1,r=y();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=x();return i&&(n=X.Attach(i,e,t)||n),n},z.isTypeof=M,z.isUndefined=D,z.isNullOrUndefined=w,z.hasOwnProperty=_,z.isFunction=L,z.isObject=E,z);function z(){}var G,B,W=/[xy]/g,X=(V.Attach=q,V.AttachEvent=q,V.Detach=U,V.DetachEvent=U,V);function V(){}(B=G=G||{})[B.CRITICAL=1]="CRITICAL",B[B.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},Q=($.sanitizeDiagnosticText=function(e){return e?'"'+e.replace(/\"/g,"")+'"':""},$.dataType="MessageData",$.AiNonUserActionablePrefix="AI (Internal): ",$.AiUserActionablePrefix="AI: ",$);function $(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?$.AiUserActionablePrefix:$.AiNonUserActionablePrefix)+e;var i="";C()&&(i=I().stringify(r));var a=(t?" message:"+$.sanitizeDiagnosticText(t):"")+(r?" props:"+$.sanitizeDiagnosticText(i):"");this.message+=a}var J=(Y.prototype.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new Q(t,n,i,r),o=this;if(o.enableDebugExceptions())throw a;if(!P.isUndefined(a)&&a&&!P.isUndefined(a.message)){if(i){var s=+a.messageId;!o._messageLogged[s]&&o.consoleLoggingLevel()>=G.WARNING&&(o.warnToConsole(a.message),o._messageLogged[s]=!0)}else o.consoleLoggingLevel()>=G.WARNING&&o.warnToConsole(a.message);o.logInternalMessage(e,a)}},Y.prototype.warnToConsole=function(e){!P.isUndefined(console)&&console&&(P.isFunction(console.warn)?console.warn(e):P.isFunction(console.log)&&console.log(e))},Y.prototype.resetInternalMessageCount=function(){this._messageCount=0,this._messageLogged={}},Y.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 Q(K.MessageLimitPerPVExceeded,a,!1);n.queue.push(o),n.warnToConsole(a)}}},Y.prototype._areInternalMessagesThrottled=function(){return this._messageCount>=this.maxInternalMessageLimit()},Y);function Y(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},P.isNullOrUndefined(e)||(P.isNullOrUndefined(e.loggingLevelConsole)||(this.consoleLoggingLevel=function(){return e.loggingLevelConsole}),P.isNullOrUndefined(e.loggingLevelTelemetry)||(this.telemetryLoggingLevel=function(){return e.loggingLevelTelemetry}),P.isNullOrUndefined(e.maxMessageLimit)||(this.maxInternalMessageLimit=function(){return e.maxMessageLimit}),P.isNullOrUndefined(e.enableDebugExceptions)||(this.enableDebugExceptions=function(){return e.enableDebugExceptions}))}var Z=P.isFunction,ee=function tr(i,a){var o=this,s=null,u=Z(i.processTelemetry),l=Z(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&&u){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(G.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+r),s&&!n&&s.processTelemetry(e,t)}}else s&&(o._hasRun=!0,s.processTelemetry(e,t))}},te=P.isNullOrUndefined;function ne(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&&P.isFunction(a.processTelemetry)){var o=new ee(a,t);n.push(o),r&&r.setNext(o),r=o}}return 0<n.length?n[0]:null}var re=function nr(e,a,n,t){var o=this,r=null;null!==t&&(e&&P.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),ne(r,t)}(e,o,t||e.getPlugin()):t?r=function u(e,t,n){var r=e,i=!1;return n&&e&&(r=[],P.arrForEach(e,function(e){!i&&e!==n||(i=!0,r.push(e))})),n&&!i&&(r=r||[]).push(n),ne(r,t)}(e,o,t):P.isUndefined(t)&&(r=ne(e,o))),o.core=function(){return n},o.diagLog=function(){var e=(n||{}).logger;return e=e||new J(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&&!te(i[t])?r=i[t]:a&&!te(a[t])&&(r=a[t]),te(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 nr(e||r,a,n,t)}},ie=P.isFunction,ae="getPlugin",oe=(se.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},se);function se(){var a=this,o=!1,s=null,u=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){u=e},a.processNext=function(e,t){t?t.processNext(e):u&&ie(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t=e;if(!t){var n=s||new re(null,{},a.core);t=u&&u[ae]?n.createNew(null,u[ae]):n.createNew(null,u)}return t},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=u;u&&u[ae]&&(i=u[ae]()),a.core=t,s=new re(r,e,t,i),o=!0}}var ue=P.isFunction,le="processTelemetry",ce="priority",fe="setNextPlugin",de="isInitialized";function pe(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&ue(r[fe])&&ue(a[le])&&r[fe](a),ue(a[de])&&a[de]()||e.push(a),r=a,i=i.getNext())}P.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function ge(e){return e.sort(function(e,t){var n=0,r=ue(t[le]);return ue(e[le])?n=r?e[ce]-t[ce]:1:r&&(n=-1),n})}var he=500,me="Channel has invalid priority",ve=P.arrForEach,ye=P.objDefineAccessors;function xe(e,t){t&&0<t.length&&(function n(e){ve(e,function(e){if(e.priority<he)throw Error(me+e.identifier)})}(t=t.sort(function(e,t){return e.priority-t.priority})),e.push(t))}var Se,Ce=(t(Ie,Se=oe),Ie.prototype.processTelemetry=function(t,n){var r=this;this._channelQueue&&ve(this._channelQueue,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},Ie.prototype.getChannelControls=function(){return this._channelQueue},Ie.prototype.initialize=function(t,n,r){if(!this.isInitialized()){Se.prototype.initialize.call(this,t,n,r),t.isCookieUseDisabled&&P.disableCookies();var e=this._channelQueue=function i(e,t){var n=[];if(e&&ve(e,function(e){return xe(n,e)}),t){var r=[];ve(t,function(e){e.priority>he&&r.push(e)}),xe(n,r)}return n}((t||{}).channels,r);ve(e,function(e){return pe(new re(e,t,n),r)})}},Ie._staticInit=(ye(Ie.prototype,"ChannelControls",Ie.prototype.getChannelControls),void ye(Ie.prototype,"channelQueue",Ie.prototype.getChannelControls)),Ie);function Ie(){var e=null!==Se&&Se.apply(this,arguments)||this;return e.identifier="ChannelControllerPlugin",e.priority=he,e}var Te=P.arrForEach,be=P.isNullOrUndefined,Ne=(Ae.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||be(e.instrumentationKey))throw Error("Please provide instrumentation key");i.config=e;var a=i._channelController;n=n||P.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){}}),i._notificationManager=n,e.extensions=be(e.extensions)?[]:e.extensions,(e.extensionConfig=be(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||P.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=ge(o);var s=[],u={};if(Te(o,function(e){if(be(e)||be(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&(be(u[t])?u[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+u[t]+", "+n)),(!t||t<a.priority)&&s.push(e)}),o.push(a),s.push(a),o=ge(o),i._extensions=o,pe(new re([a],e,i),o),pe(new re(s,e,i),o),i._extensions=s,0===i.getTransmissionControls().length)throw new Error("No channels available");i._setInit(!0)},Ae.prototype.getTransmissionControls=function(){return this._channelController.getChannelControls()},Ae.prototype.track=function(e){var t=this;e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=P.toISOString(new Date)),be(e.ver)&&(e.ver="4.0"),t.isInitialized()?(0<t._eventQueue.length&&(Te(t._eventQueue,function(e){t.getProcessTelContext().processNext(e)}),t._eventQueue=[]),t.getProcessTelContext().processNext(e)):t._eventQueue.push(e)},Ae.prototype.getProcessTelContext=function(){var e=this._extensions,t=e;return e&&0!==e.length||(t=[this._channelController]),new re(t,this.config,this)},Ae);function Ae(){var t=!1,e=this;e._extensions=new Array,e._channelController=new Ce,e.isInitialized=function(){return t},e._setInit=function(e){t=e},e._eventQueue=[]}var Me=(De.prototype.addNotificationListener=function(e){this.listeners.push(e)},De.prototype.removeNotificationListener=function(e){for(var t=P.arrIndexOf(this.listeners,e);-1<t;)this.listeners.splice(t,1),t=P.arrIndexOf(this.listeners,e)},De.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)},De.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)},De);function De(){this.listeners=[]}var we;t(_e,we=Ne),_e.prototype.initialize=function(e,t){var n=this;n._notificationManager=new Me,n.logger=new J(e),n.config=e,we.prototype.initialize.call(this,e,t,n.logger,n._notificationManager)},_e.prototype.getTransmissionControls=function(){return we.prototype.getTransmissionControls.call(this)},_e.prototype.track=function(e){if(null===e)throw this._notifyInvalidEvent(e),Error("Invalid telemetry item");this._validateTelemetryItem(e),we.prototype.track.call(this,e)},_e.prototype.addNotificationListener=function(e){this._notificationManager&&this._notificationManager.addNotificationListener(e)},_e.prototype.removeNotificationListener=function(e){this._notificationManager&&this._notificationManager.removeNotificationListener(e)},_e.prototype.pollInternalLogs=function(r){var t=this,e=this.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var n=t,e=n.logger?n.logger.queue:[];P.arrForEach(e,function(e){var t={name:r||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:P.toISOString(new Date),baseType:Q.dataType,baseData:{message:e.message}};n.track(t)}),e.length=0},e)},_e.prototype._validateTelemetryItem=function(e){if(P.isNullOrUndefined(e.name))throw this._notifyInvalidEvent(e),Error("telemetry name required")},_e.prototype._notifyInvalidEvent=function(e){this._notificationManager&&this._notificationManager.eventsDiscarded([e],u)};function _e(){return we.call(this)||this}var Ee="_aiHooks",Le=["req","rsp","hkErr","fnErr"];function qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function Re(e,u,l,c,f){0<=f&&f<=2&&qe(e,function(e,t){var n=e.cbks,r=n[Le[f]];if(r){u.ctx=function(){return c[t]=c[t]||{}};try{r.apply(u.inst,l)}catch(o){var i=u.err;try{var a=n[Le[2]];a&&(u.err=o,a.apply(u.inst,l))}catch(s){}finally{u.err=i}}}})}function ke(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){var i=function l(e,t,n){var r=null;return e&&(e.hasOwnProperty(t)?r=e:n&&(r=l(e[F],t,!1))),r}(e,t,r),a=i[t];if(typeof a===f){var o=a[Ee];if(!o){var s=function c(s){return function(){var e=arguments,t=s.h,n={name:s.n,inst:this,ctx:null},r=[],i=[n];qe(e,function(e){i.push(e)}),Re(t,n,i,r,0);var a=s.f;try{n.rslt=a.apply(this,e)}catch(o){throw n.err=o,Re(t,n,i,r,3),o}return Re(t,n,i,r,1),n.rslt}}(o={i:0,n:t,f:a,h:[]});s[Ee]=o,i[t]=s}var u={id:o.i,cbks:n,rm:function(){var n=this.id;qe(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}};return o.i++,o.h.push(u),u}}return null}var Fe=(Oe.requestContextHeader="Request-Context",Oe.requestContextTargetKey="appId",Oe.requestContextAppIdFormat="appId=cid-v1:",Oe.requestIdHeader="Request-Id",Oe.traceParentHeader="traceparent",Oe.sdkContextHeader="Sdk-Context",Oe.sdkContextHeaderAppIdRequest="appId",Oe.requestContextHeaderLowerCase="request-context",Oe);function Oe(){}var je=(He.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=He.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,He.MAX_NAME_LENGTH-3)+He.padNumber(a);i=o}return i},He.sanitizeKey=function(e,t){var n;return t&&(t=He.trim(t.toString())).length>He.MAX_NAME_LENGTH&&(n=t.substring(0,He.MAX_NAME_LENGTH),e.throwInternal(G.WARNING,K.NameTooLong,"name is too long. It has been truncated to "+He.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},He.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=He.MAX_STRING_LENGTH),t&&(n=n||He.MAX_STRING_LENGTH,(t=He.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(G.WARNING,K.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},He.sanitizeUrl=function(e,t){return He.sanitizeInput(e,t,He.MAX_URL_LENGTH,K.UrlTooLong)},He.sanitizeMessage=function(e,t){var n;return t&&t.length>He.MAX_MESSAGE_LENGTH&&(n=t.substring(0,He.MAX_MESSAGE_LENGTH),e.throwInternal(G.WARNING,K.MessageTruncated,"message is too long, it has been truncated to "+He.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},He.sanitizeException=function(e,t){var n;return t&&t.length>He.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,He.MAX_EXCEPTION_LENGTH),e.throwInternal(G.WARNING,K.ExceptionTruncated,"exception is too long, it has been truncated to "+He.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},He.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(P.isObject(i)&&C())try{i=I().stringify(i)}catch(a){e.throwInternal(G.WARNING,K.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:a},!0)}i=He.sanitizeString(e,i,He.MAX_PROPERTY_LENGTH),n[r=He.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},He.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=He.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},He.sanitizeId=function(e,t){return t?He.sanitizeInput(e,t,He.MAX_ID_LENGTH,K.IdTooLong).toString():t},He.sanitizeInput=function(e,t,n,r){var i;return t&&(t=He.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(G.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},He.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},He.trim=function(e){return P.isString(e)?e.replace(/^\s+|\s+$/g,""):e},He.MAX_NAME_LENGTH=150,He.MAX_ID_LENGTH=128,He.MAX_PROPERTY_LENGTH=8192,He.MAX_STRING_LENGTH=1024,He.MAX_URL_LENGTH=2048,He.MAX_MESSAGE_LENGTH=32768,He.MAX_EXCEPTION_LENGTH=32768,He);function He(){}var Ue=S(),Pe=P.isString,ze=null;var Ge=(Be.createDomEvent=function(e){var t=null;if(P.isFunction(Event))t=new Event(e);else{var n=x();n&&n.createEvent&&(t=n.createEvent("Event")).initEvent(e,!0,!0)}return t},Be.disableStorage=function(){Be._canUseLocalStorage=!1,Be._canUseSessionStorage=!1},Be._getLocalStorageObject=function(){return Be.canUseLocalStorage()?Be._getVerifiedStorageObject(a.LocalStorage):null},Be._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(P.isNullOrUndefined(O()))return null;n=new Date,(r=e===a.LocalStorage?m("localStorage"):m("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},Be.isInternalApplicationInsightsEndpoint=function(e){return-1!==Be._internalEndpoints.indexOf(e.toLowerCase())},Be.canUseLocalStorage=function(){return Be._canUseLocalStorage===undefined&&(Be._canUseLocalStorage=!!Be._getVerifiedStorageObject(a.LocalStorage)),Be._canUseLocalStorage},Be.getStorage=function(e,t){var n=Be._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return null},Be.setStorage=function(e,t,n){var r=Be._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+Be.getExceptionName(i),{exception:Be.dump(i)})}return!1},Be.removeStorage=function(e,t){var n=Be._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Be._canUseLocalStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return!1},Be._getSessionStorageObject=function(){return Be.canUseSessionStorage()?Be._getVerifiedStorageObject(a.SessionStorage):null},Be.canUseSessionStorage=function(){return Be._canUseSessionStorage===undefined&&(Be._canUseSessionStorage=!!Be._getVerifiedStorageObject(a.SessionStorage)),Be._canUseSessionStorage},Be.getSessionStorageKeys=function(){var e=[];if(Be.canUseSessionStorage())for(var t in m("sessionStorage"))e.push(t);return e},Be.getSessionStorage=function(e,t){var n=Be._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return null},Be.setSessionStorage=function(e,t,n){var r=Be._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+Be.getExceptionName(i),{exception:Be.dump(i)})}return!1},Be.removeSessionStorage=function(e,t){var n=Be._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){Be._canUseSessionStorage=!1,e.throwInternal(G.WARNING,K.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+Be.getExceptionName(r),{exception:Be.dump(r)})}return!1},Be.disableCookies=function(){P.disableCookies()},Be.canUseCookies=function(e){if(P._canUseCookies===undefined){P._canUseCookies=!1;try{P._canUseCookies=Be.document.cookie!==undefined}catch(t){e.throwInternal(G.WARNING,K.CannotAccessCookie,"Cannot access document.cookie - "+Be.getExceptionName(t),{exception:Be.dump(t)})}}return P._canUseCookies},Be.disallowsSameSiteNone=function(e){return!!Pe(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"))},Be.setCookie=function(e,t,n,r){if(Be.canUseCookies(e)){var i="",a="";r&&(i=";domain="+r);var o=j();o&&"https:"===o.protocol&&(a=";secure",null===ze&&(ze=Be.disallowsSameSiteNone((S()||{}).userAgent)),ze||(n+=";SameSite=None")),Be.document.cookie=t+"="+n+i+";path=/"+a}},Be.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"===e.toString().toLowerCase()},Be.getCookie=function(e,t){if(Be.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=Be.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=Be.trim(o))&&0===o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},Be.deleteCookie=function(e,t){Be.canUseCookies(e)&&(Be.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},Be.trim=function(e){return Pe(e)?e.replace(/^\s+|\s+$/g,""):e},Be.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64);return e},Be.random32=function(){return 4294967296*Math.random()|0},Be.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=Be.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)},Be.isArray=function(e){return"[object Array]"===Object[F].toString.call(e)},Be.isError=function(e){return"[object Error]"===Object[F].toString.call(e)},Be.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():Ue?(Ue.userAgent||"").toLowerCase():"";return-1!==t.indexOf("msie")?parseInt(t.split("msie")[1]):null},Be.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},Be.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},Be.dump=function(e){var t=Object[F].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":C()&&(n=I().stringify(e)),t+n},Be.getExceptionName=function(e){return"[object Error]"===Object[F].toString.call(e)?e.name:""},Be.addEventHandler=function(e,t){return X.Attach(y(),e,t)},Be.IsBeaconApiSupported=function(){return"sendBeacon"in Ue&&Ue.sendBeacon},Be.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},Be.document=x()||{},Be._canUseLocalStorage=undefined,Be._canUseSessionStorage=undefined,Be._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Be.NotSpecified="not_specified",Be.isDate=P.isDate,Be.toISOStringForIE8=P.toISOString,Be);function Be(){}var We=(Xe.parseUrl=function(e){return Xe.htmlAnchorElement||(Xe.htmlAnchorElement=Xe.document.createElement?Xe.document.createElement("a"):{host:Xe.parseHost(e)}),Xe.htmlAnchorElement.href=e,Xe.htmlAnchorElement},Xe.getAbsoluteUrl=function(e){var t,n=Xe.parseUrl(e);return n&&(t=n.href),t},Xe.getPathName=function(e){var t,n=Xe.parseUrl(e);return n&&(t=n.pathname),t},Xe.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},Xe.parseHost=function(e){if(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);if(null!=t&&2<t.length&&Pe(t[2])&&0<t[2].length)return t[2]}return null},Xe.document=x()||{},Xe);function Xe(){}var Ve=(Ke.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var r=We.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||r===n))return!1;var i,a=e&&e.correlationHeaderDomains;if(a&&(P.arrForEach(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));i=i||t.test(r)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(var s=0;s<o.length;s++)if(new RegExp(o[s].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&0<r.length},Ke.getCorrelationContext=function(e){if(e){var t=Ke.getCorrelationContextValue(e,Fe.requestContextTargetKey);if(t&&t!==Ke.correlationIdPrefix)return t}},Ke.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}},Ke.correlationIdPrefix="cid-v1:",Ke);function Ke(){}var Qe=($e.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&0<t.length){var s=We.parseUrl(t);if(i=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=je.sanitizeString(e,n?n+" "+u:u)}else a=je.sanitizeString(e,t)}else a=i=r;return{target:i,name:a,data:o}},$e);function $e(){}var Je=(Ye.Now=function(){var e=H();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},Ye.GetDuration=function(e,t){var n=null;return 0===e||0===t||P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||(n=t-e),n},Ye);function Ye(){}var Ze,et="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",tt=(t(nt,Ze=function rr(){}),nt);function nt(){return Ze.call(this)||this}var rt;t(it,rt=function ir(){this.ver=1,this.sampleRate=100,this.tags={}});function it(e,t,n){var r=rt.call(this)||this;return r.name=je.sanitizeString(e,n)||Ge.NotSpecified,r.data=t,r.time=P.toISOString(new Date),r.aiDataContract={time:g.Required,iKey:g.Required,name:g.Required,sampleRate:function(){return 100===r.sampleRate?g.Hidden:g.Required},tags:g.Required,data:g.Required},r}var at,ot=function ar(){},st=(t(ut,at=ot),ut);function ut(){var e=at.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var lt;t(ct,lt=st),ct.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ct.dataType="EventData";function ct(e,t,n,r){var i=lt.call(this)||this;return i.aiDataContract={ver:g.Required,name:g.Required,properties:g.Default,measurements:g.Default},i.name=je.sanitizeString(e,t)||Ge.NotSpecified,i.properties=je.sanitizeProperties(e,n),i.measurements=je.sanitizeMeasurements(e,r),i}var ft,dt=function or(){},pt=(t(gt,ft=ot),gt);function gt(){var e=ft.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var ht,mt=function sr(){this.hasFullStack=!0,this.parsedStack=[]};t(vt,ht=pt),vt.CreateFromInterface=function(t,e){var n=e.exceptions&&P.arrMap(e.exceptions,function(e){return xt.CreateFromInterface(t,e)});return new vt(t,s({},e,{exceptions:n}))},vt.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&&P.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},vt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},vt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",vt.dataType="ExceptionData";function vt(e,t,n,r,i,a){var o=ht.call(this)||this;return o.aiDataContract={ver:g.Required,exceptions:g.Required,severityLevel:g.Default,properties:g.Default,measurements:g.Default},t instanceof Error?(o.exceptions=[new xt(e,t)],o.properties=je.sanitizeProperties(e,n),o.measurements=je.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,P.isNullOrUndefined(t.isManual)||(o.isManual=t.isManual)),o}var yt,xt=(t(St,yt=mt),St.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&P.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}},St.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&P.arrMap(t.parsedStack,function(e){return It.CreateFromInterface(e)})||t.parsedStack;return new St(e,s({},t,{parsedStack:n}))},St.parseStack=function(e){var t;if(P.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(It.regex.test(o)){var s=new It(n[a],r++);i+=s.sizeInBytes,t.push(s)}}if(32768<i)for(var u=0,l=t.length-1,c=0,f=u,d=l;u<l;){if(32768<(c+=t[u].sizeInBytes+t[l].sizeInBytes)){var p=d-f+1;t.splice(f,p);break}f=u,d=l,u++,l--}}return t},St);function St(e,t){var n=yt.call(this)||this;if(n.aiDataContract={id:g.Default,outerId:g.Default,typeName:g.Required,message:g.Required,hasFullStack:g.Default,stack:g.Default,parsedStack:g.Array},t instanceof Error){n.typeName=je.sanitizeString(e,t.name)||Ge.NotSpecified,n.message=je.sanitizeMessage(e,t.message)||Ge.NotSpecified;var r=t.stack;n.parsedStack=St.parseStack(r),n.stack=je.sanitizeException(e,r),n.hasFullStack=Ge.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 Ct,It=(t(Tt,Ct=dt),Tt.CreateFromInterface=function(e){return new Tt(e,null)},Tt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Tt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Tt.baseSize=58,Tt);function Tt(e,t){var n=Ct.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:g.Required,method:g.Required,assembly:g.Default,fileName:g.Default,line:g.Default},"string"==typeof e){var r=e;n.level=t,n.method="<no_method>",n.assembly=Ge.trim(r),n.fileName="",n.line=0;var i=r.match(Tt.regex);i&&5<=i.length&&(n.method=Ge.trim(i[2])||n.method,n.fileName=Ge.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+=Tt.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}var bt,Nt,At,Mt=(t(Dt,bt=ot),Dt);function Dt(){var e=bt.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(At=Nt=Nt||{})[At.Measurement=0]="Measurement",At[At.Aggregation=1]="Aggregation";var wt,_t=(t(Et,wt=function ur(){this.kind=Nt.Measurement}),Et);function Et(){var e=null!==wt&&wt.apply(this,arguments)||this;return e.aiDataContract={name:g.Required,kind:g.Default,value:g.Required,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default},e}var Lt;t(qt,Lt=Mt),qt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",qt.dataType="MetricData";function qt(e,t,n,r,i,a,o,s){var u=Lt.call(this)||this;u.aiDataContract={ver:g.Required,metrics:g.Required,properties:g.Default};var l=new _t;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=je.sanitizeString(e,t)||Ge.NotSpecified,l.value=n,u.metrics=[l],u.properties=je.sanitizeProperties(e,o),u.measurements=je.sanitizeMeasurements(e,s),u}var Rt,kt=(t(Ft,Rt=st),Ft);function Ft(){var e=Rt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Ot;t(jt,Ot=kt),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",jt.dataType="PageviewData";function jt(e,t,n,r,i,a,o){var s=Ot.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,properties:g.Default,measurements:g.Default,id:g.Default},s.id=je.sanitizeId(e,o),s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Ge.NotSpecified,isNaN(r)||(s.duration=Ge.msToTimeSpan(r)),s.properties=je.sanitizeProperties(e,i),s.measurements=je.sanitizeMeasurements(e,a),s}var Ht,Ut=(t(Pt,Ht=ot),Pt);function Pt(){var e=Ht.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var zt,Gt=(t(Bt,zt=Ut),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Bt.dataType="RemoteDependencyData",Bt);function Bt(e,t,n,r,i,a,o,s,u,l,c,f){void 0===u&&(u="Ajax");var d=zt.call(this)||this;d.aiDataContract={id:g.Required,ver:g.Required,name:g.Default,resultCode:g.Default,duration:g.Default,success:g.Default,data:g.Default,target:g.Default,type:g.Default,properties:g.Default,measurements:g.Default,kind:g.Default,value:g.Default,count:g.Default,min:g.Default,max:g.Default,stdDev:g.Default,dependencyKind:g.Default,dependencySource:g.Default,commandName:g.Default,dependencyTypeName:g.Default},d.id=t,d.duration=Ge.msToTimeSpan(i),d.success=a,d.resultCode=o+"",d.type=je.sanitizeString(e,u);var p=Qe.ParseDependencyPath(e,n,s,r);return d.data=je.sanitizeUrl(e,r)||p.data,d.target=je.sanitizeString(e,p.target),l&&(d.target=d.target+" | "+l),d.name=je.sanitizeString(e,p.name),d.properties=je.sanitizeProperties(e,c),d.measurements=je.sanitizeMeasurements(e,f),d}var Wt,Xt=(t(Vt,Wt=ot),Vt);function Vt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Kt;t(Qt,Kt=Xt),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Qt.dataType="MessageData";function Qt(e,t,n,r,i){var a=Kt.call(this)||this;return a.aiDataContract={ver:g.Required,message:g.Required,severityLevel:g.Default,properties:g.Default},t=t||Ge.NotSpecified,a.message=je.sanitizeMessage(e,t),a.properties=je.sanitizeProperties(e,r),a.measurements=je.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var $t,Jt=(t(Yt,$t=kt),Yt);function Yt(){var e=$t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Zt;t(en,Zt=Jt),en.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",en.dataType="PageviewPerformanceData";function en(e,t,n,r,i,a,o){var s=Zt.call(this)||this;return s.aiDataContract={ver:g.Required,name:g.Default,url:g.Default,duration:g.Default,perfTotal:g.Default,networkConnect:g.Default,sentRequest:g.Default,receivedResponse:g.Default,domProcessing:g.Default,properties:g.Default,measurements:g.Default},s.url=je.sanitizeUrl(e,n),s.name=je.sanitizeString(e,t)||Ge.NotSpecified,s.properties=je.sanitizeProperties(e,i),s.measurements=je.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 tn,nn,rn;t(an,tn=tt);function an(e,t){var n=tn.call(this)||this;return n.aiDataContract={baseType:g.Required,baseData:g.Required},n.baseType=e,n.baseData=t,n}(rn=nn=nn||{})[rn.Verbose=0]="Verbose",rn[rn.Information=1]="Information",rn[rn.Warning=2]="Warning",rn[rn.Error=3]="Error",rn[rn.Critical=4]="Critical";var on=(sn.create=function(e,t,n,r,i,a){if(n=je.sanitizeString(r,n)||Ge.NotSpecified,P.isNullOrUndefined(e)||P.isNullOrUndefined(t)||P.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:P.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!P.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},sn);function sn(){}var un="constructor",ln="prototype",cn="function",fn="getPrototypeOf",dn="_dynInstFuncs",pn="_isDynProxy",gn="_dynClass",hn="_dynCls$",mn="_unknown_",vn=0;function yn(e,t){return e&&Object[ln].hasOwnProperty.call(e,t)}function xn(e){return typeof e===cn}function Sn(e){return e&&(e===Object[ln]||e===Array[ln])}function Cn(e){return Sn(e)||e===Function[ln]}function In(e){if(e){if(Object[fn])return Object[fn](e);var t="__proto__";if(Sn(e[t]))return e[t];var n=e[un];if(n)return n[ln]}return null}function Tn(e,t){return t!==un&&xn(e[t])&&yn(e,t)}function bn(e){throw new TypeError("DynamicProto: "+e)}function Nn(e,t){return yn(e,ln)?e.name||t||mn:((e||{})[un]||{}).name||t||mn}function An(e,t,n){yn(e,ln)||bn("theClass is an invalid class definition.");var r=e[ln];!function o(e,t){for(var n=In(t);n&&!Cn(n);){if(n===e)return 1;n=In(n)}}(r,t)&&bn("["+Nn(e)+"] is not in class heirarchy of ["+Nn(t)+"]");var i=null;yn(r,gn)?i=r[gn]:(i=hn+Nn(e,"_")+"$"+vn,vn++,r[gn]=i);var a=function s(e){var t={};for(var n in e)!t[n]&&Tn(e,n)&&(t[n]=e[n]);return t}(t);n(t,function u(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=In(e);o&&!Cn(o);){for(var a in o)!i[a]&&Tn(o,a)&&(i[a]=r(t,o[a]));o=In(o)}return i}(r,t,a)),function l(e,t,n,r){function i(n,r){var i=function(){if(this&&yn(n,gn)){var e=((this[dn]||{})[n[gn]]||{})[r];if(e)return e.apply(this,arguments);bn("Missing ["+r+"] "+cn)}var t=n[r];return t===i&&(t=In(n)[r]),xn(t)||bn("["+r+"] is not a "+cn),t.apply(this,arguments)};return i[pn]=1,i}if(!Sn(e)){var a=n[dn]=n[dn]||{},o=a[t]=a[t]||{};for(var s in n)Tn(n,s)&&n[s]!==r[s]&&(o[s]=n[s],delete n[s],yn(e,s)&&(!e[s]||e[s][pn])||(e[s]=i(e,s)))}}(r,i,t,a)}var Mn="properties",Dn=P.objKeys,wn=P.arrForEach;function _n(e,t,n){var r=0,i=e[t],a=e[n];return i&&a&&(r=Je.GetDuration(i,a)),r}function En(e,t,n,r,i){var a=0,o=_n(n,r,i);return o&&(a=Ln(e,t,Ge.msToTimeSpan(o))),a}function Ln(e,t,n){var r="ajaxPerf",i=0;e&&t&&n&&((e[r]=e[r]||{})[t]=n,i=1);return i}function qn(e,t){var n=e.perfTiming,r=t[Mn]||{},i=0,a=P.isString,o="Start",s="End",u="domainLookup",l="connect",c="redirect",f="request",d="response",p="duration",g="startTime",h=l+s,m=f+o,v=d+s,y=c+o,x=c=s,S="transferSize",C="encodedBodySize",I="decodedBodySize",T="serverTiming";if(n){i|=En(r,c,n,y,x),i|=En(r,u,n,"domainLookupStart","domainLookupEnd"),i|=En(r,l,n,"connectStart",h),i|=En(r,f,n,m,"requestEnd"),i|=En(r,d,n,"responseStart",v),i|=En(r,"networkConnect",n,g,h),i|=En(r,"sentRequest",n,m,v);var b=n[p];i|=Ln(r,p,b=b||(_n(n,g,v)||0)),i|=Ln(r,"perfTotal",b);var N=n[T];if(N){var A={};wn(N,function(n,e){var t=function i(e){var t=e,n=/([^\w\d_$])/g;return n.test(e)&&(t=e.replace(n,"_")),t}(n.name||""+e),r=A[t]||{};wn(Dn(n),function(e){var t=n[e];("name"!==e&&a(t)||P.isNumber(t))&&(r[e]&&(t=r[e]+";"+t),!t&&a(t)||(r[e]=t))}),A[t]=r}),i|=Ln(r,T,A)}i|=Ln(r,S,n[S]),i|=Ln(r,C,n[C]),i|=Ln(r,I,n[I])}else e.perfMark&&(i|=Ln(r,"missing",e.perfAttempts));i&&(t[Mn]=r)}var Rn=function lr(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},kn=function cr(e,t,n){var r=this,i=n,l="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Rn,r.clientFailure=0,r.traceID=e,r.spanID=t,An(cr,r,function(u){u.getAbsoluteUrl=function(){return u.requestUrl?We.getAbsoluteUrl(u.requestUrl):null},u.getPathName=function(){return u.requestUrl?je.sanitizeUrl(i,We.getCompleteUrl(u.method,u.requestUrl)):null},u.CreateTrackItem=function(e,t,n){if(u.ajaxTotalDuration=Math.round(1e3*Je.GetDuration(u.requestSentTime,u.responseFinishedTime))/1e3,u.ajaxTotalDuration<0)return null;var r,i=((r={id:"|"+u.traceID+"."+u.spanID,target:u.getAbsoluteUrl(),name:u.getPathName(),type:e,duration:u.ajaxTotalDuration,success:200<=+u.status&&+u.status<400,responseCode:+u.status,method:u.method})[Mn]={HttpMethod:u.method},r);if(qn(u,i),t&&0<Dn(u.requestHeaders).length&&(i[Mn]=i[Mn]||{},i[Mn].requestHeaders=u.requestHeaders),n){var a=n();if(a){var o=a.correlationContext;if(o&&(i.correlationContext=o),a.headerMap&&0<Dn(a.headerMap).length&&(i[Mn]=i[Mn]||{},i[Mn].responseHeaders=a.headerMap),400<=u.status){var s=a.type;i[Mn]=i[Mn]||{},""!==s&&"text"!==s||(i[Mn][l]=a[l]?a.statusText+" - "+a[l]:a.statusText),"json"===s&&(i[Mn][l]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return i}})},Fn=(On.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},On.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},On.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},On.DEFAULT_TRACE_FLAG="01",On.DEFAULT_VERSION="00",On);function On(e,t){var n=this;n.traceFlag=On.DEFAULT_TRACE_FLAG,n.version=On.DEFAULT_VERSION,e&&On.isValidTraceId(e)?n.traceId=e:n.traceId=Ge.generateW3CId(),t&&On.isValidSpanId(t)?n.spanId=t:n.spanId=Ge.generateW3CId().substr(0,16)}var jn="ai.ajxmn.",Hn="diagLog",Un="ajaxData",Pn="throwInternal",zn="fetch",Gn=P.isNullOrUndefined,Bn=P.arrForEach,Wn=P.objKeys,Xn=0;function Vn(e){var t="";try{Gn(e)||Gn(e[Un])||Gn(e[Un].requestUrl)||(t+="(url: '"+e[Un].requestUrl+"')")}catch(n){}return t}function Kn(e,t,n,r,i){e[Hn]()[Pn](G.CRITICAL,t,n,r,i)}function Qn(e,t,n,r,i){e[Hn]()[Pn](G.WARNING,t,n,r,i)}function $n(t,n,r){return function(e){Kn(t,n,r,{ajaxDiagnosticsMessage:Vn(e.inst),exception:Ge.dump(e.err)})}}function Jn(e,t){return e&&t?e.indexOf(t):-1}var Yn,Zn=(t(er,Yn=oe),er.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:R.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},er.getEmptyConfig=function(){var t=this.getDefaultConfig();return Bn(Wn(t),function(e){t[e]=undefined}),t},er.prototype.processTelemetry=function(e,t){this.processNext(e,t)},er.identifier="AjaxDependencyPlugin",er);function er(){var e=Yn.call(this)||this;e.identifier=er.identifier,e.priority=120;var C,I,T,b,N="trackDependencyDataInternal",t=j(),A=!1,M=!1,u=t&&t.host&&t.host.toLowerCase(),D=er.getEmptyConfig(),w=!1,i=0,_=!1,E=0,L=!1,q=[],s={};return An(er,e,function(d,p){function g(e,t,n){q.push(function r(e,t,n){return e?ke(e[F],t,n,!1):null}(e,t,n))}function h(e,t,n){var r=!1,i=((P.isString(t)?t:(t||{}).url||"")||"").toLowerCase(),a=Jn(i,"?"),o=Jn(i,"#");return(-1===a||-1!==o&&o<a)&&(a=o),-1!==a&&(i=i.substring(0,a)),Gn(e)?Gn(t)||(r="object"==typeof t&&!0===t[et]||!!n&&!0===n[et]):r=!0===e[et]||!0===i[et],r?s[i]||(s[i]=1):s[i]&&(r=!0),r}function m(e,t){var n=!0,r=M;return Gn(e)||(n=!0===t||!Gn(e[Un])),r&&n}function v(e,t){if(t.requestUrl&&b&&_){var n=H();if(n&&P.isFunction(n.mark)){var r=b+e+"#"+ ++Xn;n.mark(r);var i=n.getEntriesByName(r);i&&1===i.length&&(t.perfMark=i[0])}}}function y(a,o,s,u){var l=o.perfMark,c=H(),f=D.maxAjaxPerfLookupAttempts,d=D.ajaxPerfLookupDelay,p=o.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===Jn(r.name,p)&&-1===Jn(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){o.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||o.perfTiming||f<=g||!1===o.async?(l&&P.isFunction(c.clearMarks)&&c.clearMarks(l.name),o.perfAttempts=g,s()):setTimeout(h,d)}catch(i){u(i)}}()}function x(e){var t="";try{Gn(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Kn(d,K.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Ge.dump(n)})}return t}function S(e,t,i,n,r){function a(e,t,n){var r=n||{};r.fetchDiagnosticsMessage=x(i),t&&(r.exception=Ge.dump(t)),Qn(d,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}n&&(n.responseFinishedTime=Je.Now(),n.status=t,y("fetch",n,function(){var e=n.CreateTrackItem("Fetch",w,r);e?d[N](e):a(K.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){a(K.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}d.initialize=function(e,t,n,r){if(!d.isInitialized()){p.initialize(e,t,n,r);var i=d._getTelCtx(),a=er.getDefaultConfig();Bn(Wn(a),function(e){D[e]=i.getConfig(er.identifier,e,a[e])});var o=D.distributedTracingMode;if(w=D.enableRequestHeaderTracking,_=D.enableAjaxPerfTracking,E=D.maxAjaxCallsPerView,L=D.enableResponseHeaderTracking,T=o===R.AI||o===R.AI_AND_W3C,I=o===R.AI_AND_W3C||o===R.W3C,_){var s=e.instrumentationKey||"unkwn";b=5<s.length?jn+s.substring(s.length-5)+".":jn+s+"."}if(!1===D.disableAjaxTracking&&!function c(){!function a(e){var t=!1;if(typeof XMLHttpRequest!==k&&!Gn(XMLHttpRequest)){var n=XMLHttpRequest[F];t=!(Gn(n)||Gn(n.open)||Gn(n.send)||Gn(n.abort))}if(t)try{(new XMLHttpRequest)[Un]={};var r=XMLHttpRequest[F].open;XMLHttpRequest[F].open=r}catch(i){t=!1,Kn(e,K.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Ge.dump(i)})}return t}(d)||M||(g(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst,a=i[Un];h(i,n)||!m(i,!0)||a&&a.xhrMonitoringState.openDone||!function u(e,t,n,r){var i=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Ge.generateW3CId(),a=Ge.generateW3CId().substr(0,16),o=new kn(i,a,d[Hn]());o.method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o.async=r,e[Un]=o,function s(r){r[Un].xhrMonitoringState.stateChangeAttached=X.Attach(r,"readystatechange",function(){try{r&&4===r.readyState&&m(r)&&!function t(o){var n=o[Un];function r(e,t){var n=t||{};n.ajaxDiagnosticsMessage=Vn(o),e&&(n.exception=Ge.dump(e)),Qn(d,K.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",n)}n.responseFinishedTime=Je.Now(),n.status=o.status,y("xmlhttprequest",n,function(){try{var e=n.CreateTrackItem("Ajax",w,function(){var e={statusText:o.statusText,headerMap:null,correlationContext:function a(e){try{var t=e.getAllResponseHeaders();if(null!==t)if(-1!==Jn(t.toLowerCase(),Fe.requestContextHeaderLowerCase)){var n=e.getResponseHeader(Fe.requestContextHeader);return Ve.getCorrelationContext(n)}}catch(r){Qn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Vn(e),exception:Ge.dump(r)})}}(o),type:o.responseType,responseText:function r(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};if(L){var t=o.getAllResponseHeaders();if(t){var n=t.trim().split(/[\r\n]+/),i={};Bn(n,function(e){var t=e.split(": "),n=t.shift(),r=t.join(": ");i[n]=r}),e.headerMap=i}}return e});e?d[N](e):r(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{o[Un]=null}catch(t){}}},function(e){r(e,null)})}(r)}catch(n){var e=Ge.dump(n);e&&-1!==Jn(e.toLowerCase(),"c00c023f")||Kn(d,K.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Vn(r),exception:e})}})}(e)}(i,t,n,r)},hkErr:$n(d,K.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,r=n[Un];m(n)&&!r.xhrMonitoringState.sendDone&&(v("xhr",r),r.requestSentTime=Je.Now(),n=d.includeCorrelationHeaders(r,undefined,undefined,n),r.xhrMonitoringState.sendDone=!0)},hkErr:$n(d,K.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),g(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,n=t[Un];m(t)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:$n(d,K.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),w&&g(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;m(r)&&(r[Un].requestHeaders[t]=n)},hkErr:$n(d,K.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),M=!0)}(),function f(){var e=function n(){var e=O();return!e||Gn(e.Request)||Gn(e.Request[F])||Gn(e[zn])?null:e[zn]}();if(!e)return;var t=O(),a=e.polyfill;!1===D.disableFetchTracking?(q.push(ke(t,zn,{req:function(e,t,n){var r;if(A&&!h(null,t,n)&&(!a||!M)){var i=e.ctx();r=function s(e,t){var n=C&&C.telemetryTrace&&C.telemetryTrace.traceID||Ge.generateW3CId(),r=Ge.generateW3CId().substr(0,16),i=new kn(n,r,d[Hn]());i.requestSentTime=Je.Now(),e instanceof Request?i.requestUrl=e?e.url:"":i.requestUrl=e;var a="GET";t&&t.method?a=t.method:e&&e instanceof Request&&(a=e.method);i.method=a;var o={};t&&t.headers&&w&&(o=t.headers);return i.requestHeaders=o,v("fetch",i),i}(t,n),n=d.includeCorrelationHeaders(r,t,n),i.data=r}},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return S(0,(t||{}).status,t,n,function(){var e={statusText:t.statusText,headerMap:null,correlationContext:function r(e){if(e&&e.headers)try{var t=e.headers.get(Fe.requestContextHeader);return Ve.getCorrelationContext(t)}catch(n){Qn(d,K.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:x(e),exception:Ge.dump(n)})}}(t)};if(L){var n={};t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n}return e}),t})["catch"](function(e){throw S(0,0,t,n,null,e.message),e}))},hkErr:$n(d,K.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),A=!0):a&&q.push(ke(t,zn,{req:function(e,t,n){h(null,t,n)}}));a&&(t[zn].polyfill=a)}(),0<n.length&&n){for(var u=void 0,l=0;!u&&l<n.length;)n[l]&&"AppInsightsPropertiesPlugin"===n[l].identifier&&(u=n[l]),l++;u&&(C=u.context)}}},d.teardown=function(){Bn(q,function(e){e.rm()}),M=A=!(q=[]),d.setInitialized(!1)},d.trackDependencyData=function(e,t){d[N](e,t)},d.includeCorrelationHeaders=function(e,t,n,r){var i=d._currentWindowHost||u;if(t){if(Ve.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T){var a="|"+e.traceID+"."+e.spanID;n.headers.set(Fe.requestIdHeader,a),w&&(e.requestHeaders[Fe.requestIdHeader]=a)}if((s=D.appId||C&&C.appId())&&(n.headers.set(Fe.requestContextHeader,Fe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Fe.requestContextHeader]=Fe.requestContextAppIdFormat+s)),I){var o=new Fn(e.traceID,e.spanID);n.headers.set(Fe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Fe.traceParentHeader]=o.toString())}return n}return n}if(r){if(Ve.canIncludeCorrelationHeader(D,e.getAbsoluteUrl(),i)){if(T){a="|"+e.traceID+"."+e.spanID;r.setRequestHeader(Fe.requestIdHeader,a),w&&(e.requestHeaders[Fe.requestIdHeader]=a)}var s;if((s=D.appId||C&&C.appId())&&(r.setRequestHeader(Fe.requestContextHeader,Fe.requestContextAppIdFormat+s),w&&(e.requestHeaders[Fe.requestContextHeader]=Fe.requestContextAppIdFormat+s)),I){o=new Fn(e.traceID,e.spanID);r.setRequestHeader(Fe.traceParentHeader,o.toString()),w&&(e.requestHeaders[Fe.traceParentHeader]=o.toString())}}return r}return undefined},d[N]=function(e,t,n){if(-1===E||i<E){D.distributedTracingMode!==R.W3C&&D.distributedTracingMode!==R.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+=".");var r=on.create(e,Gt.dataType,Gt.envelopeType,d[Hn](),t,n);d.core.track(r)}else i===E&&Kn(d,K.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++i}}),e}e.AjaxPlugin=Zn,e.ajaxRecord=kn,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-dependencies-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-dependencies-js", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "Microsoft Application Insights XHR dependencies plugin", | ||
@@ -37,4 +37,4 @@ "main": "dist/applicationinsights-dependencies-js.js", | ||
"@microsoft/dynamicproto-js": "^0.5.1", | ||
"@microsoft/applicationinsights-core-js": "2.5.1", | ||
"@microsoft/applicationinsights-common": "2.5.1", | ||
"@microsoft/applicationinsights-core-js": "2.5.2", | ||
"@microsoft/applicationinsights-common": "2.5.2", | ||
"tslib": "1.10.0" | ||
@@ -41,0 +41,0 @@ }, |
@@ -22,2 +22,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
const strDiagLog = "diagLog"; | ||
const strAjaxData = "ajaxData"; | ||
const strThrowInternal = "throwInternal"; | ||
@@ -51,3 +52,3 @@ const strFetch = "fetch"; | ||
*/ | ||
function _supportsAjaxMonitoring(): boolean { | ||
function _supportsAjaxMonitoring(ajaxMonitorInstance:AjaxMonitor): boolean { | ||
let result = false; | ||
@@ -70,2 +71,23 @@ | ||
if (result) { | ||
// Disable if the XmlHttpRequest can't be extended or hooked | ||
try { | ||
let xhr = new XMLHttpRequest(); | ||
xhr[strAjaxData] = {}; | ||
// Check that we can update the prototype | ||
let theOpen = XMLHttpRequest[strPrototype].open; | ||
XMLHttpRequest[strPrototype].open = theOpen; | ||
} catch (e) { | ||
// We can't decorate the xhr object so disable monitoring | ||
result = false; | ||
_throwInternalCritical(ajaxMonitorInstance, | ||
_InternalMessageId.FailedMonitorAjaxOpen, | ||
"Failed to enable XMLHttpRequest monitoring, extension is not supported", | ||
{ | ||
exception: Util.dump(e) | ||
}); | ||
} | ||
} | ||
return result; | ||
@@ -79,5 +101,5 @@ } | ||
if (!_isNullOrUndefined(xhr) && | ||
!_isNullOrUndefined(xhr.ajaxData) && | ||
!_isNullOrUndefined(xhr.ajaxData.requestUrl)) { | ||
result += "(url: '" + xhr.ajaxData.requestUrl + "')"; | ||
!_isNullOrUndefined(xhr[strAjaxData]) && | ||
!_isNullOrUndefined(xhr[strAjaxData].requestUrl)) { | ||
result += "(url: '" + xhr[strAjaxData].requestUrl + "')"; | ||
} | ||
@@ -366,2 +388,3 @@ } catch (e) { } | ||
let global = getGlobal(); | ||
let isPolyfill = (fetch as any).polyfill; | ||
if (_config.disableFetchTracking === false) { | ||
@@ -372,3 +395,6 @@ _hooks.push(InstrumentFunc(global, strFetch, { | ||
let fetchData: ajaxRecord; | ||
if (_fetchInitialized && !_isDisabledRequest(null, input, init)) { | ||
if (_fetchInitialized && | ||
!_isDisabledRequest(null, input, init) && | ||
// If we have a polyfil and XHR instrumented then let XHR report otherwise we get duplicates | ||
!(isPolyfill && _xhrInitialized)) { | ||
let ctx = callDetails.ctx(); | ||
@@ -418,3 +444,3 @@ fetchData = _createFetchRecord(input, init); | ||
_fetchInitialized = true; | ||
} else if ((fetch as any).polyfill) { | ||
} else if (isPolyfill) { | ||
// If fetch is a polyfill we need to capture the request to ensure that we correctly track | ||
@@ -433,2 +459,8 @@ // disabled request URLS (i.e. internal urls) to ensure we don't end up in a constant loop | ||
} | ||
if (isPolyfill) { | ||
// retag the instrumented fetch with the same polyfill settings this is mostly for testing | ||
// But also supports multiple App Insights usages | ||
(global[strFetch] as any).polyfill = isPolyfill; | ||
} | ||
} | ||
@@ -441,3 +473,3 @@ | ||
function _instrumentXhr():void { | ||
if (_supportsAjaxMonitoring() && !_xhrInitialized) { | ||
if (_supportsAjaxMonitoring(_self) && !_xhrInitialized) { | ||
// Instrument open | ||
@@ -447,3 +479,3 @@ _hookProto(XMLHttpRequest, "open", { | ||
let xhr = args.inst as XMLHttpRequestInstrumented; | ||
let ajaxData = xhr.ajaxData; | ||
let ajaxData = xhr[strAjaxData]; | ||
if (!_isDisabledRequest(xhr, url) && _isMonitoredXhrInstance(xhr, true) && | ||
@@ -462,3 +494,3 @@ (!ajaxData || !ajaxData.xhrMonitoringState.openDone)) { | ||
let xhr = args.inst as XMLHttpRequestInstrumented; | ||
let ajaxData = xhr.ajaxData; | ||
let ajaxData = xhr[strAjaxData]; | ||
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.sendDone) { | ||
@@ -479,3 +511,3 @@ _createMarkId("xhr", ajaxData); | ||
let xhr = args.inst as XMLHttpRequestInstrumented; | ||
let ajaxData = xhr.ajaxData; | ||
let ajaxData = xhr[strAjaxData]; | ||
if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.abortDone) { | ||
@@ -496,3 +528,3 @@ ajaxData.aborted = 1; | ||
if (_isMonitoredXhrInstance(xhr)) { | ||
xhr.ajaxData.requestHeaders[header] = value; | ||
xhr[strAjaxData].requestHeaders[header] = value; | ||
} | ||
@@ -524,3 +556,4 @@ }, | ||
if (!_isNullOrUndefined(xhr)) { | ||
isDisabled = xhr[DisabledPropertyName] === true; | ||
// Look on the XMLHttpRequest of the URL string value | ||
isDisabled = xhr[DisabledPropertyName] === true || theUrl[DisabledPropertyName] === true; | ||
} else if (!_isNullOrUndefined(request)) { // fetch | ||
@@ -554,3 +587,3 @@ // Look for DisabledPropertyName in either Request or RequestInit | ||
if (!_isNullOrUndefined(xhr)) { | ||
ajaxValidation = excludeAjaxDataValidation === true || !_isNullOrUndefined(xhr.ajaxData); | ||
ajaxValidation = excludeAjaxDataValidation === true || !_isNullOrUndefined(xhr[strAjaxData]); | ||
} | ||
@@ -574,3 +607,3 @@ | ||
ajaxData.async = async; | ||
xhr.ajaxData = ajaxData; | ||
xhr[strAjaxData] = ajaxData; | ||
@@ -581,3 +614,3 @@ _attachToOnReadyStateChange(xhr); | ||
function _attachToOnReadyStateChange(xhr: XMLHttpRequestInstrumented) { | ||
xhr.ajaxData.xhrMonitoringState.stateChangeAttached = EventHelper.Attach(xhr, "readystatechange", () => { | ||
xhr[strAjaxData].xhrMonitoringState.stateChangeAttached = EventHelper.Attach(xhr, "readystatechange", () => { | ||
try { | ||
@@ -604,4 +637,18 @@ if (xhr && xhr.readyState === 4 && _isMonitoredXhrInstance(xhr)) { | ||
function _getResponseText(xhr: XMLHttpRequestInstrumented) { | ||
try { | ||
const responseType = xhr.responseType; | ||
if (responseType === "" || responseType === "text") { | ||
// As per the specification responseText is only valid if the type is an empty string or "text" | ||
return xhr.responseText; | ||
} | ||
} catch (e) { | ||
// This shouldn't happend because of the above check -- but just in case, so just ignore | ||
} | ||
return null; | ||
} | ||
function _onAjaxComplete(xhr: XMLHttpRequestInstrumented) { | ||
let ajaxData = xhr.ajaxData; | ||
let ajaxData = xhr[strAjaxData]; | ||
ajaxData.responseFinishedTime = DateTimeUtils.Now(); | ||
@@ -632,3 +679,3 @@ ajaxData.status = xhr.status; | ||
type: xhr.responseType, | ||
responseText: xhr.responseText, | ||
responseText: _getResponseText(xhr), | ||
response: xhr.response | ||
@@ -668,3 +715,7 @@ }; | ||
// cleanup telemetry data | ||
xhr.ajaxData = null; | ||
try { | ||
xhr[strAjaxData] = null; | ||
} catch (e) { | ||
// May throw in environments that prevent extension or freeze xhr | ||
} | ||
} | ||
@@ -671,0 +722,0 @@ }, (e) => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2372648
12789
+ Added@microsoft/applicationinsights-common@2.5.2(transitive)
+ Added@microsoft/applicationinsights-core-js@2.5.2(transitive)
- Removed@microsoft/applicationinsights-common@2.5.1(transitive)
- Removed@microsoft/applicationinsights-core-js@2.5.1(transitive)