@microsoft/applicationinsights-react-js 19.3.6-nightly.2504-04 → 19.3.6-nightly.2504-06
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-js.js +353 -142
- 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.api.json +32 -1
- package/dist/applicationinsights-react-js.api.md +3 -0
- package/dist/applicationinsights-react-js.d.ts +3 -1
- package/dist/applicationinsights-react-js.js +353 -142
- 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 +3 -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 +12 -3
- package/dist-esm/ReactPlugin.js.map +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 +2 -1
- package/src/ReactPlugin.ts +16 -2
- package/types/ReactPlugin.d.ts +2 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Plugin, 19.3.6-nightly.2504-
|
|
2
|
+
* Application Insights JavaScript SDK - React Plugin, 19.3.6-nightly.2504-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
var ObjClass$1 = Object;
|
|
39
39
|
var ObjProto$1 = ObjClass$1[strShimPrototype];
|
|
40
40
|
|
|
41
|
-
/*! https://github.com/nevware21/ts-utils v0.
|
|
41
|
+
/*! https://github.com/nevware21/ts-utils v0.12.2 */
|
|
42
42
|
function _pureAssign(func1, func2) {
|
|
43
43
|
return func1 || func2;
|
|
44
44
|
}
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
var UNDEFINED = "undefined";
|
|
56
56
|
var CONSTRUCTOR = "constructor";
|
|
57
57
|
var SYMBOL = "Symbol";
|
|
58
|
-
var POLYFILL_TAG = "_polyfill";
|
|
59
58
|
var LENGTH = "length";
|
|
60
59
|
var NAME = "name";
|
|
61
60
|
var CALL = "call";
|
|
@@ -68,6 +67,9 @@
|
|
|
68
67
|
var ArrCls = ( _pureAssign(Array));
|
|
69
68
|
var ArrProto = ( _pureRef(ArrCls, PROTOTYPE));
|
|
70
69
|
var ArrSlice = ( _pureRef(ArrProto, "slice"));
|
|
70
|
+
var NumberCls = ( _pureAssign(Number));
|
|
71
|
+
var POLYFILL_TAG = "_polyfill";
|
|
72
|
+
var POLYFILL_TYPE_NAME = "__nw21$polytype__";
|
|
71
73
|
function safe(func, argArray) {
|
|
72
74
|
try {
|
|
73
75
|
return {
|
|
@@ -100,13 +102,13 @@
|
|
|
100
102
|
return typeof value === UNDEFINED || value === UNDEFINED;
|
|
101
103
|
}
|
|
102
104
|
function isStrictUndefined(arg) {
|
|
103
|
-
return
|
|
105
|
+
return arg === UNDEF_VALUE;
|
|
104
106
|
}
|
|
105
107
|
function isNullOrUndefined(value) {
|
|
106
108
|
return value === NULL_VALUE || isUndefined(value);
|
|
107
109
|
}
|
|
108
110
|
function isStrictNullOrUndefined(value) {
|
|
109
|
-
return value === NULL_VALUE ||
|
|
111
|
+
return value === NULL_VALUE || value === UNDEF_VALUE;
|
|
110
112
|
}
|
|
111
113
|
function isDefined(arg) {
|
|
112
114
|
return !!arg || arg !== UNDEF_VALUE;
|
|
@@ -120,21 +122,59 @@
|
|
|
120
122
|
return !!value && typeof value === OBJECT;
|
|
121
123
|
}
|
|
122
124
|
var isArray = ( _pureRef(ArrCls, "isArray"));
|
|
125
|
+
var isNumber = ( _createIs("number"));
|
|
123
126
|
var isRegExp = ( _createObjIs("RegExp"));
|
|
124
127
|
var isError = ( _createObjIs("Error"));
|
|
125
128
|
function isTruthy(value) {
|
|
126
129
|
return !(!value || safeGet(function () { return !(value && (0 + value)); }, !value));
|
|
127
130
|
}
|
|
128
|
-
var
|
|
131
|
+
var asString = ( _pureAssign(StrCls));
|
|
132
|
+
var ERROR_TYPE = "[object Error]";
|
|
133
|
+
function dumpObj(object, format) {
|
|
134
|
+
var propertyValueDump = EMPTY;
|
|
135
|
+
var objType = ObjProto[TO_STRING][CALL](object);
|
|
136
|
+
if (objType === ERROR_TYPE) {
|
|
137
|
+
object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
|
|
141
|
+
propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
propertyValueDump = " - " + dumpObj(e, format);
|
|
145
|
+
}
|
|
146
|
+
return objType + ": " + propertyValueDump;
|
|
147
|
+
}
|
|
148
|
+
function throwTypeError(message) {
|
|
149
|
+
throw new TypeError(message);
|
|
150
|
+
}
|
|
151
|
+
function throwRangeError(message) {
|
|
152
|
+
throw new RangeError(message);
|
|
153
|
+
}
|
|
154
|
+
function _throwIfNullOrUndefined(obj) {
|
|
155
|
+
if (isStrictNullOrUndefined(obj)) {
|
|
156
|
+
throwTypeError("Cannot convert undefined or null to object");
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function _throwIfNotString(value) {
|
|
160
|
+
if (!isString(value)) {
|
|
161
|
+
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function _returnNothing() {
|
|
165
|
+
return UNDEF_VALUE;
|
|
166
|
+
}
|
|
167
|
+
var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptor")), _returnNothing));
|
|
129
168
|
function objHasOwnProperty(obj, prop) {
|
|
130
169
|
return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
|
|
131
170
|
}
|
|
132
|
-
var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
|
|
133
171
|
function polyObjHasOwn(obj, prop) {
|
|
172
|
+
_throwIfNullOrUndefined(obj);
|
|
134
173
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
135
174
|
}
|
|
175
|
+
var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
|
|
136
176
|
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
137
|
-
if (theObject && isObject(theObject)) {
|
|
177
|
+
if (theObject && (isObject(theObject) || isFunction(theObject))) {
|
|
138
178
|
for (var prop in theObject) {
|
|
139
179
|
if (objHasOwn(theObject, prop)) {
|
|
140
180
|
if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
|
|
@@ -144,6 +184,49 @@
|
|
|
144
184
|
}
|
|
145
185
|
}
|
|
146
186
|
}
|
|
187
|
+
( _pureAssign(( _pureRef(ObjClass, "getOwnPropertySymbols")), function () { return []; }));
|
|
188
|
+
function arrForEach(theArray, callbackfn, thisArg) {
|
|
189
|
+
if (theArray) {
|
|
190
|
+
var len = theArray[LENGTH] >>> 0;
|
|
191
|
+
for (var idx = 0; idx < len; idx++) {
|
|
192
|
+
if (idx in theArray) {
|
|
193
|
+
if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
var _unwrapFunction = ( _unwrapFunctionWithPoly);
|
|
201
|
+
function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
|
|
202
|
+
var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
|
|
203
|
+
return function (thisArg) {
|
|
204
|
+
var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
|
|
205
|
+
if (theFunc || polyFunc) {
|
|
206
|
+
var theArgs = arguments;
|
|
207
|
+
return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
|
|
208
|
+
}
|
|
209
|
+
throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function _objPropertyIsEnum(obj, propKey) {
|
|
213
|
+
var desc;
|
|
214
|
+
var fn = ObjClass.getOwnPropertyDescriptor;
|
|
215
|
+
if (!isStrictNullOrUndefined(obj) && fn) {
|
|
216
|
+
desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
|
|
217
|
+
}
|
|
218
|
+
if (!desc) {
|
|
219
|
+
desc = safe(function () {
|
|
220
|
+
for (var key in obj) {
|
|
221
|
+
if (key === propKey) {
|
|
222
|
+
return { enumerable: true };
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}).v;
|
|
226
|
+
}
|
|
227
|
+
return (desc && desc.enumerable) || false;
|
|
228
|
+
}
|
|
229
|
+
( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
|
|
147
230
|
var propMap = {
|
|
148
231
|
e: "enumerable",
|
|
149
232
|
c: "configurable",
|
|
@@ -171,7 +254,7 @@
|
|
|
171
254
|
return prop;
|
|
172
255
|
}
|
|
173
256
|
var objDefineProp = ( _pureRef(ObjClass, "defineProperty"));
|
|
174
|
-
( _pureRef(ObjClass, "defineProperties"));
|
|
257
|
+
var objDefineProperties = ( _pureRef(ObjClass, "defineProperties"));
|
|
175
258
|
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
176
259
|
var desc = {
|
|
177
260
|
e: enumerable,
|
|
@@ -203,59 +286,68 @@
|
|
|
203
286
|
writable: false
|
|
204
287
|
});
|
|
205
288
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
|
|
289
|
+
function polyObjEntries(value) {
|
|
290
|
+
var result = [];
|
|
291
|
+
objForEachKey(value, function (key, value) {
|
|
292
|
+
result.push([key, value]);
|
|
293
|
+
});
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
function polyObjIs(value1, value2) {
|
|
297
|
+
if (value1 !== value1) {
|
|
298
|
+
return value2 !== value2;
|
|
217
299
|
}
|
|
218
|
-
|
|
219
|
-
|
|
300
|
+
if (value1 === 0 && value2 === 0) {
|
|
301
|
+
return 1 / value1 === 1 / value2;
|
|
220
302
|
}
|
|
221
|
-
return
|
|
222
|
-
}
|
|
223
|
-
function throwTypeError(message) {
|
|
224
|
-
throw new TypeError(message);
|
|
303
|
+
return value1 === value2;
|
|
225
304
|
}
|
|
226
|
-
function
|
|
227
|
-
throw new RangeError(message);
|
|
228
|
-
}
|
|
229
|
-
function polyObjEntries(value) {
|
|
305
|
+
function polyObjValues(value) {
|
|
230
306
|
var result = [];
|
|
231
307
|
objForEachKey(value, function (key, value) {
|
|
232
|
-
result.push(
|
|
308
|
+
result.push(value);
|
|
233
309
|
});
|
|
234
310
|
return result;
|
|
235
311
|
}
|
|
312
|
+
function _returnFalse() {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), _returnFalse));
|
|
316
|
+
( _pureAssign(( _pureRef(ObjClass, "isSealed")), _returnFalse));
|
|
236
317
|
var _objFreeze = ( _pureRef(ObjClass, "freeze"));
|
|
237
318
|
function _doNothing(value) {
|
|
238
319
|
return value;
|
|
239
320
|
}
|
|
240
321
|
function _getProto(value) {
|
|
322
|
+
_throwIfNullOrUndefined(value);
|
|
241
323
|
return value[__PROTO__] || NULL_VALUE;
|
|
242
324
|
}
|
|
243
325
|
var objAssign = ( _pureRef(ObjClass, "assign"));
|
|
244
326
|
var objKeys = ( _pureRef(ObjClass, "keys"));
|
|
245
|
-
function
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
if (
|
|
249
|
-
|
|
327
|
+
function _deepFreeze(val, visited) {
|
|
328
|
+
if ((isArray(val) || isObject(val) || isFunction(val)) && !objIsFrozen(val)) {
|
|
329
|
+
for (var lp = 0; lp < visited.length; lp++) {
|
|
330
|
+
if (visited[lp] === val) {
|
|
331
|
+
return val;
|
|
250
332
|
}
|
|
333
|
+
}
|
|
334
|
+
visited.push(val);
|
|
335
|
+
objForEachKey(val, function (_key, propValue) {
|
|
336
|
+
_deepFreeze(propValue, visited);
|
|
251
337
|
});
|
|
338
|
+
objFreeze(val);
|
|
252
339
|
}
|
|
253
|
-
return
|
|
340
|
+
return val;
|
|
341
|
+
}
|
|
342
|
+
function objDeepFreeze(value) {
|
|
343
|
+
return _objFreeze ? _deepFreeze(value, []) : value;
|
|
254
344
|
}
|
|
255
345
|
var objFreeze = ( _pureAssign(_objFreeze, _doNothing));
|
|
256
346
|
( _pureAssign(( _pureRef(ObjClass, "seal")), _doNothing));
|
|
257
347
|
var objGetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "getPrototypeOf")), _getProto));
|
|
258
348
|
( _pureAssign(( _pureRef(ObjClass, "entries")), polyObjEntries));
|
|
349
|
+
( _pureAssign(( _pureRef(ObjClass, "values")), polyObjValues));
|
|
350
|
+
( _pureAssign(( _pureRef(ObjClass, "is")), polyObjIs));
|
|
259
351
|
function createEnum(values) {
|
|
260
352
|
return _createKeyValueMap(values, 1 , 0 , objFreeze);
|
|
261
353
|
}
|
|
@@ -302,27 +394,13 @@
|
|
|
302
394
|
}
|
|
303
395
|
return _globalCfg;
|
|
304
396
|
}
|
|
305
|
-
var _unwrapFunction = ( _unwrapFunctionWithPoly);
|
|
306
|
-
function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
|
|
307
|
-
var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
|
|
308
|
-
return function (thisArg) {
|
|
309
|
-
var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
|
|
310
|
-
if (theFunc || polyFunc) {
|
|
311
|
-
var theArgs = arguments;
|
|
312
|
-
return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
|
|
313
|
-
}
|
|
314
|
-
throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
397
|
( _pureRef(MathCls, "min"));
|
|
318
398
|
var mathMax = ( _pureRef(MathCls, "max"));
|
|
319
399
|
var strSlice = ( _unwrapFunction("slice", StrProto));
|
|
320
400
|
var strSubstring = ( _unwrapFunction("substring", StrProto));
|
|
321
401
|
( _unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
|
|
322
402
|
function polyStrSubstr(value, start, length) {
|
|
323
|
-
|
|
324
|
-
throwTypeError("Invalid " + dumpObj(value));
|
|
325
|
-
}
|
|
403
|
+
_throwIfNullOrUndefined(value);
|
|
326
404
|
if (length < 0) {
|
|
327
405
|
return EMPTY;
|
|
328
406
|
}
|
|
@@ -338,8 +416,90 @@
|
|
|
338
416
|
function strLeft(value, count) {
|
|
339
417
|
return strSubstring(value, 0, count);
|
|
340
418
|
}
|
|
419
|
+
function _tagAsPolyfill(target, polyfillTypeName) {
|
|
420
|
+
if (target) {
|
|
421
|
+
safe(function () {
|
|
422
|
+
target[POLYFILL_TAG] = true;
|
|
423
|
+
target[POLYFILL_TYPE_NAME] = polyfillTypeName;
|
|
424
|
+
});
|
|
425
|
+
safe(objDefine, [target, POLYFILL_TAG, {
|
|
426
|
+
v: true,
|
|
427
|
+
w: false,
|
|
428
|
+
e: false
|
|
429
|
+
}]);
|
|
430
|
+
safe(objDefine, [target, POLYFILL_TYPE_NAME, {
|
|
431
|
+
v: polyfillTypeName,
|
|
432
|
+
w: false,
|
|
433
|
+
e: false
|
|
434
|
+
}]);
|
|
435
|
+
}
|
|
436
|
+
return target;
|
|
437
|
+
}
|
|
438
|
+
var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
|
|
439
|
+
function polyObjCreate(obj, properties) {
|
|
440
|
+
var newObj = null;
|
|
441
|
+
function tempFunc() { }
|
|
442
|
+
if (!isStrictNullOrUndefined(obj)) {
|
|
443
|
+
var type = typeof obj;
|
|
444
|
+
if (type !== OBJECT && type !== FUNCTION) {
|
|
445
|
+
throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
|
|
446
|
+
}
|
|
447
|
+
tempFunc[PROTOTYPE] = obj;
|
|
448
|
+
safe(function () {
|
|
449
|
+
tempFunc[__PROTO__] = obj;
|
|
450
|
+
});
|
|
451
|
+
newObj = new tempFunc();
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
newObj = {};
|
|
455
|
+
}
|
|
456
|
+
if (properties) {
|
|
457
|
+
safe(objDefineProperties, [newObj, properties]);
|
|
458
|
+
}
|
|
459
|
+
return newObj;
|
|
460
|
+
}
|
|
461
|
+
function utcNow() {
|
|
462
|
+
return (Date.now || polyUtcNow)();
|
|
463
|
+
}
|
|
464
|
+
function polyUtcNow() {
|
|
465
|
+
return new Date().getTime();
|
|
466
|
+
}
|
|
467
|
+
var _globalLazyTestHooks;
|
|
468
|
+
function _initTestHooks() {
|
|
469
|
+
_globalLazyTestHooks = _getGlobalConfig();
|
|
470
|
+
}
|
|
471
|
+
function getLazy(cb) {
|
|
472
|
+
var lazyValue = {};
|
|
473
|
+
!_globalLazyTestHooks && _initTestHooks();
|
|
474
|
+
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
475
|
+
objDefineProp(lazyValue, "v", {
|
|
476
|
+
configurable: true,
|
|
477
|
+
get: function () {
|
|
478
|
+
var result = cb();
|
|
479
|
+
if (!_globalLazyTestHooks.lzy) {
|
|
480
|
+
objDefineProp(lazyValue, "v", {
|
|
481
|
+
value: result
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
485
|
+
return result;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
return lazyValue;
|
|
489
|
+
}
|
|
490
|
+
var mathRandom = ( _pureRef(MathCls, "random"));
|
|
491
|
+
var _uniqueInstanceId = ( getLazy(function () {
|
|
492
|
+
var value = (utcNow().toString(36).slice(2));
|
|
493
|
+
while (value.length < 16) {
|
|
494
|
+
value += mathRandom().toString(36).slice(2);
|
|
495
|
+
}
|
|
496
|
+
value = value.substring(0, 16);
|
|
497
|
+
return value;
|
|
498
|
+
}));
|
|
341
499
|
var UNIQUE_REGISTRY_ID = "_urid";
|
|
500
|
+
var POLY_SYM = "$nw21sym";
|
|
342
501
|
var _polySymbols;
|
|
502
|
+
var _polyId = 0;
|
|
343
503
|
function _globalSymbolRegistry() {
|
|
344
504
|
if (!_polySymbols) {
|
|
345
505
|
var gblCfg = _getGlobalConfig();
|
|
@@ -349,12 +509,22 @@
|
|
|
349
509
|
}
|
|
350
510
|
var _wellKnownSymbolCache;
|
|
351
511
|
function polyNewSymbol(description) {
|
|
352
|
-
var
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
512
|
+
var uniqueId = "_" + _polyId++ + "_" + _uniqueInstanceId.v;
|
|
513
|
+
var symString = SYMBOL + "(" + description + ")";
|
|
514
|
+
function _setProp(name, value) {
|
|
515
|
+
objDefine(theSymbol, name, {
|
|
516
|
+
v: value,
|
|
517
|
+
e: false,
|
|
518
|
+
w: false
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
var theSymbol = objCreate(null);
|
|
522
|
+
_setProp("description", asString(description));
|
|
523
|
+
_setProp(TO_STRING, function () { return symString + POLY_SYM + uniqueId; });
|
|
524
|
+
_setProp("valueOf", function () { return theSymbol; });
|
|
525
|
+
_setProp("v", symString);
|
|
526
|
+
_setProp("_uid", uniqueId);
|
|
527
|
+
return _tagAsPolyfill(theSymbol, "symbol");
|
|
358
528
|
}
|
|
359
529
|
function polySymbolFor(key) {
|
|
360
530
|
var registry = _globalSymbolRegistry();
|
|
@@ -376,29 +546,6 @@
|
|
|
376
546
|
}
|
|
377
547
|
return result;
|
|
378
548
|
}
|
|
379
|
-
var _globalLazyTestHooks;
|
|
380
|
-
function _initTestHooks() {
|
|
381
|
-
_globalLazyTestHooks = _getGlobalConfig();
|
|
382
|
-
}
|
|
383
|
-
function getLazy(cb) {
|
|
384
|
-
var lazyValue = {};
|
|
385
|
-
!_globalLazyTestHooks && _initTestHooks();
|
|
386
|
-
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
387
|
-
objDefineProp(lazyValue, "v", {
|
|
388
|
-
configurable: true,
|
|
389
|
-
get: function () {
|
|
390
|
-
var result = cb();
|
|
391
|
-
if (!_globalLazyTestHooks.lzy) {
|
|
392
|
-
objDefineProp(lazyValue, "v", {
|
|
393
|
-
value: result
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
397
|
-
return result;
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
return lazyValue;
|
|
401
|
-
}
|
|
402
549
|
function createCachedValue(value) {
|
|
403
550
|
return objDefineProp({
|
|
404
551
|
toJSON: function () { return value; }
|
|
@@ -550,18 +697,6 @@
|
|
|
550
697
|
}
|
|
551
698
|
_unwrapFunction("every", ArrProto);
|
|
552
699
|
_unwrapFunction("filter", ArrProto);
|
|
553
|
-
function arrForEach(theArray, callbackfn, thisArg) {
|
|
554
|
-
if (theArray) {
|
|
555
|
-
var len = theArray[LENGTH] >>> 0;
|
|
556
|
-
for (var idx = 0; idx < len; idx++) {
|
|
557
|
-
if (idx in theArray) {
|
|
558
|
-
if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
|
|
559
|
-
break;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
700
|
var arrIndexOf = ( _unwrapFunction("indexOf", ArrProto));
|
|
566
701
|
( _unwrapFunction("lastIndexOf", ArrProto));
|
|
567
702
|
var arrMap = ( _unwrapFunction("map", ArrProto));
|
|
@@ -621,28 +756,13 @@
|
|
|
621
756
|
( _unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
|
|
622
757
|
( _unwrapFunction("reduce", ArrProto));
|
|
623
758
|
( _unwrapFunction("some", ArrProto));
|
|
624
|
-
var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
|
|
625
|
-
function polyObjCreate(obj) {
|
|
626
|
-
if (!obj) {
|
|
627
|
-
return {};
|
|
628
|
-
}
|
|
629
|
-
var type = typeof obj;
|
|
630
|
-
if (type !== OBJECT && type !== FUNCTION) {
|
|
631
|
-
throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
|
|
632
|
-
}
|
|
633
|
-
function tempFunc() { }
|
|
634
|
-
tempFunc[PROTOTYPE] = obj;
|
|
635
|
-
return new tempFunc();
|
|
636
|
-
}
|
|
637
759
|
var _isProtoArray;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
};
|
|
645
|
-
return fn(obj, proto);
|
|
760
|
+
var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
|
|
761
|
+
function _polyObjSetPrototypeOf(obj, proto) {
|
|
762
|
+
var _a;
|
|
763
|
+
!_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
|
|
764
|
+
_isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
|
|
765
|
+
return obj;
|
|
646
766
|
}
|
|
647
767
|
function _createCustomError(name, d, b) {
|
|
648
768
|
safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
|
|
@@ -682,17 +802,9 @@
|
|
|
682
802
|
}
|
|
683
803
|
}, theBaseClass);
|
|
684
804
|
}
|
|
685
|
-
function utcNow() {
|
|
686
|
-
return (Date.now || polyUtcNow)();
|
|
687
|
-
}
|
|
688
|
-
function polyUtcNow() {
|
|
689
|
-
return new Date().getTime();
|
|
690
|
-
}
|
|
691
805
|
function _createTrimFn(exp) {
|
|
692
806
|
return function _doTrim(value) {
|
|
693
|
-
|
|
694
|
-
throwTypeError("strTrim called [" + dumpObj(value) + "]");
|
|
695
|
-
}
|
|
807
|
+
_throwIfNullOrUndefined(value);
|
|
696
808
|
if (value && value.replace) {
|
|
697
809
|
value = value.replace(exp, EMPTY);
|
|
698
810
|
}
|
|
@@ -716,16 +828,14 @@
|
|
|
716
828
|
}
|
|
717
829
|
function mathToInt(value, throwInfinity) {
|
|
718
830
|
var result = +value;
|
|
719
|
-
if (result
|
|
831
|
+
if (throwInfinity && (result === Infinity || result == Infinity)) {
|
|
720
832
|
throwRangeError("invalid value [" + dumpObj(value) + "]");
|
|
721
833
|
}
|
|
722
834
|
return result !== result || result === 0 ? 0 : mathTrunc(result);
|
|
723
835
|
}
|
|
724
836
|
var strRepeat = ( _unwrapFunctionWithPoly("repeat", StrProto, polyStrRepeat));
|
|
725
837
|
function polyStrRepeat(value, count) {
|
|
726
|
-
|
|
727
|
-
throwTypeError("can't convert [" + dumpObj(value) + "]");
|
|
728
|
-
}
|
|
838
|
+
_throwIfNullOrUndefined(value);
|
|
729
839
|
count = mathToInt(count, true);
|
|
730
840
|
if (count < 0) {
|
|
731
841
|
throwRangeError("invalid count must be >= 0 && < Infinity");
|
|
@@ -795,18 +905,111 @@
|
|
|
795
905
|
}
|
|
796
906
|
return result;
|
|
797
907
|
}
|
|
798
|
-
( _pureRef(MathCls, "round"));
|
|
799
908
|
function polyStrSymSplit(value, splitter, limit) {
|
|
800
909
|
var splitFn = splitter ? splitter[getKnownSymbol(9 )] : UNDEF_VALUE;
|
|
801
910
|
return splitFn ? splitFn(value, limit) : [value];
|
|
802
911
|
}
|
|
803
912
|
( _unwrapFunction("split", StrProto));
|
|
804
913
|
( _unwrapFunctionWithPoly("split", StrProto, !hasSymbol() ? polyStrSymSplit : NULL_VALUE));
|
|
914
|
+
( _pureAssign(( _pureRef(NumberCls, "isInteger")), _polyNumberIsInteger));
|
|
915
|
+
function _polyNumberIsInteger(value) {
|
|
916
|
+
return isNumber(value) && !isNaN(value) &&
|
|
917
|
+
isFinite(value) &&
|
|
918
|
+
mathFloor(value) === value;
|
|
919
|
+
}
|
|
920
|
+
( _pureRef(MathCls, "abs"));
|
|
921
|
+
( _pureRef(MathCls, "exp"));
|
|
922
|
+
( _pureRef(MathCls, "log"));
|
|
923
|
+
( _pureRef(MathCls, "asin"));
|
|
924
|
+
( _pureRef(MathCls, "acos"));
|
|
925
|
+
( _pureRef(MathCls, "atan"));
|
|
926
|
+
( _pureRef(MathCls, "atan2"));
|
|
927
|
+
( _pureRef(MathCls, "pow"));
|
|
928
|
+
( _pureRef(MathCls, "sqrt"));
|
|
929
|
+
( _pureRef(MathCls, "round"));
|
|
930
|
+
( _pureRef(MathCls, "sin"));
|
|
931
|
+
( _pureRef(MathCls, "cos"));
|
|
932
|
+
( _pureRef(MathCls, "tan"));
|
|
933
|
+
function _returnEmptyArray() {
|
|
934
|
+
return [];
|
|
935
|
+
}
|
|
936
|
+
var objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyNames")), _returnEmptyArray));
|
|
937
|
+
var recursionCheckOwnDescriptors;
|
|
938
|
+
function polyObjGetOwnPropertyDescriptors(obj) {
|
|
939
|
+
var result = {};
|
|
940
|
+
_throwIfNullOrUndefined(obj);
|
|
941
|
+
if (!recursionCheckOwnDescriptors) {
|
|
942
|
+
try {
|
|
943
|
+
recursionCheckOwnDescriptors = true;
|
|
944
|
+
arrForEach(objGetOwnPropertyNames(obj), function (propName) {
|
|
945
|
+
var descriptor = objGetOwnPropertyDescriptor(obj, propName);
|
|
946
|
+
if (descriptor !== undefined) {
|
|
947
|
+
result[propName] = descriptor;
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
arrForEach(polyObjGetOwnPropertySymbols(obj), function (sym) {
|
|
951
|
+
var descriptor = objGetOwnPropertyDescriptor(obj, sym);
|
|
952
|
+
if (descriptor !== undefined) {
|
|
953
|
+
result[sym] = descriptor;
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
finally {
|
|
958
|
+
recursionCheckOwnDescriptors = false;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
return result;
|
|
962
|
+
}
|
|
963
|
+
var recursionCheckOwnSymbols;
|
|
964
|
+
function polyObjGetOwnPropertySymbols(obj) {
|
|
965
|
+
var result = [];
|
|
966
|
+
var objHasOwn = ObjClass.hasOwn || polyObjHasOwn;
|
|
967
|
+
if (!recursionCheckOwnSymbols) {
|
|
968
|
+
try {
|
|
969
|
+
recursionCheckOwnSymbols = true;
|
|
970
|
+
var symEnum = 0 ;
|
|
971
|
+
while (symEnum <= 12 ) {
|
|
972
|
+
var sym = getKnownSymbol(symEnum);
|
|
973
|
+
if (sym && objHasOwn(obj, sym)) {
|
|
974
|
+
result.push(sym);
|
|
975
|
+
}
|
|
976
|
+
symEnum++;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
finally {
|
|
980
|
+
recursionCheckOwnSymbols = false;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
return result;
|
|
984
|
+
}
|
|
985
|
+
( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptors")), polyObjGetOwnPropertyDescriptors));
|
|
986
|
+
function polyObjFromEntries(entries) {
|
|
987
|
+
var result = {};
|
|
988
|
+
function addEntry(entry) {
|
|
989
|
+
if (isArray(entry) && entry.length >= 2) {
|
|
990
|
+
result[entry[0]] = entry[1];
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if (isArray(entries)) {
|
|
994
|
+
arrForEach(entries, addEntry);
|
|
995
|
+
}
|
|
996
|
+
else if (isIterable(entries)) {
|
|
997
|
+
iterForOf(entries, addEntry);
|
|
998
|
+
}
|
|
999
|
+
return result;
|
|
1000
|
+
}
|
|
1001
|
+
( _pureAssign(( _pureRef(ObjClass, "fromEntries")), polyObjFromEntries));
|
|
1002
|
+
function polyObjIsExtensible(obj) {
|
|
1003
|
+
if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), _doNothing));
|
|
1009
|
+
( _pureAssign(( _pureRef(ObjClass, "isExtensible")), polyObjIsExtensible));
|
|
805
1010
|
var strEndsWith = ( _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
|
|
806
1011
|
function polyStrEndsWith(value, searchString, length) {
|
|
807
|
-
|
|
808
|
-
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
809
|
-
}
|
|
1012
|
+
_throwIfNotString(value);
|
|
810
1013
|
var searchValue = isString(searchString) ? searchString : asString(searchString);
|
|
811
1014
|
var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
|
|
812
1015
|
return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
|
|
@@ -822,9 +1025,7 @@
|
|
|
822
1025
|
}
|
|
823
1026
|
( _unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
|
|
824
1027
|
function polyStrStartsWith(value, searchString, position) {
|
|
825
|
-
|
|
826
|
-
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
827
|
-
}
|
|
1028
|
+
_throwIfNotString(value);
|
|
828
1029
|
var searchValue = isString(searchString) ? searchString : asString(searchString);
|
|
829
1030
|
var pos = position > 0 ? position : 0;
|
|
830
1031
|
return strSubstring(value, pos, pos + searchValue[LENGTH]) === searchValue;
|
|
@@ -1268,6 +1469,13 @@
|
|
|
1268
1469
|
var STR_PATH = "path";
|
|
1269
1470
|
var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
|
|
1270
1471
|
|
|
1472
|
+
function cfgDfMerge(defaultValue) {
|
|
1473
|
+
return {
|
|
1474
|
+
mrg: true,
|
|
1475
|
+
v: defaultValue
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1271
1479
|
var rCamelCase = /-([a-z])/g;
|
|
1272
1480
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
1273
1481
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
@@ -1470,7 +1678,7 @@
|
|
|
1470
1678
|
return result;
|
|
1471
1679
|
}
|
|
1472
1680
|
|
|
1473
|
-
var version = '3.3.7-nightly3.2504-
|
|
1681
|
+
var version = '3.3.7-nightly3.2504-13';
|
|
1474
1682
|
var instanceName = "." + newId(6);
|
|
1475
1683
|
var _dataUid = 0;
|
|
1476
1684
|
function _canAcceptData(target) {
|
|
@@ -2136,13 +2344,6 @@
|
|
|
2136
2344
|
return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
|
|
2137
2345
|
}
|
|
2138
2346
|
|
|
2139
|
-
function cfgDfMerge(defaultValue) {
|
|
2140
|
-
return {
|
|
2141
|
-
mrg: true,
|
|
2142
|
-
v: defaultValue
|
|
2143
|
-
};
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
2347
|
var _aiNamespace = null;
|
|
2147
2348
|
function _getExtensionNamespace() {
|
|
2148
2349
|
var target = getInst("Microsoft");
|
|
@@ -3308,6 +3509,7 @@
|
|
|
3308
3509
|
Critical: 4
|
|
3309
3510
|
});
|
|
3310
3511
|
|
|
3512
|
+
var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
3311
3513
|
var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
|
|
3312
3514
|
|
|
3313
3515
|
var defaultReactExtensionConfig = objDeepFreeze({
|
|
@@ -3324,10 +3526,18 @@
|
|
|
3324
3526
|
var _unlisten;
|
|
3325
3527
|
var _pageViewTimer;
|
|
3326
3528
|
var _pageViewTracked;
|
|
3529
|
+
var properties;
|
|
3327
3530
|
dynamicProto(ReactPlugin, _this, function (_self, _base) {
|
|
3328
3531
|
_initDefaults();
|
|
3329
3532
|
_self.initialize = function (config, core, extensions, pluginChain) {
|
|
3330
3533
|
_super.prototype.initialize.call(_this, config, core, extensions, pluginChain);
|
|
3534
|
+
var thePlugin = core.getPlugin(PropertiesPluginIdentifier);
|
|
3535
|
+
if (thePlugin) {
|
|
3536
|
+
properties = thePlugin.plugin;
|
|
3537
|
+
}
|
|
3538
|
+
objDefine(_self, "context", {
|
|
3539
|
+
g: function () { return properties ? properties.context : null; }
|
|
3540
|
+
});
|
|
3331
3541
|
_self._addHook(onConfigChange(config, function (details) {
|
|
3332
3542
|
var _a;
|
|
3333
3543
|
var ctx = _self._getTelCtx();
|
|
@@ -3378,6 +3588,7 @@
|
|
|
3378
3588
|
_unlisten = null;
|
|
3379
3589
|
_pageViewTimer = null;
|
|
3380
3590
|
_pageViewTracked = false;
|
|
3591
|
+
properties = null;
|
|
3381
3592
|
}
|
|
3382
3593
|
function _getAnalytics() {
|
|
3383
3594
|
if (!_analyticsPlugin) {
|