@microsoft/applicationinsights-react-js 3.2.3 → 3.2.4-nightly.2202-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/browser/applicationinsights-react-js.js +115 -81
- package/browser/applicationinsights-react-js.js.map +1 -1
- package/browser/applicationinsights-react-js.min.js +2 -2
- package/browser/applicationinsights-react-js.min.js.map +1 -1
- package/dist/applicationinsights-react-js.d.ts +1 -1
- package/dist/applicationinsights-react-js.js +115 -81
- package/dist/applicationinsights-react-js.js.map +1 -1
- package/dist/applicationinsights-react-js.min.js +2 -2
- package/dist/applicationinsights-react-js.min.js.map +1 -1
- package/dist/applicationinsights-react-js.rollup.d.ts +1 -1
- package/dist-esm/AppInsightsContext.js +1 -1
- package/dist-esm/AppInsightsErrorBoundary.js +1 -1
- package/dist-esm/Interfaces/IReactExtensionConfig.js +1 -1
- package/dist-esm/ReactPlugin.js +1 -1
- package/dist-esm/applicationinsights-react-js.js +1 -1
- package/dist-esm/useTrackEvent.js +1 -1
- package/dist-esm/useTrackMetric.js +1 -1
- package/dist-esm/withAITracking.js +1 -1
- package/package.json +74 -71
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Plugin, 3.2.
|
|
2
|
+
* Application Insights JavaScript SDK - React Plugin, 3.2.4-nightly.2202-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var t=this,e=function(t,a){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function r(o){if(o&&o.__esModule)return o;var t,a=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var e=(e=Object.getOwnPropertyDescriptor)?e(o,t):undefined,n=a,r=t,e=e.get?e:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(n,r,e)}catch(o){}e&&typeof e.value!==undefined&&(n[r]=e.value)}var e}),a["default"]=o,a}var l=r(a),i=n(a),s="function",T="object",o="undefined",f="prototype",d="hasOwnProperty",C=Object,x=C[f],I=C.assign,A=C.create,w=C.defineProperty,S=x[d],_=null;function b(t){return void 0===t&&(t=!0),_&&t||(typeof globalThis!==o&&globalThis&&(_=globalThis),typeof self!==o&&self&&(_=self),typeof window!==o&&window&&(_=window),typeof global!==o&&global&&(_=global)),_}function E(t){throw new TypeError(t)}function k(t){if(A)return A(t);if(null==t)return{};var e=typeof t;function n(){}return e!==T&&e!==s&&E("Object prototype may only be an Object:"+t),n[f]=t,new n}(b()||{}).Symbol,(b()||{}).Reflect;var P=I||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])x[d].call(e,i)&&(t[i]=e[i]);return t},M=function(t,e){return(M=C.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[d](n)&&(t[n]=e[n])})(t,e)};function L(t,e){function n(){this.constructor=t}typeof e!==s&&null!==e&&E("Class extends value "+e+" is not a constructor or null"),M(t,e),t[f]=null===e?k(e):(n[f]=e[f],new n)}var N="constructor",F="prototype",R="function",O="_dynInstFuncs",j="_isDynProxy",D="_dynClass",U="_dynInstChk",B=U,V="_dfOpts",z="_unknown_",K="__proto__",W="useBaseInst",G="setInstFuncs",H=Object,q=H.getPrototypeOf,J=0;function X(t,e){return t&&H[F].hasOwnProperty.call(t,e)}function Z(t){return t&&(t===H[F]||t===Array[F])}function $(t){return Z(t)||t===Function[F]}function Q(t){if(t){if(q)return q(t);t=t[K]||t[F]||(t[N]?t[N][F]:null);if(t)return t}return null}function Y(t,e){var n=[],r=H.getOwnPropertyNames;if(r)n=r(t);else for(var i in t)"string"==typeof i&&X(t,i)&&n.push(i);if(n&&0<n.length)for(var o=0;o<n.length;o++)e(n[o])}function tt(t,e,n){return e!==N&&typeof t[e]===R&&(n||X(t,e))}function et(t){throw new TypeError("DynamicProto: "+t)}function nt(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function rt(t,e){return X(t,F)?t.name||e||z:((t||{})[N]||{}).name||e||z}function it(t,r,e,n){X(t,F)||et("theClass is an invalid class definition.");var c,i,o,a,f,d,l=t[F],s=(function(t){if(q)for(var e=[],n=Q(r);n&&!$(n)&&!nt(e,n);){if(n===t)return 1;e.push(n),n=Q(n)}}(l)||et("["+rt(t)+"] is not in class hierarchy of ["+rt(r)+"]"),null),t=(X(l,D)?s=l[D]:(s="_dynCls$"+rt(t,"_")+"$"+J,J++,l[D]=s),it[V]),u=!!t[W],p=(u&&n&&n[W]!==undefined&&(u=!!n[W]),i={},Y(c=r,function(t){!i[t]&&tt(c,t,!1)&&(i[t]=c[t])}),i),u=(e(r,function(t,e,n,o){function r(t,e,n){var r,i=e[n];return i[j]&&o&&!1!==(r=t[O]||{})[B]&&(i=(r[e[D]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},a=(Y(n,function(t){i[t]=r(e,n,t)}),Q(t)),l=[];a&&!$(a)&&!nt(l,a);)Y(a,function(t){!i[t]&&tt(a,t,!q)&&(i[t]=r(e,a,t))}),l.push(a),a=Q(a);return i}(l,r,p,u)),!!q&&!!t[G]);o=l,e=s,a=r,f=p,t=!1!==(u=u&&n?!!n[G]:u),Z(o)||(l=a[O]=a[O]||{},d=l[e]=l[e]||{},!1!==l[B]&&(l[B]=!!t),Y(a,function(t){var n,r,i;tt(a,t,!1)&&a[t]!==f[t]&&(d[t]=a[t],delete a[t],X(o,t)&&(!o[t]||o[t][j])||(o[t]=(n=o,r=t,(i=function(){var t,e;return(function(t,e,n,c){var r=null;if(t&&X(n,D)){var i=t[O]||{};if((r=(i[n[D]]||{})[e])||et("Missing ["+e+"] "+R),!r[U]&&!1!==i[B]){for(var o=!X(t,e),a=Q(t),l=[];o&&a&&!$(a)&&!nt(l,a);){var s=a[e];if(s){o=s===c;break}l.push(a),a=Q(a)}try{o&&(t[e]=r),r[U]=1}catch(u){i[B]=!1}}}return r}(this,r,n,i)||(typeof(e=(e=n[t=r])===i?Q(n)[t]:e)!==R&&et("["+t+"] is not a "+R),e)).apply(this,arguments)})[j]=1,i)))}))}it[V]={setInstFuncs:!0,useBaseInst:!0},(I=u=u||{})[I.CRITICAL=1]="CRITICAL",I[I.WARNING=2]="WARNING";var u,ot={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105},at="attachEvent",lt="addEventListener",st="toISOString",ut=w;function ct(t){return x.toString.call(t)}function p(t){return t===undefined||typeof t===o}function g(t){return null===t||p(t)}function ft(t){return!g(t)}function c(t){return typeof t===s}function dt(t,e,n,r){void 0===r&&(r=!1);var i=!1;if(!g(t))try{g(t[lt])?g(t[at])||(t[at]("on"+e,n),i=!0):(t[lt](e,n,r),i=!0)}catch(o){}return i}function m(t,e){return!(!t||!e||!~t.indexOf(e))}function pt(t){return"[object Date]"===ct(t)}function gt(t){return"[object Array]"===ct(t)}function mt(t){return"[object Error]"===ct(t)}function vt(t){return"string"==typeof t}function ht(t){return"boolean"==typeof t}function yt(t,e,n){var r=t.length;try{for(var i=0;i<r&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(o){}}function Tt(t,e,n){var r=t.length,n=n||0;try{for(var i=Math.max(0<=n?n:r-Math.abs(n),0);i<r;i++)if(i in t&&t[i]===e)return i}catch(o){}return-1}function Ct(t){return"string"!=typeof t?t:t.replace(/^\s+|\s+$/g,"")}var xt=!{toString:null}.propertyIsEnumerable("toString"),It=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function At(t,e,n,r){if(ut)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),ut(t,e,i),!0}catch(o){}return!1}function v(){var t=Date;return t.now?t.now():(new t).getTime()}function wt(t,e,n,r,i){var o=n;return t&&((o=t[e])===n||i&&!i(o)||r&&!r(n)||(t[e]=o=n)),o}function St(t){return!!t}var _t="window",bt="navigator",Et="location",kt="JSON",Pt="crypto",Mt="msCrypto",Lt="msie",Nt="trident/",Ft=null,Rt=null;function h(t){var e=b();return e&&e[t]?e[t]:t===_t&&Ot()?window:null}function Ot(){return typeof window===T&&window}function jt(){return typeof document===T&&document?document:h("document")}function Dt(){return typeof navigator===T&&navigator?navigator:h(bt)}function Ut(){return typeof JSON===T&&JSON||null!==h(kt)}function Bt(){return Ut()?JSON||h(kt):null}function Vt(){var t=Dt();return!t||t.userAgent===Rt&&null!==Ft||(t=((Rt=t.userAgent)||"").toLowerCase(),Ft=m(t,Lt)||m(t,Nt)),Ft}function zt(t){var e=Object[f].toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":Ut()&&(n=Bt().stringify(t)),e+n}var Kt=null;function Wt(t){return t?'"'+t.replace(/\"/g,"")+'"':""}function Gt(t,e){var n,r=typeof console!==o?console:h("console");r&&(n="log",c(r[n=r[t]?t:n])&&r[n](e))}qt.dataType="MessageData";var Ht=qt;function qt(t,e,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n="",Ut()&&(n=Bt().stringify(r)),t=(e?" message:"+Wt(e):"")+(r?" props:"+Wt(n):"");this.message+=t}var Jt=function He(i){this.identifier="DiagnosticLogger",this.queue=[];var l=0,s={};it(He,this,function(o){function t(t,e){t=i[t];return g(t)?e:t}function a(t,e){var n,r=(n=(n=Kt)||!0===i.disableDbgExt?n:Kt||(r=h("Microsoft"),Kt=r?r.ApplicationInsights:Kt))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(t,e)}g(i)&&(i={}),o.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},o.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},o.throwInternal=function(t,e,n,r,i){e=new Ht(e,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw e;n=t===u.CRITICAL?"errorToConsole":"warnToConsole";p(e.message)?a("throw"+(t===u.CRITICAL?"Critical":"Warning"),e):(r=o.consoleLoggingLevel(),i?(i=+e.messageId,!s[i]&&t<=r&&(o[n](e.message),s[i]=!0)):t<=r&&o[n](e.message),o.logInternalMessage(t,e))},o.warnToConsole=function(t){Gt("warn",t),a("warning",t)},o.errorToConsole=function(t){Gt("error",t),a("error",t)},o.resetInternalMessageCount=function(){l=0,s={}},o.logInternalMessage=function(t,e){var n,r;l>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+e.messageId,s[n]?r=!1:s[n]=!0,r&&(t<=o.telemetryLoggingLevel()&&(o.queue.push(e),l++,a(t===u.CRITICAL?"error":"warn",e)),l===o.maxInternalMessageLimit()&&(r=new Ht(ot.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),t===u.CRITICAL?o.errorToConsole(n):o.warnToConsole(n))))}})},Xt=(Zt.ParentContextKey="parent",Zt.ChildrenContextKey="childEvts",Zt);function Zt(t,i,e){var n,o=this,a=!1;o.start=v(),o.name=t,o.isAsync=e,o.isChildEvt=function(){return!1},c(i)&&(a=At(o,"payload",function(){return!n&&c(i)&&(n=i(),i=null),n})),o.getCtx=function(t){return t?(t===Zt.ParentContextKey||t===Zt.ChildrenContextKey?o:o.ctx||{})[t]:null},o.setCtx=function(t,e){t&&(t===Zt.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=e):t===Zt.ChildrenContextKey?o[t]=e:(o.ctx=o.ctx||{})[t]=e)},o.complete=function(){var t=0,e=o.getCtx(Zt.ChildrenContextKey);if(gt(e))for(var n=0;n<e.length;n++){var r=e[n];r&&(t+=r.time)}o.time=v()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&c(i)&&(o.payload=i())}}var $t="CoreUtils.doPerf";function Qt(t,e,n,r,i){if(t)if(t=c(t.getPerfMgr)?t.getPerfMgr():t){var o,a=void 0,l=t.getCtx($t);try{if(a=t.create(e(),r,i))return l&&a.setCtx&&(a.setCtx(Xt.ParentContextKey,l),l.getCtx&&l.setCtx&&((o=l.getCtx(Xt.ChildrenContextKey))||(o=[],l.setCtx(Xt.ChildrenContextKey,o)),o.push(a))),t.setCtx($t,a),n(a)}catch(s){a&&a.setCtx&&a.setCtx("exception",s)}finally{a&&t.fire(a),t.setCtx($t,l)}}return n()}var Yt=function(i,e){var o=this,a=null,l=c(i.processTelemetry),s=c(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return a},o.setNext=function(t){a=t},o.processTelemetry=function(n,r){r=r||e;var t=i?i.identifier:"TelemetryPluginChain";Qt(r?r.core():null,function(){return t+":processTelemetry"},function(){if(i&&l){o._hasRun=!0;try{r.setNext(a),s&&i.setNextPlugin(a),a&&(a._hasRun=!1),i.processTelemetry(n,r)}catch(e){var t=a&&a._hasRun;a&&t||r.diagLog().throwInternal(u.CRITICAL,ot.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+zt(e)),a&&!t&&a.processTelemetry(n,r)}}else a&&(o._hasRun=!0,a.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function te(t,e){var n=[];if(t&&0<t.length)for(var r=null,i=0;i<t.length;i++){var o=t[i];o&&c(o.processTelemetry)&&(o=new Yt(o,e),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ee=function qe(t,i,n,e){var r,o,a,l,s=this,u=null;null!==e&&(t&&c(t.getPlugin)?u=function(t,e,n){var r=[],i=!n;if(t)for(;t;){var o=t.getPlugin();!i&&o!==n||(i=!0,r.push(o)),t=t.getNext()}return i||r.push(n),te(r,e)}(t,s,e||t.getPlugin()):e?(r=s,a=t,l=!1,(o=e)&&t&&(a=[],yt(t,function(t){!l&&t!==o||(l=!0,a.push(t))})),o&&!l&&(a=a||[]).push(o),u=te(a,r)):p(e)&&(u=te(t,s))),s.core=function(){return n},s.diagLog=function(){return(n||{}).logger||new Jt(i)},s.getCfg=function(){return i},s.getExtCfg=function(t,e){var n,r;return void 0===e&&(e={}),!i||(r=i.extensionConfig)&&t&&(n=r[t]),n||e},s.getConfig=function(t,e,n){void 0===n&&(n=!1);var r,t=s.getExtCfg(t,null);return t&&!g(t[e])?r=t[e]:i&&!g(i[e])&&(r=i[e]),g(r)?n:r},s.hasNext=function(){return null!=u},s.getNext=function(){return u},s.setNext=function(t){u=t},s.processNext=function(t){var e=u;e&&(u=e.getNext(),e.processTelemetry(t,s))},s.createNew=function(t,e){return new qe((t=void 0===t?null:t)||u,i,n,e)}},ne="getPlugin";function re(){var o=this,a=!1,l=null,s=null;o.core=null,o.diagLog=function(t){return o._getTelCtx(t).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(t){a=t},o.setNextPlugin=function(t){s=t},o.processNext=function(t,e){e?e.processNext(t):s&&c(s.processTelemetry)&&s.processTelemetry(t,null)},o._getTelCtx=function(t){var e,t=t=void 0===t?null:t;return t||(e=l||new ee(null,{},o.core),t=s&&s[ne]?e.createNew(null,s[ne]):e.createNew(null,s)),t},o._baseTelInit=function(t,e,n,r){t&&wt(t,"extensionConfig",[],null,g),!r&&e&&(r=e.getProcessTelContext().getNext());var i=s;s&&s[ne]&&(i=s[ne]()),o.core=e,l=new ee(r,t,e,i),a=!0}}re.prototype.initialize=function(t,e,n,r){this._baseTelInit(t,e,n,r)};var ie="toGMTString",oe="toUTCString",ae="cookie",le="expires",se="enabled",ue="isCookieUseDisabled",ce="disableCookiesUsage",fe="_ckMgr",y="",de=null,pe=null,ge=null,me=jt(),ve={},he={};function ye(t,e){var n=Ce[fe]||he[fe];return n||(n=Ce[fe]=Ce(t,e),he[fe]=n),n}function Te(t){return!t||t.isEnabled()}function Ce(t,i){wt(n=(t=t||he).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,ft,g),wt(n,"path",t.cookiePath||"/",null,g),g(n[se])&&(e=void 0,p(t[ue])||(e=!t[ue]),p(t[ce])||(e=!t[ce]),n[se]=e);var e,n,u=n,c=u.path||"/",f=u.domain,r=!1!==u[se],d={isEnabled:function(){var t=r&&xe(i),e=he[fe];return t&&e&&d!==e?Te(e):t},setEnabled:function(t){r=!1!==t},set:function(t,e,n,r,i){var o,a,l,s=!1;return Te(d)&&(o={},-1!=(l=(a=Ct(e||y)).indexOf(";"))&&(a=Ct(e.substring(0,l)),o=Ie(e.substring(1+l))),wt(o,"domain",r||f,St,p),g(n)||(l=Vt(),!p(o[le])||0<(e=v()+1e3*n)&&((r=new Date).setTime(e),wt(o,le,Ae(r,l?ie:oe)||Ae(r,l?ie:oe)||y,St)),l||wt(o,"max-age",y+n,null,p)),(e=typeof location===T&&location?location:h(Et))&&"https:"===e.protocol&&(wt(o,"secure",null,null,p),(pe=null===pe?!(vt(r=(Dt()||{}).userAgent)&&(m(r,"CPU iPhone OS 12")||m(r,"iPad; CPU OS 12")||m(r,"Macintosh; Intel Mac OS X 10_14")&&m(r,"Version/")&&m(r,"Safari")||m(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,e){if(t){var n=t.length;if(t===e)return 1;if(40<=n){for(var r=n-1,i=39;0<=i;i--){if(t[r]!=e[i])return;r--}return 1}}}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||m(r,"Chrome/5")||m(r,"Chrome/6")||m(r,"UnrealEngine")&&!m(r,"Chrome")||m(r,"UCBrowser/12")||m(r,"UCBrowser/11"))):pe)&&wt(o,"SameSite","None",null,p)),wt(o,"path",i||c,null,p),(u.setCookie||Se)(t,we(a,o)),s=!0),s},get:function(t){var e=y;return Te(d)?(u.getCookie||function(t){var e,n=y;return me&&(e=me[ae]||y,ge!==e&&(ve=Ie(e),ge=e),n=Ct(ve[t]||y)),n})(t):e},del:function(t,e){return!!Te(d)&&d.purge(t,e)},purge:function(t,e){var n,r=!1;return xe(i)&&((n={}).path=e||"/",n[le]="Thu, 01 Jan 1970 00:00:01 GMT",e=n,Vt()||(e["max-age"]="0"),(u.delCookie||Se)(t,we(y,e)),r=!0),r}};return d[fe]=d}function xe(t){if(null===de){de=!1;try{de=(me||{})[ae]!==undefined}catch(n){t&&t.throwInternal(u.WARNING,ot.CannotAccessCookie,"Cannot access document.cookie - "+(mt(e=n)?e.name:""),{exception:zt(n)})}}var e;return de}function Ie(t){var n={};return t&&t.length&&yt(Ct(t).split(";"),function(t){var e;(t=Ct(t||y))&&(-1==(e=t.indexOf("="))?n[t]=null:n[Ct(t.substring(0,e))]=Ct(t.substring(1+e)))}),n}function Ae(t,e){return c(t[e])?t[e]():null}function we(t,e){var n,r=t||y,i=e;if(i)for(var o in i)S.call(i,o)&&(n=o,o=i[o],r+="; "+n+(g(o)?y:"="+o));return r}function Se(t,e){me&&(me[ae]=t+"="+e)}var _e=4294967296,be=4294967295,Ee=!1,ke=123456789,Pe=987654321;function Me(t){t<0&&(t>>>=0),ke=123456789+t&be,Pe=987654321-t&be,Ee=!0}function Le(){try{var t=2147483647&v();Me((Math.random()*_e^t)+t)}catch(e){}}function Ne(t){return 0<t?Math.floor(Fe()/be*(t+1))>>>0:0}function Fe(t){var e=h(Pt)||h(Mt),e=e&&e.getRandomValues?e.getRandomValues(new Uint32Array(1))[0]&be:Vt()?(Ee||Le(),Re()&be):Math.floor(_e*Math.random()|0);return t||(e>>>=0),e}function Re(t){var e=((Pe=36969*(65535&Pe)+(Pe>>16)&be)<<16)+(65535&(ke=18e3*(65535&ke)+(ke>>16)&be))>>>0&be|0;return t||(e>>>=0),e}var Oe,je,De=null,Ue={_canUseCookies:undefined,isTypeof:function(t,e){return typeof t===e},isUndefined:p,isNullOrUndefined:g,hasOwnProperty:function(t,e){return t&&S.call(t,e)},isFunction:c,isObject:function(t){return typeof t===T},isDate:pt,isArray:gt,isError:mt,isString:vt,isNumber:function(t){return"number"==typeof t},isBoolean:ht,toISOString:function(t){var e;if(t)return t[st]?t[st]():pt(t)?(e=function(t){t=""+t;return 1===t.length?"0"+t:t},t.getUTCFullYear()+"-"+e(1+t.getUTCMonth())+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+(""+(t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"):void 0},arrForEach:yt,arrIndexOf:Tt,arrMap:function(t,e,n){var r=t.length,i=n||t,o=Array(r);try{for(var a=0;a<r;a++)a in t&&(o[a]=e.call(i,t[a],t))}catch(l){}return o},arrReduce:function(t,e,n){var r,i=t.length,o=0;if(3<=arguments.length)r=n;else{for(;o<i&&!(o in t);)o++;r=t[o++]}for(;o<i;)o in t&&(r=e(r,t[o],o,t)),o++;return r},strTrim:Ct,objCreate:k,objKeys:function(t){var e,n=typeof t,r=(n===s||n===T&&null!==t||E("objKeys called on non-object"),[]);for(e in t)t&&S.call(t,e)&&r.push(e);if(xt)for(var i=It.length,o=0;o<i;o++)t&&S.call(t,It[o])&&r.push(It[o]);return r},objDefineAccessors:At,addEventHandler:function(t,e){var n=!1,r=Ot()?window:h(_t),r=(r&&(n=dt(r,t,e),n=dt(r.body,t,e)||n),jt());return r&&dt(r,t,e)||n},dateNow:v,isIE:Vt,disableCookies:function(){var t=ye(void 0,void 0),e=Ue._canUseCookies;null===De&&(De=[],Oe=e,At(Ue,"_canUseCookies",function(){return Oe},function(e){Oe=e,yt(De,function(t){t.setEnabled(e)})})),-1===Tt(De,t)&&De.push(t),ht(e)&&t.setEnabled(e),ht(Oe)&&t.setEnabled(Oe),t.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Be,function(t){var e=0|Ne(15);return("x"===t?e:3&e|8).toString(16)})},perfNow:function(){var t=h("performance");return t&&t.now?t.now():v()},newId:function(t){void 0===t&&(t=22);for(var e=Fe()>>>0,n=0,r="";r.length<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(Fe()<<2&4294967295|3&e)>>>0,n=0);return r},randomValue:Ne,random32:Fe,mwcRandomSeed:function(t){t?Me(t):Le()},mwcRandom32:Re,generateW3CId:function(){for(var t,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=e[15&(t=Fe())]+e[t>>4&15]+e[t>>8&15]+e[t>>12&15]+e[t>>16&15]+e[t>>20&15]+e[t>>24&15]+e[t>>28&15];var i=e[8+(3&Fe())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}},Be=/[xy]/g;function e(){var t=null!==je&&je.apply(this,arguments)||this;return t.priority=185,t.identifier="ReactPlugin",t}L(e,je=re),e.prototype.initialize=function(t,e,n,r){var i=this;je.prototype.initialize.call(this,t,e,n,r),this._extensionConfig=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{history:null},yt(n,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(i._analyticsPlugin=t)}),this._extensionConfig.history&&(this.addHistoryListener(this._extensionConfig.history),e={uri:this._extensionConfig.history.location.pathname},this.trackPageView(e))},e.prototype.getCookieMgr=function(){return(e=(t=this.core)?t.getCookieMgr():e)||ye(void 0,(t||{}).logger);var t,e},e.prototype.getAppInsights=function(){return this._analyticsPlugin},e.prototype.processTelemetry=function(t,e){this.processNext(t,e)},e.prototype.trackMetric=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackMetric(t,e):this.diagLog().throwInternal(u.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackPageView=function(t){this._analyticsPlugin?this._analyticsPlugin.trackPageView(t):this.diagLog().throwInternal(u.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackEvent=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackEvent(t,e):this.diagLog().throwInternal(u.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackException=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackException(t,e):this.diagLog().throwInternal(u.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackTrace=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackTrace(t,e):this.diagLog().throwInternal(u.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.addHistoryListener=function(t){var n=this;t.listen(function(t){var e="location"in t?t.location:t;setTimeout(function(){var t={uri:e.pathname};n.trackPageView(t)},500)})};var Ve,ze,I=e;function Ke(){var t=null!==Ve&&Ve.apply(this,arguments)||this;return t.state={hasError:!1},t}ze=3,L(Ke,Ve=i["default"].Component),Ke.prototype.componentDidCatch=function(t,e){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:ze,properties:e})},Ke.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,i["default"].createElement(t)):this.props.children};var w=Ke,We=a.createContext(undefined),w=(t.AppInsightsContext=We,t.AppInsightsErrorBoundary=w,t.ReactPlugin=I,t.useAppInsightsContext=function(){return a.useContext(We)},t.useTrackEvent=function(t,e,n,r){void 0===r&&(r=!0);var n=a.useState(n),i=n[0],n=n[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:e},i)},[t,i,e]),n},t.useTrackMetric=function(n,r){var i=a.useRef({hookTimestamp:v(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=a.useRef();return t.current=function(){var t=i.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&v()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=v(),t.idleCount++)},a.useEffect(function(){var e=setInterval(t.current,100);return function(){clearInterval(e);var t=i.current;if(0===t.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==t.firstActiveTimestamp&&(t=t,t=(v()-t.firstActiveTimestamp-t.totalIdleTime-t.idleCount*t.idleTimeout)/1e3,n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},{"Component Name":r}))}},[]),function(){var t,e=i.current;0===e.firstActiveTimestamp?(e.firstActiveTimestamp=v(),e.lastActiveTimestamp=e.firstActiveTimestamp):e.lastActiveTimestamp=v(),0<e.idleStartTimestamp&&(t=e.lastActiveTimestamp-e.idleStartTimestamp,e.totalIdleTime+=t,e.idleStartTimestamp=0)}},t.withAITracking=function(n,t,r,e){return r!==undefined&&null!==r&&"string"==typeof r||(r=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),e!==undefined&&null!==e&&"string"==typeof e||(e=""),L(i,o=l.Component),i.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=Ue.dateNow(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<t._lastActiveTimestamp&&0===t._idleStartTimestamp&&Ue.dateNow()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=Ue.dateNow(),t._idleCount++)},100)},i.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,e;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),e={"Component Name":r},n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},e))},i.prototype.render=function(){return l.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:e},l.createElement(t,P({},this.props)))},i.prototype.getEngagementTimeSeconds=function(){return(Ue.dateNow()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},i;function i(){var n=null!==o&&o.apply(this,arguments)||this;return n._mountTimestamp=0,n._firstActiveTimestamp=0,n._idleStartTimestamp=0,n._lastActiveTimestamp=0,n._totalIdleTime=0,n._idleCount=0,n._idleTimeout=5e3,n.trackActivity=function(t){var e;0===n._firstActiveTimestamp?(n._firstActiveTimestamp=Ue.dateNow(),n._lastActiveTimestamp=n._firstActiveTimestamp):n._lastActiveTimestamp=Ue.dateNow(),0<n._idleStartTimestamp&&(e=n._lastActiveTimestamp-n._idleStartTimestamp,n._totalIdleTime+=e,n._idleStartTimestamp=0)},n}var o},t),I="__esModule",t={value:!0},Ge=Object.defineProperty;if(Ge)try{return void Ge(w,I,t)}catch(Je){}typeof t.value!==undefined&&(w[I]=t.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
|
|
5
|
+
var e=this,t=function(e,a){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{"default":e}}function r(o){if(o&&o.__esModule)return o;var e,a=(e=Object.create)?e(null):{};return o&&Object.keys(o).forEach(function(e){if("default"!==e){var t=(t=Object.getOwnPropertyDescriptor)?t(o,e):undefined,n=a,r=e,t=t.get?t:{enumerable:!0,get:function(){return o[e]}},i=Object.defineProperty;if(i)try{return void i(n,r,t)}catch(o){}t&&typeof t.value!==undefined&&(n[r]=t.value)}var t}),a["default"]=o,a}var l=r(a),i=n(a),s="function",T="object",o="undefined",f="prototype",d="hasOwnProperty",C=Object,x=C[f],I=C.assign,A=C.create,w=C.defineProperty,S=x[d],_=null;function b(e){return void 0===e&&(e=!0),_&&e||(typeof globalThis!==o&&globalThis&&(_=globalThis),typeof self!==o&&self&&(_=self),typeof window!==o&&window&&(_=window),typeof global!==o&&global&&(_=global)),_}function E(e){throw new TypeError(e)}function k(e){if(A)return A(e);if(null==e)return{};var t=typeof e;function n(){}return t!==T&&t!==s&&E("Object prototype may only be an Object:"+e),n[f]=e,new n}(b()||{}).Symbol,(b()||{}).Reflect;var P=I||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])x[d].call(t,i)&&(e[i]=t[i]);return e},M=function(e,t){return(M=C.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[d](n)&&(e[n]=t[n])})(e,t)};function L(e,t){function n(){this.constructor=e}typeof t!==s&&null!==t&&E("Class extends value "+t+" is not a constructor or null"),M(e,t),e[f]=null===t?k(t):(n[f]=t[f],new n)}var F="constructor",N="prototype",R="function",O="_dynInstFuncs",j="_isDynProxy",D="_dynClass",U="_dynInstChk",B=U,V="_dfOpts",z="_unknown_",K="__proto__",W="useBaseInst",G="setInstFuncs",H=Object,q=H.getPrototypeOf,J=0;function X(e,t){return e&&H[N].hasOwnProperty.call(e,t)}function Y(e){return e&&(e===H[N]||e===Array[N])}function Z(e){return Y(e)||e===Function[N]}function $(e){if(e){if(q)return q(e);e=e[K]||e[N]||(e[F]?e[F][N]:null);if(e)return e}return null}function Q(e,t){var n=[],r=H.getOwnPropertyNames;if(r)n=r(e);else for(var i in e)"string"==typeof i&&X(e,i)&&n.push(i);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function ee(e,t,n){return t!==F&&typeof e[t]===R&&(n||X(e,t))}function te(e){throw new TypeError("DynamicProto: "+e)}function ne(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function re(e,t){return X(e,N)?e.name||t||z:((e||{})[F]||{}).name||t||z}function ie(e,r,t,n){X(e,N)||te("theClass is an invalid class definition.");var c,i,o,a,f,d,l=e[N],s=(function(e){if(q)for(var t=[],n=$(r);n&&!Z(n)&&!ne(t,n);){if(n===e)return 1;t.push(n),n=$(n)}}(l)||te("["+re(e)+"] is not in class hierarchy of ["+re(r)+"]"),null),e=(X(l,D)?s=l[D]:(s="_dynCls$"+re(e,"_")+"$"+J,J++,l[D]=s),ie[V]),u=!!e[W],p=(u&&n&&n[W]!==undefined&&(u=!!n[W]),i={},Q(c=r,function(e){!i[e]&&ee(c,e,!1)&&(i[e]=c[e])}),i),u=(t(r,function(e,t,n,o){function r(e,t,n){var r,i=t[n];return i[j]&&o&&!1!==(r=e[O]||{})[B]&&(i=(r[t[D]]||{})[n]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(Q(n,function(e){i[e]=r(t,n,e)}),$(e)),l=[];a&&!Z(a)&&!ne(l,a);)Q(a,function(e){!i[e]&&ee(a,e,!q)&&(i[e]=r(t,a,e))}),l.push(a),a=$(a);return i}(l,r,p,u)),!!q&&!!e[G]);o=l,t=s,a=r,f=p,e=!1!==(u=u&&n?!!n[G]:u),Y(o)||(l=a[O]=a[O]||{},d=l[t]=l[t]||{},!1!==l[B]&&(l[B]=!!e),Q(a,function(e){var n,r,i;ee(a,e,!1)&&a[e]!==f[e]&&(d[e]=a[e],delete a[e],X(o,e)&&(!o[e]||o[e][j])||(o[e]=(n=o,r=e,(i=function(){var e,t;return(function(e,t,n,c){var r=null;if(e&&X(n,D)){var i=e[O]||{};if((r=(i[n[D]]||{})[t])||te("Missing ["+t+"] "+R),!r[U]&&!1!==i[B]){for(var o=!X(e,t),a=$(e),l=[];o&&a&&!Z(a)&&!ne(l,a);){var s=a[t];if(s){o=s===c;break}l.push(a),a=$(a)}try{o&&(e[t]=r),r[U]=1}catch(u){i[B]=!1}}}return r}(this,r,n,i)||(typeof(t=(t=n[e=r])===i?$(n)[e]:t)!==R&&te("["+e+"] is not a "+R),t)).apply(this,arguments)})[j]=1,i)))}))}ie[V]={setInstFuncs:!0,useBaseInst:!0},(I=u=u||{})[I.CRITICAL=1]="CRITICAL",I[I.WARNING=2]="WARNING";var u,oe={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105},ae="attachEvent",le="addEventListener",se="toISOString",ue="endsWith",ce="indexOf",fe="trim",de="toString",pe=w,I=String[f],ge=I[fe],me=I[ue],ve=Date[f][se],he=Array.isArray;function ye(e){return x[de].call(e)}function p(e){return e===undefined||typeof e===o}function g(e){return null===e||p(e)}function Te(e){return!g(e)}function c(e){return!(!e||typeof e!==s)}function Ce(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!g(e))try{g(e[le])?g(e[ae])||(e[ae]("on"+t,n),i=!0):(e[le](t,n,r),i=!0)}catch(o){}return i}function m(e,t){return!(!e||!t||!~e.indexOf(t))}function xe(e){return he?he(e):!(!e||"[object Array]"!==ye(e))}function Ie(e){return!(!e||"[object Error]"!==ye(e))}function Ae(e){return"string"==typeof e}function we(e){return"boolean"==typeof e}function Se(e,t,n){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}catch(o){}}function _e(e,t,n){if(e){if(e[ce])return e[ce](t,n);var r=e.length,n=n||0;try{for(var i=Math.max(0<=n?n:r-Math.abs(n),0);i<r;i++)if(i in e&&e[i]===t)return i}catch(o){}}return-1}function be(e){return e&&(ge&&e[fe]?e[fe]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}S[de].call(C);var Ee=!{toString:null}.propertyIsEnumerable("toString"),ke=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Pe(e,t,n,r){if(pe)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),pe(e,t,i),!0}catch(o){}return!1}function v(){var e=Date;return e.now?e.now():(new e).getTime()}function Me(e,t,n,r,i){var o=n;return e&&((o=e[t])===n||i&&!i(o)||r&&!r(n)||(e[t]=o=n)),o}function Le(e){return!!e}var Fe="window",Ne="navigator",Re="location",Oe="JSON",je="crypto",De="msCrypto",Ue="msie",Be="trident/",Ve=null,ze=null;function h(e){var t=b();return t&&t[e]?t[e]:e===Fe&&Ke()?window:null}function Ke(){return typeof window===T&&window}function We(){return typeof document===T&&document?document:h("document")}function Ge(){return typeof navigator===T&&navigator?navigator:h(Ne)}function He(){return typeof JSON===T&&JSON||null!==h(Oe)}function qe(){return He()?JSON||h(Oe):null}function Je(){var e=Ge();return!e||e.userAgent===ze&&null!==Ve||(e=((ze=e.userAgent)||"").toLowerCase(),Ve=m(e,Ue)||m(e,Be)),Ve}function Xe(e){var t=Object[f].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":He()&&(n=qe().stringify(e)),t+n}var Ye=null;function Ze(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function $e(e,t){var n,r=typeof console!==o?console:h("console");r&&(n="log",c(r[n=r[e]?e:n])&&r[n](t))}et.dataType="MessageData";var Qe=et;function et(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",He()&&(n=qe().stringify(r)),e=(t?" message:"+Ze(t):"")+(r?" props:"+Ze(n):"");this.message+=e}var tt=function Qt(i){this.identifier="DiagnosticLogger",this.queue=[];var l=0,s={};ie(Qt,this,function(o){function e(e,t){e=i[e];return g(e)?t:e}function a(e,t){var n,r=(n=(n=Ye)||!0===i.disableDbgExt?n:Ye||(r=h("Microsoft"),Ye=r?r.ApplicationInsights:Ye))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}g(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){t=new Qe(t,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw t;n=e===u.CRITICAL?"errorToConsole":"warnToConsole";p(t.message)?a("throw"+(e===u.CRITICAL?"Critical":"Warning"),t):(r=o.consoleLoggingLevel(),i?(i=+t.messageId,!s[i]&&e<=r&&(o[n](t.message),s[i]=!0)):e<=r&&o[n](t.message),o.logInternalMessage(e,t))},o.warnToConsole=function(e){$e("warn",e),a("warning",e)},o.errorToConsole=function(e){$e("error",e),a("error",e)},o.resetInternalMessageCount=function(){l=0,s={}},o.logInternalMessage=function(e,t){var n,r;l>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,s[n]?r=!1:s[n]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),l++,a(e===u.CRITICAL?"error":"warn",t)),l===o.maxInternalMessageLimit()&&(r=new Qe(oe.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),e===u.CRITICAL?o.errorToConsole(n):o.warnToConsole(n))))}})},nt=(rt.ParentContextKey="parent",rt.ChildrenContextKey="childEvts",rt);function rt(e,i,t){var n,o=this,a=!1;o.start=v(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},c(i)&&(a=Pe(o,"payload",function(){return!n&&c(i)&&(n=i(),i=null),n})),o.getCtx=function(e){return e?(e===rt.ParentContextKey||e===rt.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,t){e&&(e===rt.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===rt.ChildrenContextKey?o[e]=t:(o.ctx=o.ctx||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(rt.ChildrenContextKey);if(xe(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=v()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&c(i)&&(o.payload=i())}}var it="CoreUtils.doPerf";function ot(e,t,n,r,i){if(e)if(e=c(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,l=e.getCtx(it);try{if(a=e.create(t(),r,i))return l&&a.setCtx&&(a.setCtx(nt.ParentContextKey,l),l.getCtx&&l.setCtx&&((o=l.getCtx(nt.ChildrenContextKey))||(o=[],l.setCtx(nt.ChildrenContextKey,o)),o.push(a))),e.setCtx(it,a),n(a)}catch(s){a&&a.setCtx&&a.setCtx("exception",s)}finally{a&&e.fire(a),e.setCtx(it,l)}}return n()}var at=function(i,t){var o=this,a=null,l=c(i.processTelemetry),s=c(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";ot(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&l){o._hasRun=!0;try{r.setNext(a),s&&i.setNextPlugin(a),a&&(a._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=a&&a._hasRun;a&&e||r.diagLog().throwInternal(u.CRITICAL,oe.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+Xe(t)),a&&!e&&a.processTelemetry(n,r)}}else a&&(o._hasRun=!0,a.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function lt(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var o=e[i];o&&c(o.processTelemetry)&&(o=new at(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var st=function en(e,i,n,t){var r,o,a,l,s=this,u=null;null!==t&&(e&&c(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),lt(r,t)}(e,s,t||e.getPlugin()):t?(r=s,a=e,l=!1,(o=t)&&e&&(a=[],Se(e,function(e){!l&&e!==o||(l=!0,a.push(e))})),o&&!l&&(a=a||[]).push(o),u=lt(a,r)):p(t)&&(u=lt(e,s))),s.core=function(){return n},s.diagLog=function(){return(n||{}).logger||new tt(i)},s.getCfg=function(){return i},s.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!i||(r=i.extensionConfig)&&e&&(n=r[e]),n||t},s.getConfig=function(e,t,n){void 0===n&&(n=!1);var r,e=s.getExtCfg(e,null);return e&&!g(e[t])?r=e[t]:i&&!g(i[t])&&(r=i[t]),g(r)?n:r},s.hasNext=function(){return null!=u},s.getNext=function(){return u},s.setNext=function(e){u=e},s.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,s))},s.createNew=function(e,t){return new en((e=void 0===e?null:e)||u,i,n,t)}},ut="getPlugin";function ct(){var o=this,a=!1,l=null,s=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){s=e},o.processNext=function(e,t){t?t.processNext(e):s&&c(s.processTelemetry)&&s.processTelemetry(e,null)},o._getTelCtx=function(e){var t,e=e=void 0===e?null:e;return e||(t=l||new st(null,{},o.core),e=s&&s[ut]?t.createNew(null,s[ut]):t.createNew(null,s)),e},o._baseTelInit=function(e,t,n,r){e&&Me(e,"extensionConfig",[],null,g),!r&&t&&(r=t.getProcessTelContext().getNext());var i=s;s&&s[ut]&&(i=s[ut]()),o.core=t,l=new st(r,e,t,i),a=!0}}ct.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)};var ft="toGMTString",dt="toUTCString",pt="cookie",gt="expires",mt="enabled",vt="isCookieUseDisabled",ht="disableCookiesUsage",yt="_ckMgr",y="",Tt=null,Ct=null,xt=null,It=We(),At={},wt={};function St(e,t){var n=bt[yt]||wt[yt];return n||(n=bt[yt]=bt(e,t),wt[yt]=n),n}function _t(e){return!e||e.isEnabled()}function bt(e,i){Me(n=(e=e||wt).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,Te,g),Me(n,"path",e.cookiePath||"/",null,g),g(n[mt])&&(t=void 0,p(e[vt])||(t=!e[vt]),p(e[ht])||(t=!e[ht]),n[mt]=t);var t,n,u=n,c=u.path||"/",f=u.domain,r=!1!==u[mt],d={isEnabled:function(){var e=r&&Et(i),t=wt[yt];return e&&t&&d!==t?_t(t):e},setEnabled:function(e){r=!1!==e},set:function(e,t,n,r,i){var o,a,l,s=!1;return _t(d)&&(o={},-1!=(l=(a=be(t||y)).indexOf(";"))&&(a=be(t.substring(0,l)),o=kt(t.substring(1+l))),Me(o,"domain",r||f,Le,p),g(n)||(l=Je(),!p(o[gt])||0<(t=v()+1e3*n)&&((r=new Date).setTime(t),Me(o,gt,Pt(r,l?ft:dt)||Pt(r,l?ft:dt)||y,Le)),l||Me(o,"max-age",y+n,null,p)),(t=typeof location===T&&location?location:h(Re))&&"https:"===t.protocol&&(Me(o,"secure",null,null,p),(Ct=null===Ct?!(Ae(r=(Ge()||{}).userAgent)&&(m(r,"CPU iPhone OS 12")||m(r,"iPad; CPU OS 12")||m(r,"Macintosh; Intel Mac OS X 10_14")&&m(r,"Version/")&&m(r,"Safari")||m(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,t){var n=!1;if(!e||(n=e===t))return n;if(me)return e[ue](t);var r=e,i=t,n=!1,e=r?r.length:0;if(e&&40<=e&&!(n=r===i)){for(var o=e-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}n=!0}return n}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||m(r,"Chrome/5")||m(r,"Chrome/6")||m(r,"UnrealEngine")&&!m(r,"Chrome")||m(r,"UCBrowser/12")||m(r,"UCBrowser/11"))):Ct)&&Me(o,"SameSite","None",null,p)),Me(o,"path",i||c,null,p),(u.setCookie||Lt)(e,Mt(a,o)),s=!0),s},get:function(e){var t=y;return _t(d)?(u.getCookie||function(e){var t,n=y;return It&&(t=It[pt]||y,xt!==t&&(At=kt(t),xt=t),n=be(At[e]||y)),n})(e):t},del:function(e,t){return!!_t(d)&&d.purge(e,t)},purge:function(e,t){var n,r=!1;return Et(i)&&((n={}).path=t||"/",n[gt]="Thu, 01 Jan 1970 00:00:01 GMT",t=n,Je()||(t["max-age"]="0"),(u.delCookie||Lt)(e,Mt(y,t)),r=!0),r}};return d[yt]=d}function Et(e){if(null===Tt){Tt=!1;try{Tt=(It||{})[pt]!==undefined}catch(n){e&&e.throwInternal(u.WARNING,oe.CannotAccessCookie,"Cannot access document.cookie - "+(Ie(t=n)?t.name:""),{exception:Xe(n)})}}var t;return Tt}function kt(e){var n={};return e&&e.length&&Se(be(e).split(";"),function(e){var t;(e=be(e||y))&&(-1==(t=e.indexOf("="))?n[e]=null:n[be(e.substring(0,t))]=be(e.substring(1+t)))}),n}function Pt(e,t){return c(e[t])?e[t]():null}function Mt(e,t){var n,r=e||y,i=t;if(i)for(var o in i)S.call(i,o)&&(n=o,o=i[o],r+="; "+n+(g(o)?y:"="+o));return r}function Lt(e,t){It&&(It[pt]=e+"="+t)}var Ft=4294967296,Nt=4294967295,Rt=!1,Ot=123456789,jt=987654321;function Dt(e){e<0&&(e>>>=0),Ot=123456789+e&Nt,jt=987654321-e&Nt,Rt=!0}function Ut(){try{var e=2147483647&v();Dt((Math.random()*Ft^e)+e)}catch(t){}}function Bt(e){return 0<e?Math.floor(Vt()/Nt*(e+1))>>>0:0}function Vt(e){var t=h(je)||h(De),t=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Nt:Je()?(Rt||Ut(),zt()&Nt):Math.floor(Ft*Math.random()|0);return e||(t>>>=0),t}function zt(e){var t=((jt=36969*(65535&jt)+(jt>>16)&Nt)<<16)+(65535&(Ot=18e3*(65535&Ot)+(Ot>>16)&Nt))>>>0&Nt|0;return e||(t>>>=0),t}var Kt,Wt,Gt=null,Ht={_canUseCookies:undefined,isTypeof:function(e,t){return typeof e===t},isUndefined:p,isNullOrUndefined:g,hasOwnProperty:function(e,t){return!(!e||!S.call(e,t))},isFunction:c,isObject:function(e){return!(!e||typeof e!==T)},isDate:function(e){return!(!e||"[object Date]"!==ye(e))},isArray:xe,isError:Ie,isString:Ae,isNumber:function(e){return"number"==typeof e},isBoolean:we,toISOString:function(e){if(e){if(ve)return e[se]();var t;return e&&e.getUTCFullYear?(t=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(""+(e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"):void 0}},arrForEach:Se,arrIndexOf:_e,arrMap:function(e,t,n){if(e){if(e.map)return e.map(t,n);var r=e.length,i=n||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=t.call(i,e[a],e))}catch(l){}}return o},arrReduce:function(e,t,n){var r;if(e){if(e.reduce)return e.reduce(t,n);var 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},strTrim:be,objCreate:k,objKeys:function(e){var t=typeof e;if(t===s||t===T&&null!==e||E("objKeys called on non-object"),!Ee&&e.keys)return e.keys;var n,r=[];for(n in e)e&&S.call(e,n)&&r.push(n);if(Ee)for(var i=ke.length,o=0;o<i;o++)e&&S.call(e,ke[o])&&r.push(ke[o]);return r},objDefineAccessors:Pe,addEventHandler:function(e,t){var n=!1,r=Ke()?window:h(Fe),r=(r&&(n=Ce(r,e,t),n=Ce(r.body,e,t)||n),We());return r&&Ce(r,e,t)||n},dateNow:v,isIE:Je,disableCookies:function(){var e=St(void 0,void 0),t=Ht._canUseCookies;null===Gt&&(Gt=[],Kt=t,Pe(Ht,"_canUseCookies",function(){return Kt},function(t){Kt=t,Se(Gt,function(e){e.setEnabled(t)})})),-1===_e(Gt,e)&&Gt.push(e),we(t)&&e.setEnabled(t),we(Kt)&&e.setEnabled(Kt),e.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(qt,function(e){var t=0|Bt(15);return("x"===e?t:3&t|8).toString(16)})},perfNow:function(){var e=h("performance");return e&&e.now?e.now():v()},newId:function(e){void 0===e&&(e=22);for(var t=Vt()>>>0,n=0,r="";r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++n&&(t=(Vt()<<2&4294967295|3&t)>>>0,n=0);return r},randomValue:Bt,random32:Vt,mwcRandomSeed:function(e){e?Dt(e):Ut()},mwcRandom32:zt,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=Vt())]+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&Vt())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}},qt=/[xy]/g;function t(){var e=null!==Wt&&Wt.apply(this,arguments)||this;return e.priority=185,e.identifier="ReactPlugin",e}L(t,Wt=ct),t.prototype.initialize=function(e,t,n,r){var i=this;Wt.prototype.initialize.call(this,e,t,n,r),this._extensionConfig=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{history:null},Se(n,function(e){"ApplicationInsightsAnalytics"===e.identifier&&(i._analyticsPlugin=e)}),this._extensionConfig.history&&(this.addHistoryListener(this._extensionConfig.history),t={uri:this._extensionConfig.history.location.pathname},this.trackPageView(t))},t.prototype.getCookieMgr=function(){return(t=(e=this.core)?e.getCookieMgr():t)||St(void 0,(e||{}).logger);var e,t},t.prototype.getAppInsights=function(){return this._analyticsPlugin},t.prototype.processTelemetry=function(e,t){this.processNext(e,t)},t.prototype.trackMetric=function(e,t){this._analyticsPlugin?this._analyticsPlugin.trackMetric(e,t):this.diagLog().throwInternal(u.CRITICAL,oe.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},t.prototype.trackPageView=function(e){this._analyticsPlugin?this._analyticsPlugin.trackPageView(e):this.diagLog().throwInternal(u.CRITICAL,oe.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},t.prototype.trackEvent=function(e,t){this._analyticsPlugin?this._analyticsPlugin.trackEvent(e,t):this.diagLog().throwInternal(u.CRITICAL,oe.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},t.prototype.trackException=function(e,t){this._analyticsPlugin?this._analyticsPlugin.trackException(e,t):this.diagLog().throwInternal(u.CRITICAL,oe.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},t.prototype.trackTrace=function(e,t){this._analyticsPlugin?this._analyticsPlugin.trackTrace(e,t):this.diagLog().throwInternal(u.CRITICAL,oe.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},t.prototype.addHistoryListener=function(e){var n=this;e.listen(function(e){var t="location"in e?e.location:e;setTimeout(function(){var e={uri:t.pathname};n.trackPageView(e)},500)})};var Jt,Xt,w=t;function Yt(){var e=null!==Jt&&Jt.apply(this,arguments)||this;return e.state={hasError:!1},e}Xt=3,L(Yt,Jt=i["default"].Component),Yt.prototype.componentDidCatch=function(e,t){this.setState({hasError:!0}),this.props.appInsights.trackException({error:e,exception:e,severityLevel:Xt,properties:t})},Yt.prototype.render=function(){var e;return this.state.hasError?(e=this.props.onError,i["default"].createElement(e)):this.props.children};var I=Yt,Zt=a.createContext(undefined),I=(e.AppInsightsContext=Zt,e.AppInsightsErrorBoundary=I,e.ReactPlugin=w,e.useAppInsightsContext=function(){return a.useContext(Zt)},e.useTrackEvent=function(e,t,n,r){void 0===r&&(r=!0);var n=a.useState(n),i=n[0],n=n[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:e.trackEvent({name:t},i)},[e,i,t]),n},e.useTrackMetric=function(n,r){var i=a.useRef({hookTimestamp:v(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),e=a.useRef();return e.current=function(){var e=i.current;0<e.lastActiveTimestamp&&0===e.idleStartTimestamp&&v()-e.lastActiveTimestamp>=e.idleTimeout&&(e.idleStartTimestamp=v(),e.idleCount++)},a.useEffect(function(){var t=setInterval(e.current,100);return function(){clearInterval(t);var e=i.current;if(0===e.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==e.firstActiveTimestamp&&(e=e,e=(v()-e.firstActiveTimestamp-e.totalIdleTime-e.idleCount*e.idleTimeout)/1e3,n.trackMetric({average:e,name:"React Component Engaged Time (seconds)",sampleCount:1},{"Component Name":r}))}},[]),function(){var e,t=i.current;0===t.firstActiveTimestamp?(t.firstActiveTimestamp=v(),t.lastActiveTimestamp=t.firstActiveTimestamp):t.lastActiveTimestamp=v(),0<t.idleStartTimestamp&&(e=t.lastActiveTimestamp-t.idleStartTimestamp,t.totalIdleTime+=e,t.idleStartTimestamp=0)}},e.withAITracking=function(n,e,r,t){return r!==undefined&&null!==r&&"string"==typeof r||(r=e.prototype&&e.prototype.constructor&&e.prototype.constructor.name||"Unknown"),t!==undefined&&null!==t&&"string"==typeof t||(t=""),L(i,o=l.Component),i.prototype.componentDidMount=function(){var e=this;this._mountTimestamp=Ht.dateNow(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<e._lastActiveTimestamp&&0===e._idleStartTimestamp&&Ht.dateNow()-e._lastActiveTimestamp>=e._idleTimeout&&(e._idleStartTimestamp=Ht.dateNow(),e._idleCount++)},100)},i.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var e,t;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(e=this.getEngagementTimeSeconds(),t={"Component Name":r},n.trackMetric({average:e,name:"React Component Engaged Time (seconds)",sampleCount:1},t))},i.prototype.render=function(){return l.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:t},l.createElement(e,P({},this.props)))},i.prototype.getEngagementTimeSeconds=function(){return(Ht.dateNow()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},i;function i(){var n=null!==o&&o.apply(this,arguments)||this;return n._mountTimestamp=0,n._firstActiveTimestamp=0,n._idleStartTimestamp=0,n._lastActiveTimestamp=0,n._totalIdleTime=0,n._idleCount=0,n._idleTimeout=5e3,n.trackActivity=function(e){var t;0===n._firstActiveTimestamp?(n._firstActiveTimestamp=Ht.dateNow(),n._lastActiveTimestamp=n._firstActiveTimestamp):n._lastActiveTimestamp=Ht.dateNow(),0<n._idleStartTimestamp&&(t=n._lastActiveTimestamp-n._idleStartTimestamp,n._totalIdleTime+=t,n._idleStartTimestamp=0)},n}var o},e),w="__esModule",e={value:!0},$t=Object.defineProperty;if($t)try{return void $t(I,w,e)}catch(tn){}typeof e.value!==undefined&&(I[w]=e.value)};"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}),e.React);
|
|
6
6
|
//# sourceMappingURL=applicationinsights-react-js.min.js.map
|