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