@microsoft/applicationinsights-react-native 4.3.7-nightly.2504-04 → 4.3.7-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-native.js +336 -116
- package/browser/applicationinsights-react-native.js.map +1 -1
- package/browser/applicationinsights-react-native.min.js +2 -2
- package/browser/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.api.json +1 -1
- package/dist/applicationinsights-react-native.d.ts +1 -1
- package/dist/applicationinsights-react-native.js +336 -116
- package/dist/applicationinsights-react-native.js.map +1 -1
- package/dist/applicationinsights-react-native.min.js +2 -2
- package/dist/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.rollup.d.ts +1 -1
- package/dist-esm/DeviceInfo/DeviceModule.js +1 -1
- package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js +1 -1
- package/dist-esm/Interfaces/IDeviceInfoModule.js +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/ReactNativeManualDevicePlugin.js +1 -1
- package/dist-esm/ReactNativePlugin.js +1 -1
- package/dist-esm/index.js +1 -1
- package/dist-esm/manualIndex.js +1 -1
- package/package.json +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Native Plugin, 4.3.7-nightly.2504-
|
|
2
|
+
* Application Insights JavaScript SDK - React Native Plugin, 4.3.7-nightly.2504-06
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
var strShimPrototype = "prototype";
|
|
19
19
|
var ObjClass$1 = Object;
|
|
20
20
|
|
|
21
|
-
/*! https://github.com/nevware21/ts-utils v0.
|
|
21
|
+
/*! https://github.com/nevware21/ts-utils v0.12.2 */
|
|
22
22
|
function _pureAssign(func1, func2) {
|
|
23
23
|
return func1 || func2;
|
|
24
24
|
}
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
var UNDEFINED = "undefined";
|
|
36
36
|
var CONSTRUCTOR = "constructor";
|
|
37
37
|
var SYMBOL = "Symbol";
|
|
38
|
-
var POLYFILL_TAG = "_polyfill";
|
|
39
38
|
var LENGTH = "length";
|
|
40
39
|
var NAME = "name";
|
|
41
40
|
var CALL = "call";
|
|
@@ -48,6 +47,9 @@
|
|
|
48
47
|
var ArrCls = ( _pureAssign(Array));
|
|
49
48
|
var ArrProto = ( _pureRef(ArrCls, PROTOTYPE));
|
|
50
49
|
var ArrSlice = ( _pureRef(ArrProto, "slice"));
|
|
50
|
+
var NumberCls = ( _pureAssign(Number));
|
|
51
|
+
var POLYFILL_TAG = "_polyfill";
|
|
52
|
+
var POLYFILL_TYPE_NAME = "__nw21$polytype__";
|
|
51
53
|
function safe(func, argArray) {
|
|
52
54
|
try {
|
|
53
55
|
return {
|
|
@@ -76,13 +78,13 @@
|
|
|
76
78
|
return typeof value === UNDEFINED || value === UNDEFINED;
|
|
77
79
|
}
|
|
78
80
|
function isStrictUndefined(arg) {
|
|
79
|
-
return
|
|
81
|
+
return arg === UNDEF_VALUE;
|
|
80
82
|
}
|
|
81
83
|
function isNullOrUndefined(value) {
|
|
82
84
|
return value === NULL_VALUE || isUndefined(value);
|
|
83
85
|
}
|
|
84
86
|
function isStrictNullOrUndefined(value) {
|
|
85
|
-
return value === NULL_VALUE ||
|
|
87
|
+
return value === NULL_VALUE || value === UNDEF_VALUE;
|
|
86
88
|
}
|
|
87
89
|
function isDefined(arg) {
|
|
88
90
|
return !!arg || arg !== UNDEF_VALUE;
|
|
@@ -96,21 +98,59 @@
|
|
|
96
98
|
return !!value && typeof value === OBJECT;
|
|
97
99
|
}
|
|
98
100
|
var isArray = ( _pureRef(ArrCls, "isArray"));
|
|
101
|
+
var isNumber = ( _createIs("number"));
|
|
99
102
|
var isRegExp = ( _createObjIs("RegExp"));
|
|
100
103
|
var isError = ( _createObjIs("Error"));
|
|
101
104
|
function isPromiseLike(value) {
|
|
102
105
|
return !!(value && value.then && isFunction(value.then));
|
|
103
106
|
}
|
|
104
|
-
var
|
|
107
|
+
var asString = ( _pureAssign(StrCls));
|
|
108
|
+
var ERROR_TYPE = "[object Error]";
|
|
109
|
+
function dumpObj(object, format) {
|
|
110
|
+
var propertyValueDump = EMPTY;
|
|
111
|
+
var objType = ObjProto[TO_STRING][CALL](object);
|
|
112
|
+
if (objType === ERROR_TYPE) {
|
|
113
|
+
object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
|
|
117
|
+
propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
|
|
118
|
+
}
|
|
119
|
+
catch (e) {
|
|
120
|
+
propertyValueDump = " - " + dumpObj(e, format);
|
|
121
|
+
}
|
|
122
|
+
return objType + ": " + propertyValueDump;
|
|
123
|
+
}
|
|
124
|
+
function throwTypeError(message) {
|
|
125
|
+
throw new TypeError(message);
|
|
126
|
+
}
|
|
127
|
+
function throwRangeError(message) {
|
|
128
|
+
throw new RangeError(message);
|
|
129
|
+
}
|
|
130
|
+
function _throwIfNullOrUndefined(obj) {
|
|
131
|
+
if (isStrictNullOrUndefined(obj)) {
|
|
132
|
+
throwTypeError("Cannot convert undefined or null to object");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function _throwIfNotString(value) {
|
|
136
|
+
if (!isString(value)) {
|
|
137
|
+
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function _returnNothing() {
|
|
141
|
+
return UNDEF_VALUE;
|
|
142
|
+
}
|
|
143
|
+
var objGetOwnPropertyDescriptor = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptor")), _returnNothing));
|
|
105
144
|
function objHasOwnProperty(obj, prop) {
|
|
106
145
|
return !!obj && ObjProto.hasOwnProperty[CALL](obj, prop);
|
|
107
146
|
}
|
|
108
|
-
var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
|
|
109
147
|
function polyObjHasOwn(obj, prop) {
|
|
148
|
+
_throwIfNullOrUndefined(obj);
|
|
110
149
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
111
150
|
}
|
|
151
|
+
var objHasOwn = ( _pureAssign(( _pureRef(ObjClass, "hasOwn")), polyObjHasOwn));
|
|
112
152
|
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
113
|
-
if (theObject && isObject(theObject)) {
|
|
153
|
+
if (theObject && (isObject(theObject) || isFunction(theObject))) {
|
|
114
154
|
for (var prop in theObject) {
|
|
115
155
|
if (objHasOwn(theObject, prop)) {
|
|
116
156
|
if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
|
|
@@ -120,6 +160,49 @@
|
|
|
120
160
|
}
|
|
121
161
|
}
|
|
122
162
|
}
|
|
163
|
+
( _pureAssign(( _pureRef(ObjClass, "getOwnPropertySymbols")), function () { return []; }));
|
|
164
|
+
function arrForEach(theArray, callbackfn, thisArg) {
|
|
165
|
+
if (theArray) {
|
|
166
|
+
var len = theArray[LENGTH] >>> 0;
|
|
167
|
+
for (var idx = 0; idx < len; idx++) {
|
|
168
|
+
if (idx in theArray) {
|
|
169
|
+
if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
var _unwrapFunction = ( _unwrapFunctionWithPoly);
|
|
177
|
+
function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
|
|
178
|
+
var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
|
|
179
|
+
return function (thisArg) {
|
|
180
|
+
var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
|
|
181
|
+
if (theFunc || polyFunc) {
|
|
182
|
+
var theArgs = arguments;
|
|
183
|
+
return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
|
|
184
|
+
}
|
|
185
|
+
throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function _objPropertyIsEnum(obj, propKey) {
|
|
189
|
+
var desc;
|
|
190
|
+
var fn = ObjClass.getOwnPropertyDescriptor;
|
|
191
|
+
if (!isStrictNullOrUndefined(obj) && fn) {
|
|
192
|
+
desc = safe(fn, [obj, propKey]).v || NULL_VALUE;
|
|
193
|
+
}
|
|
194
|
+
if (!desc) {
|
|
195
|
+
desc = safe(function () {
|
|
196
|
+
for (var key in obj) {
|
|
197
|
+
if (key === propKey) {
|
|
198
|
+
return { enumerable: true };
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}).v;
|
|
202
|
+
}
|
|
203
|
+
return (desc && desc.enumerable) || false;
|
|
204
|
+
}
|
|
205
|
+
( _unwrapFunctionWithPoly("propertyIsEnumerable", NULL_VALUE, _objPropertyIsEnum));
|
|
123
206
|
var propMap = {
|
|
124
207
|
e: "enumerable",
|
|
125
208
|
c: "configurable",
|
|
@@ -147,7 +230,7 @@
|
|
|
147
230
|
return prop;
|
|
148
231
|
}
|
|
149
232
|
var objDefineProp = ( _pureRef(ObjClass, "defineProperty"));
|
|
150
|
-
( _pureRef(ObjClass, "defineProperties"));
|
|
233
|
+
var objDefineProperties = ( _pureRef(ObjClass, "defineProperties"));
|
|
151
234
|
function objDefine(target, key, propDesc) {
|
|
152
235
|
return objDefineProp(target, key, _createProp(propDesc));
|
|
153
236
|
}
|
|
@@ -166,59 +249,68 @@
|
|
|
166
249
|
writable: false
|
|
167
250
|
});
|
|
168
251
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
propertyValueDump = (propertyValueDump ? propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ") : NULL_VALUE) || asString(object);
|
|
252
|
+
function polyObjEntries(value) {
|
|
253
|
+
var result = [];
|
|
254
|
+
objForEachKey(value, function (key, value) {
|
|
255
|
+
result.push([key, value]);
|
|
256
|
+
});
|
|
257
|
+
return result;
|
|
258
|
+
}
|
|
259
|
+
function polyObjIs(value1, value2) {
|
|
260
|
+
if (value1 !== value1) {
|
|
261
|
+
return value2 !== value2;
|
|
180
262
|
}
|
|
181
|
-
|
|
182
|
-
|
|
263
|
+
if (value1 === 0 && value2 === 0) {
|
|
264
|
+
return 1 / value1 === 1 / value2;
|
|
183
265
|
}
|
|
184
|
-
return
|
|
185
|
-
}
|
|
186
|
-
function throwTypeError(message) {
|
|
187
|
-
throw new TypeError(message);
|
|
188
|
-
}
|
|
189
|
-
function throwRangeError(message) {
|
|
190
|
-
throw new RangeError(message);
|
|
266
|
+
return value1 === value2;
|
|
191
267
|
}
|
|
192
|
-
function
|
|
268
|
+
function polyObjValues(value) {
|
|
193
269
|
var result = [];
|
|
194
270
|
objForEachKey(value, function (key, value) {
|
|
195
|
-
result.push(
|
|
271
|
+
result.push(value);
|
|
196
272
|
});
|
|
197
273
|
return result;
|
|
198
274
|
}
|
|
275
|
+
function _returnFalse() {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
var objIsFrozen = ( _pureAssign(( _pureRef(ObjClass, "isFrozen")), _returnFalse));
|
|
279
|
+
( _pureAssign(( _pureRef(ObjClass, "isSealed")), _returnFalse));
|
|
199
280
|
var _objFreeze = ( _pureRef(ObjClass, "freeze"));
|
|
200
281
|
function _doNothing(value) {
|
|
201
282
|
return value;
|
|
202
283
|
}
|
|
203
284
|
function _getProto(value) {
|
|
285
|
+
_throwIfNullOrUndefined(value);
|
|
204
286
|
return value[__PROTO__] || NULL_VALUE;
|
|
205
287
|
}
|
|
206
288
|
( _pureRef(ObjClass, "assign"));
|
|
207
289
|
var objKeys = ( _pureRef(ObjClass, "keys"));
|
|
208
|
-
function
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
if (
|
|
212
|
-
|
|
290
|
+
function _deepFreeze(val, visited) {
|
|
291
|
+
if ((isArray(val) || isObject(val) || isFunction(val)) && !objIsFrozen(val)) {
|
|
292
|
+
for (var lp = 0; lp < visited.length; lp++) {
|
|
293
|
+
if (visited[lp] === val) {
|
|
294
|
+
return val;
|
|
213
295
|
}
|
|
296
|
+
}
|
|
297
|
+
visited.push(val);
|
|
298
|
+
objForEachKey(val, function (_key, propValue) {
|
|
299
|
+
_deepFreeze(propValue, visited);
|
|
214
300
|
});
|
|
301
|
+
objFreeze(val);
|
|
215
302
|
}
|
|
216
|
-
return
|
|
303
|
+
return val;
|
|
304
|
+
}
|
|
305
|
+
function objDeepFreeze(value) {
|
|
306
|
+
return _objFreeze ? _deepFreeze(value, []) : value;
|
|
217
307
|
}
|
|
218
308
|
var objFreeze = ( _pureAssign(_objFreeze, _doNothing));
|
|
219
309
|
( _pureAssign(( _pureRef(ObjClass, "seal")), _doNothing));
|
|
220
310
|
var objGetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "getPrototypeOf")), _getProto));
|
|
221
311
|
( _pureAssign(( _pureRef(ObjClass, "entries")), polyObjEntries));
|
|
312
|
+
( _pureAssign(( _pureRef(ObjClass, "values")), polyObjValues));
|
|
313
|
+
( _pureAssign(( _pureRef(ObjClass, "is")), polyObjIs));
|
|
222
314
|
function createEnumKeyMap(values) {
|
|
223
315
|
return _createKeyValueMap(values, 0 , 0 , objFreeze);
|
|
224
316
|
}
|
|
@@ -262,27 +354,13 @@
|
|
|
262
354
|
}
|
|
263
355
|
return _globalCfg;
|
|
264
356
|
}
|
|
265
|
-
var _unwrapFunction = ( _unwrapFunctionWithPoly);
|
|
266
|
-
function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
|
|
267
|
-
var clsFn = clsProto ? clsProto[funcName] : NULL_VALUE;
|
|
268
|
-
return function (thisArg) {
|
|
269
|
-
var theFunc = (thisArg ? thisArg[funcName] : NULL_VALUE) || clsFn;
|
|
270
|
-
if (theFunc || polyFunc) {
|
|
271
|
-
var theArgs = arguments;
|
|
272
|
-
return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
|
|
273
|
-
}
|
|
274
|
-
throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
357
|
( _pureRef(MathCls, "min"));
|
|
278
358
|
var mathMax = ( _pureRef(MathCls, "max"));
|
|
279
359
|
var strSlice = ( _unwrapFunction("slice", StrProto));
|
|
280
360
|
var strSubstring = ( _unwrapFunction("substring", StrProto));
|
|
281
361
|
( _unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
|
|
282
362
|
function polyStrSubstr(value, start, length) {
|
|
283
|
-
|
|
284
|
-
throwTypeError("Invalid " + dumpObj(value));
|
|
285
|
-
}
|
|
363
|
+
_throwIfNullOrUndefined(value);
|
|
286
364
|
if (length < 0) {
|
|
287
365
|
return EMPTY;
|
|
288
366
|
}
|
|
@@ -295,8 +373,90 @@
|
|
|
295
373
|
}
|
|
296
374
|
return strSlice(value, start, start + length);
|
|
297
375
|
}
|
|
376
|
+
function _tagAsPolyfill(target, polyfillTypeName) {
|
|
377
|
+
if (target) {
|
|
378
|
+
safe(function () {
|
|
379
|
+
target[POLYFILL_TAG] = true;
|
|
380
|
+
target[POLYFILL_TYPE_NAME] = polyfillTypeName;
|
|
381
|
+
});
|
|
382
|
+
safe(objDefine, [target, POLYFILL_TAG, {
|
|
383
|
+
v: true,
|
|
384
|
+
w: false,
|
|
385
|
+
e: false
|
|
386
|
+
}]);
|
|
387
|
+
safe(objDefine, [target, POLYFILL_TYPE_NAME, {
|
|
388
|
+
v: polyfillTypeName,
|
|
389
|
+
w: false,
|
|
390
|
+
e: false
|
|
391
|
+
}]);
|
|
392
|
+
}
|
|
393
|
+
return target;
|
|
394
|
+
}
|
|
395
|
+
var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
|
|
396
|
+
function polyObjCreate(obj, properties) {
|
|
397
|
+
var newObj = null;
|
|
398
|
+
function tempFunc() { }
|
|
399
|
+
if (!isStrictNullOrUndefined(obj)) {
|
|
400
|
+
var type = typeof obj;
|
|
401
|
+
if (type !== OBJECT && type !== FUNCTION) {
|
|
402
|
+
throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
|
|
403
|
+
}
|
|
404
|
+
tempFunc[PROTOTYPE] = obj;
|
|
405
|
+
safe(function () {
|
|
406
|
+
tempFunc[__PROTO__] = obj;
|
|
407
|
+
});
|
|
408
|
+
newObj = new tempFunc();
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
newObj = {};
|
|
412
|
+
}
|
|
413
|
+
if (properties) {
|
|
414
|
+
safe(objDefineProperties, [newObj, properties]);
|
|
415
|
+
}
|
|
416
|
+
return newObj;
|
|
417
|
+
}
|
|
418
|
+
function utcNow() {
|
|
419
|
+
return (Date.now || polyUtcNow)();
|
|
420
|
+
}
|
|
421
|
+
function polyUtcNow() {
|
|
422
|
+
return new Date().getTime();
|
|
423
|
+
}
|
|
424
|
+
var _globalLazyTestHooks;
|
|
425
|
+
function _initTestHooks() {
|
|
426
|
+
_globalLazyTestHooks = _getGlobalConfig();
|
|
427
|
+
}
|
|
428
|
+
function getLazy(cb) {
|
|
429
|
+
var lazyValue = {};
|
|
430
|
+
!_globalLazyTestHooks && _initTestHooks();
|
|
431
|
+
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
432
|
+
objDefineProp(lazyValue, "v", {
|
|
433
|
+
configurable: true,
|
|
434
|
+
get: function () {
|
|
435
|
+
var result = cb();
|
|
436
|
+
if (!_globalLazyTestHooks.lzy) {
|
|
437
|
+
objDefineProp(lazyValue, "v", {
|
|
438
|
+
value: result
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
lazyValue.b = _globalLazyTestHooks.lzy;
|
|
442
|
+
return result;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
return lazyValue;
|
|
446
|
+
}
|
|
447
|
+
var mathRandom = ( _pureRef(MathCls, "random"));
|
|
448
|
+
var _uniqueInstanceId = ( getLazy(function () {
|
|
449
|
+
var value = (utcNow().toString(36).slice(2));
|
|
450
|
+
while (value.length < 16) {
|
|
451
|
+
value += mathRandom().toString(36).slice(2);
|
|
452
|
+
}
|
|
453
|
+
value = value.substring(0, 16);
|
|
454
|
+
return value;
|
|
455
|
+
}));
|
|
298
456
|
var UNIQUE_REGISTRY_ID = "_urid";
|
|
457
|
+
var POLY_SYM = "$nw21sym";
|
|
299
458
|
var _polySymbols;
|
|
459
|
+
var _polyId = 0;
|
|
300
460
|
function _globalSymbolRegistry() {
|
|
301
461
|
if (!_polySymbols) {
|
|
302
462
|
var gblCfg = _getGlobalConfig();
|
|
@@ -306,12 +466,22 @@
|
|
|
306
466
|
}
|
|
307
467
|
var _wellKnownSymbolCache;
|
|
308
468
|
function polyNewSymbol(description) {
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
469
|
+
var uniqueId = "_" + _polyId++ + "_" + _uniqueInstanceId.v;
|
|
470
|
+
var symString = SYMBOL + "(" + description + ")";
|
|
471
|
+
function _setProp(name, value) {
|
|
472
|
+
objDefine(theSymbol, name, {
|
|
473
|
+
v: value,
|
|
474
|
+
e: false,
|
|
475
|
+
w: false
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
var theSymbol = objCreate(null);
|
|
479
|
+
_setProp("description", asString(description));
|
|
480
|
+
_setProp(TO_STRING, function () { return symString + POLY_SYM + uniqueId; });
|
|
481
|
+
_setProp("valueOf", function () { return theSymbol; });
|
|
482
|
+
_setProp("v", symString);
|
|
483
|
+
_setProp("_uid", uniqueId);
|
|
484
|
+
return _tagAsPolyfill(theSymbol, "symbol");
|
|
315
485
|
}
|
|
316
486
|
function polySymbolFor(key) {
|
|
317
487
|
var registry = _globalSymbolRegistry();
|
|
@@ -333,10 +503,6 @@
|
|
|
333
503
|
}
|
|
334
504
|
return result;
|
|
335
505
|
}
|
|
336
|
-
var _globalLazyTestHooks;
|
|
337
|
-
function _initTestHooks() {
|
|
338
|
-
_globalLazyTestHooks = _getGlobalConfig();
|
|
339
|
-
}
|
|
340
506
|
function createCachedValue(value) {
|
|
341
507
|
return objDefineProp({
|
|
342
508
|
toJSON: function () { return value; }
|
|
@@ -487,18 +653,6 @@
|
|
|
487
653
|
}
|
|
488
654
|
_unwrapFunction("every", ArrProto);
|
|
489
655
|
_unwrapFunction("filter", ArrProto);
|
|
490
|
-
function arrForEach(theArray, callbackfn, thisArg) {
|
|
491
|
-
if (theArray) {
|
|
492
|
-
var len = theArray[LENGTH] >>> 0;
|
|
493
|
-
for (var idx = 0; idx < len; idx++) {
|
|
494
|
-
if (idx in theArray) {
|
|
495
|
-
if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
|
|
496
|
-
break;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
656
|
var arrIndexOf = ( _unwrapFunction("indexOf", ArrProto));
|
|
503
657
|
( _unwrapFunction("lastIndexOf", ArrProto));
|
|
504
658
|
var arrMap = ( _unwrapFunction("map", ArrProto));
|
|
@@ -558,28 +712,13 @@
|
|
|
558
712
|
( _unwrapFunctionWithPoly("includes", ArrProto, polyArrIncludes));
|
|
559
713
|
( _unwrapFunction("reduce", ArrProto));
|
|
560
714
|
( _unwrapFunction("some", ArrProto));
|
|
561
|
-
var objCreate = ( _pureAssign(( _pureRef(ObjClass, "create")), polyObjCreate));
|
|
562
|
-
function polyObjCreate(obj) {
|
|
563
|
-
if (!obj) {
|
|
564
|
-
return {};
|
|
565
|
-
}
|
|
566
|
-
var type = typeof obj;
|
|
567
|
-
if (type !== OBJECT && type !== FUNCTION) {
|
|
568
|
-
throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
|
|
569
|
-
}
|
|
570
|
-
function tempFunc() { }
|
|
571
|
-
tempFunc[PROTOTYPE] = obj;
|
|
572
|
-
return new tempFunc();
|
|
573
|
-
}
|
|
574
715
|
var _isProtoArray;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
};
|
|
582
|
-
return fn(obj, proto);
|
|
716
|
+
var objSetPrototypeOf = ( _pureAssign(( _pureRef(ObjClass, "setPrototypeOf")), _polyObjSetPrototypeOf));
|
|
717
|
+
function _polyObjSetPrototypeOf(obj, proto) {
|
|
718
|
+
var _a;
|
|
719
|
+
!_isProtoArray && (_isProtoArray = createCachedValue((_a = {}, _a[__PROTO__] = [], _a) instanceof Array));
|
|
720
|
+
_isProtoArray.v ? obj[__PROTO__] = proto : objForEachKey(proto, function (key, value) { return obj[key] = value; });
|
|
721
|
+
return obj;
|
|
583
722
|
}
|
|
584
723
|
function _createCustomError(name, d, b) {
|
|
585
724
|
safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
|
|
@@ -619,17 +758,9 @@
|
|
|
619
758
|
}
|
|
620
759
|
}, theBaseClass);
|
|
621
760
|
}
|
|
622
|
-
function utcNow() {
|
|
623
|
-
return (Date.now || polyUtcNow)();
|
|
624
|
-
}
|
|
625
|
-
function polyUtcNow() {
|
|
626
|
-
return new Date().getTime();
|
|
627
|
-
}
|
|
628
761
|
function _createTrimFn(exp) {
|
|
629
762
|
return function _doTrim(value) {
|
|
630
|
-
|
|
631
|
-
throwTypeError("strTrim called [" + dumpObj(value) + "]");
|
|
632
|
-
}
|
|
763
|
+
_throwIfNullOrUndefined(value);
|
|
633
764
|
if (value && value.replace) {
|
|
634
765
|
value = value.replace(exp, EMPTY);
|
|
635
766
|
}
|
|
@@ -653,16 +784,14 @@
|
|
|
653
784
|
}
|
|
654
785
|
function mathToInt(value, throwInfinity) {
|
|
655
786
|
var result = +value;
|
|
656
|
-
if (result
|
|
787
|
+
if (throwInfinity && (result === Infinity || result == Infinity)) {
|
|
657
788
|
throwRangeError("invalid value [" + dumpObj(value) + "]");
|
|
658
789
|
}
|
|
659
790
|
return result !== result || result === 0 ? 0 : mathTrunc(result);
|
|
660
791
|
}
|
|
661
792
|
var strRepeat = ( _unwrapFunctionWithPoly("repeat", StrProto, polyStrRepeat));
|
|
662
793
|
function polyStrRepeat(value, count) {
|
|
663
|
-
|
|
664
|
-
throwTypeError("can't convert [" + dumpObj(value) + "]");
|
|
665
|
-
}
|
|
794
|
+
_throwIfNullOrUndefined(value);
|
|
666
795
|
count = mathToInt(count, true);
|
|
667
796
|
if (count < 0) {
|
|
668
797
|
throwRangeError("invalid count must be >= 0 && < Infinity");
|
|
@@ -732,18 +861,111 @@
|
|
|
732
861
|
}
|
|
733
862
|
return result;
|
|
734
863
|
}
|
|
735
|
-
( _pureRef(MathCls, "round"));
|
|
736
864
|
function polyStrSymSplit(value, splitter, limit) {
|
|
737
865
|
var splitFn = splitter ? splitter[getKnownSymbol(9 )] : UNDEF_VALUE;
|
|
738
866
|
return splitFn ? splitFn(value, limit) : [value];
|
|
739
867
|
}
|
|
740
868
|
( _unwrapFunction("split", StrProto));
|
|
741
869
|
( _unwrapFunctionWithPoly("split", StrProto, !hasSymbol() ? polyStrSymSplit : NULL_VALUE));
|
|
870
|
+
( _pureAssign(( _pureRef(NumberCls, "isInteger")), _polyNumberIsInteger));
|
|
871
|
+
function _polyNumberIsInteger(value) {
|
|
872
|
+
return isNumber(value) && !isNaN(value) &&
|
|
873
|
+
isFinite(value) &&
|
|
874
|
+
mathFloor(value) === value;
|
|
875
|
+
}
|
|
876
|
+
( _pureRef(MathCls, "abs"));
|
|
877
|
+
( _pureRef(MathCls, "exp"));
|
|
878
|
+
( _pureRef(MathCls, "log"));
|
|
879
|
+
( _pureRef(MathCls, "asin"));
|
|
880
|
+
( _pureRef(MathCls, "acos"));
|
|
881
|
+
( _pureRef(MathCls, "atan"));
|
|
882
|
+
( _pureRef(MathCls, "atan2"));
|
|
883
|
+
( _pureRef(MathCls, "pow"));
|
|
884
|
+
( _pureRef(MathCls, "sqrt"));
|
|
885
|
+
( _pureRef(MathCls, "round"));
|
|
886
|
+
( _pureRef(MathCls, "sin"));
|
|
887
|
+
( _pureRef(MathCls, "cos"));
|
|
888
|
+
( _pureRef(MathCls, "tan"));
|
|
889
|
+
function _returnEmptyArray() {
|
|
890
|
+
return [];
|
|
891
|
+
}
|
|
892
|
+
var objGetOwnPropertyNames = ( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyNames")), _returnEmptyArray));
|
|
893
|
+
var recursionCheckOwnDescriptors;
|
|
894
|
+
function polyObjGetOwnPropertyDescriptors(obj) {
|
|
895
|
+
var result = {};
|
|
896
|
+
_throwIfNullOrUndefined(obj);
|
|
897
|
+
if (!recursionCheckOwnDescriptors) {
|
|
898
|
+
try {
|
|
899
|
+
recursionCheckOwnDescriptors = true;
|
|
900
|
+
arrForEach(objGetOwnPropertyNames(obj), function (propName) {
|
|
901
|
+
var descriptor = objGetOwnPropertyDescriptor(obj, propName);
|
|
902
|
+
if (descriptor !== undefined) {
|
|
903
|
+
result[propName] = descriptor;
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
arrForEach(polyObjGetOwnPropertySymbols(obj), function (sym) {
|
|
907
|
+
var descriptor = objGetOwnPropertyDescriptor(obj, sym);
|
|
908
|
+
if (descriptor !== undefined) {
|
|
909
|
+
result[sym] = descriptor;
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
finally {
|
|
914
|
+
recursionCheckOwnDescriptors = false;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
return result;
|
|
918
|
+
}
|
|
919
|
+
var recursionCheckOwnSymbols;
|
|
920
|
+
function polyObjGetOwnPropertySymbols(obj) {
|
|
921
|
+
var result = [];
|
|
922
|
+
var objHasOwn = ObjClass.hasOwn || polyObjHasOwn;
|
|
923
|
+
if (!recursionCheckOwnSymbols) {
|
|
924
|
+
try {
|
|
925
|
+
recursionCheckOwnSymbols = true;
|
|
926
|
+
var symEnum = 0 ;
|
|
927
|
+
while (symEnum <= 12 ) {
|
|
928
|
+
var sym = getKnownSymbol(symEnum);
|
|
929
|
+
if (sym && objHasOwn(obj, sym)) {
|
|
930
|
+
result.push(sym);
|
|
931
|
+
}
|
|
932
|
+
symEnum++;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
finally {
|
|
936
|
+
recursionCheckOwnSymbols = false;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
return result;
|
|
940
|
+
}
|
|
941
|
+
( _pureAssign(( _pureRef(ObjClass, "getOwnPropertyDescriptors")), polyObjGetOwnPropertyDescriptors));
|
|
942
|
+
function polyObjFromEntries(entries) {
|
|
943
|
+
var result = {};
|
|
944
|
+
function addEntry(entry) {
|
|
945
|
+
if (isArray(entry) && entry.length >= 2) {
|
|
946
|
+
result[entry[0]] = entry[1];
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (isArray(entries)) {
|
|
950
|
+
arrForEach(entries, addEntry);
|
|
951
|
+
}
|
|
952
|
+
else if (isIterable(entries)) {
|
|
953
|
+
iterForOf(entries, addEntry);
|
|
954
|
+
}
|
|
955
|
+
return result;
|
|
956
|
+
}
|
|
957
|
+
( _pureAssign(( _pureRef(ObjClass, "fromEntries")), polyObjFromEntries));
|
|
958
|
+
function polyObjIsExtensible(obj) {
|
|
959
|
+
if (isStrictNullOrUndefined(obj) || (!isObject(obj) && !isFunction(obj))) {
|
|
960
|
+
return false;
|
|
961
|
+
}
|
|
962
|
+
return true;
|
|
963
|
+
}
|
|
964
|
+
( _pureAssign(( _pureRef(ObjClass, "preventExtensions")), _doNothing));
|
|
965
|
+
( _pureAssign(( _pureRef(ObjClass, "isExtensible")), polyObjIsExtensible));
|
|
742
966
|
( _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
|
|
743
967
|
function polyStrEndsWith(value, searchString, length) {
|
|
744
|
-
|
|
745
|
-
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
746
|
-
}
|
|
968
|
+
_throwIfNotString(value);
|
|
747
969
|
var searchValue = isString(searchString) ? searchString : asString(searchString);
|
|
748
970
|
var end = (!isUndefined(length) && length < value[LENGTH]) ? length : value[LENGTH];
|
|
749
971
|
return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
|
|
@@ -759,9 +981,7 @@
|
|
|
759
981
|
}
|
|
760
982
|
( _unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
|
|
761
983
|
function polyStrStartsWith(value, searchString, position) {
|
|
762
|
-
|
|
763
|
-
throwTypeError("'" + dumpObj(value) + "' is not a string");
|
|
764
|
-
}
|
|
984
|
+
_throwIfNotString(value);
|
|
765
985
|
var searchValue = isString(searchString) ? searchString : asString(searchString);
|
|
766
986
|
var pos = position > 0 ? position : 0;
|
|
767
987
|
return strSubstring(value, pos, pos + searchValue[LENGTH]) === searchValue;
|
|
@@ -1358,7 +1578,7 @@
|
|
|
1358
1578
|
return result;
|
|
1359
1579
|
}
|
|
1360
1580
|
|
|
1361
|
-
var version = '3.3.7-nightly3.2504-
|
|
1581
|
+
var version = '3.3.7-nightly3.2504-13';
|
|
1362
1582
|
var instanceName = "." + newId(6);
|
|
1363
1583
|
var _dataUid = 0;
|
|
1364
1584
|
function _canAcceptData(target) {
|