@microsoft/applicationinsights-react-js 3.3.6-nightly.2207-22 → 3.3.6

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.3.6-nightly.2207-22
2
+ * Application Insights JavaScript SDK - React Plugin, 3.3.6
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var t=this,n=function(t,a){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function p(o){if(o&&o.__esModule)return o;var t,u=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var n=(n=Object.getOwnPropertyDescriptor)?n(o,t):undefined,e=u,r=t,n=n.get?n:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(e,r,n)}catch(o){}n&&typeof n.value!==undefined&&(e[r]=n.value)}var n}),u["default"]=o,u}var R=p(a),z=s(a),V="function",d="object",i="undefined",r="prototype",K="hasOwnProperty",e=Object,B=e[r],n=e.assign,W=e.create,J=e.defineProperty,q=B[K],o=null;function F(t){return void 0===t&&(t=!0),o&&t||(typeof globalThis!==i&&globalThis&&(o=globalThis),typeof self!==i&&self&&(o=self),typeof window!==i&&window&&(o=window),typeof global!==i&&global&&(o=global)),o}function $(t){throw new TypeError(t)}(F()||{}).Symbol,(F()||{}).Reflect;var G=n||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])B[K].call(n,i)&&(t[i]=n[i]);return t},H=function(t,n){return(H=e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n[K](e)&&(t[e]=n[e])})(t,n)};function X(t,n){function e(){this.constructor=t}typeof n!==V&&null!==n&&$("Class extends value "+n+" is not a constructor or null"),H(t,n),t[r]=null===n?function(t){if(W)return W(t);if(null==t)return{};var n=typeof t;function e(){}return n!==d&&n!==V&&$("Object prototype may only be an Object:"+t),e[r]=t,new e}(n):(e[r]=n[r],new e)}var Q="constructor",v="prototype",Y="function",Z="_dynInstFuncs",tt="_isDynProxy",m="_dynClass",nt="_dynInstChk",et=nt,rt="_dfOpts",it="_unknown_",ot="__proto__",ut="_dyn"+ot,at="_dynInstProto",ct="useBaseInst",ft="setInstFuncs",lt=Object,st=lt.getPrototypeOf,pt=lt.getOwnPropertyNames,dt=0;function g(t,n){return t&&lt[v].hasOwnProperty.call(t,n)}function vt(t){return t&&(t===lt[v]||t===Array[v])}function mt(t){return vt(t)||t===Function[v]}function h(t){if(t){if(st)return st(t);var n=t[ot]||t[v]||(t[Q]?t[Q][v]:null),e=t[ut]||n;g(t,ut)||(delete t[at],e=t[ut]=t[at]||t[ut],t[at]=n)}return e}function gt(t,n){var e=[];if(pt)e=pt(t);else for(var r in t)"string"==typeof r&&g(t,r)&&e.push(r);if(e&&0<e.length)for(var i=0;i<e.length;i++)n(e[i])}function ht(t,n,e){return n!==Q&&typeof t[n]===Y&&(e||g(t,n))}function yt(t){throw new TypeError("DynamicProto: "+t)}function _t(t,n){for(var e=t.length-1;0<=e;e--)if(t[e]===n)return 1}function Tt(t,n){return g(t,v)?t.name||n||it:((t||{})[Q]||{}).name||n||it}function Ct(t,r,n,e){g(t,v)||yt("theClass is an invalid class definition.");var i,o,u,a,c,f,l=t[v],s=(function(t){if(!st)return 1;for(var n=[],e=h(r);e&&!mt(e)&&!_t(n,e);){if(e===t)return 1;n.push(e),e=h(e)}}(l)||yt("["+Tt(t)+"] is not in class hierarchy of ["+Tt(r)+"]"),null),t=(g(l,m)?s=l[m]:(s="_dynCls$"+Tt(t,"_")+"$"+dt,dt++,l[m]=s),Ct[rt]),p=!!t[ct],d=(p&&e&&e[ct]!==undefined&&(p=!!e[ct]),o={},gt(i=r,function(t){!o[t]&&ht(i,t,!1)&&(o[t]=i[t])}),o),p=(n(r,function(t,n,e,o){function r(t,n,e){var r,i=n[e];return i[tt]&&o&&!1!==(r=t[Z]||{})[et]&&(i=(r[n[m]]||{})[e]||i),function(){return i.apply(t,arguments)}}for(var i={},u=(gt(e,function(t){i[t]=r(n,e,t)}),h(t)),a=[];u&&!mt(u)&&!_t(a,u);)gt(u,function(t){!i[t]&&ht(u,t,!st)&&(i[t]=r(n,u,t))}),a.push(u),u=h(u);return i}(l,r,d,p)),!!st&&!!t[ft]);u=l,n=s,a=r,c=d,t=!1!==(p=p&&e?!!e[ft]:p),vt(u)||(l=a[Z]=a[Z]||{},f=l[n]=l[n]||{},!1!==l[et]&&(l[et]=!!t),gt(a,function(t){var e,r,i;ht(a,t,!1)&&a[t]!==c[t]&&(f[t]=a[t],delete a[t],g(u,t)&&(!u[t]||u[t][tt])||(u[t]=(e=u,r=t,(i=function(){var t,n;return(function(t,n,e,r){var i=null;if(t&&g(e,m)){var o=t[Z]||{};if((i=(o[e[m]]||{})[n])||yt("Missing ["+n+"] "+Y),!i[nt]&&!1!==o[et]){for(var u=!g(t,n),a=h(t),c=[];u&&a&&!mt(a)&&!_t(c,a);){var f=a[n];if(f){u=f===r;break}c.push(a),a=h(a)}try{u&&(t[n]=i),i[nt]=1}catch(l){o[et]=!1}}}return i}(this,r,e,i)||(typeof(n=(n=e[t=r])===i?h(e)[t]:n)!==Y&&yt("["+t+"] is not a "+Y),n)).apply(this,arguments)})[tt]=1,i)))}))}Ct[rt]={setInstFuncs:!0,useBaseInst:!0};var xt="name",wt="identifier",y="push",At="isInitialized",bt="config",kt="logger",_="length",It="time",T="processNext",Et="getPlugin",C="teardown",Pt="messageId",Mt="message",St="isAsync",Ot="_doTeardown",Nt="update",x="getNext",w="diagLog",Dt="setNextPlugin",Ut="createNew",jt="cookieCfg",Lt="indexOf",Rt="substring",zt="userAgent",Vt="split",Kt="setEnabled",Bt="replace",Wt="nodeType",Jt="apply",qt="enableDebugExceptions",Ft="toLowerCase",A="call",$t="isChildEvt",Gt="getCtx",f="setCtx",Ht="complete",b="",k="core",Xt="disabled",Qt="extensionConfig",Yt="processTelemetry",Zt="priority",tn="errorToConsole",nn="warnToConsole",en="getPerfMgr",rn="endsWith",on="trim",n="toString",un="constructor",an=J,cn=e.freeze,fn=String[r],ln=fn[on],sn=fn[rn],fn=Array.isArray,pn=B[n],dn=q[n],vn=dn[A](e),mn=/-([a-z])/g,gn=/([^\w\d_$])/g,hn=/^(\d+[\w\d_$])/,yn=Object.getPrototypeOf;function I(t){return t===undefined||typeof t===i}function E(t){return null===t||I(t)}function _n(t){return!E(t)}function Tn(t){return!(!t||typeof t!==d)}function P(t){return!(!t||typeof t!==V)}function Cn(t){var n=t;return t&&wn(t)?(n=(n=t[Bt](mn,function(t,n){return n.toUpperCase()}))[Bt](gn,"_"))[Bt](hn,function(t,n){return"_"+n}):n}function xn(t,n){if(t)for(var e in t)q[A](t,e)&&n[A](t,e,t[e])}function M(t,n){return!(!t||!n)&&-1!==t[Lt](n)}var S=fn||function(t){return!(!t||"[object Array]"!==pn[A](t))};function wn(t){return"string"==typeof t}function An(t){return t&&"object"==typeof t&&(!(t=(yn||function(t){if(t){if(yn)return yn(t);t=t.__proto__||t[r]||t[un];if(t)return t}return null})(t))||typeof(t=t[un]&&q[A](t,un)?t[un]:t)===V&&dn[A](t)===vn)}function O(t,n,e){var r=t[_];try{for(var i=0;i<r&&!(i in t&&-1===n[A](e||t,t[i],i,t));i++);}catch(o){}}function N(t){return t&&(ln&&t[on]?t[on]():t[Bt]?t[Bt](/^\s+|\s+$/g,b):t)}function bn(t,n,e,r){if(an)try{var i={enumerable:!0,configurable:!0};return e&&(i.get=e),r&&(i.set=r),an(t,n,i),!0}catch(o){}return!1}var kn=cn||function(t){return t};function D(){var t=Date;return t.now?t.now():(new t).getTime()}function U(t,n,e,r,i){var o=e;!t||(o=t[n])===e||i&&!i(o)||r&&!r(e)||(t[n]=o=e)}function In(t,n){return E(t)?n:t}function En(t){return!!t}function Pn(t,n,e,r,i){var o,u,a;t&&n&&e&&(!1===i&&!I(t[n])||(t[n]=(o=r,a=u=null,P(i=e)?u=i:a=i,function(){var t=arguments;if(a=u?u():a)return a[o][Jt](a,t)})))}var Mn="window",Sn="navigator",On="location",Nn="console",Dn="JSON",Un="msie",jn="trident/",Ln=null,Rn=null;function j(t){var n=F();return n&&n[t]?n[t]:t===Mn&&typeof window===d&&window?window:null}function zn(){return typeof navigator===d&&navigator?navigator:j(Sn)}function Vn(){return typeof JSON===d&&JSON||null!==j(Dn)}function Kn(){return Vn()?JSON||j(Dn):null}function Bn(){var t=zn();return!t||t[zt]===Rn&&null!==Ln||(t=((Rn=t[zt])||b)[Ft](),Ln=M(t,Un)||M(t,jn)),Ln}function Wn(t){var n=Object[r].toString[A](t),e=b;return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t[xt]+"'":Vn()&&(e=Kn().stringify(t)),n+e}var Jn=null;function qn(t){return t?'"'+t[Bt](/\"/g,b)+'"':b}function Fn(t,n){var e,r=typeof console!==i?console:j(Nn);r&&(e="log",P(r[e=r[t]?t:e])&&r[e](n))}Gn.dataType="MessageData";var $n=Gn;function Gn(t,n,e,r){void 0===e&&(e=!1),this[Pt]=t,this[Mt]=(e?"AI: ":"AI (Internal): ")+t;e=b,Vn()&&(e=Kn().stringify(r)),t=(n?" message:"+qn(n):b)+(r?" props:"+qn(e):b);this[Mt]+=t}Xn.__ieDyn=1;var Hn=Xn;function Xn(i){this.identifier="DiagnosticLogger",this.queue=[];var c,f,l,s,p=0,d={};Ct(Xn,this,function(o){var t;function u(t,n){var e,r;l<=p||(r=!0,e="AITR_"+n[Pt],d[e]?r=!1:d[e]=!0,r&&(t<=f&&(o.queue[y](n),p++,a(1===t?"error":"warn",n)),p===l&&(r=new $n(23,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue[y](r),1===t?o[tn](e):o[nn](e))))}function a(t,n){var e,r=(e=(e=Jn)||!0===(i||{}).disableDbgExt?e:Jn||(r=j("Microsoft"),Jn=r?r.ApplicationInsights:Jn))?e.ChromeDbgExt:null;r&&r[w]&&r[w](t,n)}c=In((t=i||{}).loggingLevelConsole,0),f=In(t.loggingLevelTelemetry,1),l=In(t.maxMessageLimit,25),s=In(t[qt],!1),o.consoleLoggingLevel=function(){return c},o.telemetryLoggingLevel=function(){return f},o.maxInternalMessageLimit=function(){return l},o[qt]=function(){return s},o.throwInternal=function(t,n,e,r,i){n=new $n(n,e,i=void 0!==i&&i,r);if(s)throw Wn(n);e=1===t?tn:nn;I(n[Mt])?a("throw"+(1===t?"Critical":"Warning"),n):(i?(r=+n[Pt],!d[r]&&t<=c&&(o[e](n[Mt]),d[r]=!0)):t<=c&&o[e](n[Mt]),u(t,n))},o[nn]=function(t){Fn("warn",t),a("warning",t)},o[tn]=function(t){Fn("error",t),a("error",t)},o.resetInternalMessageCount=function(){p=0,d={}},o.logInternalMessage=u})}function Qn(t,n,e,r,i,o){void 0===o&&(o=!1),(t||new Hn).throwInternal(n,e,r,i,o)}var Yn="ParentContextKey",Zn="ChildrenContextKey",te=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(t,i,n){var e,o=this,u=!1;o.start=D(),o[xt]=t,o[St]=n,o[$t]=function(){return!1},P(i)&&(u=bn(o,"payload",function(){return!e&&P(i)&&(e=i(),i=null),e})),o[Gt]=function(t){return t?(t===c[Yn]||t===c[Zn]?o:o.ctx||{})[t]:null},o[f]=function(t,n){t&&(t===c[Yn]?(o[t]||(o[$t]=function(){return!0}),o[t]=n):t===c[Zn]?o[t]=n:(o.ctx=o.ctx||{})[t]=n)},o[Ht]=function(){var t=0,n=o[Gt](c[Zn]);if(S(n))for(var e=0;e<n[_];e++){var r=n[e];r&&(t+=r[It])}o[It]=D()-o.start,o.exTime=o[It]-t,o[Ht]=function(){},!u&&P(i)&&(o.payload=i())}}var ne="CoreUtils.doPerf";function ee(t,n,e,r,i){if(t)if(t=t[en]?t[en]():t){var o,u=void 0,a=t[Gt](ne);try{if(u=t.create(n(),r,i))return a&&u[f]&&(u[f](te[Yn],a),a[Gt]&&a[f]&&((o=a[Gt](te[Zn]))||(o=[],a[f](te[Zn],o)),o[y](u))),t[f](ne,u),e(u)}catch(c){u&&u[f]&&u[f]("exception",c)}finally{u&&t.fire(u),t[f](ne,a)}}e()}var re=4294967296,u=4294967295,ie=!1,oe=123456789,ue=987654321;function ae(t){var n,e=0,r=j("crypto")||j("msCrypto");if(0===(e=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&u:e)&&Bn()){if(!ie)try{var i=2147483647&D();(n=(Math.random()*re^i)+i)<0&&(n>>>=0),oe=123456789+n&u,ue=987654321-n&u,ie=!0}catch(o){}r=((ue=36969*(65535&ue)+(ue>>16)&u)<<16)+(65535&(oe=18e3*(65535&oe)+(oe>>16)&u))>>>0&u|0,e=(r>>>=0)&u}return 0===e&&(e=Math.floor(re*Math.random()|0)),t||(e>>>=0),e}var ce=J,n="2.8.6-nightly.2207-22",fn="."+function(t){void 0===t&&(t=22);for(var n=ae()>>>0,e=0,r=b;r[_]<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++e&&(n=(ae()<<2&4294967295|3&n)>>>0,e=0);return r}(6);function fe(t){return 1===t[Wt]||9===t[Wt]||!+t[Wt]}var le="toGMTString",se="toUTCString",pe="cookie",de="expires",ve="enabled",me="isCookieUseDisabled",ge="disableCookiesUsage",he="_ckMgr",ye=null,_e=null,Te=null,Ce=typeof document===d&&document?document:j("document"),xe={},we={};function Ae(t){return!t||t.isEnabled()}function be(t,i){U(e=(t=t||we)[jt]=t[jt]||{},"domain",t.cookieDomain,_n,E),U(e,"path",t.cookiePath||"/",null,E),E(e[ve])&&(n=void 0,I(t[me])||(n=!t[me]),I(t[ge])||(n=!t[ge]),e[ve]=n);var n,e,f=e,l=f.path||"/",s=f.domain,r=!1!==f[ve],p=((t={isEnabled:function(){var t=r&&ke(i),n=we[he];return t&&n&&p!==n?Ae(n):t}})[Kt]=function(t){r=!1!==t},t.set=function(t,n,e,r,i){var o,u,a,c=!1;return Ae(p)&&(o={},-1!==(a=(u=N(n||b))[Lt](";"))&&(u=N(n[Rt](0,a)),o=Ie(n[Rt](a+1))),U(o,"domain",r||s,En,I),E(e)||(a=Bn(),I(o[de])&&0<(n=D()+1e3*e)&&((r=new Date).setTime(n),U(o,de,Ee(r,a?le:se)||Ee(r,a?le:se)||b,En)),a||U(o,"max-age",b+e,null,I)),(n=typeof location===d&&location?location:j(On))&&"https:"===n.protocol&&(U(o,"secure",null,null,I),(_e=null===_e?!(wn(r=(zn()||{})[zt])&&(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,n){var e=!1;if(!t||(e=t===n))return e;if(sn)return t[rn](n);var r=t,i=n,e=!1,t=i[_],n=r?r[_]:0;if(t&&n&&t<=n&&!(e=r===i)){for(var o=n-1,u=t-1;0<=u;u--){if(r[o]!=i[u])return;o--}e=!0}return e}(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"))):_e)&&U(o,"SameSite","None",null,I)),U(o,"path",i||l,null,I),(f.setCookie||Me)(t,Pe(u,o)),c=!0),c},t.get=function(t){var n=b;return Ae(p)?(f.getCookie||function(t){var n,e=b;return Ce&&(n=Ce[pe]||b,Te!==n&&(xe=Ie(n),Te=n),e=N(xe[t]||b)),e})(t):n},t.del=function(t,n){return!!Ae(p)&&p.purge(t,n)},t.purge=function(t,n){var e,r=!1;return ke(i)&&((e={}).path=n||"/",e[de]="Thu, 01 Jan 1970 00:00:01 GMT",n=e,Bn()||(n["max-age"]="0"),(f.delCookie||Me)(t,Pe(b,n)),r=!0),r},t);return p[he]=p}function ke(t){if(null===ye){ye=!1;try{ye=(Ce||{})[pe]!==undefined}catch(n){Qn(t,2,68,"Cannot access document.cookie - "+((t=n)&&"[object Error]"===pn[A](t)?t[xt]:b),{exception:Wn(n)})}}return ye}function Ie(t){var e={};return t&&t[_]&&O(N(t)[Vt](";"),function(t){var n;(t=N(t||b))&&(-1===(n=t[Lt]("="))?e[t]=null:e[N(t[Rt](0,n))]=N(t[Rt](n+1)))}),e}function Ee(t,n){return P(t[n])?t[n]():null}function Pe(t,n){var e=t||b;return xn(n,function(t,n){e+="; "+t+(E(n)?b:"="+n)}),e}function Me(t,n){Ce&&(Ce[pe]=t+"="+n)}var Se,Oe=Se={id:Cn("_aiData-plugin."+n+0+((l=void 0!==l&&l)?"."+n:b)+fn),accept:fe,get:function(t,n,e,r){var i=t[Se.id];return i?i[Cn(n)]:(r&&((i=function(t,n){var e=n[t.id];if(!e){e={};try{fe(n)&&!function(t,n,e){if(ce)try{return ce(t,n,{value:e,enumerable:!1,configurable:!0}),1}catch(r){}}(n,t.id,e)&&(n[t.id]=e)}catch(r){}}return e}(Se,t))[Cn(n)]=e),e)},kill:function(t,n){if(t&&t[n])try{delete t[n]}catch(e){}}};function Ne(t){return Oe.get(t,"state",{},!0)}var De="TelemetryPluginChain",Ue="_hasRun",je="_getTelCtx",Le=0;function Re(t,u,e,n){var r=null,i=[],o=(null!==n&&(r=n?function(t,n,e){for(;t;){if(t[Et]()===e)return t;t=t[x]()}return Ve([e],n[bt]||{},n)}(t,e,n):t),{_next:function(){var t,n=r;return r=n?n[x]():null,n||(t=i)&&0<t[_]&&(O(t,function(t){try{t.func[A](t.self,t.args)}catch(n){Qn(e[kt],2,73,"Unexpected Exception during onComplete - "+Wn(n))}}),i=[]),n},ctx:{core:function(){return e},diagLog:function(){return(e||{})[kt]||new Hn(u)},getCfg:function(){return u},getExtCfg:a,getConfig:function(t,n,e){void 0===e&&(e=!1);var r,t=a(t,null);return t&&!E(t[n])?r=t[n]:u&&!E(u[n])&&(r=u[n]),E(r)?e:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(t){r=t},iterate:function(t){for(;n=o._next();){var n=n[Et]();n&&t(n)}},onComplete:function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];t&&i[y]({func:t,self:I(n)?o.ctx:n,args:e})}}});function a(t,n,e){var r,i,o;return void 0===n&&(n={}),void 0===e&&(e=0),(r=u&&(i=u[Qt])&&t?i[t]:r)?Tn(n)&&0!==e&&(o=function p(){var t=arguments,n=t[0]||{},e=t[_],r=!1,i=1;for(0<e&&"boolean"==typeof n&&(r=n,n=t[i]||{},i++),Tn(n)||(n={});i<e;i++){var o,u,a,c,f=t[i],l=S(f),s=Tn(f);for(o in f)(l&&o in f||s&&q[A](f,o))&&(u=f[o],a=void 0,r&&u&&((a=S(u))||An(u))&&(c=n[o],a?S(c)||(c=[]):An(c)||(c={}),u=p(r,c,u)),u!==undefined&&(n[o]=u))}return n}(!0,n,r),u&&2===e&&xn(n,function(t){var n;E(o[t])&&!E(n=u[t])&&(o[t]=n)}),r=o):r=n,r}return o}function ze(t,e,r,n){var i=Re(t,e,r,n),o=i.ctx;return o[T]=function(t){var n=i._next();return n&&n[Yt](t,o),!n},o[Ut]=function(t,n){return ze((t=S(t=void 0===t?null:t)?Ve(t,e,r,n):t)||o[x](),e,r,n)},o}function Ve(t,n,e,r){var i,o=null,u=!r;return S(t)&&0<t[_]&&(i=null,O(t,function(t){(u=!u&&r===t||u)&&t&&P(t[Yt])&&(t=Ke(t,n,e),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?Ve([r],n,e):o}function Ke(c,r,i){var f=null,o=P(c[Yt]),u=P(c[Dt]),l=c?c[wt]+"-"+c[Zt]+"-"+Le++:"Unknown-0-"+Le++,a={getPlugin:function(){return c},getNext:function(){return f},processTelemetry:function(e,t){var n;s(t=t||(n=(n=c&&P(c[je])?c[je]():n)||ze(a,r,i)),function(t){if(!c||!o)return!1;var n=Ne(c);return!n[C]&&!n[Xt]&&(u&&c[Dt](f),c[Yt](e,t),!0)},"processTelemetry",function(){return{item:e}},!e.sync)||t[T](e)},unload:function(r,i){s(r,function(){var t,n,e=!1;return c&&(t=Ne(c),n=c[k]||t[k],!c||n&&n!==r.core()||t[C]||(t[k]=null,t[C]=!0,t[At]=!1,c[C]&&!0===c[C](r,i)&&(e=!0))),e},"unload",function(){},i[St])||r[T](i)},update:function(r,i){s(r,function(){var t,n,e=!1;return c&&(t=Ne(c),n=c[k]||t[k],!c||n&&n!==r.core()||t[C]||c[Nt]&&!0===c[Nt](r,i)&&(e=!0)),e},"update",function(){},!1)||r[T](i)},_id:l,_setNext:function(t){f=t}};function s(e,r,i,t,n){var o=!1,u=c?c[wt]:De,a=(a=e[Ue])||(e[Ue]={});return e.setNext(f),c&&ee(e[k](),function(){return u+":"+i},function(){a[l]=!0;try{var t=f?f._id:b;t&&(a[t]=!1),o=r(e)}catch(n){t=!f||a[f._id];t&&(o=!0),f&&t||Qn(e[w](),1,73,"Plugin ["+u+"] failed during "+i+" - "+Wn(n)+", run flags: "+Wn(a))}},t,n),o}return kn(a)}function Be(){var n=[];return{add:function(t){t&&n[y](t)},run:function(e,r){O(n,function(t){try{t(e,r)}catch(n){Qn(e[w](),2,73,"Unexpected error calling unload handler - "+Wn(n))}}),n=[]}}}var We,L="getPlugin";function Je(){var i,o,l,s,p,u=this;function n(t){var n,t=t=void 0===t?null:t;return t||(n=o||ze(null,{},u[k]),t=l&&l[L]?n[Ut](null,l[L]):n[Ut](null,l)),t}function c(t,n,e){t&&U(t,Qt,[],null,E),!e&&n&&(e=n.getProcessTelContext()[x]());var r=l;l&&l[L]&&(r=l[L]()),u[k]=n,o=ze(e,t,n,r)}function d(){i=!1,u[k]=null,l=o=null,p=[],s=Be()}d(),Ct(Je,u,function(f){f.initialize=function(t,n,e,r){c(t,n,r),i=!0},f[C]=function(t,n){var e,r,i,o,u=f[k];if(u&&(!t||u===t[k]()))return r=!1,i=t||function c(t,e,n){var r=e[bt]||{},i=Re(t,r,e,n),o=i.ctx;return o[T]=function(t){var n=i._next();return n&&n.unload(o,t),!n},o[Ut]=function(t,n){return c((t=S(t=void 0===t?null:t)?Ve(t,r,e,n):t)||o[x](),e,n)},o}(null,u,l&&l[L]?l[L]():l),o=n||((t={reason:0})[St]=!1,t),f[Ot]&&!0===f[Ot](i,o,a)?e=!0:a(),e;function a(){var t;r||(r=!0,s.run(i,n),t=p,p=[],O(t,function(t){t.rm()}),!0===e&&i[T](o),d())}},f[Nt]=function(t,n){var e,r,i,o=f[k];if(o&&(!t||o===t[k]()))return r=!1,i=t||function a(t,e,n){var r=e[bt]||{},i=Re(t,r,e,n).ctx;return i[T]=function(n){return i.iterate(function(t){P(t[Nt])&&t[Nt](i,n)})},i[Ut]=function(t,n){return a((t=S(t=void 0===t?null:t)?Ve(t,r,e,n):t)||i[x](),e,n)},i}(null,o,l&&l[L]?l[L]():l),f._doUpdate&&!0===f._doUpdate(i,n||{reason:0},u)?e=!0:u(),e;function u(){r||(r=!0,c(i.getCfg(),i.core(),i[x]()))}},f._addHook=function(t){t&&(S(t)?p=p.concat(t):p[y](t))},Pn(f,"_addUnloadCb",function(){return s},"add")}),u[w]=function(t){return n(t)[w]()},u[At]=function(){return i},u.setInitialized=function(t){i=t},u[Dt]=function(t){l=t},u[T]=function(t,n){n?n[T](t):l&&P(l[Yt])&&l[Yt](t,null)},u._getTelCtx=n}function qe(){var a,c,f,l,s=We.call(this)||this;return s.priority=185,s.identifier="ReactPlugin",Ct(qe,s,function(i,t){var n,e,r;function o(){l=f=c=a=null}function u(){return a||Qn(i.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),a}o(),i.initialize=function(t,n,e,r){We.prototype.initialize.call(s,t,n,e,r),c=t.extensionConfig&&t.extensionConfig[i.identifier]?t.extensionConfig[i.identifier]:{history:null},O(e,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(a=t)}),c.history&&(n=c.history,f=n.listen(function(t){var n="location"in t?t.location:t;l=setTimeout(function(){l=null;var t={uri:n.pathname};i.trackPageView(t)},500)}),r={uri:c.history.location.pathname},i.trackPageView(r))},i.getCookieMgr=function(){return(n=(e=i.core)?e.getCookieMgr():n)||(e=(e||{})[kt],(r=be[he]||we[he])||(r=be[he]=be(t,e),we[he]=r),n=r),n;var t,n,e,r},i.getAppInsights=u,i.processTelemetry=function(t,n){i.processNext(t,n)},i._doTeardown=function(t,n,e){P(f)&&f(),l&&clearTimeout(l),o()},e=u,r=["trackMetric","trackPageView","trackEvent","trackException","trackTrace"],(n=i)&&e&&Tn(n)&&S(r)&&O(r,function(t){wn(t)&&Pn(n,t,e,t,void 0)}),bn(i,"_extensionConfig",function(){return c})}),s}Je.__ieDyn=1,X(qe,We=Je),qe.__ieDyn=1;var Fe,J=qe,$e=(X(Ge,Fe=R.Component),Ge.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=D(),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&&D()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=D(),t._idleCount++)},100)},Ge.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,n;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),n={"Component Name":this._componentName},this._reactPlugin.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},n))},Ge.prototype.getEngagementTimeSeconds=function(){return(D()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},Ge);function Ge(t,n,e){var r=Fe.call(this,t)||this;return r._mountTimestamp=0,r._firstActiveTimestamp=0,r._idleStartTimestamp=0,r._lastActiveTimestamp=0,r._totalIdleTime=0,r._idleCount=0,r._idleTimeout=5e3,r.trackActivity=function(t){var n;0===r._firstActiveTimestamp?(r._firstActiveTimestamp=D(),r._lastActiveTimestamp=r._firstActiveTimestamp):r._lastActiveTimestamp=D(),0<r._idleStartTimestamp&&(n=r._lastActiveTimestamp-r._idleStartTimestamp,r._totalIdleTime+=n,r._idleStartTimestamp=0)},r._reactPlugin=n,r._componentName=e,r}He={},xn({Verbose:0,Information:1,Warning:2,Error:3,Critical:4},function(t,n){He[t]=n,He[n]=t}),l=He,cn&&xn(l,function(t,n){(S(n)||Tn(n))&&cn(n)});var He,Xe,Qe=kn(l);function Ye(){var t=null!==Xe&&Xe.apply(this,arguments)||this;return t.state={hasError:!1},t}X(Ye,Xe=z["default"].Component),Ye.prototype.componentDidCatch=function(t,n){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:Qe.Error,properties:n})},Ye.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,z["default"].createElement(t)):this.props.children};var n=Ye,Ze=a.createContext(undefined),fn=(t.AITrackedComponentBase=$e,t.AppInsightsContext=Ze,t.AppInsightsErrorBoundary=n,t.ReactPlugin=J,t.useAppInsightsContext=function(){return a.useContext(Ze)},t.useTrackEvent=function(t,n,e,r){void 0===r&&(r=!0);var e=a.useState(e),i=e[0],e=e[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:n},i)},[t,i,n]),e},t.useTrackMetric=function(r,i,o){var u=a.useRef({hookTimestamp:D(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=a.useRef();return t.current=function(){var t=u.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&D()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=D(),t.idleCount++)},a.useEffect(function(){var e=setInterval(t.current,100);return function(){clearInterval(e);var t,n=u.current;if(0===n.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==n.firstActiveTimestamp&&(n=n,n={average:(D()-n.firstActiveTimestamp-n.totalIdleTime-n.idleCount*n.idleTimeout)/1e3,name:"React Component Engaged Time (seconds)",sampleCount:1},t=G({"Component Name":i},o),r.trackMetric(n,t))}},[]),function(){var t,n=u.current;0===n.firstActiveTimestamp?(n.firstActiveTimestamp=D(),n.lastActiveTimestamp=n.firstActiveTimestamp):n.lastActiveTimestamp=D(),0<n.idleStartTimestamp&&(t=n.lastActiveTimestamp-n.idleStartTimestamp,n.totalIdleTime+=t,n.idleStartTimestamp=0)}},t.withAITracking=function(n,t,e,r){return e!==undefined&&null!==e&&"string"==typeof e||(e=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),r!==undefined&&null!==r&&"string"==typeof r||(r=""),X(i,o=$e),i.prototype.render=function(){return R.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:r},R.createElement(t,G({},this.props)))},i;function i(t){return o.call(this,t,n,e)||this}var o},t),l="__esModule",n={value:!0},J=Object.defineProperty;if(J)try{return void J(fn,l,n)}catch(tr){}typeof n.value!==undefined&&(fn[l]=n.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
5
+ var t=this,n=function(t,a){"use strict";function l(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function s(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){var n;"default"!==t&&Object.defineProperty(r,t,(n=Object.getOwnPropertyDescriptor(e,t)).get?n:{enumerable:!0,get:function(){return e[t]}})}),r["default"]=e,r}var p=s(a),z=l(a),V="function",d="object",i="undefined",r="prototype",K="hasOwnProperty",e=Object,B=e[r],W=e.assign,J=e.create,q=e.defineProperty,F=B[K],n=null;function $(t){return void 0===t&&(t=!0),n&&t||(typeof globalThis!==i&&globalThis&&(n=globalThis),typeof self!==i&&self&&(n=self),typeof window!==i&&window&&(n=window),typeof global!==i&&global&&(n=global)),n}function G(t){throw new TypeError(t)}($()||{}).Symbol,($()||{}).Reflect;var H=W||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])B[K].call(n,i)&&(t[i]=n[i]);return t},X=function(t,n){return(X=e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n[K](e)&&(t[e]=n[e])})(t,n)};function Q(t,n){function e(){this.constructor=t}typeof n!==V&&null!==n&&G("Class extends value "+n+" is not a constructor or null"),X(t,n),t[r]=null===n?function(t){if(J)return J(t);if(null==t)return{};var n=typeof t;function e(){}return n!==d&&n!==V&&G("Object prototype may only be an Object:"+t),e[r]=t,new e}(n):(e[r]=n[r],new e)}var Y="constructor",v="prototype",Z="function",tt="_dynInstFuncs",nt="_isDynProxy",m="_dynClass",et="_dynInstChk",rt=et,it="_dfOpts",ot="_unknown_",ut="__proto__",at="_dyn"+ut,ct="_dynInstProto",ft="useBaseInst",lt="setInstFuncs",st=Object,pt=st.getPrototypeOf,dt=st.getOwnPropertyNames,vt=0;function g(t,n){return t&&st[v].hasOwnProperty.call(t,n)}function mt(t){return t&&(t===st[v]||t===Array[v])}function gt(t){return mt(t)||t===Function[v]}function h(t){if(t){if(pt)return pt(t);var n=t[ut]||t[v]||(t[Y]?t[Y][v]:null),e=t[at]||n;g(t,at)||(delete t[ct],e=t[at]=t[ct]||t[at],t[ct]=n)}return e}function ht(t,n){var e=[];if(dt)e=dt(t);else for(var r in t)"string"==typeof r&&g(t,r)&&e.push(r);if(e&&0<e.length)for(var i=0;i<e.length;i++)n(e[i])}function yt(t,n,e){return n!==Y&&typeof t[n]===Z&&(e||g(t,n))}function _t(t){throw new TypeError("DynamicProto: "+t)}function Tt(t,n){for(var e=t.length-1;0<=e;e--)if(t[e]===n)return 1}function Ct(t,n){return g(t,v)?t.name||n||ot:((t||{})[Y]||{}).name||n||ot}function xt(t,r,n,e){g(t,v)||_t("theClass is an invalid class definition.");var i,o,u,a,c,f,l=t[v],s=(function(t){if(!pt)return 1;for(var n=[],e=h(r);e&&!gt(e)&&!Tt(n,e);){if(e===t)return 1;n.push(e),e=h(e)}}(l)||_t("["+Ct(t)+"] is not in class hierarchy of ["+Ct(r)+"]"),null),t=(g(l,m)?s=l[m]:(s="_dynCls$"+Ct(t,"_")+"$"+vt,vt++,l[m]=s),xt[it]),p=!!t[ft],d=(p&&e&&e[ft]!==undefined&&(p=!!e[ft]),o={},ht(i=r,function(t){!o[t]&&yt(i,t,!1)&&(o[t]=i[t])}),o),p=(n(r,function(t,n,e,o){function r(t,n,e){var r,i=n[e];return i[nt]&&o&&!1!==(r=t[tt]||{})[rt]&&(i=(r[n[m]]||{})[e]||i),function(){return i.apply(t,arguments)}}for(var i={},u=(ht(e,function(t){i[t]=r(n,e,t)}),h(t)),a=[];u&&!gt(u)&&!Tt(a,u);)ht(u,function(t){!i[t]&&yt(u,t,!pt)&&(i[t]=r(n,u,t))}),a.push(u),u=h(u);return i}(l,r,d,p)),!!pt&&!!t[lt]);u=l,n=s,a=r,c=d,t=!1!==(p=p&&e?!!e[lt]:p),mt(u)||(l=a[tt]=a[tt]||{},f=l[n]=l[n]||{},!1!==l[rt]&&(l[rt]=!!t),ht(a,function(t){var e,r,i;yt(a,t,!1)&&a[t]!==c[t]&&(f[t]=a[t],delete a[t],g(u,t)&&(!u[t]||u[t][nt])||(u[t]=(e=u,r=t,(i=function(){var t,n;return(function(t,n,e,r){var i=null;if(t&&g(e,m)){var o=t[tt]||{};if((i=(o[e[m]]||{})[n])||_t("Missing ["+n+"] "+Z),!i[et]&&!1!==o[rt]){for(var u=!g(t,n),a=h(t),c=[];u&&a&&!gt(a)&&!Tt(c,a);){var f=a[n];if(f){u=f===r;break}c.push(a),a=h(a)}try{u&&(t[n]=i),i[et]=1}catch(l){o[rt]=!1}}}return i}(this,r,e,i)||(typeof(n=(n=e[t=r])===i?h(e)[t]:n)!==Z&&_t("["+t+"] is not a "+Z),n)).apply(this,arguments)})[nt]=1,i)))}))}xt[it]={setInstFuncs:!0,useBaseInst:!0};var wt="name",At="identifier",y="push",bt="isInitialized",kt="config",It="logger",_="length",Et="time",T="processNext",Pt="getPlugin",C="teardown",Mt="messageId",St="message",Ot="isAsync",Nt="_doTeardown",Dt="update",x="getNext",w="diagLog",Ut="setNextPlugin",jt="createNew",Lt="cookieCfg",Rt="indexOf",zt="substring",Vt="userAgent",Kt="split",Bt="setEnabled",o="replace",Wt="nodeType",Jt="apply",qt="enableDebugExceptions",Ft="toLowerCase",A="call",$t="isChildEvt",Gt="getCtx",f="setCtx",Ht="complete",b="",k="core",Xt="disabled",Qt="extensionConfig",I="processTelemetry",Yt="priority",Zt="errorToConsole",tn="warnToConsole",nn="getPerfMgr",en="endsWith",rn="trim",W="toString",on="constructor",un=q,an=e.freeze,cn=String[r],fn=cn[rn],ln=cn[en],cn=Array.isArray,sn=B[W],pn=F[W],dn=pn[A](e),vn=/-([a-z])/g,mn=/([^\w\d_$])/g,gn=/^(\d+[\w\d_$])/,hn=Object.getPrototypeOf;function E(t){return t===undefined||typeof t===i}function P(t){return null===t||E(t)}function yn(t){return!P(t)}function _n(t){return!(!t||typeof t!==d)}function M(t){return!(!t||typeof t!==V)}function Tn(t){var n=t;return t&&xn(t)?(n=(n=t[o](vn,function(t,n){return n.toUpperCase()}))[o](mn,"_"))[o](gn,function(t,n){return"_"+n}):n}function Cn(t,n){if(t)for(var e in t)F[A](t,e)&&n[A](t,e,t[e])}function S(t,n){return!(!t||!n)&&-1!==t[Rt](n)}var O=cn||function(t){return!(!t||"[object Array]"!==sn[A](t))};function xn(t){return"string"==typeof t}function wn(t){return t&&"object"==typeof t&&(!(t=(hn||function(t){if(t){if(hn)return hn(t);t=t.__proto__||t[r]||t[on];if(t)return t}return null})(t))||typeof(t=t[on]&&F[A](t,on)?t[on]:t)===V&&pn[A](t)===dn)}function N(t,n,e){var r=t[_];try{for(var i=0;i<r&&!(i in t&&-1===n[A](e||t,t[i],i,t));i++);}catch(o){}}function D(t){return t&&(fn&&t[rn]?t[rn]():t[o]?t[o](/^\s+|\s+$/g,b):t)}function An(t,n,e,r){if(un)try{var i={enumerable:!0,configurable:!0};return e&&(i.get=e),r&&(i.set=r),un(t,n,i),!0}catch(o){}return!1}var bn=an||function(t){return t};function U(){var t=Date;return t.now?t.now():(new t).getTime()}function j(t,n,e,r,i){var o=e;!t||(o=t[n])===e||i&&!i(o)||r&&!r(e)||(t[n]=o=e)}function kn(t,n){return P(t)?n:t}function In(t){return!!t}function En(t,n,e,r,i){var o,u,a;t&&n&&e&&(!1===i&&!E(t[n])||(t[n]=(o=r,a=u=null,M(i=e)?u=i:a=i,function(){var t=arguments;if(a=u?u():a)return a[o][Jt](a,t)})))}var Pn="window",Mn="navigator",Sn="location",On="console",Nn="JSON",Dn="msie",Un="trident/",jn=null,Ln=null;function L(t){var n=$();return n&&n[t]?n[t]:t===Pn&&typeof window===d&&window?window:null}function Rn(){return typeof navigator===d&&navigator?navigator:L(Mn)}function zn(){return typeof JSON===d&&JSON||null!==L(Nn)}function Vn(){return zn()?JSON||L(Nn):null}function Kn(){var t=Rn();return!t||t[Vt]===Ln&&null!==jn||(t=((Ln=t[Vt])||b)[Ft](),jn=S(t,Dn)||S(t,Un)),jn}function Bn(t){var n=Object[r].toString[A](t),e=b;return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t[wt]+"'":zn()&&(e=Vn().stringify(t)),n+e}var Wn=null;function Jn(t){return t?'"'+t[o](/\"/g,b)+'"':b}function qn(t,n){var e,r=typeof console!==i?console:L(On);r&&(e="log",M(r[e=r[t]?t:e])&&r[e](n))}$n.dataType="MessageData";var Fn=$n;function $n(t,n,e,r){void 0===e&&(e=!1),this[Mt]=t,this[St]=(e?"AI: ":"AI (Internal): ")+t;e=b,zn()&&(e=Vn().stringify(r)),t=(n?" message:"+Jn(n):b)+(r?" props:"+Jn(e):b);this[St]+=t}Hn.__ieDyn=1;var Gn=Hn;function Hn(i){this.identifier="DiagnosticLogger",this.queue=[];var c,f,l,s,p=0,d={};xt(Hn,this,function(o){var t;function u(t,n){var e,r;l<=p||(r=!0,e="AITR_"+n[Mt],d[e]?r=!1:d[e]=!0,r&&(t<=f&&(o.queue[y](n),p++,a(1===t?"error":"warn",n)),p===l&&(r=new Fn(23,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue[y](r),1===t?o[Zt](e):o[tn](e))))}function a(t,n){var e,r=(e=(e=Wn)||!0===(i||{}).disableDbgExt?e:Wn||(r=L("Microsoft"),Wn=r?r.ApplicationInsights:Wn))?e.ChromeDbgExt:null;r&&r[w]&&r[w](t,n)}c=kn((t=i||{}).loggingLevelConsole,0),f=kn(t.loggingLevelTelemetry,1),l=kn(t.maxMessageLimit,25),s=kn(t[qt],!1),o.consoleLoggingLevel=function(){return c},o.telemetryLoggingLevel=function(){return f},o.maxInternalMessageLimit=function(){return l},o[qt]=function(){return s},o.throwInternal=function(t,n,e,r,i){n=new Fn(n,e,i=void 0!==i&&i,r);if(s)throw Bn(n);e=1===t?Zt:tn;E(n[St])?a("throw"+(1===t?"Critical":"Warning"),n):(i?(r=+n[Mt],!d[r]&&t<=c&&(o[e](n[St]),d[r]=!0)):t<=c&&o[e](n[St]),u(t,n))},o[tn]=function(t){qn("warn",t),a("warning",t)},o[Zt]=function(t){qn("error",t),a("error",t)},o.resetInternalMessageCount=function(){p=0,d={}},o.logInternalMessage=u})}function Xn(t,n,e,r,i,o){void 0===o&&(o=!1),(t||new Gn).throwInternal(n,e,r,i,o)}var Qn="ParentContextKey",Yn="ChildrenContextKey",Zn=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(t,i,n){var e,o=this,u=!1;o.start=U(),o[wt]=t,o[Ot]=n,o[$t]=function(){return!1},M(i)&&(u=An(o,"payload",function(){return!e&&M(i)&&(e=i(),i=null),e})),o[Gt]=function(t){return t?(t===c[Qn]||t===c[Yn]?o:o.ctx||{})[t]:null},o[f]=function(t,n){t&&(t===c[Qn]?(o[t]||(o[$t]=function(){return!0}),o[t]=n):t===c[Yn]?o[t]=n:(o.ctx=o.ctx||{})[t]=n)},o[Ht]=function(){var t=0,n=o[Gt](c[Yn]);if(O(n))for(var e=0;e<n[_];e++){var r=n[e];r&&(t+=r[Et])}o[Et]=U()-o.start,o.exTime=o[Et]-t,o[Ht]=function(){},!u&&M(i)&&(o.payload=i())}}var te="CoreUtils.doPerf";function ne(t,n,e,r,i){if(t)if(t=t[nn]?t[nn]():t){var o,u=void 0,a=t[Gt](te);try{if(u=t.create(n(),r,i))return a&&u[f]&&(u[f](Zn[Qn],a),a[Gt]&&a[f]&&((o=a[Gt](Zn[Yn]))||(o=[],a[f](Zn[Yn],o)),o[y](u))),t[f](te,u),e(u)}catch(c){u&&u[f]&&u[f]("exception",c)}finally{u&&t.fire(u),t[f](te,a)}}e()}var ee=4294967296,u=4294967295,re=!1,ie=123456789,oe=987654321;function ue(t){var n,e=0,r=L("crypto")||L("msCrypto");if(0===(e=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&u:e)&&Kn()){if(!re)try{var i=2147483647&U();(n=(Math.random()*ee^i)+i)<0&&(n>>>=0),ie=123456789+n&u,oe=987654321-n&u,re=!0}catch(o){}r=((oe=36969*(65535&oe)+(oe>>16)&u)<<16)+(65535&(ie=18e3*(65535&ie)+(ie>>16)&u))>>>0&u|0,e=(r>>>=0)&u}return 0===e&&(e=Math.floor(ee*Math.random()|0)),t||(e>>>=0),e}var ae=q,W="."+function(t){void 0===t&&(t=22);for(var n=ue()>>>0,e=0,r=b;r[_]<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++e&&(n=(ue()<<2&4294967295|3&n)>>>0,e=0);return r}(6);function ce(t){return 1===t[Wt]||9===t[Wt]||!+t[Wt]}var fe="toGMTString",le="toUTCString",se="cookie",pe="expires",de="enabled",ve="isCookieUseDisabled",me="disableCookiesUsage",ge="_ckMgr",he=null,ye=null,_e=null,Te=typeof document===d&&document?document:L("document"),Ce={},xe={};function we(t){return!t||t.isEnabled()}function Ae(t,i){j(e=(t=t||xe)[Lt]=t[Lt]||{},"domain",t.cookieDomain,yn,P),j(e,"path",t.cookiePath||"/",null,P),P(e[de])&&(n=void 0,E(t[ve])||(n=!t[ve]),E(t[me])||(n=!t[me]),e[de]=n);var n,e,f=e,l=f.path||"/",s=f.domain,r=!1!==f[de],p=((t={isEnabled:function(){var t=r&&be(i),n=xe[ge];return t&&n&&p!==n?we(n):t}})[Bt]=function(t){r=!1!==t},t.set=function(t,n,e,r,i){var o,u,a,c=!1;return we(p)&&(o={},-1!==(a=(u=D(n||b))[Rt](";"))&&(u=D(n[zt](0,a)),o=ke(n[zt](a+1))),j(o,"domain",r||s,In,E),P(e)||(a=Kn(),E(o[pe])&&0<(n=U()+1e3*e)&&((r=new Date).setTime(n),j(o,pe,Ie(r,a?fe:le)||Ie(r,a?fe:le)||b,In)),a||j(o,"max-age",b+e,null,E)),(n=typeof location===d&&location?location:L(Sn))&&"https:"===n.protocol&&(j(o,"secure",null,null,E),(ye=null===ye?!(xn(r=(Rn()||{})[Vt])&&(S(r,"CPU iPhone OS 12")||S(r,"iPad; CPU OS 12")||S(r,"Macintosh; Intel Mac OS X 10_14")&&S(r,"Version/")&&S(r,"Safari")||S(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,n){var e=!1;if(!t||(e=t===n))return e;if(ln)return t[en](n);var r=t,i=n,e=!1,t=i[_],n=r?r[_]:0;if(t&&n&&t<=n&&!(e=r===i)){for(var o=n-1,u=t-1;0<=u;u--){if(r[o]!=i[u])return;o--}e=!0}return e}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||S(r,"Chrome/5")||S(r,"Chrome/6")||S(r,"UnrealEngine")&&!S(r,"Chrome")||S(r,"UCBrowser/12")||S(r,"UCBrowser/11"))):ye)&&j(o,"SameSite","None",null,E)),j(o,"path",i||l,null,E),(f.setCookie||Pe)(t,Ee(u,o)),c=!0),c},t.get=function(t){var n=b;return we(p)?(f.getCookie||function(t){var n,e=b;return Te&&(n=Te[se]||b,_e!==n&&(Ce=ke(n),_e=n),e=D(Ce[t]||b)),e})(t):n},t.del=function(t,n){return!!we(p)&&p.purge(t,n)},t.purge=function(t,n){var e,r=!1;return be(i)&&((e={}).path=n||"/",e[pe]="Thu, 01 Jan 1970 00:00:01 GMT",n=e,Kn()||(n["max-age"]="0"),(f.delCookie||Pe)(t,Ee(b,n)),r=!0),r},t);return p[ge]=p}function be(t){if(null===he){he=!1;try{he=(Te||{})[se]!==undefined}catch(n){Xn(t,2,68,"Cannot access document.cookie - "+((t=n)&&"[object Error]"===sn[A](t)?t[wt]:b),{exception:Bn(n)})}}return he}function ke(t){var e={};return t&&t[_]&&N(D(t)[Kt](";"),function(t){var n;(t=D(t||b))&&(-1===(n=t[Rt]("="))?e[t]=null:e[D(t[zt](0,n))]=D(t[zt](n+1)))}),e}function Ie(t,n){return M(t[n])?t[n]():null}function Ee(t,n){var e=t||b;return Cn(n,function(t,n){e+="; "+t+(P(n)?b:"="+n)}),e}function Pe(t,n){Te&&(Te[se]=t+"="+n)}var Me,Se=Me={id:Tn("_aiData-plugin.2.8.50"+((Ye=void 0!==Ye&&Ye)?".2.8.5":b)+W),accept:ce,get:function(t,n,e,r){var i=t[Me.id];return i?i[Tn(n)]:(r&&((i=function(t,n){var e=n[t.id];if(!e){e={};try{ce(n)&&!function(t,n,e){if(ae)try{return ae(t,n,{value:e,enumerable:!1,configurable:!0}),1}catch(r){}}(n,t.id,e)&&(n[t.id]=e)}catch(r){}}return e}(Me,t))[Tn(n)]=e),e)},kill:function(t,n){if(t&&t[n])try{delete t[n]}catch(e){}}};function Oe(t){return Se.get(t,"state",{},!0)}var Ne="TelemetryPluginChain",De="_hasRun",Ue="_getTelCtx",je=0;function Le(t,u,e,n){var r=null,i=[],o=(null!==n&&(r=n?function(t,n,e){for(;t;){if(t[Pt]()===e)return t;t=t[x]()}return ze([e],n[kt]||{},n)}(t,e,n):t),{_next:function(){var t,n=r;return r=n?n[x]():null,n||(t=i)&&0<t[_]&&(N(t,function(t){try{t.func[A](t.self,t.args)}catch(n){Xn(e[It],2,73,"Unexpected Exception during onComplete - "+Bn(n))}}),i=[]),n},ctx:{core:function(){return e},diagLog:function(){return(e||{})[It]||new Gn(u)},getCfg:function(){return u},getExtCfg:a,getConfig:function(t,n,e){void 0===e&&(e=!1);var r,t=a(t,null);return t&&!P(t[n])?r=t[n]:u&&!P(u[n])&&(r=u[n]),P(r)?e:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(t){r=t},iterate:function(t){for(;n=o._next();){var n=n[Pt]();n&&t(n)}},onComplete:function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];t&&i[y]({func:t,self:E(n)?o.ctx:n,args:e})}}});function a(t,n,e){var r,i,o;return void 0===n&&(n={}),void 0===e&&(e=0),(r=u&&(i=u[Qt])&&t?i[t]:r)?_n(n)&&0!==e&&(o=function p(){var t=arguments,n=t[0]||{},e=t[_],r=!1,i=1;for(0<e&&"boolean"==typeof n&&(r=n,n=t[i]||{},i++),_n(n)||(n={});i<e;i++){var o,u,a,c,f=t[i],l=O(f),s=_n(f);for(o in f)(l&&o in f||s&&F[A](f,o))&&(u=f[o],a=void 0,r&&u&&((a=O(u))||wn(u))&&(c=n[o],a?O(c)||(c=[]):wn(c)||(c={}),u=p(r,c,u)),u!==undefined&&(n[o]=u))}return n}(!0,n,r),u&&2===e&&Cn(n,function(t){var n;P(o[t])&&!P(n=u[t])&&(o[t]=n)}),r=o):r=n,r}return o}function Re(t,e,r,n){var i=Le(t,e,r,n),o=i.ctx;return o[T]=function(t){var n=i._next();return n&&n[I](t,o),!n},o[jt]=function(t,n){return Re((t=O(t=void 0===t?null:t)?ze(t,e,r,n):t)||o[x](),e,r,n)},o}function ze(t,n,e,r){var i,o=null,u=!r;return O(t)&&0<t[_]&&(i=null,N(t,function(t){(u=!u&&r===t||u)&&t&&M(t[I])&&(t=Ve(t,n,e),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?ze([r],n,e):o}function Ve(c,r,i){var f=null,o=M(c[I]),u=M(c[Ut]),l=c?c[At]+"-"+c[Yt]+"-"+je++:"Unknown-0-"+je++,a={getPlugin:function(){return c},getNext:function(){return f},processTelemetry:function(e,t){var n;s(t=t||(n=(n=c&&M(c[Ue])?c[Ue]():n)||Re(a,r,i)),function(t){if(!c||!o)return!1;var n=Oe(c);return!n[C]&&!n[Xt]&&(u&&c[Ut](f),c[I](e,t),!0)},"processTelemetry",function(){return{item:e}},!e.sync)||t[T](e)},unload:function(r,i){s(r,function(){var t,n,e=!1;return c&&(t=Oe(c),n=c[k]||t[k],!c||n&&n!==r.core()||t[C]||(t[k]=null,t[C]=!0,t[bt]=!1,c[C]&&!0===c[C](r,i)&&(e=!0))),e},"unload",function(){},i[Ot])||r[T](i)},update:function(r,i){s(r,function(){var t,n,e=!1;return c&&(t=Oe(c),n=c[k]||t[k],!c||n&&n!==r.core()||t[C]||c[Dt]&&!0===c[Dt](r,i)&&(e=!0)),e},"update",function(){},!1)||r[T](i)},_id:l,_setNext:function(t){f=t}};function s(e,r,i,t,n){var o=!1,u=c?c[At]:Ne,a=(a=e[De])||(e[De]={});return e.setNext(f),c&&ne(e[k](),function(){return u+":"+i},function(){a[l]=!0;try{var t=f?f._id:b;t&&(a[t]=!1),o=r(e)}catch(n){t=!f||a[f._id];t&&(o=!0),f&&t||Xn(e[w](),1,73,"Plugin ["+u+"] failed during "+i+" - "+Bn(n)+", run flags: "+Bn(a))}},t,n),o}return bn(a)}function Ke(){var n=[];return{add:function(t){t&&n[y](t)},run:function(e,r){N(n,function(t){try{t(e,r)}catch(n){Xn(e[w](),2,73,"Unexpected error calling unload handler - "+Bn(n))}}),n=[]}}}var Be,R="getPlugin";function We(){var i,o,l,s,p,u=this;function n(t){var n,t=t=void 0===t?null:t;return t||(n=o||Re(null,{},u[k]),t=l&&l[R]?n[jt](null,l[R]):n[jt](null,l)),t}function c(t,n,e){t&&j(t,Qt,[],null,P),!e&&n&&(e=n.getProcessTelContext()[x]());var r=l;l&&l[R]&&(r=l[R]()),u[k]=n,o=Re(e,t,n,r)}function d(){i=!1,u[k]=null,l=o=null,p=[],s=Ke()}d(),xt(We,u,function(f){f.initialize=function(t,n,e,r){c(t,n,r),i=!0},f[C]=function(t,n){var e,r,i,o,u=f[k];if(u&&(!t||u===t[k]()))return r=!1,i=t||function c(t,e,n){var r=e[kt]||{},i=Le(t,r,e,n),o=i.ctx;return o[T]=function(t){var n=i._next();return n&&n.unload(o,t),!n},o[jt]=function(t,n){return c((t=O(t=void 0===t?null:t)?ze(t,r,e,n):t)||o[x](),e,n)},o}(null,u,l&&l[R]?l[R]():l),o=n||((t={reason:0})[Ot]=!1,t),f[Nt]&&!0===f[Nt](i,o,a)?e=!0:a(),e;function a(){var t;r||(r=!0,s.run(i,n),t=p,p=[],N(t,function(t){t.rm()}),!0===e&&i[T](o),d())}},f[Dt]=function(t,n){var e,r,i,o=f[k];if(o&&(!t||o===t[k]()))return r=!1,i=t||function a(t,e,n){var r=e[kt]||{},i=Le(t,r,e,n).ctx;return i[T]=function(n){return i.iterate(function(t){M(t[Dt])&&t[Dt](i,n)})},i[jt]=function(t,n){return a((t=O(t=void 0===t?null:t)?ze(t,r,e,n):t)||i[x](),e,n)},i}(null,o,l&&l[R]?l[R]():l),f._doUpdate&&!0===f._doUpdate(i,n||{reason:0},u)?e=!0:u(),e;function u(){r||(r=!0,c(i.getCfg(),i.core(),i[x]()))}},f._addHook=function(t){t&&(O(t)?p=p.concat(t):p[y](t))},En(f,"_addUnloadCb",function(){return s},"add")}),u[w]=function(t){return n(t)[w]()},u[bt]=function(){return i},u.setInitialized=function(t){i=t},u[Ut]=function(t){l=t},u[T]=function(t,n){n?n[T](t):l&&M(l[I])&&l[I](t,null)},u._getTelCtx=n}function Je(){var a,c,f,l,s=Be.call(this)||this;return s.priority=185,s.identifier="ReactPlugin",xt(Je,s,function(i,t){var n,e,r;function o(){l=f=c=a=null}function u(){return a||Xn(i.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),a}o(),i.initialize=function(t,n,e,r){Be.prototype.initialize.call(s,t,n,e,r),c=t.extensionConfig&&t.extensionConfig[i.identifier]?t.extensionConfig[i.identifier]:{history:null},N(e,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(a=t)}),c.history&&(n=c.history,f=n.listen(function(t){var n="location"in t?t.location:t;l=setTimeout(function(){l=null;var t={uri:n.pathname};i.trackPageView(t)},500)}),r={uri:c.history.location.pathname},i.trackPageView(r))},i.getCookieMgr=function(){return(n=(e=i.core)?e.getCookieMgr():n)||(e=(e||{})[It],(r=Ae[ge]||xe[ge])||(r=Ae[ge]=Ae(t,e),xe[ge]=r),n=r),n;var t,n,e,r},i.getAppInsights=u,i.processTelemetry=function(t,n){i.processNext(t,n)},i._doTeardown=function(t,n,e){M(f)&&f(),l&&clearTimeout(l),o()},e=u,r=["trackMetric","trackPageView","trackEvent","trackException","trackTrace"],(n=i)&&e&&_n(n)&&O(r)&&N(r,function(t){xn(t)&&En(n,t,e,t,void 0)}),An(i,"_extensionConfig",function(){return c})}),s}We.__ieDyn=1,Q(Je,Be=We),Je.__ieDyn=1;var qe,cn=Je,Fe=(Q($e,qe=p.Component),$e.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=U(),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&&U()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=U(),t._idleCount++)},100)},$e.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,n;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),n={"Component Name":this._componentName},this._reactPlugin.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},n))},$e.prototype.getEngagementTimeSeconds=function(){return(U()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},$e);function $e(t,n,e){var r=qe.call(this,t)||this;return r._mountTimestamp=0,r._firstActiveTimestamp=0,r._idleStartTimestamp=0,r._lastActiveTimestamp=0,r._totalIdleTime=0,r._idleCount=0,r._idleTimeout=5e3,r.trackActivity=function(t){var n;0===r._firstActiveTimestamp?(r._firstActiveTimestamp=U(),r._lastActiveTimestamp=r._firstActiveTimestamp):r._lastActiveTimestamp=U(),0<r._idleStartTimestamp&&(n=r._lastActiveTimestamp-r._idleStartTimestamp,r._totalIdleTime+=n,r._idleStartTimestamp=0)},r._reactPlugin=n,r._componentName=e,r}Ge={},Cn({Verbose:0,Information:1,Warning:2,Error:3,Critical:4},function(t,n){Ge[t]=n,Ge[n]=t}),q=Ge,an&&Cn(q,function(t,n){(O(n)||_n(n))&&an(n)});var Ge,He,Xe=bn(q);function Qe(){var t=null!==He&&He.apply(this,arguments)||this;return t.state={hasError:!1},t}Q(Qe,He=z["default"].Component),Qe.prototype.componentDidCatch=function(t,n){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:Xe.Error,properties:n})},Qe.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,z["default"].createElement(t)):this.props.children};var Ye=Qe,Ze=a.createContext(undefined);t.AITrackedComponentBase=Fe,t.AppInsightsContext=Ze,t.AppInsightsErrorBoundary=Ye,t.ReactPlugin=cn,t.useAppInsightsContext=function(){return a.useContext(Ze)},t.useTrackEvent=function(t,n,e,r){void 0===r&&(r=!0);var e=a.useState(e),i=e[0],e=e[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:n},i)},[t,i,n]),e},t.useTrackMetric=function(r,i,o){var u=a.useRef({hookTimestamp:U(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=a.useRef();return t.current=function(){var t=u.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&U()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=U(),t.idleCount++)},a.useEffect(function(){var e=setInterval(t.current,100);return function(){clearInterval(e);var t,n=u.current;if(0===n.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==n.firstActiveTimestamp&&(n=n,n={average:(U()-n.firstActiveTimestamp-n.totalIdleTime-n.idleCount*n.idleTimeout)/1e3,name:"React Component Engaged Time (seconds)",sampleCount:1},t=H({"Component Name":i},o),r.trackMetric(n,t))}},[]),function(){var t,n=u.current;0===n.firstActiveTimestamp?(n.firstActiveTimestamp=U(),n.lastActiveTimestamp=n.firstActiveTimestamp):n.lastActiveTimestamp=U(),0<n.idleStartTimestamp&&(t=n.lastActiveTimestamp-n.idleStartTimestamp,n.totalIdleTime+=t,n.idleStartTimestamp=0)}},t.withAITracking=function(n,t,e,r){return e!==undefined&&null!==e&&"string"==typeof e||(e=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),r!==undefined&&null!==r&&"string"==typeof r||(r=""),Q(i,o=Fe),i.prototype.render=function(){return p.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:r},p.createElement(t,H({},this.props)))},i;function i(t){return o.call(this,t,n,e)||this}var o},Object.defineProperty(t,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
6
6
  //# sourceMappingURL=applicationinsights-react-js.min.js.map