Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/applicationinsights-dependencies-js

Package Overview
Dependencies
Maintainers
9
Versions
598
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.6.0 to 2.6.1

4

browser/applicationinsights-dependencies-js.min.js
/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(e){"use strict";var i="function",s="object",t="undefined",o="prototype",u="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}var r,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[u](n)&&(e[n]=t[n])})(e,t)},l=n()||{};Ge=function(e,t){function n(){this.constructor=e}a(e,t),e[o]=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!=s&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}(t):(n[o]=t[o],new n)},(r=l).__assign||(r.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object[o][u].call(t,a)&&(e[a]=t[a]);return e}),r.__extends||(r.__extends=Ge),__assign=__assign||l.__assign,__extends=__extends||l.__extends;var c,d="constructor",p="prototype",h="function",m="_dynInstFuncs",x="_isDynProxy",v="_dynClass",T="_dynCls$",y="_dynInstChk",C=y,A="_dfOpts",f="_unknown_",g="__proto__",I="useBaseInst",M="setInstFuncs",b=Object,S=b.getPrototypeOf,_=0;function E(e,t){return e&&b[p].hasOwnProperty.call(e,t)}function q(e){return e&&(e===b[p]||e===Array[p])}function H(e){return q(e)||e===Function[p]}function w(e){if(e){if(S)return S(e);if(e=e[g]||e[p]||e[d])return e}return null}function D(e,t){var n=[],r=b.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&E(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function L(e,t,n){return t!==d&&typeof e[t]===h&&(n||E(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function R(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function F(e,t){return E(e,p)?e.name||t||f:((e||{})[d]||{}).name||t||f}function P(e,n,t,r){E(e,p)||N("theClass is an invalid class definition.");var a=e[p];!function(e){for(var t=w(n);t&&!H(t);){if(t===e)return 1;t=w(t)}}(a)&&N("["+F(e)+"] is not in class hierarchy of ["+F(n)+"]");var o=null;E(a,v)?o=a[v]:(o=T+F(e,"_")+"$"+_,_++,a[v]=o);var i,s,u,l,c,d,f=P[A],g=!!f[I];g&&r&&r[I]!==undefined&&(g=!!r[I]),t(n,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[x]&&o&&!1!==(r=e[m]||{})[C]&&(a=(r[t[v]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};D(n,function(e){a[e]=r(t,n,e)});for(var i=w(e),s=[];i&&!H(i)&&!R(s,i);)D(i,function(e){!a[e]&&L(i,e,!S)&&(a[e]=r(t,i,e))}),s.push(i),i=w(i);return a}(a,n,(s={},D(i=n,function(e){!s[e]&&L(i,e,!1)&&(s[e]=i[e])}),e=s),g)),u=a,o=o,l=n,c=e,r=!1!==(f=(f=!!S&&!!f[M])&&r?!!r[M]:f),q(u)||(f=l[m]=l[m]||{},d=f[o]=f[o]||{},!1!==f[C]&&(f[C]=!!r),D(l,function(e){var n,r,a;L(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],E(u,e)&&(!u[e]||u[e][x])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&E(n,v)){var o=e[m]||{};if((a=(o[n[v]]||{})[t])||N("Missing ["+t+"] "+h),!a[y]&&!1!==o[C]){for(var i=!E(e,t),s=w(e),u=[];i&&s&&!H(s)&&!R(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=w(s)}try{i&&(e[t]=a),a[y]=1}catch(c){o[C]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?w(n)[e]:t)!==h&&N("["+e+"] is not a "+h),t)).apply(this,arguments)})[x]=1,a)))}))}P[A]={setInstFuncs:!0,useBaseInst:!0},(Ge=c=c||{})[Ge.CRITICAL=1]="CRITICAL",Ge[Ge.WARNING=2]="WARNING";var j={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,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103},k="attachEvent",O="addEventListener",G="detachEvent",z="removeEventListener",U=(l=Object)[o],X=U.hasOwnProperty,V=l.defineProperty;function W(e){return U.toString.call(e)}function B(e){return e===undefined||typeof e===t}function K(e){return null===e||B(e)}function $(e){return typeof e===i}function J(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!K(e))try{K(e[O])?K(e[k])||(e[k]("on"+t,n),a=!0):(e[O](t,n,r),a=!0)}catch(o){}return a}function Y(e,t,n,r){if(void 0===r&&(r=!1),!K(e))try{K(e[z])?K(e[G])||e[G]("on"+t,n):e[z](t,n,r)}catch(a){}}function Z(e,t){if(e)for(var n in e)X.call(e,n)&&t.call(e,n,e[n])}function Q(e,t){return!(!e||!t||!~e.indexOf(t))}function ee(e){return"string"==typeof e}function te(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var ne=!{toString:null}.propertyIsEnumerable("toString"),re=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ae(e){var t=typeof e;if(t!==i&&(t!=s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&X.call(e,n)&&r.push(n);if(ne)for(var a=re.length,o=0;o<a;o++)e&&X.call(e,re[o])&&r.push(re[o]);return r}function oe(){var e=Date;return e.now?e.now():(new e).getTime()}var ie=t,se=s,ue=o,le=i,ce="window",de="navigator",fe="location",ge="performance",pe="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",Te=null,ye=null,Ce=n;function Ae(e){var t=Ce();return t&&t[e]?t[e]:e===ce&&typeof window===se&&window?window:null}function Ie(){return typeof navigator===se&&navigator?navigator:Ae(de)}function Me(){return Ae(ge)}function be(){return typeof JSON===se&&JSON||null!==Ae(pe)}function Se(){return be()?JSON||Ae(pe):null}function _e(e){var t=Object[o].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":be()&&(n=Se().stringify(e)),t+n}function Ee(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var qe=(He.dataType="MessageData",He);function He(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",be()&&(e=Se().stringify(r)),e=(t?" message:"+Ee(t):"")+(r?" props:"+Ee(e):""),this.message+=e}var we=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};P($t,this,function(o){function e(e,t){return K(e=n[e])?t:e}K(n)&&(n={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,r,a){if(n=new qe(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;B(n)||!n||B(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=c.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=c.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==ie?console:Ae("console");n&&(t="log",$(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new qe(j.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Ne.ParentContextKey="parent",Ne.ChildrenContextKey="childEvts",Ne);function Ne(e,a,t){var r,o=this,i=!1;o.start=oe(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},$(a)&&(i=function(e){if(V)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&$(a)&&(r=a(),a=null),r}};return V(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Ne.ParentContextKey||e===Ne.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Ne.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Ne.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Ne.ChildrenContextKey);if("[object Array]"===W(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=oe()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&$(a)&&(o.payload=a())}}var Re="CoreUtils.doPerf";function Fe(e,t,n,r,a){if(e){var o=e;if(o=o&&$(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Re);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Re,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Re,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=$(a.processTelemetry),u=$(a.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return a},o.getNext=function(){return i},o.setNext=function(e){i=e},o.processTelemetry=function(n,r){var e=a?a.identifier:"TelemetryPluginChain";Fe((r=r||t)?r.core():null,function(){return e+":processTelemetry"},function(){if(a&&s){o._hasRun=!0;try{r.setNext(i),u&&a.setNextPlugin(i),i&&(i._hasRun=!1),a.processTelemetry(n,r)}catch(t){var e=i&&i._hasRun;i&&e||r.diagLog().throwInternal(c.CRITICAL,j.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function je(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&$(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&$(e.getPlugin)?l=function(e,t,n){var r=[],a=!n;if(e)for(;e;){var o=e.getPlugin();!a&&o!==n||(a=!0,r.push(o)),e=e.getNext()}return a||r.push(n),je(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],te(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=je(i,r)):B(t)&&(l=je(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new we(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!K(e[t])?r=e[t]:a&&!K(a[t])&&(r=a[t]),K(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return new Jt((e=void 0===e?null:e)||l,a,n,t)}},Oe="getPlugin",Ge=(ze.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ze);function ze(){var s=this,u=!1,l=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,t){t?t.processNext(e):c&&$(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[Oe]?e.createNew(null,c[Oe]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&K(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Oe]&&(i=c[Oe]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var Ue=4294967296,Xe=4294967295,Ve=!1,We=123456789,Be=987654321;function Ke(e){var t=Ae(he)||Ae(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Xe:(!(n=Ie())||n.userAgent===ye&&null!==Te||(n=((ye=n.userAgent)||"").toLowerCase(),Te=Q(n,xe)||Q(n,ve)),Te?(Ve||function(){try{var e=2147483647&oe();(t=(Math.random()*Ue^e)+e)<0&&(t>>>=0),We=123456789+t&Xe,Be=987654321-t&Xe,Ve=!0}catch(n){}var t}(),t=((Be=36969*(65535&Be)+(Be>>16)&Xe)<<16)+(65535&(We=18e3*(65535&We)+(We>>16)&Xe))>>>0&Xe|0,(t>>>=0)&Xe):Math.floor(Ue*Math.random()|0));return e||(n>>>=0),n}function $e(){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=Ke())]+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 a=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)}var Je={Attach:J,AttachEvent:J,Detach:Y,DetachEvent:Y},Ye="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",et="constructor";function tt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function nt(e,i,s,u,l){0<=l&&l<=2&&tt(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function rt(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=o([],n))[e]=t,a=o([r],n)}},t=[],a=o([r],n);function o(t,e){return tt(e,function(e){t.push(e)}),t}nt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,nt(e,r,a,t,3),s}return nt(e,r,a,t,1),r.rslt}}var at=Object.getPrototypeOf;function ot(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&((e=function o(e,t,n){var r=null;return e&&(e&&X.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(at)return at(e);if(e=e[Qe]||e[ue]||e[et])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===le)){var a=r[Ye];return a||((r=rt(a={i:0,n:t,f:r,h:[]}))[Ye]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;tt(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var it={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},st=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=ut.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(o);a=i}return a},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(c.WARNING,j.NameTooLong,"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(c.WARNING,j.StringValueTooLong,"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,j.UrlTooLong)},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(c.WARNING,j.MessageTruncated,"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(c.WARNING,j.ExceptionTruncated,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(r,e){var a;return e&&(a={},Z(e,function(e,t){if(typeof t==s&&be())try{t=Se().stringify(t)}catch(n){r.throwInternal(c.WARNING,j.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ut.sanitizeString(r,t,ut.MAX_PROPERTY_LENGTH),e=ut.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},ut.sanitizeMeasurements=function(n,e){var r;return e&&(r={},Z(e,function(e,t){e=ut.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},ut.sanitizeId=function(e,t){return t&&ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,j.IdTooLong).toString()},ut.sanitizeInput=function(e,t,n,r){var a;return t&&(t=ut.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(c.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},ut.padNumber=function(e){return(e="00"+e).substr(e.length-3)},ut.trim=function(e){return ee(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(){}function lt(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,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;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ct,dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(l={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(l=ct={})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(l=dt=dt||{})[l.AI=0]="AI",l[l.AI_AND_W3C=1]="AI_AND_W3C",l[l.W3C=2]="W3C";var gt=(typeof document===se&&document?document:Ae("document"))||{},pt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=pt,a=ht,o=a[r];return gt.createElement?a[r]||(o=a[r]=gt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&ee(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),pt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&ee(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var vt={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var a,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(te(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,it.requestContextTargetKey))&&e!==vt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var a=n[r].split("=");if(2===a.length&&a[0]===t)return a[1]}}};function Tt(){var e=Me();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:oe()}function yt(e,t){return 0===e||0===t||K(e)||K(t)?null:t-e}var Ct,At=(Ct=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(It,Ct),It.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",It.dataType="RemoteDependencyData",It);function It(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Ct.call(this)||this;f.aiDataContract={id:ct.Required,ver:ct.Required,name:ct.Default,resultCode:ct.Default,duration:ct.Default,success:ct.Default,data:ct.Default,target:ct.Default,type:ct.Default,properties:ct.Default,measurements:ct.Default,kind:ct.Default,value:ct.Default,count:ct.Default,min:ct.Default,max:ct.Default,stdDev:ct.Default,dependencyKind:ct.Default,dependencySource:ct.Default,commandName:ct.Default,dependencyTypeName:ct.Default},f.id=t,f.duration=lt(a),f.success=o,f.resultCode=i+"",f.type=st.sanitizeString(e,u);var g,p,i=(g=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(p=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st.sanitizeString(g,t?t+" "+n:n)):st.sanitizeString(g,u))):p=a,{target:p,name:o,data:i});return f.data=st.sanitizeUrl(e,r)||i.data,f.target=st.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st.sanitizeString(e,i.name),f.properties=st.sanitizeProperties(e,c),f.measurements=st.sanitizeMeasurements(e,d),f}var Mt=(bt.create=function(e,t,n,r,a,o){if(n=st.sanitizeString(r,n)||"not_specified",K(e)||K(t)||K(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===W(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return K(a)||Z(a,function(e,t){i.data[e]=t}),i},bt);function bt(){}var St="AppInsightsPropertiesPlugin",_t="properties";function Et(e,t,n){t=e[t],n=e[n];return t&&n?yt(t,n):0}function qt(e,t,n,r,a){return(a=Et(n,r,a))?Ht(e,t,lt(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var wt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Dt=function Yt(e,t,n){var r=this,a=n,v="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 wt,r.clientFailure=0,r.traceID=e,r.spanID=t,P(Yt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?st.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*yt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?null:((e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[_t]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[_t]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",g="transferSize",p="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=qt(s,"End",i,"redirectStart","End"),u|=qt(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=qt(s,"connect",i,"connectStart",c),u|=qt(s,"request",i,d,"requestEnd"),u|=qt(s,"response",i,"responseStart",f),u|=qt(s,"networkConnect",i,l,c),u|=qt(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Et(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},te(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};Z(e,function(e,t){("name"!==e&&ee(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&ee(t)||(a[e]=t))}),o[t]=a}),u|=Ht(s,m,o)),u|=Ht(s,g,i[g]),u|=Ht(s,p,i[p]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[_t]=s),t&&0<ae(x.requestHeaders).length&&(e[_t]=e[_t]||{},e[_t].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ae(t.headerMap).length&&(e[_t]=e[_t]||{},e[_t].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[_t]=e[_t]||{},""!==n&&"text"!==n||(e[_t][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[_t][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,g,p,h,m}})},Lt=(Nt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Nt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Nt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Nt.DEFAULT_TRACE_FLAG="01",Nt.DEFAULT_VERSION="00",Nt);function Nt(e,t){var n=this;n.traceFlag=Nt.DEFAULT_TRACE_FLAG,n.version=Nt.DEFAULT_VERSION,e&&Nt.isValidTraceId(e)?n.traceId=e:n.traceId=$e(),t&&Nt.isValidSpanId(t)?n.spanId=t:n.spanId=$e().substr(0,16)}var Rt="ai.ajxmn.",Ft="diagLog",Pt="ajaxData",jt="throwInternal",kt="fetch",Ot=0;function Gt(e){var t=!1;typeof XMLHttpRequest===ie||K(XMLHttpRequest)||(t=!(K(a=XMLHttpRequest[ue])||K(a.open)||K(a.send)||K(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",Q(r=n?r:(n=Ie()||{})?(n.userAgent||"").toLowerCase():"",xe)?parseInt(r.split(xe)[1]):Q(r,ve)&&(r=parseInt(r.split(ve)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Pt]={};var o=XMLHttpRequest[ue].open;XMLHttpRequest[ue].open=o}catch(i){t=!1,Ut(e,j.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:_e(i)})}return t}function zt(e){var t="";try{K(e)||K(e[Pt])||K(e[Pt].requestUrl)||(t+="(url: '"+e[Pt].requestUrl+"')")}catch(n){}return t}function Ut(e,t,n,r,a){e[Ft]()[jt](c.CRITICAL,t,n,r,a)}function Xt(e,t,n,r,a){e[Ft]()[jt](c.WARNING,t,n,r,a)}function Vt(t,n,r){return function(e){Ut(t,n,r,{ajaxDiagnosticsMessage:zt(e.inst),exception:_e(e.err)})}}function Wt(e,t){return e&&t?e.indexOf(t):-1}var Bt,Ge=(Bt=Ge,__extends(Kt,Bt),Kt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.AI_AND_W3C,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}},Kt.getEmptyConfig=function(){var t=this.getDefaultConfig();return Z(t,function(e){t[e]=undefined}),t},Kt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Kt.identifier="AjaxDependencyPlugin",Kt);function Kt(){var e=Bt.call(this)||this;e.identifier=Kt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===se&&location?location:Ae(fe),b=!1,S=!1,_=t&&t.host&&t.host.toLowerCase(),E=Kt.getEmptyConfig(),q=!1,r=0,H=0,w=[],D={};return P(Kt,e,function(l,c){function d(e,t,n){w.push(e?ot(e[ue],t,n,!1):null)}function f(e,t,n){var r=!1,a=((ee(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Wt(a,"?"),i=Wt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),K(e)?K(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?D[a]||(D[a]=1):D[a]&&(r=!0),r}function g(e,t){var n=!0;return K(e)||(n=!0===t||!K(e[Pt])),S&&n}function p(o){o[Pt].xhrMonitoringState.stateChangeAttached=Je.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Pt]).responseFinishedTime=Tt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",q,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},te(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Pt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=_e(t);e&&-1!==Wt(e.toLowerCase(),"c00c023f")||Ut(l,j.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:zt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=zt(r),e&&(t.exception=_e(e)),Xt(l,j.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Wt(t.toLowerCase(),it.requestContextHeaderLowerCase)){var n=e.getResponseHeader(it.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:zt(e),exception:_e(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Me())&&$(n.mark)&&(e=C+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Me(),d=E.maxAjaxPerfLookupAttempts,f=E.ajaxPerfLookupDelay,g=i.requestUrl,p=0;!function h(){try{if(c&&l){p++;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!==o||-1===Wt(r.name,g)&&-1===Wt(g,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=p||!1===i["async"]?(l&&$(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=p,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{K(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Ut(l,j.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:_e(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=_e(t)),Xt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=Tt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,a);e?l[M](e):o(j.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(j.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(it.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:_e(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(Z(Kt.getDefaultConfig(),function(e,t){E[e]=a.getConfig(Kt.identifier,e,t)}),r=E.distributedTracingMode,q=E.enableRequestHeaderTracking,A=E.enableAjaxPerfTracking,H=E.maxAjaxCallsPerView,I=E.enableResponseHeaderTracking,y=r===dt.AI||r===dt.AI_AND_W3C,T=r===dt.AI_AND_W3C||r===dt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Rt+s.substring(s.length-5)+".":Rt+s+"."),!1===E.disableAjaxTracking&&Gt(l)&&!S&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Pt];f(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16),(r=new Dt(n,r,l[Ft]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Pt]=r,p(e))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Pt];g(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=Tt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Pt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&(e[Pt].requestHeaders[t]=n)},hkErr:Vt(l,j.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),S=!0),(e=!(r=Ce())||K(r.Request)||K(r.Request[ue])||K(r[kt])?null:r[kt])&&(s=Ce(),u=e.polyfill,!1===E.disableFetchTracking?(w.push(ot(s,kt,{req:function(e,t,n){var r,a;!b||f(null,t,n)||u&&S||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16);(n=new Dt(n,r,l[Ft]())).requestSentTime=Tt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),b=!0):u&&w.push(ot(s,kt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[kt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===St&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){te(w,function(e){e.rm()}),S=b=!(w=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||_;return t?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(n.headers.set(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),n.headers.set(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(r.setRequestHeader(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),r.setRequestHeader(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===H||r<H?(E.distributedTracingMode!==dt.W3C&&E.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),K(e.startTime)&&(e.startTime=new Date),n=Mt.create(e,At.dataType,At.envelopeType,l[Ft](),t,n),l.core.track(n)):r===H&&Ut(l,j.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),++r}}),e}e.AjaxPlugin=Ge,e.ajaxRecord=Dt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(e){"use strict";var i="function",s="object",t="undefined",o="prototype",u="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}var r,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[u](n)&&(e[n]=t[n])})(e,t)},l=n()||{};Ge=function(e,t){function n(){this.constructor=e}a(e,t),e[o]=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!=s&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}(t):(n[o]=t[o],new n)},(r=l).__assign||(r.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object[o][u].call(t,a)&&(e[a]=t[a]);return e}),r.__extends||(r.__extends=Ge),__assign=__assign||l.__assign,__extends=__extends||l.__extends;var c,d="constructor",p="prototype",h="function",m="_dynInstFuncs",x="_isDynProxy",v="_dynClass",T="_dynCls$",y="_dynInstChk",C=y,A="_dfOpts",f="_unknown_",g="__proto__",I="useBaseInst",M="setInstFuncs",b=Object,S=b.getPrototypeOf,_=0;function E(e,t){return e&&b[p].hasOwnProperty.call(e,t)}function q(e){return e&&(e===b[p]||e===Array[p])}function H(e){return q(e)||e===Function[p]}function w(e){if(e){if(S)return S(e);if(e=e[g]||e[p]||e[d])return e}return null}function D(e,t){var n=[],r=b.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&E(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function L(e,t,n){return t!==d&&typeof e[t]===h&&(n||E(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function R(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function F(e,t){return E(e,p)?e.name||t||f:((e||{})[d]||{}).name||t||f}function P(e,n,t,r){E(e,p)||N("theClass is an invalid class definition.");var a=e[p];!function(e){for(var t=w(n);t&&!H(t);){if(t===e)return 1;t=w(t)}}(a)&&N("["+F(e)+"] is not in class hierarchy of ["+F(n)+"]");var o=null;E(a,v)?o=a[v]:(o=T+F(e,"_")+"$"+_,_++,a[v]=o);var i,s,u,l,c,d,f=P[A],g=!!f[I];g&&r&&r[I]!==undefined&&(g=!!r[I]),t(n,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[x]&&o&&!1!==(r=e[m]||{})[C]&&(a=(r[t[v]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};D(n,function(e){a[e]=r(t,n,e)});for(var i=w(e),s=[];i&&!H(i)&&!R(s,i);)D(i,function(e){!a[e]&&L(i,e,!S)&&(a[e]=r(t,i,e))}),s.push(i),i=w(i);return a}(a,n,(s={},D(i=n,function(e){!s[e]&&L(i,e,!1)&&(s[e]=i[e])}),e=s),g)),u=a,o=o,l=n,c=e,r=!1!==(f=(f=!!S&&!!f[M])&&r?!!r[M]:f),q(u)||(f=l[m]=l[m]||{},d=f[o]=f[o]||{},!1!==f[C]&&(f[C]=!!r),D(l,function(e){var n,r,a;L(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],E(u,e)&&(!u[e]||u[e][x])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&E(n,v)){var o=e[m]||{};if((a=(o[n[v]]||{})[t])||N("Missing ["+t+"] "+h),!a[y]&&!1!==o[C]){for(var i=!E(e,t),s=w(e),u=[];i&&s&&!H(s)&&!R(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=w(s)}try{i&&(e[t]=a),a[y]=1}catch(c){o[C]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?w(n)[e]:t)!==h&&N("["+e+"] is not a "+h),t)).apply(this,arguments)})[x]=1,a)))}))}P[A]={setInstFuncs:!0,useBaseInst:!0},(Ge=c=c||{})[Ge.CRITICAL=1]="CRITICAL",Ge[Ge.WARNING=2]="WARNING";var j={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,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103},k="attachEvent",O="addEventListener",G="detachEvent",z="removeEventListener",U=(l=Object)[o],X=U.hasOwnProperty,V=l.defineProperty;function W(e){return U.toString.call(e)}function B(e){return e===undefined||typeof e===t}function K(e){return null===e||B(e)}function $(e){return typeof e===i}function J(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!K(e))try{K(e[O])?K(e[k])||(e[k]("on"+t,n),a=!0):(e[O](t,n,r),a=!0)}catch(o){}return a}function Y(e,t,n,r){if(void 0===r&&(r=!1),!K(e))try{K(e[z])?K(e[G])||e[G]("on"+t,n):e[z](t,n,r)}catch(a){}}function Z(e,t){if(e)for(var n in e)X.call(e,n)&&t.call(e,n,e[n])}function Q(e,t){return!(!e||!t||!~e.indexOf(t))}function ee(e){return"string"==typeof e}function te(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var ne=!{toString:null}.propertyIsEnumerable("toString"),re=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ae(e){var t=typeof e;if(t!==i&&(t!=s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&X.call(e,n)&&r.push(n);if(ne)for(var a=re.length,o=0;o<a;o++)e&&X.call(e,re[o])&&r.push(re[o]);return r}function oe(){var e=Date;return e.now?e.now():(new e).getTime()}var ie=t,se=s,ue=o,le=i,ce="window",de="navigator",fe="location",ge="performance",pe="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",Te=null,ye=null,Ce=n;function Ae(e){var t=Ce();return t&&t[e]?t[e]:e===ce&&typeof window===se&&window?window:null}function Ie(){return typeof navigator===se&&navigator?navigator:Ae(de)}function Me(){return Ae(ge)}function be(){return typeof JSON===se&&JSON||null!==Ae(pe)}function Se(){return be()?JSON||Ae(pe):null}function _e(e){var t=Object[o].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":be()&&(n=Se().stringify(e)),t+n}function Ee(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var qe=(He.dataType="MessageData",He);function He(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",be()&&(e=Se().stringify(r)),e=(t?" message:"+Ee(t):"")+(r?" props:"+Ee(e):""),this.message+=e}var we=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};P($t,this,function(o){function e(e,t){return K(e=n[e])?t:e}K(n)&&(n={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,r,a){if(n=new qe(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;B(n)||!n||B(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=c.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=c.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==ie?console:Ae("console");n&&(t="log",$(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new qe(j.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Ne.ParentContextKey="parent",Ne.ChildrenContextKey="childEvts",Ne);function Ne(e,a,t){var r,o=this,i=!1;o.start=oe(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},$(a)&&(i=function(e){if(V)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&$(a)&&(r=a(),a=null),r}};return V(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Ne.ParentContextKey||e===Ne.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Ne.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Ne.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Ne.ChildrenContextKey);if("[object Array]"===W(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=oe()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&$(a)&&(o.payload=a())}}var Re="CoreUtils.doPerf";function Fe(e,t,n,r,a){if(e){var o=e;if(o=o&&$(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Re);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Re,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Re,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=$(a.processTelemetry),u=$(a.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return a},o.getNext=function(){return i},o.setNext=function(e){i=e},o.processTelemetry=function(n,r){var e=a?a.identifier:"TelemetryPluginChain";Fe((r=r||t)?r.core():null,function(){return e+":processTelemetry"},function(){if(a&&s){o._hasRun=!0;try{r.setNext(i),u&&a.setNextPlugin(i),i&&(i._hasRun=!1),a.processTelemetry(n,r)}catch(t){var e=i&&i._hasRun;i&&e||r.diagLog().throwInternal(c.CRITICAL,j.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function je(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&$(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&$(e.getPlugin)?l=function(e,t,n){var r=[],a=!n;if(e)for(;e;){var o=e.getPlugin();!a&&o!==n||(a=!0,r.push(o)),e=e.getNext()}return a||r.push(n),je(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],te(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=je(i,r)):B(t)&&(l=je(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new we(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!K(e[t])?r=e[t]:a&&!K(a[t])&&(r=a[t]),K(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return new Jt((e=void 0===e?null:e)||l,a,n,t)}},Oe="getPlugin",Ge=(ze.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ze);function ze(){var s=this,u=!1,l=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,t){t?t.processNext(e):c&&$(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[Oe]?e.createNew(null,c[Oe]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&K(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Oe]&&(i=c[Oe]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var Ue=4294967296,Xe=4294967295,Ve=!1,We=123456789,Be=987654321;function Ke(e){var t=Ae(he)||Ae(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Xe:(!(n=Ie())||n.userAgent===ye&&null!==Te||(n=((ye=n.userAgent)||"").toLowerCase(),Te=Q(n,xe)||Q(n,ve)),Te?(Ve||function(){try{var e=2147483647&oe();(t=(Math.random()*Ue^e)+e)<0&&(t>>>=0),We=123456789+t&Xe,Be=987654321-t&Xe,Ve=!0}catch(n){}var t}(),t=((Be=36969*(65535&Be)+(Be>>16)&Xe)<<16)+(65535&(We=18e3*(65535&We)+(We>>16)&Xe))>>>0&Xe|0,(t>>>=0)&Xe):Math.floor(Ue*Math.random()|0));return e||(n>>>=0),n}function $e(){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=Ke())]+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 a=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)}var Je={Attach:J,AttachEvent:J,Detach:Y,DetachEvent:Y},Ye="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",et="constructor";function tt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function nt(e,i,s,u,l){0<=l&&l<=2&&tt(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function rt(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=o([],n))[e]=t,a=o([r],n)}},t=[],a=o([r],n);function o(t,e){return tt(e,function(e){t.push(e)}),t}nt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,nt(e,r,a,t,3),s}return nt(e,r,a,t,1),r.rslt}}var at=Object.getPrototypeOf;function ot(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&X.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(at)return at(e);if(e=e[Qe]||e[ue]||e[et])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===le){var a=r[Ye];return a||((r=rt(a={i:0,n:t,f:r,h:[]}))[Ye]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;tt(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var it={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},st=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=ut.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(o);a=i}return a},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(c.WARNING,j.NameTooLong,"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(c.WARNING,j.StringValueTooLong,"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,j.UrlTooLong)},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(c.WARNING,j.MessageTruncated,"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(c.WARNING,j.ExceptionTruncated,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(r,e){var a;return e&&(a={},Z(e,function(e,t){if(typeof t==s&&be())try{t=Se().stringify(t)}catch(n){r.throwInternal(c.WARNING,j.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ut.sanitizeString(r,t,ut.MAX_PROPERTY_LENGTH),e=ut.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},ut.sanitizeMeasurements=function(n,e){var r;return e&&(r={},Z(e,function(e,t){e=ut.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},ut.sanitizeId=function(e,t){return t&&ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,j.IdTooLong).toString()},ut.sanitizeInput=function(e,t,n,r){var a;return t&&(t=ut.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(c.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},ut.padNumber=function(e){return(e="00"+e).substr(e.length-3)},ut.trim=function(e){return ee(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(){}function lt(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,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;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ct,dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(l={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(l=ct={})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(l=dt=dt||{})[l.AI=0]="AI",l[l.AI_AND_W3C=1]="AI_AND_W3C",l[l.W3C=2]="W3C";var gt=(typeof document===se&&document?document:Ae("document"))||{},pt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=pt,a=ht,o=a[r];return gt.createElement?a[r]||(o=a[r]=gt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&ee(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),pt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&ee(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var vt={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var a,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(te(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,it.requestContextTargetKey))&&e!==vt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var a=n[r].split("=");if(2===a.length&&a[0]===t)return a[1]}}};function Tt(){var e=Me();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:oe()}function yt(e,t){return 0===e||0===t||K(e)||K(t)?null:t-e}var Ct,At=(Ct=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(It,Ct),It.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",It.dataType="RemoteDependencyData",It);function It(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Ct.call(this)||this;f.aiDataContract={id:ct.Required,ver:ct.Required,name:ct.Default,resultCode:ct.Default,duration:ct.Default,success:ct.Default,data:ct.Default,target:ct.Default,type:ct.Default,properties:ct.Default,measurements:ct.Default,kind:ct.Default,value:ct.Default,count:ct.Default,min:ct.Default,max:ct.Default,stdDev:ct.Default,dependencyKind:ct.Default,dependencySource:ct.Default,commandName:ct.Default,dependencyTypeName:ct.Default},f.id=t,f.duration=lt(a),f.success=o,f.resultCode=i+"",f.type=st.sanitizeString(e,u);var g,p,i=(g=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(p=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st.sanitizeString(g,t?t+" "+n:n)):st.sanitizeString(g,u))):p=a,{target:p,name:o,data:i});return f.data=st.sanitizeUrl(e,r)||i.data,f.target=st.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st.sanitizeString(e,i.name),f.properties=st.sanitizeProperties(e,c),f.measurements=st.sanitizeMeasurements(e,d),f}var Mt=(bt.create=function(e,t,n,r,a,o){if(n=st.sanitizeString(r,n)||"not_specified",K(e)||K(t)||K(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===W(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return K(a)||Z(a,function(e,t){i.data[e]=t}),i},bt);function bt(){}var St="AppInsightsPropertiesPlugin",_t="properties";function Et(e,t,n){t=e[t],n=e[n];return t&&n?yt(t,n):0}function qt(e,t,n,r,a){return(a=Et(n,r,a))?Ht(e,t,lt(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var wt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Dt=function Yt(e,t,n){var r=this,a=n,v="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 wt,r.clientFailure=0,r.traceID=e,r.spanID=t,P(Yt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?st.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*yt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?null:((e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[_t]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[_t]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",g="transferSize",p="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=qt(s,"End",i,"redirectStart","End"),u|=qt(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=qt(s,"connect",i,"connectStart",c),u|=qt(s,"request",i,d,"requestEnd"),u|=qt(s,"response",i,"responseStart",f),u|=qt(s,"networkConnect",i,l,c),u|=qt(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Et(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},te(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};Z(e,function(e,t){("name"!==e&&ee(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&ee(t)||(a[e]=t))}),o[t]=a}),u|=Ht(s,m,o)),u|=Ht(s,g,i[g]),u|=Ht(s,p,i[p]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[_t]=s),t&&0<ae(x.requestHeaders).length&&(e[_t]=e[_t]||{},e[_t].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ae(t.headerMap).length&&(e[_t]=e[_t]||{},e[_t].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[_t]=e[_t]||{},""!==n&&"text"!==n||(e[_t][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[_t][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,g,p,h,m}})},Lt=(Nt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Nt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Nt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Nt.DEFAULT_TRACE_FLAG="01",Nt.DEFAULT_VERSION="00",Nt);function Nt(e,t){var n=this;n.traceFlag=Nt.DEFAULT_TRACE_FLAG,n.version=Nt.DEFAULT_VERSION,e&&Nt.isValidTraceId(e)?n.traceId=e:n.traceId=$e(),t&&Nt.isValidSpanId(t)?n.spanId=t:n.spanId=$e().substr(0,16)}var Rt="ai.ajxmn.",Ft="diagLog",Pt="ajaxData",jt="throwInternal",kt="fetch",Ot=0;function Gt(e){var t=!1;typeof XMLHttpRequest===ie||K(XMLHttpRequest)||(t=!(K(a=XMLHttpRequest[ue])||K(a.open)||K(a.send)||K(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",Q(r=n?r:(n=Ie()||{})?(n.userAgent||"").toLowerCase():"",xe)?parseInt(r.split(xe)[1]):Q(r,ve)&&(r=parseInt(r.split(ve)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Pt]={};var o=XMLHttpRequest[ue].open;XMLHttpRequest[ue].open=o}catch(i){t=!1,Ut(e,j.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:_e(i)})}return t}function zt(e){var t="";try{K(e)||K(e[Pt])||K(e[Pt].requestUrl)||(t+="(url: '"+e[Pt].requestUrl+"')")}catch(n){}return t}function Ut(e,t,n,r,a){e[Ft]()[jt](c.CRITICAL,t,n,r,a)}function Xt(e,t,n,r,a){e[Ft]()[jt](c.WARNING,t,n,r,a)}function Vt(t,n,r){return function(e){Ut(t,n,r,{ajaxDiagnosticsMessage:zt(e.inst),exception:_e(e.err)})}}function Wt(e,t){return e&&t?e.indexOf(t):-1}var Bt,Ge=(Bt=Ge,__extends(Kt,Bt),Kt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.AI_AND_W3C,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}},Kt.getEmptyConfig=function(){var t=this.getDefaultConfig();return Z(t,function(e){t[e]=undefined}),t},Kt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Kt.identifier="AjaxDependencyPlugin",Kt);function Kt(){var e=Bt.call(this)||this;e.identifier=Kt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===se&&location?location:Ae(fe),b=!1,S=!1,_=t&&t.host&&t.host.toLowerCase(),E=Kt.getEmptyConfig(),q=!1,r=0,H=0,w=[],D={};return P(Kt,e,function(l,c){function d(e,t,n){w.push(e?ot(e[ue],t,n,!1):null)}function f(e,t,n){var r=!1,a=((ee(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Wt(a,"?"),i=Wt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),K(e)?K(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?D[a]||(D[a]=1):D[a]&&(r=!0),r}function g(e,t){var n=!0;return K(e)||(n=!0===t||!K(e[Pt])),S&&n}function p(o){o[Pt].xhrMonitoringState.stateChangeAttached=Je.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Pt]).responseFinishedTime=Tt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",q,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},te(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Pt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=_e(t);e&&-1!==Wt(e.toLowerCase(),"c00c023f")||Ut(l,j.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:zt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=zt(r),e&&(t.exception=_e(e)),Xt(l,j.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Wt(t.toLowerCase(),it.requestContextHeaderLowerCase)){var n=e.getResponseHeader(it.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:zt(e),exception:_e(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Me())&&$(n.mark)&&(e=C+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Me(),d=E.maxAjaxPerfLookupAttempts,f=E.ajaxPerfLookupDelay,g=i.requestUrl,p=0;!function h(){try{if(c&&l){p++;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!==o||-1===Wt(r.name,g)&&-1===Wt(g,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=p||!1===i["async"]?(l&&$(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=p,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{K(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Ut(l,j.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:_e(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=_e(t)),Xt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=Tt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,a);e?l[M](e):o(j.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(j.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(it.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:_e(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(Z(Kt.getDefaultConfig(),function(e,t){E[e]=a.getConfig(Kt.identifier,e,t)}),r=E.distributedTracingMode,q=E.enableRequestHeaderTracking,A=E.enableAjaxPerfTracking,H=E.maxAjaxCallsPerView,I=E.enableResponseHeaderTracking,y=r===dt.AI||r===dt.AI_AND_W3C,T=r===dt.AI_AND_W3C||r===dt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Rt+s.substring(s.length-5)+".":Rt+s+"."),!1===E.disableAjaxTracking&&Gt(l)&&!S&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Pt];f(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16),(r=new Dt(n,r,l[Ft]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Pt]=r,p(e))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Pt];g(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=Tt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Pt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&(e[Pt].requestHeaders[t]=n)},hkErr:Vt(l,j.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),S=!0),(e=!(r=Ce())||K(r.Request)||K(r.Request[ue])||K(r[kt])?null:r[kt])&&(s=Ce(),u=e.polyfill,!1===E.disableFetchTracking?(w.push(ot(s,kt,{req:function(e,t,n){var r,a;!b||f(null,t,n)||u&&S||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16);(n=new Dt(n,r,l[Ft]())).requestSentTime=Tt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),b=!0):u&&w.push(ot(s,kt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[kt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===St&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){te(w,function(e){e.rm()}),S=b=!(w=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||_;return t?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(n.headers.set(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),n.headers.set(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(r.setRequestHeader(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),r.setRequestHeader(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===H||r<H?(E.distributedTracingMode!==dt.W3C&&E.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),K(e.startTime)&&(e.startTime=new Date),n=Mt.create(e,At.dataType,At.envelopeType,l[Ft](),t,n),l.core.track(n)):r===H&&Ut(l,j.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),++r}}),e}e.AjaxPlugin=Ge,e.ajaxRecord=Dt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map
/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*
* Microsoft Application Insights XHR dependencies plugin, 2.6.0
* Microsoft Application Insights XHR dependencies plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ *

/*!
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.0
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(e){"use strict";var i="function",s="object",t="undefined",o="prototype",u="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}var r,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[u](n)&&(e[n]=t[n])})(e,t)},l=n()||{};Ge=function(e,t){function n(){this.constructor=e}a(e,t),e[o]=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!=s&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}(t):(n[o]=t[o],new n)},(r=l).__assign||(r.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object[o][u].call(t,a)&&(e[a]=t[a]);return e}),r.__extends||(r.__extends=Ge),__assign=__assign||l.__assign,__extends=__extends||l.__extends;var c,d="constructor",p="prototype",h="function",m="_dynInstFuncs",x="_isDynProxy",v="_dynClass",T="_dynCls$",y="_dynInstChk",C=y,A="_dfOpts",f="_unknown_",g="__proto__",I="useBaseInst",M="setInstFuncs",b=Object,S=b.getPrototypeOf,_=0;function E(e,t){return e&&b[p].hasOwnProperty.call(e,t)}function q(e){return e&&(e===b[p]||e===Array[p])}function H(e){return q(e)||e===Function[p]}function w(e){if(e){if(S)return S(e);if(e=e[g]||e[p]||e[d])return e}return null}function D(e,t){var n=[],r=b.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&E(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function L(e,t,n){return t!==d&&typeof e[t]===h&&(n||E(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function R(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function F(e,t){return E(e,p)?e.name||t||f:((e||{})[d]||{}).name||t||f}function P(e,n,t,r){E(e,p)||N("theClass is an invalid class definition.");var a=e[p];!function(e){for(var t=w(n);t&&!H(t);){if(t===e)return 1;t=w(t)}}(a)&&N("["+F(e)+"] is not in class hierarchy of ["+F(n)+"]");var o=null;E(a,v)?o=a[v]:(o=T+F(e,"_")+"$"+_,_++,a[v]=o);var i,s,u,l,c,d,f=P[A],g=!!f[I];g&&r&&r[I]!==undefined&&(g=!!r[I]),t(n,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[x]&&o&&!1!==(r=e[m]||{})[C]&&(a=(r[t[v]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};D(n,function(e){a[e]=r(t,n,e)});for(var i=w(e),s=[];i&&!H(i)&&!R(s,i);)D(i,function(e){!a[e]&&L(i,e,!S)&&(a[e]=r(t,i,e))}),s.push(i),i=w(i);return a}(a,n,(s={},D(i=n,function(e){!s[e]&&L(i,e,!1)&&(s[e]=i[e])}),e=s),g)),u=a,o=o,l=n,c=e,r=!1!==(f=(f=!!S&&!!f[M])&&r?!!r[M]:f),q(u)||(f=l[m]=l[m]||{},d=f[o]=f[o]||{},!1!==f[C]&&(f[C]=!!r),D(l,function(e){var n,r,a;L(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],E(u,e)&&(!u[e]||u[e][x])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&E(n,v)){var o=e[m]||{};if((a=(o[n[v]]||{})[t])||N("Missing ["+t+"] "+h),!a[y]&&!1!==o[C]){for(var i=!E(e,t),s=w(e),u=[];i&&s&&!H(s)&&!R(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=w(s)}try{i&&(e[t]=a),a[y]=1}catch(c){o[C]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?w(n)[e]:t)!==h&&N("["+e+"] is not a "+h),t)).apply(this,arguments)})[x]=1,a)))}))}P[A]={setInstFuncs:!0,useBaseInst:!0},(Ge=c=c||{})[Ge.CRITICAL=1]="CRITICAL",Ge[Ge.WARNING=2]="WARNING";var j={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,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103},k="attachEvent",O="addEventListener",G="detachEvent",z="removeEventListener",U=(l=Object)[o],X=U.hasOwnProperty,V=l.defineProperty;function W(e){return U.toString.call(e)}function B(e){return e===undefined||typeof e===t}function K(e){return null===e||B(e)}function $(e){return typeof e===i}function J(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!K(e))try{K(e[O])?K(e[k])||(e[k]("on"+t,n),a=!0):(e[O](t,n,r),a=!0)}catch(o){}return a}function Y(e,t,n,r){if(void 0===r&&(r=!1),!K(e))try{K(e[z])?K(e[G])||e[G]("on"+t,n):e[z](t,n,r)}catch(a){}}function Z(e,t){if(e)for(var n in e)X.call(e,n)&&t.call(e,n,e[n])}function Q(e,t){return!(!e||!t||!~e.indexOf(t))}function ee(e){return"string"==typeof e}function te(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var ne=!{toString:null}.propertyIsEnumerable("toString"),re=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ae(e){var t=typeof e;if(t!==i&&(t!=s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&X.call(e,n)&&r.push(n);if(ne)for(var a=re.length,o=0;o<a;o++)e&&X.call(e,re[o])&&r.push(re[o]);return r}function oe(){var e=Date;return e.now?e.now():(new e).getTime()}var ie=t,se=s,ue=o,le=i,ce="window",de="navigator",fe="location",ge="performance",pe="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",Te=null,ye=null,Ce=n;function Ae(e){var t=Ce();return t&&t[e]?t[e]:e===ce&&typeof window===se&&window?window:null}function Ie(){return typeof navigator===se&&navigator?navigator:Ae(de)}function Me(){return Ae(ge)}function be(){return typeof JSON===se&&JSON||null!==Ae(pe)}function Se(){return be()?JSON||Ae(pe):null}function _e(e){var t=Object[o].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":be()&&(n=Se().stringify(e)),t+n}function Ee(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var qe=(He.dataType="MessageData",He);function He(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",be()&&(e=Se().stringify(r)),e=(t?" message:"+Ee(t):"")+(r?" props:"+Ee(e):""),this.message+=e}var we=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};P($t,this,function(o){function e(e,t){return K(e=n[e])?t:e}K(n)&&(n={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,r,a){if(n=new qe(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;B(n)||!n||B(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=c.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=c.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==ie?console:Ae("console");n&&(t="log",$(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new qe(j.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Ne.ParentContextKey="parent",Ne.ChildrenContextKey="childEvts",Ne);function Ne(e,a,t){var r,o=this,i=!1;o.start=oe(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},$(a)&&(i=function(e){if(V)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&$(a)&&(r=a(),a=null),r}};return V(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Ne.ParentContextKey||e===Ne.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Ne.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Ne.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Ne.ChildrenContextKey);if("[object Array]"===W(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=oe()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&$(a)&&(o.payload=a())}}var Re="CoreUtils.doPerf";function Fe(e,t,n,r,a){if(e){var o=e;if(o=o&&$(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Re);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Re,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Re,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=$(a.processTelemetry),u=$(a.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return a},o.getNext=function(){return i},o.setNext=function(e){i=e},o.processTelemetry=function(n,r){var e=a?a.identifier:"TelemetryPluginChain";Fe((r=r||t)?r.core():null,function(){return e+":processTelemetry"},function(){if(a&&s){o._hasRun=!0;try{r.setNext(i),u&&a.setNextPlugin(i),i&&(i._hasRun=!1),a.processTelemetry(n,r)}catch(t){var e=i&&i._hasRun;i&&e||r.diagLog().throwInternal(c.CRITICAL,j.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function je(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&$(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&$(e.getPlugin)?l=function(e,t,n){var r=[],a=!n;if(e)for(;e;){var o=e.getPlugin();!a&&o!==n||(a=!0,r.push(o)),e=e.getNext()}return a||r.push(n),je(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],te(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=je(i,r)):B(t)&&(l=je(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new we(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!K(e[t])?r=e[t]:a&&!K(a[t])&&(r=a[t]),K(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return new Jt((e=void 0===e?null:e)||l,a,n,t)}},Oe="getPlugin",Ge=(ze.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ze);function ze(){var s=this,u=!1,l=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,t){t?t.processNext(e):c&&$(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[Oe]?e.createNew(null,c[Oe]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&K(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Oe]&&(i=c[Oe]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var Ue=4294967296,Xe=4294967295,Ve=!1,We=123456789,Be=987654321;function Ke(e){var t=Ae(he)||Ae(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Xe:(!(n=Ie())||n.userAgent===ye&&null!==Te||(n=((ye=n.userAgent)||"").toLowerCase(),Te=Q(n,xe)||Q(n,ve)),Te?(Ve||function(){try{var e=2147483647&oe();(t=(Math.random()*Ue^e)+e)<0&&(t>>>=0),We=123456789+t&Xe,Be=987654321-t&Xe,Ve=!0}catch(n){}var t}(),t=((Be=36969*(65535&Be)+(Be>>16)&Xe)<<16)+(65535&(We=18e3*(65535&We)+(We>>16)&Xe))>>>0&Xe|0,(t>>>=0)&Xe):Math.floor(Ue*Math.random()|0));return e||(n>>>=0),n}function $e(){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=Ke())]+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 a=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)}var Je={Attach:J,AttachEvent:J,Detach:Y,DetachEvent:Y},Ye="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",et="constructor";function tt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function nt(e,i,s,u,l){0<=l&&l<=2&&tt(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function rt(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=o([],n))[e]=t,a=o([r],n)}},t=[],a=o([r],n);function o(t,e){return tt(e,function(e){t.push(e)}),t}nt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,nt(e,r,a,t,3),s}return nt(e,r,a,t,1),r.rslt}}var at=Object.getPrototypeOf;function ot(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&((e=function o(e,t,n){var r=null;return e&&(e&&X.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(at)return at(e);if(e=e[Qe]||e[ue]||e[et])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===le)){var a=r[Ye];return a||((r=rt(a={i:0,n:t,f:r,h:[]}))[Ye]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;tt(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var it={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},st=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=ut.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(o);a=i}return a},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(c.WARNING,j.NameTooLong,"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(c.WARNING,j.StringValueTooLong,"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,j.UrlTooLong)},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(c.WARNING,j.MessageTruncated,"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(c.WARNING,j.ExceptionTruncated,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(r,e){var a;return e&&(a={},Z(e,function(e,t){if(typeof t==s&&be())try{t=Se().stringify(t)}catch(n){r.throwInternal(c.WARNING,j.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ut.sanitizeString(r,t,ut.MAX_PROPERTY_LENGTH),e=ut.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},ut.sanitizeMeasurements=function(n,e){var r;return e&&(r={},Z(e,function(e,t){e=ut.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},ut.sanitizeId=function(e,t){return t&&ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,j.IdTooLong).toString()},ut.sanitizeInput=function(e,t,n,r){var a;return t&&(t=ut.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(c.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},ut.padNumber=function(e){return(e="00"+e).substr(e.length-3)},ut.trim=function(e){return ee(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(){}function lt(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,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;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ct,dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(l={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(l=ct={})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(l=dt=dt||{})[l.AI=0]="AI",l[l.AI_AND_W3C=1]="AI_AND_W3C",l[l.W3C=2]="W3C";var gt=(typeof document===se&&document?document:Ae("document"))||{},pt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=pt,a=ht,o=a[r];return gt.createElement?a[r]||(o=a[r]=gt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&ee(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),pt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&ee(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var vt={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var a,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(te(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,it.requestContextTargetKey))&&e!==vt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var a=n[r].split("=");if(2===a.length&&a[0]===t)return a[1]}}};function Tt(){var e=Me();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:oe()}function yt(e,t){return 0===e||0===t||K(e)||K(t)?null:t-e}var Ct,At=(Ct=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(It,Ct),It.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",It.dataType="RemoteDependencyData",It);function It(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Ct.call(this)||this;f.aiDataContract={id:ct.Required,ver:ct.Required,name:ct.Default,resultCode:ct.Default,duration:ct.Default,success:ct.Default,data:ct.Default,target:ct.Default,type:ct.Default,properties:ct.Default,measurements:ct.Default,kind:ct.Default,value:ct.Default,count:ct.Default,min:ct.Default,max:ct.Default,stdDev:ct.Default,dependencyKind:ct.Default,dependencySource:ct.Default,commandName:ct.Default,dependencyTypeName:ct.Default},f.id=t,f.duration=lt(a),f.success=o,f.resultCode=i+"",f.type=st.sanitizeString(e,u);var g,p,i=(g=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(p=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st.sanitizeString(g,t?t+" "+n:n)):st.sanitizeString(g,u))):p=a,{target:p,name:o,data:i});return f.data=st.sanitizeUrl(e,r)||i.data,f.target=st.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st.sanitizeString(e,i.name),f.properties=st.sanitizeProperties(e,c),f.measurements=st.sanitizeMeasurements(e,d),f}var Mt=(bt.create=function(e,t,n,r,a,o){if(n=st.sanitizeString(r,n)||"not_specified",K(e)||K(t)||K(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===W(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return K(a)||Z(a,function(e,t){i.data[e]=t}),i},bt);function bt(){}var St="AppInsightsPropertiesPlugin",_t="properties";function Et(e,t,n){t=e[t],n=e[n];return t&&n?yt(t,n):0}function qt(e,t,n,r,a){return(a=Et(n,r,a))?Ht(e,t,lt(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var wt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Dt=function Yt(e,t,n){var r=this,a=n,v="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 wt,r.clientFailure=0,r.traceID=e,r.spanID=t,P(Yt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?st.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*yt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?null:((e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[_t]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[_t]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",g="transferSize",p="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=qt(s,"End",i,"redirectStart","End"),u|=qt(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=qt(s,"connect",i,"connectStart",c),u|=qt(s,"request",i,d,"requestEnd"),u|=qt(s,"response",i,"responseStart",f),u|=qt(s,"networkConnect",i,l,c),u|=qt(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Et(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},te(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};Z(e,function(e,t){("name"!==e&&ee(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&ee(t)||(a[e]=t))}),o[t]=a}),u|=Ht(s,m,o)),u|=Ht(s,g,i[g]),u|=Ht(s,p,i[p]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[_t]=s),t&&0<ae(x.requestHeaders).length&&(e[_t]=e[_t]||{},e[_t].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ae(t.headerMap).length&&(e[_t]=e[_t]||{},e[_t].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[_t]=e[_t]||{},""!==n&&"text"!==n||(e[_t][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[_t][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,g,p,h,m}})},Lt=(Nt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Nt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Nt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Nt.DEFAULT_TRACE_FLAG="01",Nt.DEFAULT_VERSION="00",Nt);function Nt(e,t){var n=this;n.traceFlag=Nt.DEFAULT_TRACE_FLAG,n.version=Nt.DEFAULT_VERSION,e&&Nt.isValidTraceId(e)?n.traceId=e:n.traceId=$e(),t&&Nt.isValidSpanId(t)?n.spanId=t:n.spanId=$e().substr(0,16)}var Rt="ai.ajxmn.",Ft="diagLog",Pt="ajaxData",jt="throwInternal",kt="fetch",Ot=0;function Gt(e){var t=!1;typeof XMLHttpRequest===ie||K(XMLHttpRequest)||(t=!(K(a=XMLHttpRequest[ue])||K(a.open)||K(a.send)||K(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",Q(r=n?r:(n=Ie()||{})?(n.userAgent||"").toLowerCase():"",xe)?parseInt(r.split(xe)[1]):Q(r,ve)&&(r=parseInt(r.split(ve)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Pt]={};var o=XMLHttpRequest[ue].open;XMLHttpRequest[ue].open=o}catch(i){t=!1,Ut(e,j.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:_e(i)})}return t}function zt(e){var t="";try{K(e)||K(e[Pt])||K(e[Pt].requestUrl)||(t+="(url: '"+e[Pt].requestUrl+"')")}catch(n){}return t}function Ut(e,t,n,r,a){e[Ft]()[jt](c.CRITICAL,t,n,r,a)}function Xt(e,t,n,r,a){e[Ft]()[jt](c.WARNING,t,n,r,a)}function Vt(t,n,r){return function(e){Ut(t,n,r,{ajaxDiagnosticsMessage:zt(e.inst),exception:_e(e.err)})}}function Wt(e,t){return e&&t?e.indexOf(t):-1}var Bt,Ge=(Bt=Ge,__extends(Kt,Bt),Kt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.AI_AND_W3C,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}},Kt.getEmptyConfig=function(){var t=this.getDefaultConfig();return Z(t,function(e){t[e]=undefined}),t},Kt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Kt.identifier="AjaxDependencyPlugin",Kt);function Kt(){var e=Bt.call(this)||this;e.identifier=Kt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===se&&location?location:Ae(fe),b=!1,S=!1,_=t&&t.host&&t.host.toLowerCase(),E=Kt.getEmptyConfig(),q=!1,r=0,H=0,w=[],D={};return P(Kt,e,function(l,c){function d(e,t,n){w.push(e?ot(e[ue],t,n,!1):null)}function f(e,t,n){var r=!1,a=((ee(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Wt(a,"?"),i=Wt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),K(e)?K(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?D[a]||(D[a]=1):D[a]&&(r=!0),r}function g(e,t){var n=!0;return K(e)||(n=!0===t||!K(e[Pt])),S&&n}function p(o){o[Pt].xhrMonitoringState.stateChangeAttached=Je.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Pt]).responseFinishedTime=Tt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",q,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},te(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Pt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=_e(t);e&&-1!==Wt(e.toLowerCase(),"c00c023f")||Ut(l,j.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:zt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=zt(r),e&&(t.exception=_e(e)),Xt(l,j.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Wt(t.toLowerCase(),it.requestContextHeaderLowerCase)){var n=e.getResponseHeader(it.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:zt(e),exception:_e(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Me())&&$(n.mark)&&(e=C+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Me(),d=E.maxAjaxPerfLookupAttempts,f=E.ajaxPerfLookupDelay,g=i.requestUrl,p=0;!function h(){try{if(c&&l){p++;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!==o||-1===Wt(r.name,g)&&-1===Wt(g,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=p||!1===i["async"]?(l&&$(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=p,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{K(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Ut(l,j.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:_e(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=_e(t)),Xt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=Tt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,a);e?l[M](e):o(j.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(j.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(it.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:_e(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(Z(Kt.getDefaultConfig(),function(e,t){E[e]=a.getConfig(Kt.identifier,e,t)}),r=E.distributedTracingMode,q=E.enableRequestHeaderTracking,A=E.enableAjaxPerfTracking,H=E.maxAjaxCallsPerView,I=E.enableResponseHeaderTracking,y=r===dt.AI||r===dt.AI_AND_W3C,T=r===dt.AI_AND_W3C||r===dt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Rt+s.substring(s.length-5)+".":Rt+s+"."),!1===E.disableAjaxTracking&&Gt(l)&&!S&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Pt];f(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16),(r=new Dt(n,r,l[Ft]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Pt]=r,p(e))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Pt];g(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=Tt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Pt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&(e[Pt].requestHeaders[t]=n)},hkErr:Vt(l,j.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),S=!0),(e=!(r=Ce())||K(r.Request)||K(r.Request[ue])||K(r[kt])?null:r[kt])&&(s=Ce(),u=e.polyfill,!1===E.disableFetchTracking?(w.push(ot(s,kt,{req:function(e,t,n){var r,a;!b||f(null,t,n)||u&&S||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16);(n=new Dt(n,r,l[Ft]())).requestSentTime=Tt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),b=!0):u&&w.push(ot(s,kt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[kt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===St&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){te(w,function(e){e.rm()}),S=b=!(w=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||_;return t?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(n.headers.set(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),n.headers.set(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(r.setRequestHeader(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),r.setRequestHeader(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===H||r<H?(E.distributedTracingMode!==dt.W3C&&E.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),K(e.startTime)&&(e.startTime=new Date),n=Mt.create(e,At.dataType,At.envelopeType,l[Ft](),t,n),l.core.track(n)):r===H&&Ut(l,j.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),++r}}),e}e.AjaxPlugin=Ge,e.ajaxRecord=Dt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(e){"use strict";var i="function",s="object",t="undefined",o="prototype",u="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}var r,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[u](n)&&(e[n]=t[n])})(e,t)},l=n()||{};Ge=function(e,t){function n(){this.constructor=e}a(e,t),e[o]=null===t?function(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!=s&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}(t):(n[o]=t[o],new n)},(r=l).__assign||(r.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object[o][u].call(t,a)&&(e[a]=t[a]);return e}),r.__extends||(r.__extends=Ge),__assign=__assign||l.__assign,__extends=__extends||l.__extends;var c,d="constructor",p="prototype",h="function",m="_dynInstFuncs",x="_isDynProxy",v="_dynClass",T="_dynCls$",y="_dynInstChk",C=y,A="_dfOpts",f="_unknown_",g="__proto__",I="useBaseInst",M="setInstFuncs",b=Object,S=b.getPrototypeOf,_=0;function E(e,t){return e&&b[p].hasOwnProperty.call(e,t)}function q(e){return e&&(e===b[p]||e===Array[p])}function H(e){return q(e)||e===Function[p]}function w(e){if(e){if(S)return S(e);if(e=e[g]||e[p]||e[d])return e}return null}function D(e,t){var n=[],r=b.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&E(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function L(e,t,n){return t!==d&&typeof e[t]===h&&(n||E(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function R(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function F(e,t){return E(e,p)?e.name||t||f:((e||{})[d]||{}).name||t||f}function P(e,n,t,r){E(e,p)||N("theClass is an invalid class definition.");var a=e[p];!function(e){for(var t=w(n);t&&!H(t);){if(t===e)return 1;t=w(t)}}(a)&&N("["+F(e)+"] is not in class hierarchy of ["+F(n)+"]");var o=null;E(a,v)?o=a[v]:(o=T+F(e,"_")+"$"+_,_++,a[v]=o);var i,s,u,l,c,d,f=P[A],g=!!f[I];g&&r&&r[I]!==undefined&&(g=!!r[I]),t(n,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[x]&&o&&!1!==(r=e[m]||{})[C]&&(a=(r[t[v]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};D(n,function(e){a[e]=r(t,n,e)});for(var i=w(e),s=[];i&&!H(i)&&!R(s,i);)D(i,function(e){!a[e]&&L(i,e,!S)&&(a[e]=r(t,i,e))}),s.push(i),i=w(i);return a}(a,n,(s={},D(i=n,function(e){!s[e]&&L(i,e,!1)&&(s[e]=i[e])}),e=s),g)),u=a,o=o,l=n,c=e,r=!1!==(f=(f=!!S&&!!f[M])&&r?!!r[M]:f),q(u)||(f=l[m]=l[m]||{},d=f[o]=f[o]||{},!1!==f[C]&&(f[C]=!!r),D(l,function(e){var n,r,a;L(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],E(u,e)&&(!u[e]||u[e][x])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&E(n,v)){var o=e[m]||{};if((a=(o[n[v]]||{})[t])||N("Missing ["+t+"] "+h),!a[y]&&!1!==o[C]){for(var i=!E(e,t),s=w(e),u=[];i&&s&&!H(s)&&!R(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=w(s)}try{i&&(e[t]=a),a[y]=1}catch(c){o[C]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?w(n)[e]:t)!==h&&N("["+e+"] is not a "+h),t)).apply(this,arguments)})[x]=1,a)))}))}P[A]={setInstFuncs:!0,useBaseInst:!0},(Ge=c=c||{})[Ge.CRITICAL=1]="CRITICAL",Ge[Ge.WARNING=2]="WARNING";var j={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,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103},k="attachEvent",O="addEventListener",G="detachEvent",z="removeEventListener",U=(l=Object)[o],X=U.hasOwnProperty,V=l.defineProperty;function W(e){return U.toString.call(e)}function B(e){return e===undefined||typeof e===t}function K(e){return null===e||B(e)}function $(e){return typeof e===i}function J(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!K(e))try{K(e[O])?K(e[k])||(e[k]("on"+t,n),a=!0):(e[O](t,n,r),a=!0)}catch(o){}return a}function Y(e,t,n,r){if(void 0===r&&(r=!1),!K(e))try{K(e[z])?K(e[G])||e[G]("on"+t,n):e[z](t,n,r)}catch(a){}}function Z(e,t){if(e)for(var n in e)X.call(e,n)&&t.call(e,n,e[n])}function Q(e,t){return!(!e||!t||!~e.indexOf(t))}function ee(e){return"string"==typeof e}function te(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var ne=!{toString:null}.propertyIsEnumerable("toString"),re=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ae(e){var t=typeof e;if(t!==i&&(t!=s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&X.call(e,n)&&r.push(n);if(ne)for(var a=re.length,o=0;o<a;o++)e&&X.call(e,re[o])&&r.push(re[o]);return r}function oe(){var e=Date;return e.now?e.now():(new e).getTime()}var ie=t,se=s,ue=o,le=i,ce="window",de="navigator",fe="location",ge="performance",pe="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",Te=null,ye=null,Ce=n;function Ae(e){var t=Ce();return t&&t[e]?t[e]:e===ce&&typeof window===se&&window?window:null}function Ie(){return typeof navigator===se&&navigator?navigator:Ae(de)}function Me(){return Ae(ge)}function be(){return typeof JSON===se&&JSON||null!==Ae(pe)}function Se(){return be()?JSON||Ae(pe):null}function _e(e){var t=Object[o].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":be()&&(n=Se().stringify(e)),t+n}function Ee(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var qe=(He.dataType="MessageData",He);function He(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",be()&&(e=Se().stringify(r)),e=(t?" message:"+Ee(t):"")+(r?" props:"+Ee(e):""),this.message+=e}var we=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};P($t,this,function(o){function e(e,t){return K(e=n[e])?t:e}K(n)&&(n={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,r,a){if(n=new qe(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;B(n)||!n||B(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=c.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=c.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==ie?console:Ae("console");n&&(t="log",$(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new qe(j.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Ne.ParentContextKey="parent",Ne.ChildrenContextKey="childEvts",Ne);function Ne(e,a,t){var r,o=this,i=!1;o.start=oe(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},$(a)&&(i=function(e){if(V)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&$(a)&&(r=a(),a=null),r}};return V(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Ne.ParentContextKey||e===Ne.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Ne.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Ne.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Ne.ChildrenContextKey);if("[object Array]"===W(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=oe()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&$(a)&&(o.payload=a())}}var Re="CoreUtils.doPerf";function Fe(e,t,n,r,a){if(e){var o=e;if(o=o&&$(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Re);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Re,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Re,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=$(a.processTelemetry),u=$(a.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return a},o.getNext=function(){return i},o.setNext=function(e){i=e},o.processTelemetry=function(n,r){var e=a?a.identifier:"TelemetryPluginChain";Fe((r=r||t)?r.core():null,function(){return e+":processTelemetry"},function(){if(a&&s){o._hasRun=!0;try{r.setNext(i),u&&a.setNextPlugin(i),i&&(i._hasRun=!1),a.processTelemetry(n,r)}catch(t){var e=i&&i._hasRun;i&&e||r.diagLog().throwInternal(c.CRITICAL,j.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function je(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&$(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&$(e.getPlugin)?l=function(e,t,n){var r=[],a=!n;if(e)for(;e;){var o=e.getPlugin();!a&&o!==n||(a=!0,r.push(o)),e=e.getNext()}return a||r.push(n),je(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],te(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=je(i,r)):B(t)&&(l=je(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new we(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!K(e[t])?r=e[t]:a&&!K(a[t])&&(r=a[t]),K(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return new Jt((e=void 0===e?null:e)||l,a,n,t)}},Oe="getPlugin",Ge=(ze.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},ze);function ze(){var s=this,u=!1,l=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,t){t?t.processNext(e):c&&$(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[Oe]?e.createNew(null,c[Oe]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&K(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Oe]&&(i=c[Oe]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var Ue=4294967296,Xe=4294967295,Ve=!1,We=123456789,Be=987654321;function Ke(e){var t=Ae(he)||Ae(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Xe:(!(n=Ie())||n.userAgent===ye&&null!==Te||(n=((ye=n.userAgent)||"").toLowerCase(),Te=Q(n,xe)||Q(n,ve)),Te?(Ve||function(){try{var e=2147483647&oe();(t=(Math.random()*Ue^e)+e)<0&&(t>>>=0),We=123456789+t&Xe,Be=987654321-t&Xe,Ve=!0}catch(n){}var t}(),t=((Be=36969*(65535&Be)+(Be>>16)&Xe)<<16)+(65535&(We=18e3*(65535&We)+(We>>16)&Xe))>>>0&Xe|0,(t>>>=0)&Xe):Math.floor(Ue*Math.random()|0));return e||(n>>>=0),n}function $e(){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=Ke())]+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 a=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)}var Je={Attach:J,AttachEvent:J,Detach:Y,DetachEvent:Y},Ye="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",et="constructor";function tt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function nt(e,i,s,u,l){0<=l&&l<=2&&tt(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function rt(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=o([],n))[e]=t,a=o([r],n)}},t=[],a=o([r],n);function o(t,e){return tt(e,function(e){t.push(e)}),t}nt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,nt(e,r,a,t,3),s}return nt(e,r,a,t,1),r.rslt}}var at=Object.getPrototypeOf;function ot(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&X.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(at)return at(e);if(e=e[Qe]||e[ue]||e[et])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===le){var a=r[Ye];return a||((r=rt(a={i:0,n:t,f:r,h:[]}))[Ye]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;tt(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var it={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},st=(ut.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=ut.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,ut.MAX_NAME_LENGTH-3)+ut.padNumber(o);a=i}return a},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(c.WARNING,j.NameTooLong,"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(c.WARNING,j.StringValueTooLong,"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,j.UrlTooLong)},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(c.WARNING,j.MessageTruncated,"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(c.WARNING,j.ExceptionTruncated,"exception is too long, it has been truncated to "+ut.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},ut.sanitizeProperties=function(r,e){var a;return e&&(a={},Z(e,function(e,t){if(typeof t==s&&be())try{t=Se().stringify(t)}catch(n){r.throwInternal(c.WARNING,j.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=ut.sanitizeString(r,t,ut.MAX_PROPERTY_LENGTH),e=ut.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},ut.sanitizeMeasurements=function(n,e){var r;return e&&(r={},Z(e,function(e,t){e=ut.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},ut.sanitizeId=function(e,t){return t&&ut.sanitizeInput(e,t,ut.MAX_ID_LENGTH,j.IdTooLong).toString()},ut.sanitizeInput=function(e,t,n,r){var a;return t&&(t=ut.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(c.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},ut.padNumber=function(e){return(e="00"+e).substr(e.length-3)},ut.trim=function(e){return ee(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(){}function lt(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,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;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ct,dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(l={})[l.LocalStorage=0]="LocalStorage",l[l.SessionStorage=1]="SessionStorage",(l=ct={})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(l=dt=dt||{})[l.AI=0]="AI",l[l.AI_AND_W3C=1]="AI_AND_W3C",l[l.W3C=2]="W3C";var gt=(typeof document===se&&document?document:Ae("document"))||{},pt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=pt,a=ht,o=a[r];return gt.createElement?a[r]||(o=a[r]=gt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&ee(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),pt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&ee(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var vt={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var a,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(te(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,it.requestContextTargetKey))&&e!==vt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var a=n[r].split("=");if(2===a.length&&a[0]===t)return a[1]}}};function Tt(){var e=Me();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:oe()}function yt(e,t){return 0===e||0===t||K(e)||K(t)?null:t-e}var Ct,At=(Ct=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(It,Ct),It.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",It.dataType="RemoteDependencyData",It);function It(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Ct.call(this)||this;f.aiDataContract={id:ct.Required,ver:ct.Required,name:ct.Default,resultCode:ct.Default,duration:ct.Default,success:ct.Default,data:ct.Default,target:ct.Default,type:ct.Default,properties:ct.Default,measurements:ct.Default,kind:ct.Default,value:ct.Default,count:ct.Default,min:ct.Default,max:ct.Default,stdDev:ct.Default,dependencyKind:ct.Default,dependencySource:ct.Default,commandName:ct.Default,dependencyTypeName:ct.Default},f.id=t,f.duration=lt(a),f.success=o,f.resultCode=i+"",f.type=st.sanitizeString(e,u);var g,p,i=(g=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(p=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st.sanitizeString(g,t?t+" "+n:n)):st.sanitizeString(g,u))):p=a,{target:p,name:o,data:i});return f.data=st.sanitizeUrl(e,r)||i.data,f.target=st.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st.sanitizeString(e,i.name),f.properties=st.sanitizeProperties(e,c),f.measurements=st.sanitizeMeasurements(e,d),f}var Mt=(bt.create=function(e,t,n,r,a,o){if(n=st.sanitizeString(r,n)||"not_specified",K(e)||K(t)||K(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===W(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return K(a)||Z(a,function(e,t){i.data[e]=t}),i},bt);function bt(){}var St="AppInsightsPropertiesPlugin",_t="properties";function Et(e,t,n){t=e[t],n=e[n];return t&&n?yt(t,n):0}function qt(e,t,n,r,a){return(a=Et(n,r,a))?Ht(e,t,lt(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var wt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Dt=function Yt(e,t,n){var r=this,a=n,v="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 wt,r.clientFailure=0,r.traceID=e,r.spanID=t,P(Yt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?st.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*yt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?null:((e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[_t]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[_t]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",g="transferSize",p="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=qt(s,"End",i,"redirectStart","End"),u|=qt(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=qt(s,"connect",i,"connectStart",c),u|=qt(s,"request",i,d,"requestEnd"),u|=qt(s,"response",i,"responseStart",f),u|=qt(s,"networkConnect",i,l,c),u|=qt(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Et(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},te(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};Z(e,function(e,t){("name"!==e&&ee(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&ee(t)||(a[e]=t))}),o[t]=a}),u|=Ht(s,m,o)),u|=Ht(s,g,i[g]),u|=Ht(s,p,i[p]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[_t]=s),t&&0<ae(x.requestHeaders).length&&(e[_t]=e[_t]||{},e[_t].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ae(t.headerMap).length&&(e[_t]=e[_t]||{},e[_t].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[_t]=e[_t]||{},""!==n&&"text"!==n||(e[_t][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[_t][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,g,p,h,m}})},Lt=(Nt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Nt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Nt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Nt.DEFAULT_TRACE_FLAG="01",Nt.DEFAULT_VERSION="00",Nt);function Nt(e,t){var n=this;n.traceFlag=Nt.DEFAULT_TRACE_FLAG,n.version=Nt.DEFAULT_VERSION,e&&Nt.isValidTraceId(e)?n.traceId=e:n.traceId=$e(),t&&Nt.isValidSpanId(t)?n.spanId=t:n.spanId=$e().substr(0,16)}var Rt="ai.ajxmn.",Ft="diagLog",Pt="ajaxData",jt="throwInternal",kt="fetch",Ot=0;function Gt(e){var t=!1;typeof XMLHttpRequest===ie||K(XMLHttpRequest)||(t=!(K(a=XMLHttpRequest[ue])||K(a.open)||K(a.send)||K(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",Q(r=n?r:(n=Ie()||{})?(n.userAgent||"").toLowerCase():"",xe)?parseInt(r.split(xe)[1]):Q(r,ve)&&(r=parseInt(r.split(ve)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Pt]={};var o=XMLHttpRequest[ue].open;XMLHttpRequest[ue].open=o}catch(i){t=!1,Ut(e,j.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:_e(i)})}return t}function zt(e){var t="";try{K(e)||K(e[Pt])||K(e[Pt].requestUrl)||(t+="(url: '"+e[Pt].requestUrl+"')")}catch(n){}return t}function Ut(e,t,n,r,a){e[Ft]()[jt](c.CRITICAL,t,n,r,a)}function Xt(e,t,n,r,a){e[Ft]()[jt](c.WARNING,t,n,r,a)}function Vt(t,n,r){return function(e){Ut(t,n,r,{ajaxDiagnosticsMessage:zt(e.inst),exception:_e(e.err)})}}function Wt(e,t){return e&&t?e.indexOf(t):-1}var Bt,Ge=(Bt=Ge,__extends(Kt,Bt),Kt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.AI_AND_W3C,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}},Kt.getEmptyConfig=function(){var t=this.getDefaultConfig();return Z(t,function(e){t[e]=undefined}),t},Kt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Kt.identifier="AjaxDependencyPlugin",Kt);function Kt(){var e=Bt.call(this)||this;e.identifier=Kt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===se&&location?location:Ae(fe),b=!1,S=!1,_=t&&t.host&&t.host.toLowerCase(),E=Kt.getEmptyConfig(),q=!1,r=0,H=0,w=[],D={};return P(Kt,e,function(l,c){function d(e,t,n){w.push(e?ot(e[ue],t,n,!1):null)}function f(e,t,n){var r=!1,a=((ee(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Wt(a,"?"),i=Wt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),K(e)?K(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?D[a]||(D[a]=1):D[a]&&(r=!0),r}function g(e,t){var n=!0;return K(e)||(n=!0===t||!K(e[Pt])),S&&n}function p(o){o[Pt].xhrMonitoringState.stateChangeAttached=Je.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Pt]).responseFinishedTime=Tt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",q,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},te(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Pt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=_e(t);e&&-1!==Wt(e.toLowerCase(),"c00c023f")||Ut(l,j.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:zt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=zt(r),e&&(t.exception=_e(e)),Xt(l,j.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Wt(t.toLowerCase(),it.requestContextHeaderLowerCase)){var n=e.getResponseHeader(it.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:zt(e),exception:_e(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Me())&&$(n.mark)&&(e=C+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Me(),d=E.maxAjaxPerfLookupAttempts,f=E.ajaxPerfLookupDelay,g=i.requestUrl,p=0;!function h(){try{if(c&&l){p++;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!==o||-1===Wt(r.name,g)&&-1===Wt(g,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=p||!1===i["async"]?(l&&$(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=p,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{K(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Ut(l,j.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:_e(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=_e(t)),Xt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=Tt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",q,a);e?l[M](e):o(j.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(j.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(it.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Xt(l,j.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:_e(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(Z(Kt.getDefaultConfig(),function(e,t){E[e]=a.getConfig(Kt.identifier,e,t)}),r=E.distributedTracingMode,q=E.enableRequestHeaderTracking,A=E.enableAjaxPerfTracking,H=E.maxAjaxCallsPerView,I=E.enableResponseHeaderTracking,y=r===dt.AI||r===dt.AI_AND_W3C,T=r===dt.AI_AND_W3C||r===dt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Rt+s.substring(s.length-5)+".":Rt+s+"."),!1===E.disableAjaxTracking&&Gt(l)&&!S&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Pt];f(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16),(r=new Dt(n,r,l[Ft]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Pt]=r,p(e))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Pt];g(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=Tt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Pt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Vt(l,j.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),q&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&(e[Pt].requestHeaders[t]=n)},hkErr:Vt(l,j.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),S=!0),(e=!(r=Ce())||K(r.Request)||K(r.Request[ue])||K(r[kt])?null:r[kt])&&(s=Ce(),u=e.polyfill,!1===E.disableFetchTracking?(w.push(ot(s,kt,{req:function(e,t,n){var r,a;!b||f(null,t,n)||u&&S||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||$e(),r=$e().substr(0,16);(n=new Dt(n,r,l[Ft]())).requestSentTime=Tt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return q&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Vt(l,j.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),b=!0):u&&w.push(ot(s,kt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[kt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===St&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){te(w,function(e){e.rm()}),S=b=!(w=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||_;return t?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(n.headers.set(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),n.headers.set(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(E,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(it.requestIdHeader,a),q&&(e.requestHeaders[it.requestIdHeader]=a)),(o=E.appId||v&&v.appId())&&(r.setRequestHeader(it.requestContextHeader,it.requestContextAppIdFormat+o),q&&(e.requestHeaders[it.requestContextHeader]=it.requestContextAppIdFormat+o)),T&&(i=new Lt(e.traceID,e.spanID),r.setRequestHeader(it.traceParentHeader,i.toString()),q&&(e.requestHeaders[it.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===H||r<H?(E.distributedTracingMode!==dt.W3C&&E.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),K(e.startTime)&&(e.startTime=new Date),n=Mt.create(e,At.dataType,At.envelopeType,l[Ft](),t,n),l.core.track(n)):r===H&&Ut(l,j.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),++r}}),e}e.AjaxPlugin=Ge,e.ajaxRecord=Dt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map
/*
* Microsoft Application Insights XHR dependencies plugin, 2.6.0
* Microsoft Application Insights XHR dependencies plugin, 2.6.1
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ *

{
"name": "@microsoft/applicationinsights-dependencies-js",
"version": "2.6.0",
"version": "2.6.1",
"description": "Microsoft Application Insights XHR dependencies plugin",

@@ -44,6 +44,6 @@ "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",

"@microsoft/applicationinsights-shims" : "1.0.3",
"@microsoft/applicationinsights-core-js": "2.6.0",
"@microsoft/applicationinsights-common": "2.6.0"
"@microsoft/applicationinsights-core-js": "2.6.1",
"@microsoft/applicationinsights-common": "2.6.1"
},
"license": "MIT"
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc