@microsoft/applicationinsights-dependencies-js 2.8.0-beta.2202-06 → 2.8.0-beta.2202-07
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +1 -1
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +1 -1
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +1 -1
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +1 -1
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/TraceParent.js +1 -1
- package/dist-esm/ajax.js +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2202-
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2202-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
var e=this,t=function(t){"use strict";var i="function",s="object",o="undefined",P="prototype",a="hasOwnProperty",n=Object,u=n[P],e=n.assign,r=n.create,c=n.defineProperty,p=u[a],d=null;function W(e){return void 0===e&&(e=!0),d&&e||(typeof globalThis!==o&&globalThis&&(d=globalThis),typeof self!==o&&self&&(d=self),typeof window!==o&&window&&(d=window),typeof global!==o&&global&&(d=global)),d}function f(e){throw new TypeError(e)}(W()||{}).Symbol,(W()||{}).Reflect;var z=e||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])u[a].call(t,o)&&(e[o]=t[o]);return e},h=function(e,t){return(h=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[a](n)&&(e[n]=t[n])})(e,t)};function m(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&f("Class extends value "+t+" is not a constructor or null"),h(e,t),e[P]=null===t?function(e){if(r)return r(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&f("Object prototype may only be an Object:"+e),n[P]=e,new n}(t):(n[P]=t[P],new n)}var v="constructor",x="prototype",y="function",T="_dynInstFuncs",I="_isDynProxy",b="_dynClass",A="_dynInstChk",S=A,w="_dfOpts",M="_unknown_",q="__proto__",F="useBaseInst",R="setInstFuncs",D=Object,L=D.getPrototypeOf,E=0;function k(e,t){return e&&D[x].hasOwnProperty.call(e,t)}function j(e){return e&&(e===D[x]||e===Array[x])}function H(e){return j(e)||e===Function[x]}function B(e){if(e){if(L)return L(e);e=e[q]||e[x]||(e[v]?e[v][x]:null);if(e)return e}return null}function K(e,t){var n=[],r=D.getOwnPropertyNames;if(r)n=r(e);else for(var o in e)"string"==typeof o&&k(e,o)&&n.push(o);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function X(e,t,n){return t!==v&&typeof e[t]===y&&(n||k(e,t))}function G(e){throw new TypeError("DynamicProto: "+e)}function $(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function J(e,t){return k(e,x)?e.name||t||M:((e||{})[v]||{}).name||t||M}function Y(e,r,t,n){k(e,x)||G("theClass is an invalid class definition.");var c,o,a,i,d,f,s=e[x],u=(function(e){if(L)for(var t=[],n=B(r);n&&!H(n)&&!$(t,n);){if(n===e)return 1;t.push(n),n=B(n)}}(s)||G("["+J(e)+"] is not in class hierarchy of ["+J(r)+"]"),null),e=(k(s,b)?u=s[b]:(u="_dynCls$"+J(e,"_")+"$"+E,E++,s[b]=u),Y[w]),l=!!e[F],p=(l&&n&&n[F]!==undefined&&(l=!!n[F]),o={},K(c=r,function(e){!o[e]&&X(c,e,!1)&&(o[e]=c[e])}),o),l=(t(r,function(e,t,n,a){function r(e,t,n){var r,o=t[n];return o[I]&&a&&!1!==(r=e[T]||{})[S]&&(o=(r[t[b]]||{})[n]||o),function(){return o.apply(e,arguments)}}for(var o={},i=(K(n,function(e){o[e]=r(t,n,e)}),B(e)),s=[];i&&!H(i)&&!$(s,i);)K(i,function(e){!o[e]&&X(i,e,!L)&&(o[e]=r(t,i,e))}),s.push(i),i=B(i);return o}(s,r,p,l)),!!L&&!!e[R]);a=s,t=u,i=r,d=p,e=!1!==(l=l&&n?!!n[R]:l),j(a)||(s=i[T]=i[T]||{},f=s[t]=s[t]||{},!1!==s[S]&&(s[S]=!!e),K(i,function(e){var n,r,o;X(i,e,!1)&&i[e]!==d[e]&&(f[e]=i[e],delete i[e],k(a,e)&&(!a[e]||a[e][I])||(a[e]=(n=a,r=e,(o=function(){var e,t;return(function(e,t,n,c){var r=null;if(e&&k(n,b)){var o=e[T]||{};if((r=(o[n[b]]||{})[t])||G("Missing ["+t+"] "+y),!r[A]&&!1!==o[S]){for(var a=!k(e,t),i=B(e),s=[];a&&i&&!H(i)&&!$(s,i);){var u=i[t];if(u){a=u===c;break}s.push(i),i=B(i)}try{a&&(e[t]=r),r[A]=1}catch(l){o[S]=!1}}}return r}(this,r,n,o)||(typeof(t=(t=n[e=r])===o?B(n)[e]:t)!==y&&G("["+e+"] is not a "+y),t)).apply(this,arguments)})[I]=1,o)))}))}Y[w]={setInstFuncs:!0,useBaseInst:!0},(e=g=g||{})[e.CRITICAL=1]="CRITICAL",e[e.WARNING=2]="WARNING";var g,N={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,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105},Z="attachEvent",Q="addEventListener",ee="toISOString",te="trim",e="toString",ne="constructor",re=c,c=n.freeze,oe=n.keys,ae=String[P][te],ie=Date[P][ee],se=Array.isArray,ue=u[e],le=p[e],ce=le.call(n),de=/-([a-z])/g,fe=/([^\w\d_$])/g,pe=/^(\d+[\w\d_$])/,ge=Object.getPrototypeOf;function he(e){if(e){if(ge)return ge(e);e=e.__proto__||e[P]||e[ne];if(e)return e}return null}function me(e){return e===undefined||typeof e===o}function _(e){return null===e||me(e)}function ve(e){return!(!e||typeof e!==s)}function O(e){return!(!e||typeof e!==i)}function xe(e,t){if(e)for(var n in e)p.call(e,n)&&t.call(e,n,e[n])}function ye(e,t){return!(!e||!t||!~e.indexOf(t))}var Ce=se||function(e){return!(!e||"[object Array]"!==ue.call(e))};function Te(e){return"string"==typeof e}function Ie(e){return e&&"object"==typeof e&&(!(e=(ge||he)(e))||typeof(e=e[ne]&&p.call(e,ne)?e[ne]:e)===i&&le.call(e)===ce)}function be(e,t,n){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===t.call(n||e,e[o],o,e));o++);}catch(a){}}function Ae(e){return e&&(ae&&e[te]?e[te]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Se=!{toString:null}.propertyIsEnumerable("toString"),we=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Me(e){var t=typeof e;if(t===i||t===s&&null!==e||f("objKeys called on non-object"),!Se&&oe)return oe(e);var n,r=[];for(n in e)e&&p.call(e,n)&&r.push(n);if(Se)for(var o=we.length,a=0;a<o;a++)e&&p.call(e,we[a])&&r.push(we[a]);return r}var qe=c||function(e){return e};function Fe(){var e=Date;return e.now?e.now():(new e).getTime()}var Re="window",De="documentMode",Le="performance",Ee="JSON",ke="msie",je="trident/",He="XMLHttpRequest",Pe=null,Ne=null;function l(e){var t=W();return t&&t[e]?t[e]:e===Re&&typeof window===s&&window?window:null}function _e(){return typeof document===s&&document?document:l("document")}function Oe(){return typeof navigator===s&&navigator?navigator:l("navigator")}function Ue(){return l(Le)}function Ve(){return typeof JSON===s&&JSON||null!==l(Ee)}function We(){return Ve()?JSON||l(Ee):null}function ze(e){var t=Object[P].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ve()&&(n=We().stringify(e)),t+n}var Be=null;function Ke(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function Xe(e,t){var n,r=typeof console!==o?console:l("console");r&&(n="log",O(r[n=r[e]?e:n])&&r[n](t))}$e.dataType="MessageData";var Ge=$e;function $e(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",Ve()&&(n=We().stringify(r)),e=(t?" message:"+Ke(t):"")+(r?" props:"+Ke(n):"");this.message+=e}var Je=function cn(o){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};Y(cn,this,function(a){function e(e,t){e=o[e];return _(e)?t:e}function i(e,t){var n,r=(n=(n=Be)||!0===o.disableDbgExt?n:Be||(r=l("Microsoft"),Be=r?r.ApplicationInsights:Be))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}_(o)&&(o={}),a.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},a.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},a.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},a.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},a.throwInternal=function(e,t,n,r,o){t=new Ge(t,n,o=void 0!==o&&o,r);if(a.enableDebugExceptions())throw t;n=e===g.CRITICAL?"errorToConsole":"warnToConsole";me(t.message)?i("throw"+(e===g.CRITICAL?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),o?(o=+t.messageId,!u[o]&&e<=r&&(a[n](t.message),u[o]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){Xe("warn",e),i("warning",e)},a.errorToConsole=function(e){Xe("error",e),i("error",e)},a.resetInternalMessageCount=function(){s=0,u={}},a.logInternalMessage=function(e,t){var n,r;s>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,u[n]?r=!1:u[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),s++,i(e===g.CRITICAL?"error":"warn",t)),s===a.maxInternalMessageLimit()&&(r=new Ge(N.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),e===g.CRITICAL?a.errorToConsole(n):a.warnToConsole(n))))}})},Ye=(Ze.ParentContextKey="parent",Ze.ChildrenContextKey="childEvts",Ze);function Ze(e,o,t){var r,a=this,i=!1;a.start=Fe(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},O(o)&&(i=function(e){if(re)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&O(o)&&(r=o(),o=null),r}};return re(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===Ze.ParentContextKey||e===Ze.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===Ze.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===Ze.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(Ze.ChildrenContextKey);if(Ce(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Fe()-a.start,a.exTime=a.time-e,a.complete=function(){},!i&&O(o)&&(a.payload=o())}}var Qe="CoreUtils.doPerf";function et(e,t,n,r,o){if(e)if(e=O(e.getPerfMgr)?e.getPerfMgr():e){var a,i=void 0,s=e.getCtx(Qe);try{if(i=e.create(t(),r,o))return s&&i.setCtx&&(i.setCtx(Ye.ParentContextKey,s),s.getCtx&&s.setCtx&&((a=s.getCtx(Ye.ChildrenContextKey))||(a=[],s.setCtx(Ye.ChildrenContextKey,a)),a.push(i))),e.setCtx(Qe,i),n(i)}catch(u){i&&i.setCtx&&i.setCtx("exception",u)}finally{i&&e.fire(i),e.setCtx(Qe,s)}}return n()}var tt="TelemetryPluginChain",nt="_hasRun",rt="_getTelCtx",ot=0;function at(e,i,n,t){var r=null,o=null,r=t?function(e,t,n,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return it([r],t,n)}(e,i,n,t):e,a={core:function(){return n},diagLog:function(){return(n||{}).logger||new Je(i)},getCfg:function(){return i},getExtCfg:s,getConfig:function(e,t,n){void 0===n&&(n=!1);var r,e=s(e,null);return e&&!_(e[t])?r=e[t]:i&&!_(i[t])&&(r=i[t]),_(r)?n:r},hasNext:function(){return null!=r},getNext:function(){return r},setNext:function(e){r=e},processNext:function(t){u(function(e){e.processTelemetry(t,a)})},iterate:function(t){for(;r;)u(function(e){e=e.getPlugin();e&&t(e)})},createNew:function(e,t){return at((e=Ce(e=void 0===e?null:e)?it(e,i,n,t):e)||r,i,n,t)},onComplete:function(e){o=e}};function s(e,t,n){var r,o,a;return void 0===t&&(t={}),void 0===n&&(n=0),!i||(o=i.extensionConfig)&&e&&(r=o[e]),r?ve(t)&&0!==n&&(a=function f(){var e=arguments,t=e[0]||{},n=e.length,r=!1,o=1;for(0<n&&"boolean"==typeof t&&(r=t,t=e[o]||{},o++),ve(t)||(t={});o<n;o++){var a,i,s,u,l=e[o],c=Ce(l),d=ve(l);for(a in l)(c&&a in l||d&&p.call(l,a))&&(i=l[a],s=void 0,r&&i&&((s=Ce(i))||Ie(i))&&(u=t[a],s?Ce(u)||(u=[]):Ie(u)||(u={}),i=f(r,u,i)),i!==undefined&&(t[a]=i))}return t}(!0,t,r),i&&2===n&&xe(t,function(e){var t;_(a[e])&&(_(t=i[e])||(a[e]=t))})):r=t,r}function u(e){var t=r;t?(r=t.getNext(),e(t)):o&&(o(),o=null)}return a}function it(e,t,n,r){var o,a=null,i=!r;return Ce(e)&&0<e.length&&(o=null,be(e,function(e){(i=!i&&r===e||i)&&e&&O(e.processTelemetry)&&(e=st(e,t,n),a=a||e,o&&o._setNext(e),o=e)})),r&&!a?it([r],t,n):a}function st(u,l,c){var d=null,n=O(u.processTelemetry),r=O(u.setNextPlugin),f=u?u.identifier+"-"+u.priority+"-"+ot++:"Unknown-0-"+ot++,p={getPlugin:function(){return u},getNext:function(){return d},processTelemetry:function(t,e){o(e,function(e){return!!n&&(r&&u.setNextPlugin(d),u.processTelemetry(t,e),!0)},function(e){d.processTelemetry(t,e)},"processTelemetry",function(){return{item:t}},!t.sync)},_id:f,_setNext:function(e){d=e}};function o(r,o,a,i,e,t){r=(r=r||(u&&O(u[rt])?u[rt]():r))||at(p,l,c);var n=u?u.identifier:tt,s=(s=r[nt])||(r[nt]={});et(r.core(),function(){return n+":"+i},function(){var e=!(s[f]=!0);if(r.setNext(d),u)try{var t=d?d._id:"";t&&(s[t]=!1),e=o(r)}catch(n){t=!d||s[d._id];t&&(e=!0),d&&t||r.diagLog().throwInternal(g.CRITICAL,N.PluginException,"Plugin ["+u.identifier+"] failed during "+i+" - "+ze(n)+", run flags: "+ze(s))}d&&!e&&a(r)},e,t)}return qe(p)}var ut="getPlugin",e=function dn(){var s,u,l,t,c=this;function n(e){var t,e=e=void 0===e?null:e;return e||(t=u||at(null,{},c.core),e=l&&l[ut]?t.createNew(null,l[ut]):t.createNew(null,l)),e}s=!1,c.core=null,l=u=null,t=[],Y(dn,c,function(e){e.initialize=function(e,t,n,r){e&&(i="extensionConfig",a=o=[],!e||(a=e[i])!==o&&_(a)&&(e[i]=a=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var o,a,i=l;l&&l[ut]&&(i=l[ut]()),c.core=t,u=at(r,e,t,i),s=!0},e._addHook=function(e){e&&(Ce(e)?t=t.concat(e):t.push(e))}}),c.diagLog=function(e){return n(e).diagLog()},c.isInitialized=function(){return s},c.setInitialized=function(e){s=e},c.setNextPlugin=function(e){l=e},c.processNext=function(e,t){t?t.processNext(e):l&&O(l.processTelemetry)&&l.processTelemetry(e,null)},c._getTelCtx=n},lt=4294967296,ct=4294967295,dt=!1,ft=123456789,pt=987654321;function gt(e){var t,n=0,r=l("crypto")||l("msCrypto");if(0===(n=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&ct:n)&&(!(r=Oe())||r.userAgent===Ne&&null!==Pe||(r=((Ne=r.userAgent)||"").toLowerCase(),Pe=ye(r,ke)||ye(r,je)),Pe)){if(!dt)try{var o=2147483647&Fe();(t=(Math.random()*lt^o)+o)<0&&(t>>>=0),ft=123456789+t&ct,pt=987654321-t&ct,dt=!0}catch(a){}r=((pt=36969*(65535&pt)+(pt>>16)&ct)<<16)+(65535&(ft=18e3*(65535&ft)+(ft>>16)&ct))>>>0&ct|0,n=(r>>>=0)&ct}return 0===n&&(n=Math.floor(lt*Math.random()|0)),e||(n>>>=0),n}function ht(){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=gt())]+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 o=t[8+(3>())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+o+n.substr(16,3)+n.substr(19,12)}var mt="_aiHooks",vt=["req","rsp","hkErr","fnErr"];function xt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function yt(e,i,s,u,l){0<=l&&l<=2&&xt(e,function(e,t){var e=e.cbks,n=e[vt[l]];if(n){i.ctx=function(){return u[t]=u[t]||{}};try{n.apply(i.inst,s)}catch(o){n=i.err;try{var r=e.hkErr;r&&(i.err=o,r.apply(i.inst,s))}catch(a){}finally{i.err=n}}}})}function Ct(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=a([],n))[e]=t,o=a([r],n)}},t=[],o=a([r],n);function a(t,e){return xt(e,function(e){t.push(e)}),t}r.evt=l("event"),yt(e,r,o,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,yt(e,r,o,t,3),s}return yt(e,r,o,t,1),r.rslt}}function Tt(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){e=function a(e,t,n){var r=null;return e&&(p.call(e,t)?r=e:n&&(r=a(he(e),t,!1))),r}(e,t,r);if(e){var o,r=e[t];if(typeof r===i)return(o=r[mt])||((r=Ct(o={i:0,n:t,f:r,h:[]}))[mt]=o,e[t]=r),t={id:o.i,cbks:n,rm:function(){var n=this.id;xt(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}},o.i++,o.h.push(t),t}}return null}function It(e,t,n){var r,o,a=t.length,i=(e=e,(t=t)&&150<(t=Ae(t.toString())).length&&(o=t.substring(0,150),e&&e.throwInternal(g.WARNING,N.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),o||t);if(i.length!==a){for(var s=0,u=i;n[u]!==undefined;)s++,u=i.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));i=u}return i}function bt(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=Ae(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(g.WARNING,N.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function At(e,t){var n,r=N.UrlTooLong;return t&&2048<(t=Ae(t)).length&&(n=t.substring(0,2048),e&&e.throwInternal(g.WARNING,r,"input is too long, it has been truncated to 2048 characters.",{data:t},!0)),n||t}function St(r,e){var o;return e&&(o={},xe(e,function(e,t){if(ve(t)&&Ve())try{t=We().stringify(t)}catch(n){r&&r.throwInternal(g.WARNING,N.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=bt(r,t,8192),e=It(r,e,o),o[e]=t}),e=o),e}function wt(e){var t=""+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5),e=1===(e=""+e%1e3).length?"00"+e:2===e.length?"0"+e:e,t=t.length<2?"0"+t:t,n=n.length<2?"0"+n:n;return(0<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var Mt,qt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Ft="iKey",Rt=((se=Mt={})[se.AI=0]="AI",se[se.AI_AND_W3C=1]="AI_AND_W3C",se[se.W3C=2]="W3C",_e()||{}),Dt=0,Lt=[null,null,null,null,null];function Et(n){var e=Dt,t=Lt,r=t[e];return Rt.createElement?t[e]||(r=t[e]=Rt.createElement("a")):r={host:function(){var e=kt(n,!0)||"";if(e){var t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&Te(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return e}()},r.href=n,++e>=t.length&&(e=0),Dt=e,r}function kt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&Te(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 jt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Ht={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 o=Et(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(kt(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&o&&o!==n)return!1;var a,n=e&&e.correlationHeaderDomains;if(n&&(be(n,function(e){e=RegExp(e.toLowerCase().replace(/\\/g,"\\\\").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,"\\.").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if(e){e=Ht.getCorrelationContextValue(e,"appId");if(e&&e!==Ht.correlationIdPrefix)return e}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var o=n[r].split("=");if(2===o.length&&o[0]===t)return o[1]}}};function Pt(){var e=Ue();if(e&&e.now&&e.timing){e=e.now()+e.timing.navigationStart;if(0<e)return e}return Fe()}function Nt(e,t){return 0===e||0===t||_(e)||_(t)?null:t-e}m(Ut,_t=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Ut.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ut.dataType="RemoteDependencyData";var _t,Ot=Ut;function Ut(e,t,n,c,r,d,o,a,i,f,p,g){void 0===i&&(i="Ajax");var s,h,m,u,l=_t.call(this)||this,n=(l.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},l.id=t,l.duration=wt(r),l.success=d,l.resultCode=o+"",l.type=bt(e,i),t=e,r=a,i=o=d=c,o=(a=n)&&0<a.length?(h=(n=Et(a)).host,o||(null!=n.pathname?("/"!=((s=0===n.pathname.length?"/":n.pathname)[0]||"")&&(s="/"+s),i=n.pathname,bt(t,r?r+" "+s:s)):bt(t,a))):h=d,{target:h,name:o,data:i});return l.data=At(e,c)||n.data,l.target=bt(e,n.target),f&&(l.target="".concat(l.target," | ").concat(f)),l.name=bt(e,n.name),l.properties=St(e,p),l.measurements=(m=e,(r=g)&&(u={},xe(r,function(e,t){e=It(m,e,u),u[e]=t}),r=u),r),l}Wt.create=function(e,t,n,r,o,a){if(n=bt(r,n)||"not_specified",_(e)||_(t)||_(n))throw Error("Input doesn't contain all required fields");var r="",i=(e[Ft]&&(r=e[Ft],delete e[Ft]),{name:n,time:function(e){if(e){if(ie)return e[ee]();var t;return e&&e.getUTCFullYear?(t=function(e){e=""+e;return 1===e.length?"0"+e:e},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"):void 0}}(new Date),iKey:r,ext:a||{},tags:[],data:{},baseType:t,baseData:e});return _(o)||xe(o,function(e,t){i.data[e]=t}),i};var Vt=Wt;function Wt(){}var C="properties";function zt(e,t,n){t=e[t],n=e[n];return t&&n?Nt(t,n):0}function Bt(e,t,n,r,o){n=zt(n,r,o);return n?Kt(e,t,wt(n)):0}function Kt(e,t,n){var r="ajaxPerf",o=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,o=1),o}var Xt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Gt=function fn(e,t,n){var r=this,o=n,y="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 Xt,r.clientFailure=0,r.traceID=e,r.spanID=t,Y(fn,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=Et(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?At(o,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,c,d){if(x.ajaxTotalDuration=Math.round(1e3*Nt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0)return 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})[C]={HttpMethod:x.method};var f,p,o,t,n,r,a,i,s,u,l,g,h,m,v;return x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),t=(f=x).perfTiming,n=(p=e)[C]||{},r=0,a="duration",i="startTime",s="connect"+"End",u="request"+"Start",l="response"+"End",g="transferSize",h="encodedBodySize",m="decodedBodySize",v="serverTiming",t?(r=(r=(r=(r=(r=(r=(r|=Bt(n,"End",t,"redirectStart","End"))|Bt(n,"domainLookup",t,"domainLookupStart","domainLookupEnd"))|Bt(n,"connect",t,"connectStart",s))|Bt(n,"request",t,u,"requestEnd"))|Bt(n,"response",t,"responseStart",l))|Bt(n,"networkConnect",t,i,s))|Bt(n,"sentRequest",t,u,l),r=(r|=Kt(n,a,s=t[a]||zt(t,i,l)||0))|Kt(n,"perfTotal",s),(u=t[v])&&(o={},be(u,function(e,t){var n,t=e.name||""+t,t=n=(n=t)&&Te(t)?(n=(n=t.replace(de,function(e,t){return t.toUpperCase()})).replace(fe,"_")).replace(pe,function(e,t){return"_"+t}):n,r=o[t]||{};xe(e,function(e,t){("name"!==e&&Te(t)||"number"==typeof t)&&(!(t=r[e]?r[e]+";"+t:t)&&Te(t)||(r[e]=t))}),o[t]=r}),r|=Kt(n,v,o)),r=(r=(r|=Kt(n,g,t[g]))|Kt(n,h,t[h]))|Kt(n,m,t[m])):f.perfMark&&(r|=Kt(n,"missing",f.perfAttempts)),r&&(p[C]=n),c&&0<Me(x.requestHeaders).length&&(e[C]=e[C]||{},e[C].requestHeaders=x.requestHeaders),!d||(a=d())&&((i=a.correlationContext)&&(e.correlationContext=i),a.headerMap&&0<Me(a.headerMap).length&&(e[C]=e[C]||{},e[C].responseHeaders=a.headerMap),x.errorStatusText&&400<=x.status&&(l=a.type,e[C]=e[C]||{},""!==l&&"text"!==l||(e[C][y]=a[y]?a.statusText+" - "+a[y]:a.statusText),"json"===l&&(e[C][y]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText))),e}})},$t=(Jt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Jt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Jt.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},Jt.DEFAULT_TRACE_FLAG="01",Jt.DEFAULT_VERSION="00",Jt);function Jt(e,t){var n=this;n.traceFlag=Jt.DEFAULT_TRACE_FLAG,n.version=Jt.DEFAULT_VERSION,e&&Jt.isValidTraceId(e)?n.traceId=e:n.traceId=ht(),t&&Jt.isValidSpanId(t)?n.spanId=t:n.spanId=ht().substr(0,16)}var Yt="ai.ajxmn.",Zt="diagLog",U="ajaxData",Qt="throwInternal",en="fetch",tn=0;function nn(e){var t=!1,n=(function(){var e=!1;try{e=!!l(He)}catch(t){}return e}()&&(t=!(_(n=XMLHttpRequest[P])||_(n.open)||_(n.send)||_(n.abort))),function(e){var t=((e=(e=void 0===e?null:e)?e:(t=Oe()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(ye(t,ke))return e=_e()||{},Math.max(parseInt(t.split(ke)[1]),e[De]||0);if(ye(t,je)){e=parseInt(t.split(je)[1]);if(e)return e+4}return null}());if(t=!(n&&n<9)&&t)try{(new XMLHttpRequest)[U]={};var r=XMLHttpRequest[P].open;XMLHttpRequest[P].open=r}catch(o){t=!1,on(e,N.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:ze(o)})}return t}function rn(e){var t="";try{_(e)||_(e[U])||_(e[U].requestUrl)||(t+="(url: '"+e[U].requestUrl+"')")}catch(n){}return t}function on(e,t,n,r,o){e[Zt]()[Qt](g.CRITICAL,t,n,r,o)}function an(e,t,n,r,o){e[Zt]()[Qt](g.WARNING,t,n,r,o)}function sn(t,n,r){return function(e){on(t,n,r,{ajaxDiagnosticsMessage:rn(e.inst),exception:ze(e.err)})}}function un(e,t){return e&&t?e.indexOf(t):-1}m(V,ln=e),V.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:undefined,disableCorrelationHeaders:!1,distributedTracingMode:Mt.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,correlationHeaderExcludePatterns:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"],addRequestContext:undefined}},V.getEmptyConfig=function(){var t=this.getDefaultConfig();return xe(t,function(e){t[e]=undefined}),t},V.prototype.processTelemetry=function(e,t){this.processNext(e,t)},V.identifier="AjaxDependencyPlugin";var ln,c=V;function V(){var y,C,q,F,R,T,D,e=ln.call(this)||this,I=(e.identifier=V.identifier,e.priority=120,"trackDependencyDataInternal"),t=typeof location===s&&location?location:l("location"),L=!1,b=!1,E=t&&t.host&&t.host.toLowerCase(),A=V.getEmptyConfig(),S=!1,r=0,k=!1,w=0,j=!1,M=[],H={};return Y(V,e,function(c,s){function d(t){var n=!0;return(t||A.ignoreHeaders)&&be(A.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function u(e,t,n){M.push(e?Tt(e[P],t,n,!1):null)}function f(e,t,n){var r=!1,o=((Te(t)?t:(t||{}).url||"")||"").toLowerCase();if(be(R,function(e){var t=e;Te(e)&&(t=RegExp(e)),r=r||t.test(o)}),r)return r;var a=un(o,"?"),i=un(o,"#");return-1!==(a=-1===a||-1!==i&&i<a?i:a)&&(o=o.substring(0,a)),_(e)?_(t)||(r="object"==typeof t&&!0===t[qt]||!!n&&!0===n[qt]):r=!0===e[qt]||!0===o[qt],(r=!(r||!o||(i=o,!~jt.indexOf(i.toLowerCase())))||r)?H[o]||(H[o]=1):H[o]&&(r=!0),r}function p(e,t){var n=!0,r=b;return _(e)||(n=!0===t||!_(e[U])),r&&n}function v(n){n[U].xhrMonitoringState.stateChangeAttached=function(e,t,n,r){void 0===r&&(r=!1);var o=!1;if(!_(e))try{_(e[Q])?_(e[Z])||(e[Z]("on"+t,n),o=!0):(e[Q](t,n,r),o=!0)}catch(a){}return o}(n,"readystatechange",function(){try{n&&4===n.readyState&&p(n)&&((a=(o=n)[U]).responseFinishedTime=Pt(),a.status=o.status,l("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",S,function(){var e,n,t={statusText:o.statusText,headerMap:null,correlationContext:i(o),type:o.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};return!j||(e=o.getAllResponseHeaders())&&(e=Ae(e).split(/[\r\n]+/),n={},be(e,function(e){var e=e.split(": "),t=e.shift(),e=e.join(": ");d(t)&&(n[t]=e)}),t.headerMap=n),t}),t=void 0;try{T&&(t=T({status:o.status,xhr:o}))}catch(n){an(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}e?(t!==undefined&&(e.properties=z(z({},e.properties),t)),c[I](e)):r(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{o[U]=null}catch(n){}}},function(e){r(e,null)}))}catch(t){var e=ze(t);e&&-1!==un(e.toLowerCase(),"c00c023f")||on(c,N.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:rn(n),exception:e})}function r(e,t){t=t||{};t.ajaxDiagnosticsMessage=rn(o),e&&(t.exception=ze(e)),an(c,N.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var o,a})}function i(e){try{var t,n=e.getAllResponseHeaders();if(null!==n&&-1!==un(n.toLowerCase(),"request-context"))return t=e.getResponseHeader("Request-Context"),Ht.getCorrelationContext(t)}catch(r){an(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:rn(e),exception:ze(r)})}}function g(e,t){var n;t.requestUrl&&F&&k&&(n=Ue())&&O(n.mark)&&(e=F+e+"#"+ ++tn,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function l(a,i,s,u){var l=i.perfMark,c=Ue(),d=A.maxAjaxPerfLookupAttempts,h=A.ajaxPerfLookupDelay,f=i.requestUrl,p=0;!function g(){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!==a||-1===un(r.name,f)&&-1===un(f,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&&O(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=p,s()):setTimeout(g,h)}catch(o){u(o)}}()}function h(e){var t="";try{_(e)||(t+="(url: '".concat("string"==typeof e?e:e.url,"')"))}catch(n){on(c,N.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:ze(n)})}return t}function m(e,r,o,a,i,s){function u(e,t,n){n=n||{};n.fetchDiagnosticsMessage=h(o),t&&(n.exception=ze(t)),an(c,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}i&&(i.responseFinishedTime=Pt(),i.status=r,l("fetch",i,function(){var e,t=i.CreateTrackItem("Fetch",S,s);try{T&&(e=T({status:r,request:o,response:a}))}catch(n){an(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}t?(e!==undefined&&(t.properties=z(z({},t.properties),e)),c[I](t)):u(N.FailedMonitorAjaxDur,null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})},function(e){u(N.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get("Request-Context");return Ht.getCorrelationContext(t)}catch(n){an(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:h(e),exception:ze(n)})}}c.initialize=function(e,t,n,r){if(!c.isInitialized()){s.initialize(e,t,n,r);var o=c._getTelCtx(),t=(xe(V.getDefaultConfig(),function(e,t){A[e]=o.getConfig(V.identifier,e,t)}),A.distributedTracingMode);if(S=A.enableRequestHeaderTracking,D=A.enableAjaxErrorStatusText,k=A.enableAjaxPerfTracking,w=A.maxAjaxCallsPerView,j=A.enableResponseHeaderTracking,R=A.excludeRequestFromAutoTrackingPatterns,T=A.addRequestContext,q=t===Mt.AI||t===Mt.AI_AND_W3C,C=t===Mt.AI_AND_W3C||t===Mt.W3C,k&&(r=e.instrumentationKey||"unkwn",F=5<r.length?Yt+r.substring(r.length-5)+".":Yt+r+"."),!1===A.disableAjaxTracking&&nn(c)&&!b&&(u(XMLHttpRequest,"open",{req:function(e,t,n,r){var o,a,e=e.inst,i=e[U];!f(e,n)&&p(e,!0)&&(i&&i.xhrMonitoringState.openDone||(i=e,t=t,n=n,r=r,a=y&&y.telemetryTrace&&y.telemetryTrace.traceID||ht(),o=ht().substr(0,16),(a=new Gt(a,o,c[Zt]())).method=t,a.requestUrl=n,a.xhrMonitoringState.openDone=!0,a.requestHeaders={},a["async"]=r,a.errorStatusText=D,i[U]=a),v(e))},hkErr:sn(c,N.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"send",{req:function(e,t){var e=e.inst,n=e[U];p(e)&&!n.xhrMonitoringState.sendDone&&(g("xhr",n),n.requestSentTime=Pt(),c.includeCorrelationHeaders(n,undefined,undefined,e),n.xhrMonitoringState.sendDone=!0)},hkErr:sn(c,N.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"abort",{req:function(e){var e=e.inst,t=e[U];p(e)&&!t.xhrMonitoringState.abortDone&&(t.aborted=1,t.xhrMonitoringState.abortDone=!0)},hkErr:sn(c,N.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),S&&u(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){e=e.inst;p(e)&&d(t)&&(e[U].requestHeaders[t]=n)},hkErr:sn(c,N.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),b=!0),(e=!(t=W())||_(t.Request)||_(t.Request[P])||_(t[en])?null:t[en])&&(r=W(),l=e.polyfill,!1===A.disableFetchTracking?(M.push(Tt(r,en,{req:function(e,t,n){var r,o,a,i,s,u;!L||f(null,t,n)||l&&b||(r=e.ctx(),o=t,a=n,i=y&&y.telemetryTrace&&y.telemetryTrace.traceID||ht(),s=ht().substr(0,16),(i=new Gt(i,s,c[Zt]())).requestSentTime=Pt(),i.errorStatusText=D,o instanceof Request?i.requestUrl=o?o.url:"":i.requestUrl=o,s="GET",a&&a.method?s=a.method:o&&o instanceof Request&&(s=o.method),i.method=s,u={},S&&new Headers((a?a.headers:0)||o instanceof Request&&o.headers||{}).forEach(function(e,t){d(t)&&(u[t]=e)}),i.requestHeaders=u,g("fetch",i),s=i,(a=c.includeCorrelationHeaders(s,t,n))!==n&&e.set(1,a),r.data=s)},rsp:function(e,n){var r=e.ctx().data;r&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,n,t,r,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return j&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,n,null,r,null,e.message),e}))},hkErr:sn(c,N.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),L=!0):l&&M.push(Tt(r,en,{req:function(e,t,n){f(null,t,n)}})),l&&(r[en].polyfill=l)),0<n.length&&n){for(var a=void 0,i=0;!a&&i<n.length;)n[i]&&"AppInsightsPropertiesPlugin"===n[i].identifier&&(a=n[i]),i++;a&&(y=a.context)}}var l},c.teardown=function(){be(M,function(e){e.rm()}),b=L=!(M=[]),c.setInitialized(!1)},c.trackDependencyData=function(e,t){c[I](e,t)},c.includeCorrelationHeaders=function(e,t,n,r){var o,a,i,s=c._currentWindowHost||E;return t?(Ht.canIncludeCorrelationHeader(A,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),q&&(o="|"+e.traceID+"."+e.spanID,n.headers.set("Request-Id",o),S&&(e.requestHeaders["Request-Id"]=o)),(a=A.appId||y&&y.appId())&&(n.headers.set("Request-Context","appId=cid-v1:"+a),S&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),C&&(i=new $t(e.traceID,e.spanID),n.headers.set("traceparent",i.toString()),S&&(e.requestHeaders.traceparent=i.toString()))),n):r?(Ht.canIncludeCorrelationHeader(A,e.getAbsoluteUrl(),s)&&(q&&(o="|"+e.traceID+"."+e.spanID,r.setRequestHeader("Request-Id",o),S&&(e.requestHeaders["Request-Id"]=o)),(a=A.appId||y&&y.appId())&&(r.setRequestHeader("Request-Context","appId=cid-v1:"+a),S&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),C&&(i=new $t(e.traceID,e.spanID),r.setRequestHeader("traceparent",i.toString()),S&&(e.requestHeaders.traceparent=i.toString()))),r):undefined},c[I]=function(e,t,n){-1===w||r<w?(A.distributedTracingMode!==Mt.W3C&&A.distributedTracingMode!==Mt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),_(e.startTime)&&(e.startTime=new Date),e=Vt.create(e,Ot.dataType,Ot.envelopeType,c[Zt](),t,n),c.core.track(e)):r===w&&on(c,N.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}t.AjaxPlugin=c,t.ajaxRecord=Gt;se=t,e="__esModule",c={value:!0},t=Object.defineProperty;if(t)try{return void t(se,e,c)}catch(pn){}typeof c.value!==undefined&&(se[e]=c.value)};"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||{}));
|