@microsoft/applicationinsights-web-basic 3.0.7-nightly3.2312-05 → 3.0.8

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.
Files changed (45) hide show
  1. package/browser/es5/{aib.3.0.7-nightly3.2312-05.cjs.js → aib.3.0.8.cjs.js} +368 -376
  2. package/browser/es5/aib.3.0.8.cjs.js.map +1 -0
  3. package/browser/es5/aib.3.0.8.cjs.min.js +6 -0
  4. package/browser/es5/aib.3.0.8.cjs.min.js.map +1 -0
  5. package/browser/es5/{aib.3.0.7-nightly3.2312-05.gbl.js → aib.3.0.8.gbl.js} +370 -378
  6. package/browser/es5/aib.3.0.8.gbl.js.map +1 -0
  7. package/browser/es5/aib.3.0.8.gbl.min.js +6 -0
  8. package/browser/es5/aib.3.0.8.gbl.min.js.map +1 -0
  9. package/browser/es5/aib.3.0.8.integrity.json +66 -0
  10. package/browser/es5/{aib.3.0.7-nightly3.2312-05.js → aib.3.0.8.js} +370 -378
  11. package/browser/es5/aib.3.0.8.js.map +1 -0
  12. package/browser/es5/aib.3.0.8.min.js +6 -0
  13. package/browser/es5/aib.3.0.8.min.js.map +1 -0
  14. package/browser/es5/aib.3.cjs.js +367 -375
  15. package/browser/es5/aib.3.cjs.js.map +1 -1
  16. package/browser/es5/aib.3.cjs.min.js +2 -2
  17. package/browser/es5/aib.3.cjs.min.js.map +1 -1
  18. package/browser/es5/aib.3.gbl.js +369 -377
  19. package/browser/es5/aib.3.gbl.js.map +1 -1
  20. package/browser/es5/aib.3.gbl.min.js +2 -2
  21. package/browser/es5/aib.3.gbl.min.js.map +1 -1
  22. package/browser/es5/aib.3.integrity.json +25 -25
  23. package/browser/es5/aib.3.js +369 -377
  24. package/browser/es5/aib.3.js.map +1 -1
  25. package/browser/es5/aib.3.min.js +2 -2
  26. package/browser/es5/aib.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-web-basic.js +367 -375
  28. package/dist/es5/applicationinsights-web-basic.js.map +1 -1
  29. package/dist/es5/applicationinsights-web-basic.min.js +2 -2
  30. package/dist/es5/applicationinsights-web-basic.min.js.map +1 -1
  31. package/dist-es5/__DynamicConstants.js +1 -1
  32. package/dist-es5/index.js +1 -1
  33. package/package.json +67 -70
  34. package/types/applicationinsights-web-basic.d.ts +1 -1
  35. package/types/applicationinsights-web-basic.namespaced.d.ts +1 -1
  36. package/browser/es5/aib.3.0.7-nightly3.2312-05.cjs.js.map +0 -1
  37. package/browser/es5/aib.3.0.7-nightly3.2312-05.cjs.min.js +0 -6
  38. package/browser/es5/aib.3.0.7-nightly3.2312-05.cjs.min.js.map +0 -1
  39. package/browser/es5/aib.3.0.7-nightly3.2312-05.gbl.js.map +0 -1
  40. package/browser/es5/aib.3.0.7-nightly3.2312-05.gbl.min.js +0 -6
  41. package/browser/es5/aib.3.0.7-nightly3.2312-05.gbl.min.js.map +0 -1
  42. package/browser/es5/aib.3.0.7-nightly3.2312-05.integrity.json +0 -66
  43. package/browser/es5/aib.3.0.7-nightly3.2312-05.js.map +0 -1
  44. package/browser/es5/aib.3.0.7-nightly3.2312-05.min.js +0 -6
  45. package/browser/es5/aib.3.0.7-nightly3.2312-05.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.7-nightly3.2312-05
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.8
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -25,6 +25,8 @@ var DONE = "done";
25
25
  var VALUE = "value";
26
26
  var NAME = "name";
27
27
  var SLICE = "slice";
28
+ var CALL = "call";
29
+ var TO_STRING = "toString";
28
30
  var ObjClass$1 = Object;
29
31
  var ObjProto$1 = ObjClass$1[PROTOTYPE];
30
32
  var StrCls = String;
@@ -33,48 +35,63 @@ var MathCls = Math;
33
35
  var ArrCls = Array;
34
36
  var ArrProto = ArrCls[PROTOTYPE];
35
37
 
36
- function safeGet(cb, defValue) {
37
- var result = defValue;
38
+ function safe(func, argArray) {
38
39
  try {
39
- result = cb();
40
+ return {
41
+ v: func.apply(this, argArray)
42
+ };
40
43
  }
41
44
  catch (e) {
45
+ return { e: e };
42
46
  }
43
- return result;
47
+ }
48
+
49
+ function safeGet(cb, defValue) {
50
+ var result = safe(cb);
51
+ return result.e ? defValue : result.v;
44
52
  }
45
53
 
46
54
  var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN, UNDEFINED, "symbol", "bigint"];
55
+ /*#__NO_SIDE_EFFECTS__*/
47
56
  function _createIs(theType) {
48
57
  return function (value) {
49
58
  return typeof value === theType;
50
59
  };
51
60
  }
61
+ /*#__NO_SIDE_EFFECTS__*/
52
62
  function _createObjIs(theName) {
53
63
  var theType = "[object " + theName + "]";
54
64
  return function (value) {
55
65
  return !!(value && objToString(value) === theType);
56
66
  };
57
67
  }
68
+ /*#__NO_SIDE_EFFECTS__*/
58
69
  function objToString(value) {
59
70
  return ObjProto$1.toString.call(value);
60
71
  }
72
+ /*#__NO_SIDE_EFFECTS__*/
61
73
  function isUndefined(value) {
62
74
  return typeof value === UNDEFINED || value === UNDEFINED;
63
75
  }
76
+ /*#__NO_SIDE_EFFECTS__*/
64
77
  function isNullOrUndefined(value) {
65
78
  return value === NULL_VALUE || isUndefined(value);
66
79
  }
80
+ /*#__NO_SIDE_EFFECTS__*/
67
81
  function isStrictNullOrUndefined(value) {
68
82
  return value === NULL_VALUE || !isDefined(value);
69
83
  }
84
+ /*#__NO_SIDE_EFFECTS__*/
70
85
  function isDefined(arg) {
71
86
  return !!arg || arg !== UNDEF_VALUE;
72
87
  }
73
- var isPrimitiveType = function (theType) {
88
+ /*#__NO_SIDE_EFFECTS__*/
89
+ function isPrimitiveType(theType) {
74
90
  return theType !== OBJECT && PRIMITIVE_TYPES.indexOf(theType) !== -1;
75
- };
76
- var isString = _createIs(STRING);
77
- var isFunction = _createIs(FUNCTION);
91
+ }
92
+ var isString = ( /*#__PURE__*/_createIs(STRING));
93
+ var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
94
+ /*#__NO_SIDE_EFFECTS__*/
78
95
  function isObject(value) {
79
96
  if (!value && isNullOrUndefined(value)) {
80
97
  return false;
@@ -82,24 +99,28 @@ function isObject(value) {
82
99
  return !!value && typeof value === OBJECT;
83
100
  }
84
101
  var isArray = ArrCls.isArray;
85
- var isDate = _createObjIs("Date");
86
- var isNumber = _createIs(NUMBER);
87
- var isBoolean = _createIs(BOOLEAN);
88
- var isError = _createObjIs("Error");
102
+ var isDate = ( /*#__PURE__*/_createObjIs("Date"));
103
+ var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
104
+ var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
105
+ var isError = ( /*#__PURE__*/_createObjIs("Error"));
106
+ /*#__NO_SIDE_EFFECTS__*/
89
107
  function isPromiseLike(value) {
90
- return !!value && isFunction(value.then);
108
+ return !!(value && value.then && isFunction(value.then));
91
109
  }
110
+ /*#__NO_SIDE_EFFECTS__*/
92
111
  function isTruthy(value) {
93
112
  return !(!value || safeGet(function () { return !(value && (0 + value)); }, !value));
94
113
  }
95
114
 
96
115
  var objGetOwnPropertyDescriptor = ObjClass$1.getOwnPropertyDescriptor;
97
116
 
117
+ /*#__NO_SIDE_EFFECTS__*/
98
118
  function objHasOwnProperty(obj, prop) {
99
- return obj && ObjProto$1.hasOwnProperty.call(obj, prop);
119
+ return !!obj && ObjProto$1.hasOwnProperty[CALL](obj, prop);
100
120
  }
101
121
 
102
122
  var objHasOwn = ObjClass$1["hasOwn"] || polyObjHasOwn;
123
+ /*#__NO_SIDE_EFFECTS__*/
103
124
  function polyObjHasOwn(obj, prop) {
104
125
  return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
105
126
  }
@@ -108,7 +129,7 @@ function objForEachKey(theObject, callbackfn, thisArg) {
108
129
  if (theObject && isObject(theObject)) {
109
130
  for (var prop in theObject) {
110
131
  if (objHasOwn(theObject, prop)) {
111
- if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {
132
+ if (callbackfn[CALL](thisArg || theObject, prop, theObject[prop]) === -1) {
112
133
  break;
113
134
  }
114
135
  }
@@ -116,6 +137,7 @@ function objForEachKey(theObject, callbackfn, thisArg) {
116
137
  }
117
138
  }
118
139
 
140
+ /*#__NO_SIDE_EFFECTS__*/
119
141
  function _createKeyValueMap(values, keyType, valueType, completeFn) {
120
142
  var theMap = {};
121
143
  objForEachKey(values, function (key, value) {
@@ -133,15 +155,15 @@ function throwTypeError(message) {
133
155
  }
134
156
 
135
157
  var _objFreeze = ObjClass$1["freeze"];
136
- var _doNothing = function (value) { return value; };
137
- var _getProto = function (value) { return value[__PROTO__] || NULL_VALUE; };
138
- var objAssign = ObjClass$1["assign"];
139
- function objKeys(value) {
140
- if (!isObject(value) || value === NULL_VALUE) {
141
- throwTypeError("objKeys called on non-object");
142
- }
143
- return ObjClass$1.keys(value);
158
+ function _doNothing(value) {
159
+ return value;
144
160
  }
161
+ /*#__NO_SIDE_EFFECTS__*/
162
+ function _getProto(value) {
163
+ return value[__PROTO__] || NULL_VALUE;
164
+ }
165
+ var objAssign = ObjClass$1["assign"];
166
+ var objKeys = ObjClass$1.keys;
145
167
  function objDeepFreeze(value) {
146
168
  if (_objFreeze) {
147
169
  objForEachKey(value, function (key, value) {
@@ -155,12 +177,15 @@ function objDeepFreeze(value) {
155
177
  var objFreeze = _objFreeze || _doNothing;
156
178
  var objGetPrototypeOf = ObjClass$1["getPrototypeOf"] || _getProto;
157
179
 
180
+ /*#__NO_SIDE_EFFECTS__*/
158
181
  function createEnum(values) {
159
182
  return _createKeyValueMap(values, 1 , 0 , objDeepFreeze);
160
183
  }
184
+ /*#__NO_SIDE_EFFECTS__*/
161
185
  function createEnumKeyMap(values) {
162
186
  return _createKeyValueMap(values, 0 , 0 , objDeepFreeze);
163
187
  }
188
+ /*#__NO_SIDE_EFFECTS__*/
164
189
  function createSimpleMap(values) {
165
190
  var mapClass = {};
166
191
  objForEachKey(values, function (key, value) {
@@ -169,11 +194,12 @@ function createSimpleMap(values) {
169
194
  });
170
195
  return objDeepFreeze(mapClass);
171
196
  }
197
+ /*#__NO_SIDE_EFFECTS__*/
172
198
  function createTypeMap(values) {
173
199
  return createSimpleMap(values);
174
200
  }
175
201
 
176
- var _wellKnownSymbolMap = createEnumKeyMap({
202
+ var _wellKnownSymbolMap = /*#__PURE__*/ createEnumKeyMap({
177
203
  asyncIterator: 0 ,
178
204
  hasInstance: 1 ,
179
205
  isConcatSpreadable: 2 ,
@@ -209,60 +235,50 @@ function _getGlobalValue() {
209
235
  }
210
236
  return result;
211
237
  }
238
+ /*#__NO_SIDE_EFFECTS__*/
212
239
  function _getGlobalConfig() {
213
240
  if (!_globalCfg) {
214
- var gbl = _getGlobalValue() || {};
241
+ var gbl = safe(_getGlobalValue).v || {};
215
242
  _globalCfg = gbl[GLOBAL_CONFIG_KEY] = gbl[GLOBAL_CONFIG_KEY] || {};
216
243
  }
217
244
  return _globalCfg;
218
245
  }
219
246
 
247
+ var ERROR_TYPE = "[object Error]";
248
+ /*#__NO_SIDE_EFFECTS__*/
220
249
  function dumpObj(object, format) {
221
250
  var propertyValueDump = EMPTY;
222
- if (isError(object)) {
223
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
251
+ var objType = ObjProto$1[TO_STRING][CALL](object);
252
+ if (objType === ERROR_TYPE) {
253
+ object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
224
254
  }
225
- else {
226
- try {
227
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? (isNumber(format) ? format : 4) : UNDEF_VALUE);
228
- }
229
- catch (e) {
230
- propertyValueDump = " - " + dumpObj(e, format);
231
- }
255
+ try {
256
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
257
+ propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
258
+ }
259
+ catch (e) {
260
+ propertyValueDump = " - " + dumpObj(e, format);
232
261
  }
233
- return objToString(object) + ": " + propertyValueDump;
262
+ return objType + ": " + propertyValueDump;
234
263
  }
235
264
 
236
- var _arrSlice = ArrProto[SLICE];
237
- var _throwMissingFunction = function (funcName, thisArg) {
238
- throwTypeError("'" + asString(funcName) + "' not defined for " + dumpObj(thisArg));
239
- };
240
- var _unwrapInstFunction = function (funcName) {
241
- return function (thisArg) {
242
- return thisArg[funcName].apply(thisArg, _arrSlice.call(arguments, 1));
243
- };
244
- };
245
- var _unwrapFunction = function (funcName, clsProto) {
246
- var clsFn = clsProto && clsProto[funcName];
247
- return function (thisArg) {
248
- var theFunc = (thisArg && thisArg[funcName]) || clsFn;
249
- if (theFunc) {
250
- return theFunc.apply(thisArg, _arrSlice.call(arguments, 1));
251
- }
252
- _throwMissingFunction(funcName, thisArg);
253
- };
254
- };
255
- var _unwrapFunctionWithPoly = function (funcName, clsProto, polyFunc) {
265
+ var _slice;
266
+ var _unwrapInstFunction = _unwrapFunctionWithPoly;
267
+ var _unwrapFunction = _unwrapFunctionWithPoly;
268
+ /*#__NO_SIDE_EFFECTS__*/
269
+ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
270
+ _slice = _slice || ArrProto[SLICE];
256
271
  var clsFn = clsProto && clsProto[funcName];
257
272
  return function (thisArg) {
258
273
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
259
274
  if (theFunc || polyFunc) {
260
275
  var theArgs = arguments;
261
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _arrSlice.call(theArgs, 1) : theArgs);
276
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
262
277
  }
263
- _throwMissingFunction(funcName, thisArg);
278
+ throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
264
279
  };
265
- };
280
+ }
281
+ /*#__NO_SIDE_EFFECTS__*/
266
282
  function _unwrapProp(propName) {
267
283
  return function (thisArg) {
268
284
  return thisArg[propName];
@@ -271,10 +287,11 @@ function _unwrapProp(propName) {
271
287
 
272
288
  var mathMax = MathCls.max;
273
289
 
274
- var strSlice = _unwrapFunction(SLICE, StrProto);
290
+ var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
275
291
 
276
- var strSubstring = _unwrapFunction("substring", StrProto);
277
- var strSubstr = _unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr);
292
+ var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
293
+ var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
294
+ /*#__NO_SIDE_EFFECTS__*/
278
295
  function polyStrSubstr(value, start, length) {
279
296
  if (isNullOrUndefined(value)) {
280
297
  throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
@@ -291,12 +308,14 @@ function polyStrSubstr(value, start, length) {
291
308
  }
292
309
  return strSlice(value, start, start + length);
293
310
  }
311
+ /*#__NO_SIDE_EFFECTS__*/
294
312
  function strLeft(value, count) {
295
313
  return strSubstring(value, 0, count);
296
314
  }
297
315
 
298
316
  var UNIQUE_REGISTRY_ID = "_urid";
299
317
  var _polySymbols;
318
+ /*#__NO_SIDE_EFFECTS__*/
300
319
  function _globalSymbolRegistry() {
301
320
  if (!_polySymbols) {
302
321
  var gblCfg = _getGlobalConfig();
@@ -304,7 +323,8 @@ function _globalSymbolRegistry() {
304
323
  }
305
324
  return _polySymbols;
306
325
  }
307
- var _wellKnownSymbolCache = {};
326
+ var _wellKnownSymbolCache;
327
+ /*#__NO_SIDE_EFFECTS__*/
308
328
  function polyNewSymbol(description) {
309
329
  var theSymbol = {
310
330
  description: asString(description),
@@ -313,18 +333,21 @@ function polyNewSymbol(description) {
313
333
  theSymbol[POLYFILL_TAG] = true;
314
334
  return theSymbol;
315
335
  }
336
+ /*#__NO_SIDE_EFFECTS__*/
316
337
  function polySymbolFor(key) {
317
338
  var registry = _globalSymbolRegistry();
318
339
  if (!objHasOwn(registry.k, key)) {
319
340
  var newSymbol_1 = polyNewSymbol(key);
320
341
  var regId_1 = objKeys(registry.s).length;
321
- newSymbol_1[UNIQUE_REGISTRY_ID] = function () { return regId_1 + "_" + newSymbol_1.toString(); };
342
+ newSymbol_1[UNIQUE_REGISTRY_ID] = function () { return regId_1 + "_" + newSymbol_1[TO_STRING](); };
322
343
  registry.k[key] = newSymbol_1;
323
344
  registry.s[newSymbol_1[UNIQUE_REGISTRY_ID]()] = asString(key);
324
345
  }
325
346
  return registry.k[key];
326
347
  }
348
+ /*#__NO_SIDE_EFFECTS__*/
327
349
  function polyGetKnownSymbol(name) {
350
+ !_wellKnownSymbolCache && (_wellKnownSymbolCache = {});
328
351
  var result;
329
352
  var knownName = _wellKnownSymbolMap[name];
330
353
  if (knownName) {
@@ -341,6 +364,7 @@ var propMap = {
341
364
  g: "get",
342
365
  s: "set"
343
366
  };
367
+ /*#__NO_SIDE_EFFECTS__*/
344
368
  function _createProp(value) {
345
369
  var prop = {};
346
370
  prop[propMap["c"]] = true;
@@ -365,13 +389,12 @@ function objDefine(target, key, propDesc) {
365
389
  }
366
390
 
367
391
  var _globalLazyTestHooks;
368
- var _fetchLazyTestHooks = function () {
392
+ function _initTestHooks() {
369
393
  _globalLazyTestHooks = _getGlobalConfig();
370
- _fetchLazyTestHooks = NULL_VALUE;
371
- };
394
+ }
372
395
  function getLazy(cb) {
373
396
  var lazyValue = {};
374
- _fetchLazyTestHooks && _fetchLazyTestHooks();
397
+ !_globalLazyTestHooks && _initTestHooks();
375
398
  lazyValue.b = _globalLazyTestHooks.lzy;
376
399
  objDefineProp(lazyValue, "v", {
377
400
  configurable: true,
@@ -381,21 +404,27 @@ function getLazy(cb) {
381
404
  objDefineProp(lazyValue, "v", {
382
405
  value: result
383
406
  });
384
- if (lazyValue.b) {
385
- delete lazyValue.b;
386
- }
387
- }
388
- if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
389
- lazyValue.b = _globalLazyTestHooks.lzy;
390
407
  }
408
+ lazyValue.b = _globalLazyTestHooks.lzy;
391
409
  return result;
392
410
  }
393
411
  });
394
412
  return lazyValue;
395
413
  }
396
414
 
415
+ /*#__NO_SIDE_EFFECTS__*/
397
416
  function safeGetLazy(cb, defValue) {
398
- return getLazy(function () { return safeGet(cb, defValue); });
417
+ return getLazy(function () {
418
+ var result = safe(cb);
419
+ return result.e ? defValue : result.v;
420
+ });
421
+ }
422
+
423
+ /*#__NO_SIDE_EFFECTS__*/
424
+ function createCachedValue(value) {
425
+ return objDefineProp({
426
+ toJSON: function () { return value; }
427
+ }, "v", { value: value });
399
428
  }
400
429
 
401
430
  var WINDOW = "window";
@@ -404,12 +433,18 @@ var _cachedWindow;
404
433
  var _cachedDocument;
405
434
  var _cachedNavigator;
406
435
  var _isNode;
407
- var lazySafeGetInst = function (name) { return safeGetLazy(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE); };
408
- var getGlobal = function (useCached) {
409
- (!_cachedGlobal || useCached === false || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, NULL_VALUE));
436
+ /*#__NO_SIDE_EFFECTS__*/
437
+ function lazySafeGetInst(name) {
438
+ return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
439
+ }
440
+ /*#__NO_SIDE_EFFECTS__*/
441
+ function getGlobal(useCached) {
442
+ !_globalLazyTestHooks && _initTestHooks();
443
+ (!_cachedGlobal || useCached === false || _globalLazyTestHooks.lzy) && (_cachedGlobal = createCachedValue(safe(_getGlobalValue).v || NULL_VALUE));
410
444
  return _cachedGlobal.v;
411
- };
412
- var getInst = function (name, useCached) {
445
+ }
446
+ /*#__NO_SIDE_EFFECTS__*/
447
+ function getInst(name, useCached) {
413
448
  var gbl = (!_cachedGlobal || useCached === false) ? getGlobal(useCached) : _cachedGlobal.v;
414
449
  if (gbl && gbl[name]) {
415
450
  return gbl[name];
@@ -418,62 +453,85 @@ var getInst = function (name, useCached) {
418
453
  return _cachedWindow.v;
419
454
  }
420
455
  return NULL_VALUE;
421
- };
422
- var hasDocument = function () { return !!getDocument(); };
423
- var getDocument = function () {
424
- (!_cachedDocument || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst("document"));
456
+ }
457
+ /*#__NO_SIDE_EFFECTS__*/
458
+ function hasDocument() {
459
+ return !!getDocument();
460
+ }
461
+ /*#__NO_SIDE_EFFECTS__*/
462
+ function getDocument() {
463
+ !_globalLazyTestHooks && _initTestHooks();
464
+ (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
425
465
  return _cachedDocument.v;
426
- };
427
- var hasWindow = function () { return !!getWindow(); };
428
- var getWindow = function () {
429
- (!_cachedWindow || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));
466
+ }
467
+ /*#__NO_SIDE_EFFECTS__*/
468
+ function hasWindow() {
469
+ return !!getWindow();
470
+ }
471
+ /*#__NO_SIDE_EFFECTS__*/
472
+ function getWindow() {
473
+ !_globalLazyTestHooks && _initTestHooks();
474
+ (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
430
475
  return _cachedWindow.v;
431
- };
432
- var hasNavigator = function () { return !!getNavigator(); };
433
- var getNavigator = function () {
434
- (!_cachedNavigator || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst("navigator"));
476
+ }
477
+ /*#__NO_SIDE_EFFECTS__*/
478
+ function hasNavigator() {
479
+ return !!getNavigator();
480
+ }
481
+ /*#__NO_SIDE_EFFECTS__*/
482
+ function getNavigator() {
483
+ !_globalLazyTestHooks && _initTestHooks();
484
+ (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
435
485
  return _cachedNavigator.v;
436
- };
437
- var isNode = function () {
438
- !_isNode && (_isNode = safeGetLazy(function () { return !!(process && (process.versions || {}).node); }, false));
486
+ }
487
+ function isNode() {
488
+ !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
439
489
  return _isNode.v;
440
- };
490
+ }
441
491
 
442
492
  var _symbol;
443
493
  var _symbolFor;
444
- var _symbolKeyFor;
445
- function _getSymbolValue(name) {
446
- return safeGetLazy(function () {
447
- return (_symbol.v ? _symbol.v[name] : UNDEF_VALUE);
448
- }, UNDEF_VALUE);
494
+ function _initSymbol() {
495
+ if (!_symbol || !_symbol.b) {
496
+ _symbol = lazySafeGetInst(SYMBOL);
497
+ _symbolFor = safeGetLazy(function () { return (_symbol.v ? _symbol.v["for"] : UNDEF_VALUE); }, UNDEF_VALUE);
498
+ }
449
499
  }
500
+ /*#__NO_SIDE_EFFECTS__*/
450
501
  function hasSymbol() {
451
502
  return !!getSymbol();
452
503
  }
504
+ /*#__NO_SIDE_EFFECTS__*/
453
505
  function getSymbol() {
454
- var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);
455
- resetCache && (_symbol = lazySafeGetInst(SYMBOL));
456
- (!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue("for"));
457
- (!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue("keyFor"));
506
+ !_globalLazyTestHooks && _initTestHooks();
507
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
458
508
  return _symbol.v;
459
509
  }
510
+ /*#__NO_SIDE_EFFECTS__*/
460
511
  function getKnownSymbol(name, noPoly) {
461
512
  var knownName = _wellKnownSymbolMap[name];
462
- (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
513
+ !_globalLazyTestHooks && _initTestHooks();
514
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
463
515
  return _symbol.v ? _symbol.v[knownName || name] : (!noPoly ? polyGetKnownSymbol(name) : UNDEF_VALUE);
464
516
  }
517
+ /*#__NO_SIDE_EFFECTS__*/
465
518
  function newSymbol(description, noPoly) {
466
- (!_symbol || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
519
+ !_globalLazyTestHooks && _initTestHooks();
520
+ (!_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
467
521
  return _symbol.v ? _symbol.v(description) : (!noPoly ? polyNewSymbol(description) : NULL_VALUE);
468
522
  }
523
+ /*#__NO_SIDE_EFFECTS__*/
469
524
  function symbolFor(key) {
470
- (!_symbolFor || (_globalLazyTestHooks.lzy && !_symbol.b)) && getSymbol();
525
+ !_globalLazyTestHooks && _initTestHooks();
526
+ (!_symbolFor || !_symbol || _globalLazyTestHooks.lzy) && _initSymbol();
471
527
  return (_symbolFor.v || polySymbolFor)(key);
472
528
  }
473
529
 
530
+ /*#__NO_SIDE_EFFECTS__*/
474
531
  function isIterator(value) {
475
532
  return !!value && isFunction(value.next);
476
533
  }
534
+ /*#__NO_SIDE_EFFECTS__*/
477
535
  function isIterable(value) {
478
536
  return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3 )]);
479
537
  }
@@ -482,7 +540,7 @@ var _iterSymbol;
482
540
  function iterForOf(iter, callbackfn, thisArg) {
483
541
  if (iter) {
484
542
  if (!isIterator(iter)) {
485
- !_iterSymbol && (_iterSymbol = getLazy(function () { return getKnownSymbol(3 ); }));
543
+ !_iterSymbol && (_iterSymbol = createCachedValue(getKnownSymbol(3 )));
486
544
  iter = iter[_iterSymbol.v] ? iter[_iterSymbol.v]() : null;
487
545
  }
488
546
  if (isIterator(iter)) {
@@ -491,7 +549,7 @@ function iterForOf(iter, callbackfn, thisArg) {
491
549
  try {
492
550
  var count = 0;
493
551
  while (!(iterResult = iter.next())[DONE]) {
494
- if (callbackfn.call(thisArg || iter, iterResult[VALUE], count, iter) === -1) {
552
+ if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
495
553
  break;
496
554
  }
497
555
  count++;
@@ -520,7 +578,7 @@ function iterForOf(iter, callbackfn, thisArg) {
520
578
  }
521
579
  }
522
580
 
523
- var fnApply = _unwrapInstFunction("apply");
581
+ var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
524
582
 
525
583
  function arrAppend(target, elms) {
526
584
  if (!isUndefined(elms) && target) {
@@ -544,7 +602,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
544
602
  var len = theArray[LENGTH] >>> 0;
545
603
  for (var idx = 0; idx < len; idx++) {
546
604
  if (idx in theArray) {
547
- if (callbackfn.call(thisArg || theArray, theArray[idx], idx, theArray) === -1) {
605
+ if (callbackfn[CALL](thisArg || theArray, theArray[idx], idx, theArray) === -1) {
548
606
  break;
549
607
  }
550
608
  }
@@ -552,25 +610,23 @@ function arrForEach(theArray, callbackfn, thisArg) {
552
610
  }
553
611
  }
554
612
 
555
- var arrIndexOf = _unwrapFunction(INDEX_OF, ArrProto);
556
-
557
- var arrMap = _unwrapFunction("map", ArrProto);
613
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
558
614
 
559
- var arrSlice = _unwrapFunction(SLICE, ArrProto);
615
+ var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
560
616
 
561
- var fnCall = _unwrapInstFunction("call");
617
+ var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
562
618
 
563
- var arrReduce = _unwrapFunction("reduce", ArrProto);
619
+ var arrReduce = ( /*#__PURE__*/_unwrapFunction("reduce", ArrProto));
564
620
 
565
- var _objCreate = ObjClass$1["create"];
566
- var objCreate = _objCreate || polyObjCreate;
621
+ var objCreate = ObjClass$1["create"] || polyObjCreate;
622
+ /*#__NO_SIDE_EFFECTS__*/
567
623
  function polyObjCreate(obj) {
568
624
  if (!obj) {
569
625
  return {};
570
626
  }
571
627
  var type = typeof obj;
572
628
  if (type !== OBJECT && type !== FUNCTION) {
573
- throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
629
+ throwTypeError("Prototype must be an Object or function: " + dumpObj(obj));
574
630
  }
575
631
  function tempFunc() { }
576
632
  tempFunc[PROTOTYPE] = obj;
@@ -590,39 +646,30 @@ function objSetPrototypeOf(obj, proto) {
590
646
  return fn(obj, proto);
591
647
  }
592
648
 
593
- var _createCustomError = function (name, d, b) {
594
- _safeDefineName(d, name);
649
+ function _createCustomError(name, d, b) {
650
+ safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
595
651
  d = objSetPrototypeOf(d, b);
596
652
  function __() {
597
653
  this.constructor = d;
598
- _safeDefineName(this, name);
654
+ safe(objDefine, [this, NAME, { v: name, c: true, e: false }]);
599
655
  }
600
656
  d[PROTOTYPE] = b === NULL_VALUE ? objCreate(b) : (__[PROTOTYPE] = b[PROTOTYPE], new __());
601
657
  return d;
602
- };
603
- var _safeSetName = function (baseClass, name) {
604
- try {
605
- name && (baseClass[NAME] = name);
606
- }
607
- catch (e) {
608
- }
609
- };
610
- var _safeDefineName = function (target, name) {
611
- try {
612
- objDefine(target, NAME, { v: name, c: true, e: false });
613
- }
614
- catch (e) {
615
- }
616
- };
658
+ }
659
+ function _setName(baseClass, name) {
660
+ name && (baseClass[NAME] = name);
661
+ }
662
+ /*#__NO_SIDE_EFFECTS__*/
617
663
  function createCustomError(name, constructCb, errorBase) {
618
664
  var theBaseClass = errorBase || Error;
619
665
  var orgName = theBaseClass[PROTOTYPE][NAME];
620
666
  var captureFn = Error.captureStackTrace;
621
667
  return _createCustomError(name, function () {
622
668
  var _this = this;
669
+ var theArgs = arguments;
623
670
  try {
624
- _safeSetName(theBaseClass, name);
625
- var _self = fnApply(theBaseClass, _this, arrSlice(arguments)) || _this;
671
+ safe(_setName, [theBaseClass, name]);
672
+ var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
626
673
  if (_self !== _this) {
627
674
  var orgProto = objGetPrototypeOf(_this);
628
675
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -630,22 +677,25 @@ function createCustomError(name, constructCb, errorBase) {
630
677
  }
631
678
  }
632
679
  captureFn && captureFn(_self, _this[CONSTRUCTOR]);
633
- constructCb && constructCb(_self, arguments);
680
+ constructCb && constructCb(_self, theArgs);
634
681
  return _self;
635
682
  }
636
683
  finally {
637
- _safeSetName(theBaseClass, orgName);
684
+ safe(_setName, [theBaseClass, orgName]);
638
685
  }
639
686
  }, theBaseClass);
640
687
  }
641
688
 
689
+ /*#__NO_SIDE_EFFECTS__*/
642
690
  function utcNow() {
643
691
  return (Date.now || polyUtcNow)();
644
692
  }
693
+ /*#__NO_SIDE_EFFECTS__*/
645
694
  function polyUtcNow() {
646
695
  return new Date().getTime();
647
696
  }
648
697
 
698
+ /*#__NO_SIDE_EFFECTS__*/
649
699
  function _createTrimFn(exp) {
650
700
  return function _doTrim(value) {
651
701
  if (isNullOrUndefined(value)) {
@@ -657,13 +707,14 @@ function _createTrimFn(exp) {
657
707
  return value;
658
708
  };
659
709
  }
660
- var polyStrTrim = _createTrimFn(/^\s+|(?=\s)\s+$/g);
710
+ var polyStrTrim = ( /*#__PURE__*/_createTrimFn(/^\s+|(?=\s)\s+$/g));
661
711
 
662
- var strTrim = _unwrapFunctionWithPoly("trim", StrProto, polyStrTrim);
712
+ var strTrim = ( /*#__PURE__*/_unwrapFunctionWithPoly("trim", StrProto, polyStrTrim));
663
713
 
664
714
  var _fnToString;
665
715
  var _objCtrFnString;
666
716
  var _gblWindow;
717
+ /*#__NO_SIDE_EFFECTS__*/
667
718
  function isPlainObject(value) {
668
719
  if (!value || typeof value !== OBJECT) {
669
720
  return false;
@@ -674,8 +725,8 @@ function isPlainObject(value) {
674
725
  var result = false;
675
726
  if (value !== _gblWindow) {
676
727
  if (!_objCtrFnString) {
677
- _fnToString = Function[PROTOTYPE].toString;
678
- _objCtrFnString = fnCall(_fnToString, ObjClass$1);
728
+ _fnToString = Function[PROTOTYPE][TO_STRING];
729
+ _objCtrFnString = _fnToString[CALL](ObjClass$1);
679
730
  }
680
731
  try {
681
732
  var proto = objGetPrototypeOf(value);
@@ -684,7 +735,7 @@ function isPlainObject(value) {
684
735
  if (objHasOwnProperty(proto, CONSTRUCTOR)) {
685
736
  proto = proto[CONSTRUCTOR];
686
737
  }
687
- result = proto && typeof proto === FUNCTION && _fnToString.call(proto) === _objCtrFnString;
738
+ result = proto && typeof proto === FUNCTION && _fnToString[CALL](proto) === _objCtrFnString;
688
739
  }
689
740
  }
690
741
  catch (ex) {
@@ -762,12 +813,12 @@ function _deepCopy(visitMap, value, ctx, key) {
762
813
  });
763
814
  var idx = 0;
764
815
  var handler = userHandler;
765
- while (!fnCall(handler || (idx < defaultDeepCopyHandlers.length ? defaultDeepCopyHandlers[idx++] : _defaultDeepCopyHandler), ctx, details)) {
816
+ while (!(handler || (idx < defaultDeepCopyHandlers.length ? defaultDeepCopyHandlers[idx++] : _defaultDeepCopyHandler))[CALL](ctx, details)) {
766
817
  handler = NULL_VALUE;
767
818
  }
768
819
  });
769
820
  }
770
- if (userHandler && fnCall(userHandler, ctx, details)) {
821
+ if (userHandler && userHandler[CALL](ctx, details)) {
771
822
  return details.result;
772
823
  }
773
824
  return value;
@@ -788,6 +839,7 @@ function objCopyProps(target, source, handler) {
788
839
  };
789
840
  return _copyProps([], target, source, ctx);
790
841
  }
842
+ /*#__NO_SIDE_EFFECTS__*/
791
843
  function objDeepCopy(source, handler) {
792
844
  var ctx = {
793
845
  handler: handler,
@@ -836,24 +888,23 @@ function _doExtend(target, theArgs) {
836
888
  return target;
837
889
  }
838
890
  function deepExtend(target, obj1, obj2, obj3, obj4, obj5, obj6) {
839
- return _doExtend(objDeepCopy(target) || {}, arrSlice(arguments));
891
+ return _doExtend(objDeepCopy(target) || {}, ArrProto[SLICE][CALL](arguments));
840
892
  }
841
893
 
842
- var getLength = _unwrapProp(LENGTH);
894
+ var getLength = ( /*#__PURE__*/_unwrapProp(LENGTH));
843
895
 
844
- var strEndsWith = _unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith);
896
+ var strEndsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("endsWith", StrProto, polyStrEndsWith));
897
+ /*#__NO_SIDE_EFFECTS__*/
845
898
  function polyStrEndsWith(value, searchString, length) {
846
899
  if (!isString(value)) {
847
900
  throwTypeError("'" + dumpObj(value) + "' is not a string");
848
901
  }
849
902
  var searchValue = isString(searchString) ? searchString : asString(searchString);
850
- var chkLen = searchValue[LENGTH];
851
- var len = value[LENGTH];
852
- var end = !isUndefined(length) && length < len ? length : len;
853
- return strSubstring(value, end - chkLen, end) === searchValue;
903
+ var end = !isUndefined(length) && length < value[LENGTH] ? length : value[LENGTH];
904
+ return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
854
905
  }
855
906
 
856
- var strIndexOf = _unwrapFunction(INDEX_OF, StrProto);
907
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
857
908
 
858
909
  var REF = "ref";
859
910
  var UNREF = "un" + REF;
@@ -924,7 +975,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
924
975
  var timerFn = theArgs[0];
925
976
  theArgs[0] = function () {
926
977
  handler.dn();
927
- fnApply(timerFn, self, arrSlice(arguments));
978
+ fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
928
979
  };
929
980
  var handler = _createTimerHandler(startTimer, function (timerId) {
930
981
  if (timerId) {
@@ -941,10 +992,10 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
941
992
  return handler.h;
942
993
  }
943
994
  function scheduleTimeout(callback, timeout) {
944
- return _createTimeoutWith(this, true, UNDEF_VALUE, arrSlice(arguments));
995
+ return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
945
996
  }
946
997
  function createTimeout(callback, timeout) {
947
- return _createTimeoutWith(this, false, UNDEF_VALUE, arrSlice(arguments));
998
+ return _createTimeoutWith(this, false, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
948
999
  }
949
1000
 
950
1001
  var _a$5;
@@ -1017,13 +1068,13 @@ function _forEachProp(target, func) {
1017
1068
  }
1018
1069
  }
1019
1070
  function _isDynamicCandidate(target, funcName, skipOwn) {
1020
- return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)));
1071
+ return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)) && funcName !== str__Proto && funcName !== Prototype);
1021
1072
  }
1022
1073
  function _throwTypeError(message) {
1023
1074
  throwTypeError("DynamicProto: " + message);
1024
1075
  }
1025
1076
  function _getInstanceFuncs(thisTarget) {
1026
- var instFuncs = {};
1077
+ var instFuncs = objCreate(null);
1027
1078
  _forEachProp(thisTarget, function (name) {
1028
1079
  if (!instFuncs[name] && _isDynamicCandidate(thisTarget, name, false)) {
1029
1080
  instFuncs[name] = thisTarget[name];
@@ -1052,7 +1103,7 @@ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
1052
1103
  return theFunc.apply(target, arguments);
1053
1104
  };
1054
1105
  }
1055
- var baseFuncs = {};
1106
+ var baseFuncs = objCreate(null);
1056
1107
  _forEachProp(instFuncs, function (name) {
1057
1108
  baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
1058
1109
  });
@@ -1072,8 +1123,8 @@ function _getBaseFuncs(classProto, thisTarget, instFuncs, useBaseInst) {
1072
1123
  function _getInstFunc(target, funcName, proto, currentDynProtoProxy) {
1073
1124
  var instFunc = null;
1074
1125
  if (target && objHasOwnProperty(proto, DynClassName)) {
1075
- var instFuncTable = target[DynInstFuncTable] || {};
1076
- instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
1126
+ var instFuncTable = target[DynInstFuncTable] || objCreate(null);
1127
+ instFunc = (instFuncTable[proto[DynClassName]] || objCreate(null))[funcName];
1077
1128
  if (!instFunc) {
1078
1129
  _throwTypeError("Missing [" + funcName + "] " + strFunction);
1079
1130
  }
@@ -1123,20 +1174,24 @@ function _populatePrototype(proto, className, target, baseInstFuncs, setInstance
1123
1174
  return dynProtoProxy;
1124
1175
  }
1125
1176
  if (!_isObjectOrArrayPrototype(proto)) {
1126
- var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || {};
1127
- var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || {});
1128
- if (instFuncTable[DynAllowInstChkTag] !== false) {
1129
- instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
1130
- }
1131
- _forEachProp(target, function (name) {
1132
- if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
1133
- instFuncs_1[name] = target[name];
1134
- delete target[name];
1135
- if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
1136
- proto[name] = _createDynamicPrototype(proto, name);
1137
- }
1177
+ var instFuncTable = target[DynInstFuncTable] = target[DynInstFuncTable] || objCreate(null);
1178
+ if (!_isObjectOrArrayPrototype(instFuncTable)) {
1179
+ var instFuncs_1 = instFuncTable[className] = (instFuncTable[className] || objCreate(null));
1180
+ if (instFuncTable[DynAllowInstChkTag] !== false) {
1181
+ instFuncTable[DynAllowInstChkTag] = !!setInstanceFunc;
1182
+ }
1183
+ if (!_isObjectOrArrayPrototype(instFuncs_1)) {
1184
+ _forEachProp(target, function (name) {
1185
+ if (_isDynamicCandidate(target, name, false) && target[name] !== baseInstFuncs[name]) {
1186
+ instFuncs_1[name] = target[name];
1187
+ delete target[name];
1188
+ if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
1189
+ proto[name] = _createDynamicPrototype(proto, name);
1190
+ }
1191
+ }
1192
+ });
1138
1193
  }
1139
- });
1194
+ }
1140
1195
  }
1141
1196
  }
1142
1197
  function _checkPrototype(classProto, thisTarget) {
@@ -1200,8 +1255,6 @@ var strShimPrototype = "prototype";
1200
1255
  var ObjClass = Object;
1201
1256
  var ObjProto = ObjClass[strShimPrototype];
1202
1257
 
1203
- (getGlobal() || {})["Symbol"];
1204
- (getGlobal() || {})["Reflect"];
1205
1258
  var strHasOwnProperty = "hasOwnProperty";
1206
1259
  var __objAssignFnImpl = function (t) {
1207
1260
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -1260,7 +1313,7 @@ var _DYN_SET_DF = "setDf";
1260
1313
  var _DYN_WATCH = "watch";
1261
1314
  var _DYN_LOGGER = "logger";
1262
1315
  var _DYN_APPLY = "apply";
1263
- var _DYN_PUSH$2 = "push";
1316
+ var _DYN_PUSH$1 = "push";
1264
1317
  var _DYN_SPLICE = "splice";
1265
1318
  var _DYN_HDLR = "hdlr";
1266
1319
  var _DYN_CANCEL = "cancel";
@@ -1325,15 +1378,15 @@ function throwAggregationError(message, sourceErrors) {
1325
1378
 
1326
1379
  function doAwaitResponse(value, cb) {
1327
1380
  return doAwait(value, function (value) {
1328
- cb && cb({
1381
+ return cb ? cb({
1329
1382
  value: value,
1330
1383
  rejected: false
1331
- });
1384
+ }) : value;
1332
1385
  }, function (reason) {
1333
- cb && cb({
1386
+ return cb ? cb({
1334
1387
  rejected: true,
1335
1388
  reason: reason
1336
- });
1389
+ }) : reason;
1337
1390
  });
1338
1391
  }
1339
1392
  function doAwait(value, resolveFn, rejectFn, finallyFn) {
@@ -1344,10 +1397,12 @@ function doAwait(value, resolveFn, rejectFn, finallyFn) {
1344
1397
  }
1345
1398
  }
1346
1399
  else {
1347
- resolveFn && resolveFn(value);
1400
+ if (resolveFn) {
1401
+ result = resolveFn(value);
1402
+ }
1348
1403
  }
1349
1404
  if (finallyFn) {
1350
- result = doFinally(result, finallyFn);
1405
+ doFinally(result, finallyFn);
1351
1406
  }
1352
1407
  return result;
1353
1408
  }
@@ -2038,7 +2093,7 @@ function newId(maxLength) {
2038
2093
  return result;
2039
2094
  }
2040
2095
 
2041
- var version = '3.0.7-nightly3.2312-05';
2096
+ var version = '3.0.8';
2042
2097
  var instanceName = "." + newId(6);
2043
2098
  var _dataUid = 0;
2044
2099
  function _canAcceptData(target) {
@@ -2316,7 +2371,7 @@ function _createDynamicProperty(state, theConfig, name, value) {
2316
2371
  trk: function (handler) {
2317
2372
  if (handler && handler.fn) {
2318
2373
  if (arrIndexOf(detail.h, handler) === -1) {
2319
- detail.h[_DYN_PUSH$2 ](handler);
2374
+ detail.h[_DYN_PUSH$1 ](handler);
2320
2375
  }
2321
2376
  state.trk(handler, detail);
2322
2377
  }
@@ -2528,7 +2583,7 @@ function _createState(cfgHandler) {
2528
2583
  _useHandler(handler, handler.fn);
2529
2584
  }
2530
2585
  catch (e) {
2531
- watcherFailures_1[_DYN_PUSH$2 ](e);
2586
+ watcherFailures_1[_DYN_PUSH$1 ](e);
2532
2587
  }
2533
2588
  }
2534
2589
  }
@@ -2538,7 +2593,7 @@ function _createState(cfgHandler) {
2538
2593
  _notifyWatchers();
2539
2594
  }
2540
2595
  catch (e) {
2541
- watcherFailures_1[_DYN_PUSH$2 ](e);
2596
+ watcherFailures_1[_DYN_PUSH$1 ](e);
2542
2597
  }
2543
2598
  }
2544
2599
  if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
@@ -2560,7 +2615,7 @@ function _createState(cfgHandler) {
2560
2615
  for (var idx = 0; idx < detail.h[_DYN_LENGTH$2 ]; idx++) {
2561
2616
  var handler = detail.h[idx];
2562
2617
  if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
2563
- _waitingHandlers[_DYN_PUSH$2 ](handler);
2618
+ _waitingHandlers[_DYN_PUSH$1 ](handler);
2564
2619
  }
2565
2620
  }
2566
2621
  }
@@ -2569,7 +2624,7 @@ function _createState(cfgHandler) {
2569
2624
  if (handler) {
2570
2625
  var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
2571
2626
  if (arrIndexOf(details, detail) === -1) {
2572
- details[_DYN_PUSH$2 ](detail);
2627
+ details[_DYN_PUSH$1 ](detail);
2573
2628
  }
2574
2629
  }
2575
2630
  }
@@ -2935,14 +2990,14 @@ var DiagnosticLogger = /** @class */ (function () {
2935
2990
  }
2936
2991
  if (logMessage) {
2937
2992
  if (severity <= _loggingLevelTelemetry) {
2938
- _self.queue[_DYN_PUSH$2 ](message);
2993
+ _self.queue[_DYN_PUSH$1 ](message);
2939
2994
  _messageCount++;
2940
2995
  _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2941
2996
  }
2942
2997
  if (_messageCount === _maxInternalMessageLimit) {
2943
2998
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2944
2999
  var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2945
- _self.queue[_DYN_PUSH$2 ](throttleMessage);
3000
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2946
3001
  if (severity === 1 ) {
2947
3002
  _self.errorToConsole(throttleLimitMessage);
2948
3003
  }
@@ -3289,7 +3344,7 @@ var NotificationManager = /** @class */ (function () {
3289
3344
  g: function () { return _listeners; }
3290
3345
  });
3291
3346
  _self[_DYN_ADD_NOTIFICATION_LIS1 ] = function (listener) {
3292
- _listeners[_DYN_PUSH$2 ](listener);
3347
+ _listeners[_DYN_PUSH$1 ](listener);
3293
3348
  };
3294
3349
  _self[_DYN_REMOVE_NOTIFICATION_2 ] = function (listener) {
3295
3350
  var index = arrIndexOf(_listeners, listener);
@@ -3340,7 +3395,7 @@ var NotificationManager = /** @class */ (function () {
3340
3395
  if (!waiting) {
3341
3396
  waiting = [];
3342
3397
  }
3343
- waiting[_DYN_PUSH$2 ](asyncUnload);
3398
+ waiting[_DYN_PUSH$1 ](asyncUnload);
3344
3399
  }
3345
3400
  });
3346
3401
  if (waiting) {
@@ -3480,7 +3535,7 @@ function doPerf(mgrSource, getSource, func, details, isAsync) {
3480
3535
  children = [];
3481
3536
  currentActive[_DYN_SET_CTX ](PerfEvent[strChildrenContextKey], children);
3482
3537
  }
3483
- children[_DYN_PUSH$2 ](perfEvt);
3538
+ children[_DYN_PUSH$1 ](perfEvt);
3484
3539
  }
3485
3540
  }
3486
3541
  perfMgr[_DYN_SET_CTX ](doPerfActiveKey, perfEvt);
@@ -3542,7 +3597,7 @@ function initializePlugins(processContext, extensions) {
3542
3597
  isInitialized = thePlugin[_DYN_IS_INITIALIZED ]();
3543
3598
  }
3544
3599
  if (!isInitialized) {
3545
- initPlugins[_DYN_PUSH$2 ](thePlugin);
3600
+ initPlugins[_DYN_PUSH$1 ](thePlugin);
3546
3601
  }
3547
3602
  lastPlugin = thePlugin;
3548
3603
  proxy = proxy[_DYN_GET_NEXT ]();
@@ -3670,7 +3725,7 @@ function _createInternalContext(telemetryChain, dynamicHandler, core, startAt) {
3670
3725
  args[_i - 2] = arguments[_i];
3671
3726
  }
3672
3727
  if (onComplete) {
3673
- _onComplete[_DYN_PUSH$2 ]({
3728
+ _onComplete[_DYN_PUSH$1 ]({
3674
3729
  func: onComplete,
3675
3730
  self: !isUndefined(that) ? that : context.ctx,
3676
3731
  args: args
@@ -3979,7 +4034,7 @@ function createUnloadHandlerContainer() {
3979
4034
  var handlers = [];
3980
4035
  function _addHandler(handler) {
3981
4036
  if (handler) {
3982
- handlers[_DYN_PUSH$2 ](handler);
4037
+ handlers[_DYN_PUSH$1 ](handler);
3983
4038
  }
3984
4039
  }
3985
4040
  function _runHandlers(unloadCtx, unloadState) {
@@ -4272,10 +4327,10 @@ function _validateExtensions(logger, channelPriority, allExtensions) {
4272
4327
  }
4273
4328
  }
4274
4329
  if (!extPriority || extPriority < channelPriority) {
4275
- coreExtensions[_DYN_PUSH$2 ](ext);
4330
+ coreExtensions[_DYN_PUSH$1 ](ext);
4276
4331
  }
4277
4332
  else {
4278
- channels[_DYN_PUSH$2 ](ext);
4333
+ channels[_DYN_PUSH$1 ](ext);
4279
4334
  }
4280
4335
  });
4281
4336
  return _a = {},
@@ -4334,7 +4389,7 @@ function _addDelayedCfgListener(listeners, newWatcher) {
4334
4389
  }
4335
4390
  }
4336
4391
  };
4337
- listeners[_DYN_PUSH$2 ](theListener);
4392
+ listeners[_DYN_PUSH$1 ](theListener);
4338
4393
  }
4339
4394
  return theListener;
4340
4395
  }
@@ -4408,7 +4463,7 @@ var AppInsightsCore = /** @class */ (function () {
4408
4463
  _self[_DYN_LOGGER ] = logger;
4409
4464
  var cfgExtensions = config[STR_EXTENSIONS ];
4410
4465
  _configExtensions = [];
4411
- _configExtensions[_DYN_PUSH$2 ].apply(_configExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), cfgExtensions));
4466
+ _configExtensions[_DYN_PUSH$1 ].apply(_configExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), cfgExtensions));
4412
4467
  _channelConfig = config[STR_CHANNELS ];
4413
4468
  _initPluginChain(null);
4414
4469
  if (!_channels || _channels[_DYN_LENGTH$2 ] === 0) {
@@ -4430,7 +4485,7 @@ var AppInsightsCore = /** @class */ (function () {
4430
4485
  var controls = [];
4431
4486
  if (_channels) {
4432
4487
  arrForEach(_channels, function (channel) {
4433
- controls[_DYN_PUSH$2 ](channel);
4488
+ controls[_DYN_PUSH$1 ](channel);
4434
4489
  });
4435
4490
  }
4436
4491
  return objFreeze(controls);
@@ -4452,7 +4507,7 @@ var AppInsightsCore = /** @class */ (function () {
4452
4507
  _createTelCtx()[_DYN_PROCESS_NEXT ](telemetryItem);
4453
4508
  }
4454
4509
  else {
4455
- _eventQueue[_DYN_PUSH$2 ](telemetryItem);
4510
+ _eventQueue[_DYN_PUSH$1 ](telemetryItem);
4456
4511
  }
4457
4512
  }, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));
4458
4513
  };
@@ -4607,7 +4662,7 @@ var AppInsightsCore = /** @class */ (function () {
4607
4662
  reason: 16
4608
4663
  };
4609
4664
  function _addPlugin(removed) {
4610
- _configExtensions[_DYN_PUSH$2 ](plugin);
4665
+ _configExtensions[_DYN_PUSH$1 ](plugin);
4611
4666
  updateState.added = [plugin];
4612
4667
  _initPluginChain(updateState);
4613
4668
  addCb && addCb(true);
@@ -4706,7 +4761,7 @@ var AppInsightsCore = /** @class */ (function () {
4706
4761
  arrForEach(plugins, function (plugin) {
4707
4762
  if (plugin[_DYN_IDENTIFIER ] && plugin[_DYN_VERSION ] && !thePlugins[plugin.identifier]) {
4708
4763
  var ver = plugin[_DYN_IDENTIFIER ] + "=" + plugin[_DYN_VERSION ];
4709
- _pluginVersionStringArr[_DYN_PUSH$2 ](ver);
4764
+ _pluginVersionStringArr[_DYN_PUSH$1 ](ver);
4710
4765
  thePlugins[plugin.identifier] = plugin;
4711
4766
  }
4712
4767
  });
@@ -4830,7 +4885,7 @@ var AppInsightsCore = /** @class */ (function () {
4830
4885
  return -1;
4831
4886
  }
4832
4887
  if (ext.getChannel) {
4833
- channelHosts[_DYN_PUSH$2 ](ext);
4888
+ channelHosts[_DYN_PUSH$1 ](ext);
4834
4889
  }
4835
4890
  });
4836
4891
  if (!thePlugin && channelHosts[_DYN_LENGTH$2 ] > 0) {
@@ -4878,7 +4933,7 @@ var AppInsightsCore = /** @class */ (function () {
4878
4933
  if (!_pluginChain) {
4879
4934
  var extensions = (_extensions || []).slice();
4880
4935
  if (arrIndexOf(extensions, _telemetryInitializerPlugin) === -1) {
4881
- extensions[_DYN_PUSH$2 ](_telemetryInitializerPlugin);
4936
+ extensions[_DYN_PUSH$1 ](_telemetryInitializerPlugin);
4882
4937
  }
4883
4938
  _pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _configHandler.cfg, _self);
4884
4939
  }
@@ -4893,7 +4948,7 @@ var AppInsightsCore = /** @class */ (function () {
4893
4948
  var newConfigExtensions = [];
4894
4949
  arrForEach(_configExtensions, function (plugin, idx) {
4895
4950
  if (!_isPluginPresent(plugin, thePlugins)) {
4896
- newConfigExtensions[_DYN_PUSH$2 ](plugin);
4951
+ newConfigExtensions[_DYN_PUSH$1 ](plugin);
4897
4952
  }
4898
4953
  else {
4899
4954
  removed = true;
@@ -4908,13 +4963,13 @@ var AppInsightsCore = /** @class */ (function () {
4908
4963
  var newQueue = [];
4909
4964
  arrForEach(queue, function (channel) {
4910
4965
  if (!_isPluginPresent(channel, thePlugins)) {
4911
- newQueue[_DYN_PUSH$2 ](channel);
4966
+ newQueue[_DYN_PUSH$1 ](channel);
4912
4967
  }
4913
4968
  else {
4914
4969
  removed = true;
4915
4970
  }
4916
4971
  });
4917
- newChannelConfig[_DYN_PUSH$2 ](newQueue);
4972
+ newChannelConfig[_DYN_PUSH$1 ](newQueue);
4918
4973
  });
4919
4974
  _channelConfig = newChannelConfig;
4920
4975
  }
@@ -5188,7 +5243,7 @@ function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
5188
5243
  _a[_DYN_HANDLER ] = handlerRef,
5189
5244
  _a.capture = useCapture,
5190
5245
  _a);
5191
- _getRegisteredEvents(target, evtName.type)[_DYN_PUSH$2 ](registeredEvent);
5246
+ _getRegisteredEvents(target, evtName.type)[_DYN_PUSH$1 ](registeredEvent);
5192
5247
  }
5193
5248
  }
5194
5249
  catch (e) {
@@ -5243,7 +5298,6 @@ var _DYN_LENGTH$1 = "length";
5243
5298
  var _DYN_TO_LOWER_CASE = "toLowerCase";
5244
5299
  var _DYN_INGESTIONENDPOINT = "ingestionendpoint";
5245
5300
  var _DYN_TO_STRING$1 = "toString";
5246
- var _DYN_PUSH$1 = "push";
5247
5301
  var _DYN_REMOVE_ITEM = "removeItem";
5248
5302
  var _DYN_NAME$1 = "name";
5249
5303
  var _DYN_MESSAGE = "message";
@@ -5476,11 +5530,6 @@ var StorageType = createEnumStyle({
5476
5530
  LocalStorage: 0 ,
5477
5531
  SessionStorage: 1
5478
5532
  });
5479
- createEnumStyle({
5480
- AI: 0 ,
5481
- AI_AND_W3C: 1 ,
5482
- W3C: 2
5483
- });
5484
5533
 
5485
5534
  var _canUseSessionStorage = undefined;
5486
5535
  var _storagePrefix = "";
@@ -5711,7 +5760,7 @@ function _getOperaStack(errorMessage) {
5711
5760
  entry += "@" + lines[lp + 1];
5712
5761
  lp++;
5713
5762
  }
5714
- stack[_DYN_PUSH$1 ](entry);
5763
+ stack.push(entry);
5715
5764
  }
5716
5765
  return {
5717
5766
  src: errorMessage,
@@ -5794,7 +5843,7 @@ function _parseStack(stack) {
5794
5843
  if (_StackFrame.regex.test(theFrame)) {
5795
5844
  var parsedFrame = new _StackFrame(theFrame, level_1++);
5796
5845
  totalSizeInBytes_1 += parsedFrame[_DYN_SIZE_IN_BYTES ];
5797
- parsedStack[_DYN_PUSH$1 ](parsedFrame);
5846
+ parsedStack.push(parsedFrame);
5798
5847
  }
5799
5848
  });
5800
5849
  var exceptionParsedStackThreshold = 32 * 1024;
@@ -6382,122 +6431,6 @@ var ContextTagKeys = /** @class */ (function (_super) {
6382
6431
 
6383
6432
  var CtxTagKeys = new ContextTagKeys();
6384
6433
 
6385
- function _disableEvents(target, evtNamespace) {
6386
- eventOff(target, null, null, evtNamespace);
6387
- }
6388
- function createOfflineListener(parentEvtNamespace) {
6389
- var _document = getDocument();
6390
- var _navigator = getNavigator();
6391
- var _isListening = false;
6392
- var listenerList = [];
6393
- var rState = 1 ;
6394
- if (_navigator && !isNullOrUndefined(_navigator.onLine) && !_navigator.onLine) {
6395
- rState = 2 ;
6396
- }
6397
- var uState = 0 ;
6398
- var _currentState = calCurrentState();
6399
- var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
6400
- try {
6401
- if (_enableEvents(getWindow())) {
6402
- _isListening = true;
6403
- }
6404
- if (_document) {
6405
- var target = _document.body || _document;
6406
- if (target.ononline) {
6407
- if (_enableEvents(target)) {
6408
- _isListening = true;
6409
- }
6410
- }
6411
- }
6412
- }
6413
- catch (e) {
6414
- _isListening = false;
6415
- }
6416
- function _enableEvents(target) {
6417
- var enabled = false;
6418
- if (target) {
6419
- enabled = eventOn(target, "online", _setOnline, _evtNamespace);
6420
- if (enabled) {
6421
- eventOn(target, "offline", _setOffline, _evtNamespace);
6422
- }
6423
- }
6424
- return enabled;
6425
- }
6426
- function _isOnline() {
6427
- return _currentState;
6428
- }
6429
- function calCurrentState() {
6430
- if (uState === 2 || rState === 2 ) {
6431
- return false;
6432
- }
6433
- return true;
6434
- }
6435
- function listnerNoticeCheck() {
6436
- var newState = calCurrentState();
6437
- if (_currentState !== newState) {
6438
- _currentState = newState;
6439
- arrForEach(listenerList, function (callback) {
6440
- var offlineState = {
6441
- isOnline: _currentState,
6442
- rState: rState,
6443
- uState: uState
6444
- };
6445
- try {
6446
- callback(offlineState);
6447
- }
6448
- catch (e) {
6449
- }
6450
- });
6451
- }
6452
- }
6453
- function setOnlineState(newState) {
6454
- uState = newState;
6455
- listnerNoticeCheck();
6456
- }
6457
- function _setOnline() {
6458
- rState = 1 ;
6459
- listnerNoticeCheck();
6460
- }
6461
- function _setOffline() {
6462
- rState = 2 ;
6463
- listnerNoticeCheck();
6464
- }
6465
- function _unload() {
6466
- var win = getWindow();
6467
- if (win && _isListening) {
6468
- _disableEvents(win, _evtNamespace);
6469
- if (_document) {
6470
- var target = _document.body || _document;
6471
- if (!isUndefined(target.ononline)) {
6472
- _disableEvents(target, _evtNamespace);
6473
- }
6474
- }
6475
- _isListening = false;
6476
- }
6477
- }
6478
- function addListener(callback) {
6479
- listenerList[_DYN_PUSH$1 ](callback);
6480
- return {
6481
- rm: function () {
6482
- var index = listenerList.indexOf(callback);
6483
- if (index > -1) {
6484
- return listenerList.splice(index, 1);
6485
- }
6486
- else {
6487
- return;
6488
- }
6489
- }
6490
- };
6491
- }
6492
- return {
6493
- isOnline: _isOnline,
6494
- isListening: function () { return _isListening; },
6495
- unload: _unload,
6496
- addListener: addListener,
6497
- setOnlineState: setOnlineState
6498
- };
6499
- }
6500
-
6501
6434
  var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
6502
6435
 
6503
6436
  var STR_DURATION = "duration";
@@ -6513,6 +6446,8 @@ var _DYN_MEASUREMENTS = "measurements";
6513
6446
  var _DYN_DATA_TYPE = "dataType";
6514
6447
  var _DYN_ENVELOPE_TYPE = "envelopeType";
6515
6448
  var _DYN_TO_STRING = "toString";
6449
+ var _DYN_ON_LINE = "onLine";
6450
+ var _DYN_IS_ONLINE = "isOnline";
6516
6451
  var _DYN__GET = "_get";
6517
6452
  var _DYN_ENQUEUE = "enqueue";
6518
6453
  var _DYN_COUNT = "count";
@@ -6527,7 +6462,6 @@ var _DYN_CLEAR_SENT = "clearSent";
6527
6462
  var _DYN_BUFFER_OVERRIDE = "bufferOverride";
6528
6463
  var _DYN__BUFFER__KEY = "BUFFER_KEY";
6529
6464
  var _DYN__SENT__BUFFER__KEY = "SENT_BUFFER_KEY";
6530
- var _DYN_CONCAT = "concat";
6531
6465
  var _DYN__MAX__BUFFER__SIZE = "MAX_BUFFER_SIZE";
6532
6466
  var _DYN_SEND_POST = "sendPOST";
6533
6467
  var _DYN_TRIGGER_SEND = "triggerSend";
@@ -6543,7 +6477,6 @@ var _DYN__BUFFER = "_buffer";
6543
6477
  var _DYN_ONUNLOAD_DISABLE_FET6 = "onunloadDisableFetch";
6544
6478
  var _DYN_DISABLE_SEND_BEACON_7 = "disableSendBeaconSplit";
6545
6479
  var _DYN_INSTRUMENTATION_KEY$1 = "instrumentationKey";
6546
- var _DYN_UNLOAD_TRANSPORTS = "unloadTransports";
6547
6480
  var _DYN_CONVERT_UNDEFINED = "convertUndefined";
6548
6481
  var _DYN_MAX_BATCH_INTERVAL = "maxBatchInterval";
6549
6482
  var _DYN_BASE_TYPE = "baseType";
@@ -6669,7 +6602,7 @@ function EnvelopeCreatorInit(logger, telemetryItem) {
6669
6602
  }
6670
6603
  }
6671
6604
  var EnvelopeCreator = {
6672
- Version: '3.0.7-nightly3.2312-05'
6605
+ Version: '3.0.8'
6673
6606
  };
6674
6607
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
6675
6608
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -6818,6 +6751,83 @@ function TraceEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
6818
6751
  return _createEnvelope(logger, Trace[_DYN_ENVELOPE_TYPE ], telemetryItem, data);
6819
6752
  }
6820
6753
 
6754
+ function _disableEvents(target, evtNamespace) {
6755
+ eventOff(target, null, null, evtNamespace);
6756
+ }
6757
+ function createOfflineListener(parentEvtNamespace) {
6758
+ var _a;
6759
+ var _document = getDocument();
6760
+ var _navigator = getNavigator();
6761
+ var _isListening = false;
6762
+ var _onlineStatus = true;
6763
+ var _evtNamespace = mergeEvtNamespace(createUniqueNamespace("OfflineListener"), parentEvtNamespace);
6764
+ try {
6765
+ if (_enableEvents(getWindow())) {
6766
+ _isListening = true;
6767
+ }
6768
+ if (_document) {
6769
+ var target = _document.body || _document;
6770
+ if (target.ononline) {
6771
+ if (_enableEvents(target)) {
6772
+ _isListening = true;
6773
+ }
6774
+ }
6775
+ }
6776
+ if (_isListening) {
6777
+ if (_navigator && !isNullOrUndefined(_navigator[_DYN_ON_LINE ])) {
6778
+ _onlineStatus = _navigator[_DYN_ON_LINE ];
6779
+ }
6780
+ }
6781
+ }
6782
+ catch (e) {
6783
+ _isListening = false;
6784
+ }
6785
+ function _enableEvents(target) {
6786
+ var enabled = false;
6787
+ if (target) {
6788
+ enabled = eventOn(target, "online", _setOnline, _evtNamespace);
6789
+ if (enabled) {
6790
+ eventOn(target, "offline", _setOffline, _evtNamespace);
6791
+ }
6792
+ }
6793
+ return enabled;
6794
+ }
6795
+ function _setOnline() {
6796
+ _onlineStatus = true;
6797
+ }
6798
+ function _setOffline() {
6799
+ _onlineStatus = false;
6800
+ }
6801
+ function _isOnline() {
6802
+ var result = true;
6803
+ if (_isListening) {
6804
+ result = _onlineStatus;
6805
+ }
6806
+ else if (_navigator && !isNullOrUndefined(_navigator[_DYN_ON_LINE ])) {
6807
+ result = _navigator[_DYN_ON_LINE ];
6808
+ }
6809
+ return result;
6810
+ }
6811
+ function _unload() {
6812
+ var win = getWindow();
6813
+ if (win && _isListening) {
6814
+ _disableEvents(win, _evtNamespace);
6815
+ if (_document) {
6816
+ var target = _document.body || _document;
6817
+ if (!isUndefined(target.ononline)) {
6818
+ _disableEvents(target, _evtNamespace);
6819
+ }
6820
+ }
6821
+ _isListening = false;
6822
+ }
6823
+ }
6824
+ return _a = {},
6825
+ _a[_DYN_IS_ONLINE ] = _isOnline,
6826
+ _a.isListening = function () { return _isListening; },
6827
+ _a.unload = _unload,
6828
+ _a;
6829
+ }
6830
+
6821
6831
  var BaseSendBuffer = /** @class */ (function () {
6822
6832
  function BaseSendBuffer(logger, config) {
6823
6833
  var _buffer = [];
@@ -6910,7 +6920,7 @@ var SessionStorageSendBuffer = /** @class */ (function (_super) {
6910
6920
  dynamicProto(SessionStorageSendBuffer, _this, function (_self, _base) {
6911
6921
  var bufferItems = _getBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY ]);
6912
6922
  var notDeliveredItems = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY ]);
6913
- var buffer = _self._set(bufferItems[_DYN_CONCAT ](notDeliveredItems));
6923
+ var buffer = _self._set(bufferItems.concat(notDeliveredItems));
6914
6924
  if (buffer[_DYN_LENGTH ] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE ]) {
6915
6925
  buffer[_DYN_LENGTH ] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE ];
6916
6926
  }
@@ -6937,7 +6947,7 @@ var SessionStorageSendBuffer = /** @class */ (function (_super) {
6937
6947
  _setBuffer(SessionStorageSendBuffer[_DYN__BUFFER__KEY ], _self._set(_removePayloadsFromBuffer(payload, _self[_DYN__GET ]())));
6938
6948
  var sentElements = _getBuffer(SessionStorageSendBuffer[_DYN__SENT__BUFFER__KEY ]);
6939
6949
  if (sentElements instanceof Array && payload instanceof Array) {
6940
- sentElements = sentElements[_DYN_CONCAT ](payload);
6950
+ sentElements = sentElements.concat(payload);
6941
6951
  if (sentElements[_DYN_LENGTH ] > SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE ]) {
6942
6952
  _throwInternal(logger, 1 , 67 , "Sent buffer reached its maximum size: " + sentElements[_DYN_LENGTH ], true);
6943
6953
  sentElements[_DYN_LENGTH ] = SessionStorageSendBuffer[_DYN__MAX__BUFFER__SIZE ];
@@ -7175,7 +7185,7 @@ var HashCodeScoreGenerator = /** @class */ (function () {
7175
7185
  return 0;
7176
7186
  }
7177
7187
  while (input[_DYN_LENGTH ] < MIN_INPUT_LENGTH) {
7178
- input = input[_DYN_CONCAT ](input);
7188
+ input = input.concat(input);
7179
7189
  }
7180
7190
  var hash = 5381;
7181
7191
  for (var i = 0; i < input[_DYN_LENGTH ]; ++i) {
@@ -7256,17 +7266,6 @@ function _getResponseText(xhr) {
7256
7266
  function isOverrideFn(httpXHROverride) {
7257
7267
  return httpXHROverride && httpXHROverride[_DYN_SEND_POST ];
7258
7268
  }
7259
- function _prependTransports(theTransports, newTransports) {
7260
- if (newTransports) {
7261
- if (isNumber(newTransports)) {
7262
- theTransports = [newTransports][_DYN_CONCAT ](theTransports);
7263
- }
7264
- else if (isArray(newTransports)) {
7265
- theTransports = newTransports[_DYN_CONCAT ](theTransports);
7266
- }
7267
- }
7268
- return theTransports;
7269
- }
7270
7269
  var defaultAppInsightsChannelConfig = objDeepFreeze((_a = {
7271
7270
  endpointUrl: cfgDfValidate(isTruthy, DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH)
7272
7271
  },
@@ -7277,7 +7276,7 @@ var defaultAppInsightsChannelConfig = objDeepFreeze((_a = {
7277
7276
  _a[_DYN_ENABLE_SESSION_STORA5 ] = cfgDfBoolean(true),
7278
7277
  _a.isRetryDisabled = cfgDfBoolean(),
7279
7278
  _a[_DYN_IS_BEACON_API_DISABL3 ] = cfgDfBoolean(true),
7280
- _a[_DYN_DISABLE_SEND_BEACON_7 ] = cfgDfBoolean(),
7279
+ _a[_DYN_DISABLE_SEND_BEACON_7 ] = cfgDfBoolean(true),
7281
7280
  _a.disableXhr = cfgDfBoolean(),
7282
7281
  _a[_DYN_ONUNLOAD_DISABLE_FET6 ] = cfgDfBoolean(),
7283
7282
  _a[_DYN_ONUNLOAD_DISABLE_BEA2 ] = cfgDfBoolean(),
@@ -7290,7 +7289,6 @@ var defaultAppInsightsChannelConfig = objDeepFreeze((_a = {
7290
7289
  _a[_DYN_BUFFER_OVERRIDE ] = false,
7291
7290
  _a.httpXHROverride = { isVal: isOverrideFn, v: UNDEFINED_VALUE },
7292
7291
  _a[_DYN_ALWAYS_USE_XHR_OVERR4 ] = cfgDfBoolean(),
7293
- _a.transports = UNDEFINED_VALUE,
7294
7292
  _a));
7295
7293
  function _chkSampling(value) {
7296
7294
  return !isNaN(value) && value > 0 && value <= 100;
@@ -7325,8 +7323,6 @@ var Sender = /** @class */ (function (_super) {
7325
7323
  var _orgEndpointUrl;
7326
7324
  var _maxBatchSizeInBytes;
7327
7325
  var _beaconSupported;
7328
- var _beaconOnUnloadSupported;
7329
- var _beaconNormalSupported;
7330
7326
  var _customHeaders;
7331
7327
  var _disableTelemetry;
7332
7328
  var _instrumentationKey;
@@ -7423,8 +7419,6 @@ var Sender = /** @class */ (function (_super) {
7423
7419
  }
7424
7420
  _maxBatchSizeInBytes = senderConfig[_DYN_MAX_BATCH_SIZE_IN_BY1 ];
7425
7421
  _beaconSupported = (senderConfig[_DYN_ONUNLOAD_DISABLE_BEA2 ] === false || senderConfig[_DYN_IS_BEACON_API_DISABL3 ] === false) && isBeaconsSupported();
7426
- _beaconOnUnloadSupported = senderConfig[_DYN_ONUNLOAD_DISABLE_BEA2 ] === false && isBeaconsSupported();
7427
- _beaconNormalSupported = senderConfig[_DYN_IS_BEACON_API_DISABL3 ] === false && isBeaconsSupported();
7428
7422
  _alwaysUseCustomSend = senderConfig[_DYN_ALWAYS_USE_XHR_OVERR4 ];
7429
7423
  _disableXhr = !!senderConfig.disableXhr;
7430
7424
  var bufferOverride = senderConfig[_DYN_BUFFER_OVERRIDE ];
@@ -7472,8 +7466,7 @@ var Sender = /** @class */ (function (_super) {
7472
7466
  var customInterface = senderConfig.httpXHROverride;
7473
7467
  var httpInterface = null;
7474
7468
  var syncInterface = null;
7475
- var theTransports = _prependTransports([3 , 1 , 2 ], senderConfig.transports);
7476
- httpInterface = _getSenderInterface(theTransports, false);
7469
+ httpInterface = _getSenderInterface([1 , 2 ], false);
7477
7470
  var xhrInterface = { sendPOST: _xhrSender };
7478
7471
  _xhrSend = function (payload, isAsync) {
7479
7472
  return _doSend(xhrInterface, payload, isAsync);
@@ -7481,6 +7474,9 @@ var Sender = /** @class */ (function (_super) {
7481
7474
  _fallbackSend = function (payload, isAsync) {
7482
7475
  return _doSend(xhrInterface, payload, isAsync, false);
7483
7476
  };
7477
+ if (!senderConfig[_DYN_IS_BEACON_API_DISABL3 ] && isBeaconsSupported()) {
7478
+ httpInterface = _getSenderInterface([3 ], false);
7479
+ }
7484
7480
  httpInterface = _alwaysUseCustomSend ? customInterface : (httpInterface || customInterface || xhrInterface);
7485
7481
  _self[_DYN__SENDER ] = function (payload, isAsync) {
7486
7482
  return _doSend(httpInterface, payload, isAsync);
@@ -7488,13 +7484,8 @@ var Sender = /** @class */ (function (_super) {
7488
7484
  if (_fetchKeepAlive) {
7489
7485
  _syncUnloadSender = _fetchKeepAliveSender;
7490
7486
  }
7491
- var syncTransports = _prependTransports([3 , 1 ], senderConfig[_DYN_UNLOAD_TRANSPORTS ]);
7492
- if (!_fetchKeepAlive) {
7493
- syncTransports = syncTransports.filter(function (transport) { return transport !== 2 ; });
7494
- }
7495
- syncInterface = _getSenderInterface(syncTransports, true);
7496
- syncInterface = _alwaysUseCustomSend ? customInterface : (syncInterface || customInterface);
7497
- if ((_alwaysUseCustomSend || senderConfig[_DYN_UNLOAD_TRANSPORTS ] || !_syncUnloadSender) && syncInterface) {
7487
+ syncInterface = _alwaysUseCustomSend ? customInterface : (_getSenderInterface([3 , 1 ], true) || customInterface);
7488
+ if ((_alwaysUseCustomSend || !_syncUnloadSender) && syncInterface) {
7498
7489
  _syncUnloadSender = function (payload, isAsync) {
7499
7490
  return _doSend(syncInterface, payload, isAsync);
7500
7491
  };
@@ -7686,7 +7677,7 @@ var Sender = /** @class */ (function (_super) {
7686
7677
  else if (transportType === 2 && isFetchSupported(syncSupport)) {
7687
7678
  sendPostFunc = _fetchSender;
7688
7679
  }
7689
- else if (transportType === 3 && (syncSupport ? _beaconOnUnloadSupported : _beaconNormalSupported)) {
7680
+ else if (isBeaconsSupported() && transportType === 3 ) {
7690
7681
  sendPostFunc = _beaconSender;
7691
7682
  }
7692
7683
  lp++;
@@ -7743,7 +7734,7 @@ var Sender = /** @class */ (function (_super) {
7743
7734
  function _checkMaxSize(incomingPayload) {
7744
7735
  var incomingSize = incomingPayload ? incomingPayload[_DYN_LENGTH ] : 0;
7745
7736
  if ((_self[_DYN__BUFFER ].size() + incomingSize) > _maxBatchSizeInBytes) {
7746
- if (!_offlineListener || _offlineListener.isOnline()) {
7737
+ if (!_offlineListener || _offlineListener[_DYN_IS_ONLINE ]()) {
7747
7738
  _self[_DYN_TRIGGER_SEND ](true, null, 10 );
7748
7739
  }
7749
7740
  return true;
@@ -7774,7 +7765,7 @@ var Sender = /** @class */ (function (_super) {
7774
7765
  _self[_DYN__ON_ERROR ](payload, errorMessage);
7775
7766
  }
7776
7767
  }
7777
- else if (_offlineListener && !_offlineListener.isOnline()) {
7768
+ else if (_offlineListener && !_offlineListener[_DYN_IS_ONLINE ]()) {
7778
7769
  if (!_isRetryDisabled) {
7779
7770
  var offlineBackOffMultiplier = 10;
7780
7771
  _resendPayload(payload, offlineBackOffMultiplier);
@@ -7826,6 +7817,7 @@ var Sender = /** @class */ (function (_super) {
7826
7817
  }
7827
7818
  else {
7828
7819
  var payloadData = _getPayload(payload);
7820
+ _self._buffer[_DYN_MARK_AS_SENT ](payload);
7829
7821
  _beaconSender(payloadData);
7830
7822
  }
7831
7823
  }
@@ -8274,4 +8266,4 @@ exports.arrForEach = arrForEach;
8274
8266
  exports.isNullOrUndefined = isNullOrUndefined;
8275
8267
  exports.proxyFunctions = proxyFunctions;
8276
8268
  exports.throwError = throwError;
8277
- //# sourceMappingURL=aib.3.0.7-nightly3.2312-05.cjs.js.map
8269
+ //# sourceMappingURL=aib.3.0.8.cjs.js.map