@microsoft/applicationinsights-react-native 2.4.3 → 2.4.4-nightly.2201-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/browser/applicationinsights-react-native.js +1 -1
- package/browser/applicationinsights-react-native.js.map +1 -1
- package/browser/applicationinsights-react-native.min.js +1 -1
- package/browser/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.d.ts +1 -1
- package/dist/applicationinsights-react-native.js +1 -1
- package/dist/applicationinsights-react-native.js.map +1 -1
- package/dist/applicationinsights-react-native.min.js +1 -1
- package/dist/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.rollup.d.ts +1 -1
- package/dist-esm/Interfaces/INativeDevice.js +1 -1
- package/dist-esm/Interfaces/IReactNativePluginConfig.js +1 -1
- package/dist-esm/Interfaces/index.js +1 -1
- package/dist-esm/ReactNativePlugin.js +1 -1
- package/dist-esm/index.js +1 -1
- package/package.json +70 -67
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Native Plugin, 2.4.
|
|
2
|
+
* Application Insights JavaScript SDK - React Native Plugin, 2.4.4-nightly.2201-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
var e=this,n=function(t,e){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{"default":e}}var l=r(e),i="function",h="object",o="undefined",u="prototype",a="hasOwnProperty",c=Object,d=c[u],e=(c.create,c.defineProperty),x=d[a],n=null;function m(e){return void 0===e&&(e=!0),n&&e||(typeof globalThis!==o&&globalThis&&(n=globalThis),typeof self!==o&&self&&(n=self),typeof window!==o&&window&&(n=window),typeof global!==o&&global&&(n=global)),n}function I(e){throw new TypeError(e)}(m()||{}).Symbol,(m()||{}).Reflect;var b=function(e,n){return(b=c.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[a](t)&&(e[t]=n[t])})(e,n)},w="constructor",v="prototype",T="function",_="_dynInstFuncs",L="_isDynProxy",p="_dynClass",N="_dynInstChk",P=N,E="_dfOpts",A="_unknown_",D="__proto__",R="useBaseInst",M="setInstFuncs",O=Object,j=O.getPrototypeOf,K=0;function y(e,n){return e&&O[v].hasOwnProperty.call(e,n)}function S(e){return e&&(e===O[v]||e===Array[v])}function U(e){return S(e)||e===Function[v]}function C(e){if(e){if(j)return j(e);e=e[D]||e[v]||(e[w]?e[w][v]:null);if(e)return e}return null}function k(e,n){var t=[],r=O.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&y(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function z(e,n,t){return n!==w&&typeof e[n]===T&&(t||y(e,n))}function H(e){throw new TypeError("DynamicProto: "+e)}function q(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function F(e,n){return y(e,v)?e.name||n||A:((e||{})[w]||{}).name||n||A}function G(e,r,n,t){y(e,v)||H("theClass is an invalid class definition.");var c,i,o,l,f,g,s=e[v],u=(function(e){if(j)for(var n=[],t=C(r);t&&!U(t)&&!q(n,t);){if(t===e)return 1;n.push(t),t=C(t)}}(s)||H("["+F(e)+"] is not in class hierarchy of ["+F(r)+"]"),null),e=(y(s,p)?u=s[p]:(u="_dynCls$"+F(e,"_")+"$"+K,K++,s[p]=u),G[E]),a=!!e[R],d=(a&&t&&t[R]!==undefined&&(a=!!t[R]),i={},k(c=r,function(e){!i[e]&&z(c,e,!1)&&(i[e]=c[e])}),i),a=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[L]&&o&&!1!==(r=e[_]||{})[P]&&(i=(r[n[p]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},l=(k(t,function(e){i[e]=r(n,t,e)}),C(e)),s=[];l&&!U(l)&&!q(s,l);)k(l,function(e){!i[e]&&z(l,e,!j)&&(i[e]=r(n,l,e))}),s.push(l),l=C(l);return i}(s,r,d,a)),!!j&&!!e[M]);o=s,n=u,l=r,f=d,e=!1!==(a=a&&t?!!t[M]:a),S(o)||(s=l[_]=l[_]||{},g=s[n]=s[n]||{},!1!==s[P]&&(s[P]=!!e),k(l,function(e){var t,r,i;z(l,e,!1)&&l[e]!==f[e]&&(g[e]=l[e],delete l[e],y(o,e)&&(!o[e]||o[e][L])||(o[e]=(t=o,r=e,(i=function(){var e,n;return(function(e,n,t,c){var r=null;if(e&&y(t,p)){var i=e[_]||{};if((r=(i[t[p]]||{})[n])||H("Missing ["+n+"] "+T),!r[N]&&!1!==i[P]){for(var o=!y(e,n),l=C(e),s=[];o&&l&&!U(l)&&!q(s,l);){var u=l[n];if(u){o=u===c;break}s.push(l),l=C(l)}try{o&&(e[n]=r),r[N]=1}catch(a){i[P]=!1}}}return r}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?C(t)[e]:n)!==T&&H("["+e+"] is not a "+T),n)).apply(this,arguments)})[L]=1,i)))}))}G[E]={setInstFuncs:!0,useBaseInst:!0};var W={CRITICAL:1,1:"CRITICAL",WARNING:2,2:"WARNING"},J=73,V=e;function B(e){return d.toString.call(e)}function $(e){return e===undefined||typeof e===o}function f(e){return null===e||$(e)}function g(e){return typeof e===i}function Q(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function X(){var e=Date;return e.now?e.now():(new e).getTime()}var Y="window",Z="JSON";function ee(e){var n=m();return n&&n[e]?n[e]:e===Y&&typeof window===h&&window?window:null}function ne(){return typeof JSON===h&&JSON||null!==ee(Z)}function te(){return ne()?JSON||ee(Z):null}function re(e){var n=Object[u].toString.call(e),t="";return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":ne()&&(t=te().stringify(e)),n+t}var ie=null;function oe(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function le(e,n){var t,r=typeof console!==o?console:ee("console");r&&(t="log",g(r[t=r[e]?e:t])&&r[t](n))}ue.dataType="MessageData";var se=ue;function ue(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t="",ne()&&(t=te().stringify(r)),e=(n?" message:"+oe(n):"")+(r?" props:"+oe(t):"");this.message+=e}var ae=function _e(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};G(_e,this,function(o){function e(e,n){e=i[e];return f(e)?n:e}function l(e,n){var t,r=(t=(t=ie)||!0===i.disableDbgExt?t:ie||(r=ee("Microsoft"),ie=r?r.ApplicationInsights:ie))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}f(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,n,t,r,i){n=new se(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=e===W.CRITICAL?"errorToConsole":"warnToConsole";$(n.message)?l("throw"+(e===W.CRITICAL?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!u[i]&&e<=r&&(o[t](n.message),u[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){le("warn",e),l("warning",e)},o.errorToConsole=function(e){le("error",e),l("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,n){var t,r;s>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),s++,l(e===W.CRITICAL?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new se(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),e===W.CRITICAL?o.errorToConsole(t):o.warnToConsole(t))))}})},ce=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(e,i,n){var r,o=this,l=!1;o.start=X(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},g(i)&&(l=function(e){if(V)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&g(i)&&(r=i(),i=null),r}};return V(e,"payload",n),!0}catch(t){}return!1}(o)),o.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===s.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===s.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(s.ChildrenContextKey);if("[object Array]"===B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=X()-o.start,o.exTime=o.time-e,o.complete=function(){},!l&&g(i)&&(o.payload=i())}}var fe="CoreUtils.doPerf";function ge(e,n,t,r,i){if(e)if(e=g(e.getPerfMgr)?e.getPerfMgr():e){var o,l=void 0,s=e.getCtx(fe);try{if(l=e.create(n(),r,i))return s&&l.setCtx&&(l.setCtx(ce.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(ce.ChildrenContextKey))||(o=[],s.setCtx(ce.ChildrenContextKey,o)),o.push(l))),e.setCtx(fe,l),t(l)}catch(u){l&&l.setCtx&&l.setCtx("exception",u)}finally{l&&e.fire(l),e.setCtx(fe,s)}}return t()}var de=function(i,n){var o=this,l=null,s=g(i.processTelemetry),u=g(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return l},o.setNext=function(e){l=e},o.processTelemetry=function(t,r){r=r||n;var e=i?i.identifier:"TelemetryPluginChain";ge(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){o._hasRun=!0;try{r.setNext(l),u&&i.setNextPlugin(l),l&&(l._hasRun=!1),i.processTelemetry(t,r)}catch(n){var e=l&&l._hasRun;l&&e||r.diagLog().throwInternal(W.CRITICAL,J,"Plugin ["+i.identifier+"] failed during processTelemetry - "+re(n)),l&&!e&&l.processTelemetry(t,r)}}else l&&(o._hasRun=!0,l.processTelemetry(t,r))},function(){return{item:t}},!t.sync)}};function ve(e,n){var t=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var o=e[i];o&&g(o.processTelemetry)&&(o=new de(o,n),t.push(o),r&&r.setNext(o),r=o)}return 0<t.length?t[0]:null}var pe,ye=function Le(e,i,t,n){var r,o,l,s,u=this,a=null;null!==n&&(e&&g(e.getPlugin)?a=function(e,n,t){var r=[],i=!t;if(e)for(;e;){var o=e.getPlugin();!i&&o!==t||(i=!0,r.push(o)),e=e.getNext()}return i||r.push(t),ve(r,n)}(e,u,n||e.getPlugin()):n?(r=u,l=e,s=!1,(o=n)&&e&&(l=[],Q(e,function(e){!s&&e!==o||(s=!0,l.push(e))})),o&&!s&&(l=l||[]).push(o),a=ve(l,r)):$(n)&&(a=ve(e,u))),u.core=function(){return t},u.diagLog=function(){return(t||{}).logger||new ae(i)},u.getCfg=function(){return i},u.getExtCfg=function(e,n){var t,r;return void 0===n&&(n={}),!i||(r=i.extensionConfig)&&e&&(t=r[e]),t||n},u.getConfig=function(e,n,t){void 0===t&&(t=!1);var r,e=u.getExtCfg(e,null);return e&&!f(e[n])?r=e[n]:i&&!f(i[n])&&(r=i[n]),f(r)?t:r},u.hasNext=function(){return null!=a},u.getNext=function(){return a},u.setNext=function(e){a=e},u.processNext=function(e){var n=a;n&&(a=n.getNext(),n.processTelemetry(e,u))},u.createNew=function(e,n){return new Le((e=void 0===e?null:e)||a,i,t,n)}},Ce="getPlugin",e=(he.prototype.initialize=function(e,n,t,r){this._baseTelInit(e,n,t,r)},he);function he(){var s=this,u=!1,a=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,n){n?n.processNext(e):c&&g(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var n,e=e=void 0===e?null:e;return e||(n=a||new ye(null,{},s.core),e=c&&c[Ce]?n.createNew(null,c[Ce]):n.createNew(null,c)),e},s._baseTelInit=function(e,n,t,r){e&&(l="extensionConfig",o=i=[],!e||(o=e[l])!==i&&f(o)&&(e[l]=o=i)),!r&&n&&(r=n.getProcessTelContext().getNext());var i,o,l=c;c&&c[Ce]&&(l=c[Ce]()),s.core=n,a=new ye(r,e,n,l),u=!0}}pe={Verbose:0,0:"Verbose",Information:1,1:"Information",Warning:2,2:"Warning",Error:3,3:"Error",Critical:4,4:"Critical"},be.getConfig=function(e,n,t,r){return void 0===r&&(r=!1),t=(t&&e.extensionConfig&&e.extensionConfig[t]&&!f(e.extensionConfig[t][n])?e.extensionConfig[t]:e)[n],f(t)?r:t};var xe,me,Ie=be;function be(){}function we(e){var f,r,n=xe.call(this)||this,i=(n.identifier="AppInsightsReactNativePlugin",n.priority=140,{}),g=e||d();function d(){return{disableDeviceCollection:!1,disableExceptionCollection:!1}}return G(we,n,function(a,c){a.initialize=function(e,n,t){var r,i;if(!a.isInitialized()){c.initialize(e,n,t);var o=e||{},l=d(),s=function(e,n){g[e]=Ie.getConfig(o,e,a.identifier,$(g[e])?n:g[e])};if("object"===h)for(var u in l)i=u,(r=l)&&x.call(r,i)&&s(u,l[u]);g.disableDeviceCollection||a._collectDeviceInfo(),t&&Q(t,function(e){"ApplicationInsightsAnalytics"===e.identifier&&(f=e)}),g.disableExceptionCollection||a._setExceptionHandler()}},a.processTelemetry=function(e,n){var t=e;i&&(t.ext=t.ext||{},t.ext.device=t.ext.device||{},"string"==typeof i.id&&(t.ext.device.localId=i.id),"string"==typeof i.model&&(t.ext.device.model=i.model),"string"==typeof i.deviceClass&&(t.ext.device.deviceClass=i.deviceClass)),a.processNext(e,n)},a.setDeviceId=function(e){i.id=e},a.setDeviceModel=function(e){i.model=e},a.setDeviceType=function(e){i.deviceClass=e},a._collectDeviceInfo=function(){try{i.deviceClass=l["default"].getDeviceType(),i.id=l["default"].getUniqueId(),i.model=l["default"].getModel()}catch(n){a.diagLog().warnToConsole("Failed to get DeviceInfo: "+("[object Error]"===B(e=n)?e.name:"")+" - "+re(n))}var e},a._setExceptionHandler=function(){var e=typeof global!==o&&global?global:m();e&&e.ErrorUtils&&(r="function"==typeof e.ErrorUtils.getGlobalHandler&&e.ErrorUtils.getGlobalHandler()||e.ErrorUtils._globalHandler,e.ErrorUtils.setGlobalHandler((function(e,n){var t={exception:e,severityLevel:pe.Error};f?f.trackException(t):a.diagLog().throwInternal(W.CRITICAL,64,"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: "),r&&r.call(global,e,n)}).bind(n)))},a._config=g,a._getDbgPlgTargets=function(){return[i]}}),n}function Te(){this.constructor=me}me=we,typeof(e=xe=e)!==i&&null!==e&&I("Class extends value "+e+" is not a constructor or null"),b(me,e),me[u]=(Te[u]=e[u],new Te),t.ReactNativePlugin=we,Object.defineProperty(t,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react-native-device-info")):"function"==typeof define&&define.amd?define(["exports","react-native-device-info"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}),e.DeviceInfo);
|