@microsoft/applicationinsights-teechannel-js 3.1.1 → 3.1.2

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 (48) hide show
  1. package/browser/es5/{applicationinsights-teechannel-js.3.1.1.cjs.js → applicationinsights-teechannel-js.3.1.2.cjs.js} +326 -307
  2. package/browser/es5/applicationinsights-teechannel-js.3.1.2.cjs.js.map +1 -0
  3. package/browser/es5/applicationinsights-teechannel-js.3.1.2.cjs.min.js +6 -0
  4. package/browser/es5/applicationinsights-teechannel-js.3.1.2.cjs.min.js.map +1 -0
  5. package/browser/es5/{applicationinsights-teechannel-js.3.1.1.gbl.js → applicationinsights-teechannel-js.3.1.2.gbl.js} +328 -309
  6. package/browser/es5/applicationinsights-teechannel-js.3.1.2.gbl.js.map +1 -0
  7. package/browser/es5/applicationinsights-teechannel-js.3.1.2.gbl.min.js +6 -0
  8. package/browser/es5/applicationinsights-teechannel-js.3.1.2.gbl.min.js.map +1 -0
  9. package/browser/es5/applicationinsights-teechannel-js.3.1.2.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-teechannel-js.3.1.1.js → applicationinsights-teechannel-js.3.1.2.js} +328 -309
  11. package/browser/es5/applicationinsights-teechannel-js.3.1.2.js.map +1 -0
  12. package/browser/es5/applicationinsights-teechannel-js.3.1.2.min.js +6 -0
  13. package/browser/es5/applicationinsights-teechannel-js.3.1.2.min.js.map +1 -0
  14. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js +325 -306
  15. package/browser/es5/applicationinsights-teechannel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-teechannel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js +327 -308
  19. package/browser/es5/applicationinsights-teechannel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-teechannel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-teechannel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-teechannel-js.3.js +327 -308
  24. package/browser/es5/applicationinsights-teechannel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-teechannel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-teechannel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-teechannel-js.js +325 -306
  28. package/dist/es5/applicationinsights-teechannel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-teechannel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-teechannel-js.min.js.map +1 -1
  31. package/dist-es5/ChannelController.js +1 -1
  32. package/dist-es5/Interfaces/ITeeChannelConfig.js +1 -1
  33. package/dist-es5/TeeChannel.js +1 -1
  34. package/dist-es5/__DynamicConstants.js +1 -1
  35. package/dist-es5/applicationinsights-teechannel-js.js +1 -1
  36. package/package.json +4 -4
  37. package/types/applicationinsights-teechannel-js.d.ts +1 -1
  38. package/types/applicationinsights-teechannel-js.namespaced.d.ts +2 -1
  39. package/browser/es5/applicationinsights-teechannel-js.3.1.1.cjs.js.map +0 -1
  40. package/browser/es5/applicationinsights-teechannel-js.3.1.1.cjs.min.js +0 -6
  41. package/browser/es5/applicationinsights-teechannel-js.3.1.1.cjs.min.js.map +0 -1
  42. package/browser/es5/applicationinsights-teechannel-js.3.1.1.gbl.js.map +0 -1
  43. package/browser/es5/applicationinsights-teechannel-js.3.1.1.gbl.min.js +0 -6
  44. package/browser/es5/applicationinsights-teechannel-js.3.1.1.gbl.min.js.map +0 -1
  45. package/browser/es5/applicationinsights-teechannel-js.3.1.1.integrity.json +0 -66
  46. package/browser/es5/applicationinsights-teechannel-js.3.1.1.js.map +0 -1
  47. package/browser/es5/applicationinsights-teechannel-js.3.1.1.min.js +0 -6
  48. package/browser/es5/applicationinsights-teechannel-js.3.1.1.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Tee Channel, 3.1.1
2
+ * Application Insights JavaScript SDK - Tee Channel, 3.1.2
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -7,8 +7,8 @@
7
7
  typeof exports === "object" && typeof module !== undef ? factory(exports) :
8
8
  typeof define === "function" && define.amd ? define(["exports"], factory) :
9
9
  (function(global){
10
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_teechannel_js_3_1_1", msMod="__ms$mod__";
11
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1";
10
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_teechannel_js_3_1_2", msMod="__ms$mod__";
11
+ var mods={}, modDetail=mods[modName]={}, ver="3.1.2";
12
12
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
13
13
  // Versioned namespace "Microsoft.ApplicationInsights3"
14
14
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -39,30 +39,25 @@ var ObjClass$1 = Object;
39
39
  var UNDEF_VALUE = undefined;
40
40
  var NULL_VALUE = null;
41
41
  var EMPTY = "";
42
- var BOOLEAN = "boolean";
43
42
  var FUNCTION = "function";
44
- var NUMBER = "number";
45
43
  var OBJECT = "object";
46
44
  var PROTOTYPE = "prototype";
47
45
  var __PROTO__ = "__proto__";
48
- var STRING = "string";
49
46
  var UNDEFINED = "undefined";
50
47
  var CONSTRUCTOR = "constructor";
51
48
  var SYMBOL = "Symbol";
52
49
  var POLYFILL_TAG = "_polyfill";
53
- var INDEX_OF = "indexOf";
54
50
  var LENGTH = "length";
55
- var DONE = "done";
56
- var VALUE = "value";
57
51
  var NAME = "name";
58
- var SLICE = "slice";
59
52
  var CALL = "call";
60
53
  var TO_STRING = "toString";
61
54
  var ObjClass = Object;
62
55
  var ObjProto = ObjClass[PROTOTYPE];
63
56
  var StrCls = String;
57
+ var StrProto = StrCls[PROTOTYPE];
64
58
  var ArrCls = Array;
65
59
  var ArrProto = ArrCls[PROTOTYPE];
60
+ var ArrSlice = ArrProto["slice"];
66
61
 
67
62
  function safe(func, argArray) {
68
63
  try {
@@ -97,7 +92,7 @@ function isStrictNullOrUndefined(value) {
97
92
  function isDefined(arg) {
98
93
  return !!arg || arg !== UNDEF_VALUE;
99
94
  }
100
- var isString = ( /*#__PURE__*/_createIs(STRING));
95
+ var isString = ( /*#__PURE__*/_createIs("string"));
101
96
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
102
97
  /*#__NO_SIDE_EFFECTS__*/
103
98
  function isObject(value) {
@@ -107,8 +102,8 @@ function isObject(value) {
107
102
  return !!value && typeof value === OBJECT;
108
103
  }
109
104
  var isArray = ArrCls.isArray;
110
- var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
111
- var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
105
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
106
+ var isBoolean = ( /*#__PURE__*/_createIs("boolean"));
112
107
  /*#__NO_SIDE_EFFECTS__*/
113
108
  function isPromiseLike(value) {
114
109
  return !!(value && value.then && isFunction(value.then));
@@ -203,6 +198,7 @@ var asString = StrCls;
203
198
 
204
199
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
205
200
  var _globalCfg;
201
+ /*#__NO_SIDE_EFFECTS__*/
206
202
  function _getGlobalValue() {
207
203
  var result;
208
204
  if (typeof globalThis !== UNDEFINED) {
@@ -237,7 +233,7 @@ function dumpObj(object, format) {
237
233
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
238
234
  }
239
235
  try {
240
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
236
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
241
237
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
242
238
  }
243
239
  catch (e) {
@@ -246,18 +242,15 @@ function dumpObj(object, format) {
246
242
  return objType + ": " + propertyValueDump;
247
243
  }
248
244
 
249
- var _slice;
250
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
251
245
  var _unwrapFunction = _unwrapFunctionWithPoly;
252
246
  /*#__NO_SIDE_EFFECTS__*/
253
247
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
254
- _slice = _slice || ArrProto[SLICE];
255
248
  var clsFn = clsProto && clsProto[funcName];
256
249
  return function (thisArg) {
257
250
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
258
251
  if (theFunc || polyFunc) {
259
252
  var theArgs = arguments;
260
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
253
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
261
254
  }
262
255
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
263
256
  };
@@ -309,7 +302,7 @@ function polyGetKnownSymbol(name) {
309
302
  var propMap = {
310
303
  e: "enumerable",
311
304
  c: "configurable",
312
- v: VALUE,
305
+ v: "value",
313
306
  w: "writable",
314
307
  g: "get",
315
308
  s: "set"
@@ -342,6 +335,7 @@ var _globalLazyTestHooks;
342
335
  function _initTestHooks() {
343
336
  _globalLazyTestHooks = _getGlobalConfig();
344
337
  }
338
+ /*#__NO_SIDE_EFFECTS__*/
345
339
  function getLazy(cb) {
346
340
  var lazyValue = {};
347
341
  !_globalLazyTestHooks && _initTestHooks();
@@ -379,9 +373,14 @@ function createCachedValue(value) {
379
373
 
380
374
  var WINDOW = "window";
381
375
  var _cachedGlobal;
382
- var _cachedWindow;
383
- var _cachedDocument;
384
- var _isNode;
376
+ function _getGlobalInstFn(getFn, theArgs) {
377
+ var cachedValue;
378
+ return function () {
379
+ !_globalLazyTestHooks && _initTestHooks();
380
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
381
+ return cachedValue.v;
382
+ };
383
+ }
385
384
  /*#__NO_SIDE_EFFECTS__*/
386
385
  function lazySafeGetInst(name) {
387
386
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -398,21 +397,21 @@ function getInst(name, useCached) {
398
397
  if (gbl && gbl[name]) {
399
398
  return gbl[name];
400
399
  }
401
- if (name === WINDOW && _cachedWindow) {
402
- return _cachedWindow.v;
400
+ if (name === WINDOW) {
401
+ return getWindow();
403
402
  }
404
403
  return NULL_VALUE;
405
404
  }
405
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
406
406
  /*#__NO_SIDE_EFFECTS__*/
407
- function getDocument() {
408
- !_globalLazyTestHooks && _initTestHooks();
409
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
410
- return _cachedDocument.v;
411
- }
412
- function isNode() {
413
- !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
414
- return _isNode.v;
407
+ function hasWindow() {
408
+ return !!getWindow();
415
409
  }
410
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
411
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
412
+ var isNode = ( /*#__PURE__*/_getGlobalInstFn(function () {
413
+ return !!safe(function () { return (process && (process.versions || {}).node); }).v;
414
+ }));
416
415
 
417
416
  var _symbol;
418
417
  var _symbolFor;
@@ -473,8 +472,8 @@ function iterForOf(iter, callbackfn, thisArg) {
473
472
  var iterResult = void 0;
474
473
  try {
475
474
  var count = 0;
476
- while (!(iterResult = iter.next())[DONE]) {
477
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
475
+ while (!(iterResult = iter.next()).done) {
476
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
478
477
  break;
479
478
  }
480
479
  count++;
@@ -489,7 +488,7 @@ function iterForOf(iter, callbackfn, thisArg) {
489
488
  }
490
489
  finally {
491
490
  try {
492
- if (iterResult && !iterResult[DONE]) {
491
+ if (iterResult && !iterResult.done) {
493
492
  iter.return && iter.return(iterResult);
494
493
  }
495
494
  }
@@ -503,7 +502,9 @@ function iterForOf(iter, callbackfn, thisArg) {
503
502
  }
504
503
  }
505
504
 
506
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
505
+ function fnApply(fn, thisArg, argArray) {
506
+ return fn.apply(thisArg, argArray);
507
+ }
507
508
 
508
509
  function arrAppend(target, elms) {
509
510
  if (!isUndefined(elms) && target) {
@@ -535,9 +536,11 @@ function arrForEach(theArray, callbackfn, thisArg) {
535
536
  }
536
537
  }
537
538
 
538
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
539
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
539
540
 
540
- var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
541
+ function arrSlice(theArray, start, end) {
542
+ return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
543
+ }
541
544
 
542
545
  var objCreate = ObjClass["create"] || polyObjCreate;
543
546
  /*#__NO_SIDE_EFFECTS__*/
@@ -567,6 +570,7 @@ function objSetPrototypeOf(obj, proto) {
567
570
  return fn(obj, proto);
568
571
  }
569
572
 
573
+ /*#__NO_SIDE_EFFECTS__*/
570
574
  function _createCustomError(name, d, b) {
571
575
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
572
576
  d = objSetPrototypeOf(d, b);
@@ -590,7 +594,7 @@ function createCustomError(name, constructCb, errorBase) {
590
594
  var theArgs = arguments;
591
595
  try {
592
596
  safe(_setName, [theBaseClass, name]);
593
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
597
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
594
598
  if (_self !== _this) {
595
599
  var orgProto = objGetPrototypeOf(_this);
596
600
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -625,7 +629,7 @@ function isPlainObject(value) {
625
629
  return false;
626
630
  }
627
631
  if (!_gblWindow) {
628
- _gblWindow = true;
632
+ _gblWindow = hasWindow() ? getWindow() : true;
629
633
  }
630
634
  var result = false;
631
635
  if (value !== _gblWindow) {
@@ -649,56 +653,54 @@ function isPlainObject(value) {
649
653
  return result;
650
654
  }
651
655
 
656
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
657
+
652
658
  var REF = "ref";
653
- var UNREF = "un" + REF;
659
+ var UNREF = "unref";
654
660
  var HAS_REF = "hasRef";
655
661
  var ENABLED = "enabled";
662
+ /*#__NO_SIDE_EFFECTS__*/
656
663
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
657
- var _a;
658
664
  var ref = true;
659
665
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
660
666
  var theTimerHandler;
661
- var _unref = function () {
667
+ function _unref() {
662
668
  ref = false;
663
669
  timerId && timerId[UNREF] && timerId[UNREF]();
664
670
  return theTimerHandler;
665
- };
666
- var _ref = function () {
667
- ref = true;
668
- timerId && timerId[REF] && timerId[REF]();
671
+ }
672
+ function _cancel() {
673
+ timerId && cancelFn(timerId);
674
+ timerId = NULL_VALUE;
675
+ }
676
+ function _refresh() {
677
+ timerId = refreshFn(timerId);
678
+ if (!ref) {
679
+ _unref();
680
+ }
669
681
  return theTimerHandler;
682
+ }
683
+ function _setEnabled(value) {
684
+ !value && timerId && _cancel();
685
+ value && !timerId && _refresh();
686
+ }
687
+ theTimerHandler = {
688
+ cancel: _cancel,
689
+ refresh: _refresh
670
690
  };
671
- var _hasRef = function () {
691
+ theTimerHandler[HAS_REF] = function () {
672
692
  if (timerId && timerId[HAS_REF]) {
673
693
  return timerId[HAS_REF]();
674
694
  }
675
695
  return ref;
676
696
  };
677
- var _refresh = function () {
678
- timerId = refreshFn(timerId);
679
- if (!ref) {
680
- _unref();
681
- }
697
+ theTimerHandler[REF] = function () {
698
+ ref = true;
699
+ timerId && timerId[REF] && timerId[REF]();
682
700
  return theTimerHandler;
683
701
  };
684
- var _cancel = function () {
685
- timerId && cancelFn(timerId);
686
- timerId = NULL_VALUE;
687
- };
688
- var _setEnabled = function (value) {
689
- !value && timerId && _cancel();
690
- value && !timerId && _refresh();
691
- };
692
- theTimerHandler = (_a = {
693
- cancel: _cancel,
694
- refresh: _refresh
695
- },
696
- _a[HAS_REF] = _hasRef,
697
- _a[REF] = _ref,
698
- _a[UNREF] = _unref,
699
- _a[ENABLED] = false,
700
- _a);
701
- objDefineProp(theTimerHandler, ENABLED, {
702
+ theTimerHandler[UNREF] = _unref;
703
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
702
704
  get: function () { return !!timerId; },
703
705
  set: _setEnabled
704
706
  });
@@ -710,7 +712,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
710
712
  };
711
713
  }
712
714
 
713
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
715
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
714
716
  var isArr = isArray(overrideFn);
715
717
  var len = isArr ? overrideFn.length : 0;
716
718
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -718,7 +720,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
718
720
  var timerFn = theArgs[0];
719
721
  theArgs[0] = function () {
720
722
  handler.dn();
721
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
723
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
722
724
  };
723
725
  var handler = _createTimerHandler(startTimer, function (timerId) {
724
726
  if (timerId) {
@@ -726,16 +728,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
726
728
  timerId.refresh();
727
729
  return timerId;
728
730
  }
729
- fnApply(clearFn, self, [timerId]);
731
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
730
732
  }
731
- return fnApply(setFn, self, theArgs);
733
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
732
734
  }, function (timerId) {
733
- fnApply(clearFn, self, [timerId]);
735
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
734
736
  });
735
737
  return handler.h;
736
738
  }
737
739
  function scheduleTimeout(callback, timeout) {
738
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
740
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
739
741
  }
740
742
 
741
743
  var strHasOwnProperty = "hasOwnProperty";
@@ -1036,7 +1038,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1036
1038
  var _DYN_NAME = "name";
1037
1039
  var _DYN_TIME = "time";
1038
1040
  var _DYN_PROCESS_NEXT$1 = "processNext";
1039
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1041
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1040
1042
  var _DYN_UNLOAD = "unload";
1041
1043
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
1042
1044
  var _DYN_CREATE_NEW = "createNew";
@@ -1049,6 +1051,7 @@ var _DYN__DO_TEARDOWN = "_doTeardown";
1049
1051
  var _DYN_UPDATE = "update";
1050
1052
  var _DYN_GET_NEXT = "getNext";
1051
1053
  var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
1054
+ var _DYN_USER_AGENT = "userAgent";
1052
1055
  var _DYN_NODE_TYPE = "nodeType";
1053
1056
  var _DYN_REPLACE = "replace";
1054
1057
  var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
@@ -1221,7 +1224,7 @@ function _createPromise(newPromise, processor, executor) {
1221
1224
  process.emit(NODE_UNHANDLED_REJECTION, _settledValue, _thePromise);
1222
1225
  }
1223
1226
  else {
1224
- var gbl = getGlobal();
1227
+ var gbl = getWindow() || getGlobal();
1225
1228
  emitEvent(gbl, UNHANDLED_REJECTION, function (theEvt) {
1226
1229
  objDefine(theEvt, "promise", { g: function () { return _thePromise; } });
1227
1230
  theEvt.reason = _settledValue;
@@ -1329,234 +1332,6 @@ var STR_PRIORITY = "priority";
1329
1332
  var STR_GET_PERF_MGR = "getPerfMgr";
1330
1333
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1331
1334
 
1332
- var _aiNamespace = null;
1333
- function _getExtensionNamespace() {
1334
- var target = getInst("Microsoft");
1335
- if (target) {
1336
- _aiNamespace = target["ApplicationInsights"];
1337
- }
1338
- return _aiNamespace;
1339
- }
1340
- function getDebugExt(config) {
1341
- var ns = _aiNamespace;
1342
- if (!ns && config.disableDbgExt !== true) {
1343
- ns = _aiNamespace || _getExtensionNamespace();
1344
- }
1345
- return ns ? ns["ChromeDbgExt"] : null;
1346
- }
1347
-
1348
- var strConsole = "console";
1349
- var strJSON = "JSON";
1350
- var strCrypto = "crypto";
1351
- var strMsCrypto = "msCrypto";
1352
- var _isTrident = null;
1353
- function getConsole() {
1354
- if (typeof console !== strShimUndefined) {
1355
- return console;
1356
- }
1357
- return getInst(strConsole);
1358
- }
1359
- function hasJSON() {
1360
- return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1361
- }
1362
- function getJSON() {
1363
- if (hasJSON()) {
1364
- return JSON || getInst(strJSON);
1365
- }
1366
- return null;
1367
- }
1368
- function getCrypto() {
1369
- return getInst(strCrypto);
1370
- }
1371
- function getMsCrypto() {
1372
- return getInst(strMsCrypto);
1373
- }
1374
- function isIE() {
1375
- return _isTrident;
1376
- }
1377
-
1378
- var _a$2;
1379
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1380
- var AiNonUserActionablePrefix = "AI (Internal): ";
1381
- var AiUserActionablePrefix = "AI: ";
1382
- var AIInternalMessagePrefix = "AITR_";
1383
- var defaultValues$1 = {
1384
- loggingLevelConsole: 0,
1385
- loggingLevelTelemetry: 1,
1386
- maxMessageLimit: 25,
1387
- enableDebug: false
1388
- };
1389
- var _logFuncs = (_a$2 = {},
1390
- _a$2[0 ] = null,
1391
- _a$2[1 ] = "errorToConsole",
1392
- _a$2[2 ] = STR_WARN_TO_CONSOLE,
1393
- _a$2[3 ] = "debugToConsole",
1394
- _a$2);
1395
- function _sanitizeDiagnosticText(text) {
1396
- if (text) {
1397
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1398
- }
1399
- return STR_EMPTY;
1400
- }
1401
- function _logToConsole(func, message) {
1402
- var theConsole = getConsole();
1403
- if (!!theConsole) {
1404
- var logFunc = "log";
1405
- if (theConsole[func]) {
1406
- logFunc = func;
1407
- }
1408
- if (isFunction(theConsole[logFunc])) {
1409
- theConsole[logFunc](message);
1410
- }
1411
- }
1412
- }
1413
- var _InternalLogMessage = /** @class */ (function () {
1414
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1415
- if (isUserAct === void 0) { isUserAct = false; }
1416
- var _self = this;
1417
- _self[_DYN_MESSAGE_ID ] = msgId;
1418
- _self[_DYN_MESSAGE ] =
1419
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1420
- msgId;
1421
- var strProps = STR_EMPTY;
1422
- if (hasJSON()) {
1423
- strProps = getJSON().stringify(properties);
1424
- }
1425
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1426
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1427
- _self[_DYN_MESSAGE ] += diagnosticText;
1428
- }
1429
- _InternalLogMessage.dataType = "MessageData";
1430
- return _InternalLogMessage;
1431
- }());
1432
- function safeGetLogger(core, config) {
1433
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1434
- }
1435
- var DiagnosticLogger = /** @class */ (function () {
1436
- function DiagnosticLogger(config) {
1437
- this.identifier = "DiagnosticLogger";
1438
- this.queue = [];
1439
- var _messageCount = 0;
1440
- var _messageLogged = {};
1441
- var _loggingLevelConsole;
1442
- var _loggingLevelTelemetry;
1443
- var _maxInternalMessageLimit;
1444
- var _enableDebug;
1445
- var _unloadHandler;
1446
- dynamicProto(DiagnosticLogger, this, function (_self) {
1447
- _unloadHandler = _setDefaultsFromConfig(config || {});
1448
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1449
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1450
- if (isUserAct === void 0) { isUserAct = false; }
1451
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1452
- if (_enableDebug) {
1453
- throw dumpObj(message);
1454
- }
1455
- else {
1456
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1457
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1458
- if (isUserAct) {
1459
- var messageKey = +message[_DYN_MESSAGE_ID ];
1460
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1461
- _self[logFunc](message[_DYN_MESSAGE ]);
1462
- _messageLogged[messageKey] = true;
1463
- }
1464
- }
1465
- else {
1466
- if (_loggingLevelConsole >= severity) {
1467
- _self[logFunc](message[_DYN_MESSAGE ]);
1468
- }
1469
- }
1470
- _logInternalMessage(severity, message);
1471
- }
1472
- else {
1473
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1474
- }
1475
- }
1476
- };
1477
- _self.debugToConsole = function (message) {
1478
- _logToConsole("debug", message);
1479
- _debugExtMsg("warning", message);
1480
- };
1481
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1482
- _logToConsole("warn", message);
1483
- _debugExtMsg("warning", message);
1484
- };
1485
- _self.errorToConsole = function (message) {
1486
- _logToConsole("error", message);
1487
- _debugExtMsg("error", message);
1488
- };
1489
- _self.resetInternalMessageCount = function () {
1490
- _messageCount = 0;
1491
- _messageLogged = {};
1492
- };
1493
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1494
- _self[_DYN_UNLOAD ] = function (isAsync) {
1495
- _unloadHandler && _unloadHandler.rm();
1496
- _unloadHandler = null;
1497
- };
1498
- function _logInternalMessage(severity, message) {
1499
- if (_areInternalMessagesThrottled()) {
1500
- return;
1501
- }
1502
- var logMessage = true;
1503
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1504
- if (_messageLogged[messageKey]) {
1505
- logMessage = false;
1506
- }
1507
- else {
1508
- _messageLogged[messageKey] = true;
1509
- }
1510
- if (logMessage) {
1511
- if (severity <= _loggingLevelTelemetry) {
1512
- _self.queue[_DYN_PUSH ](message);
1513
- _messageCount++;
1514
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1515
- }
1516
- if (_messageCount === _maxInternalMessageLimit) {
1517
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1518
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1519
- _self.queue[_DYN_PUSH ](throttleMessage);
1520
- if (severity === 1 ) {
1521
- _self.errorToConsole(throttleLimitMessage);
1522
- }
1523
- else {
1524
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1525
- }
1526
- }
1527
- }
1528
- }
1529
- function _setDefaultsFromConfig(config) {
1530
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1531
- var config = details.cfg;
1532
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1533
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1534
- _maxInternalMessageLimit = config.maxMessageLimit;
1535
- _enableDebug = config.enableDebug;
1536
- });
1537
- }
1538
- function _areInternalMessagesThrottled() {
1539
- return _messageCount >= _maxInternalMessageLimit;
1540
- }
1541
- function _debugExtMsg(name, data) {
1542
- var dbgExt = getDebugExt(config || {});
1543
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1544
- dbgExt[_DYN_DIAG_LOG ](name, data);
1545
- }
1546
- }
1547
- });
1548
- }
1549
- DiagnosticLogger.__ieDyn=1;
1550
- return DiagnosticLogger;
1551
- }());
1552
- function _getLogger(logger) {
1553
- return (logger || new DiagnosticLogger());
1554
- }
1555
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1556
- if (isUserAct === void 0) { isUserAct = false; }
1557
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1558
- }
1559
-
1560
1335
  var rCamelCase = /-([a-z])/g;
1561
1336
  var rNormalizeInvalid = /([^\w\d_$])/g;
1562
1337
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
@@ -1576,6 +1351,12 @@ function normalizeJsName(name) {
1576
1351
  }
1577
1352
  return value;
1578
1353
  }
1354
+ function strContains(value, search) {
1355
+ if (value && search) {
1356
+ return strIndexOf(value, search) !== -1;
1357
+ }
1358
+ return false;
1359
+ }
1579
1360
  function _createProxyFunction(source, funcName) {
1580
1361
  var srcFunc = null;
1581
1362
  var src = null;
@@ -1613,6 +1394,45 @@ function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1613
1394
  return target;
1614
1395
  }
1615
1396
 
1397
+ var strConsole = "console";
1398
+ var strJSON = "JSON";
1399
+ var strCrypto = "crypto";
1400
+ var strMsCrypto = "msCrypto";
1401
+ var strMsie = "msie";
1402
+ var strTrident = "trident/";
1403
+ var _isTrident = null;
1404
+ var _navUserAgentCheck = null;
1405
+ function getConsole() {
1406
+ if (typeof console !== strShimUndefined) {
1407
+ return console;
1408
+ }
1409
+ return getInst(strConsole);
1410
+ }
1411
+ function hasJSON() {
1412
+ return Boolean((typeof JSON === strShimObject && JSON) || getInst(strJSON) !== null);
1413
+ }
1414
+ function getJSON() {
1415
+ if (hasJSON()) {
1416
+ return JSON || getInst(strJSON);
1417
+ }
1418
+ return null;
1419
+ }
1420
+ function getCrypto() {
1421
+ return getInst(strCrypto);
1422
+ }
1423
+ function getMsCrypto() {
1424
+ return getInst(strMsCrypto);
1425
+ }
1426
+ function isIE() {
1427
+ var nav = getNavigator();
1428
+ if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
1429
+ _navUserAgentCheck = nav[_DYN_USER_AGENT ];
1430
+ var userAgent = (_navUserAgentCheck || STR_EMPTY)[_DYN_TO_LOWER_CASE ]();
1431
+ _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1432
+ }
1433
+ return _isTrident;
1434
+ }
1435
+
1616
1436
  var UInt32Mask = 0x100000000;
1617
1437
  var MaxUInt32 = 0xffffffff;
1618
1438
  var SEED1 = 123456789;
@@ -2242,6 +2062,7 @@ function _createAndUseHandler(state, configHandler) {
2242
2062
  configHandler = null;
2243
2063
  }
2244
2064
  };
2065
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2245
2066
  state.use(handler, configHandler);
2246
2067
  return handler;
2247
2068
  }
@@ -2369,6 +2190,204 @@ function cfgDfBoolean(defaultValue, fallBackName) {
2369
2190
  };
2370
2191
  }
2371
2192
 
2193
+ var _aiNamespace = null;
2194
+ function _getExtensionNamespace() {
2195
+ var target = getInst("Microsoft");
2196
+ if (target) {
2197
+ _aiNamespace = target["ApplicationInsights"];
2198
+ }
2199
+ return _aiNamespace;
2200
+ }
2201
+ function getDebugExt(config) {
2202
+ var ns = _aiNamespace;
2203
+ if (!ns && config.disableDbgExt !== true) {
2204
+ ns = _aiNamespace || _getExtensionNamespace();
2205
+ }
2206
+ return ns ? ns["ChromeDbgExt"] : null;
2207
+ }
2208
+
2209
+ var _a$2;
2210
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2211
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2212
+ var AiUserActionablePrefix = "AI: ";
2213
+ var AIInternalMessagePrefix = "AITR_";
2214
+ var defaultValues$1 = {
2215
+ loggingLevelConsole: 0,
2216
+ loggingLevelTelemetry: 1,
2217
+ maxMessageLimit: 25,
2218
+ enableDebug: false
2219
+ };
2220
+ var _logFuncs = (_a$2 = {},
2221
+ _a$2[0 ] = null,
2222
+ _a$2[1 ] = "errorToConsole",
2223
+ _a$2[2 ] = STR_WARN_TO_CONSOLE,
2224
+ _a$2[3 ] = "debugToConsole",
2225
+ _a$2);
2226
+ function _sanitizeDiagnosticText(text) {
2227
+ if (text) {
2228
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
2229
+ }
2230
+ return STR_EMPTY;
2231
+ }
2232
+ function _logToConsole(func, message) {
2233
+ var theConsole = getConsole();
2234
+ if (!!theConsole) {
2235
+ var logFunc = "log";
2236
+ if (theConsole[func]) {
2237
+ logFunc = func;
2238
+ }
2239
+ if (isFunction(theConsole[logFunc])) {
2240
+ theConsole[logFunc](message);
2241
+ }
2242
+ }
2243
+ }
2244
+ var _InternalLogMessage = /** @class */ (function () {
2245
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2246
+ if (isUserAct === void 0) { isUserAct = false; }
2247
+ var _self = this;
2248
+ _self[_DYN_MESSAGE_ID ] = msgId;
2249
+ _self[_DYN_MESSAGE ] =
2250
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2251
+ msgId;
2252
+ var strProps = STR_EMPTY;
2253
+ if (hasJSON()) {
2254
+ strProps = getJSON().stringify(properties);
2255
+ }
2256
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
2257
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
2258
+ _self[_DYN_MESSAGE ] += diagnosticText;
2259
+ }
2260
+ _InternalLogMessage.dataType = "MessageData";
2261
+ return _InternalLogMessage;
2262
+ }());
2263
+ function safeGetLogger(core, config) {
2264
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2265
+ }
2266
+ var DiagnosticLogger = /** @class */ (function () {
2267
+ function DiagnosticLogger(config) {
2268
+ this.identifier = "DiagnosticLogger";
2269
+ this.queue = [];
2270
+ var _messageCount = 0;
2271
+ var _messageLogged = {};
2272
+ var _loggingLevelConsole;
2273
+ var _loggingLevelTelemetry;
2274
+ var _maxInternalMessageLimit;
2275
+ var _enableDebug;
2276
+ var _unloadHandler;
2277
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2278
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2279
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2280
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2281
+ if (isUserAct === void 0) { isUserAct = false; }
2282
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2283
+ if (_enableDebug) {
2284
+ throw dumpObj(message);
2285
+ }
2286
+ else {
2287
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2288
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2289
+ if (isUserAct) {
2290
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2291
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2292
+ _self[logFunc](message[_DYN_MESSAGE ]);
2293
+ _messageLogged[messageKey] = true;
2294
+ }
2295
+ }
2296
+ else {
2297
+ if (_loggingLevelConsole >= severity) {
2298
+ _self[logFunc](message[_DYN_MESSAGE ]);
2299
+ }
2300
+ }
2301
+ _logInternalMessage(severity, message);
2302
+ }
2303
+ else {
2304
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2305
+ }
2306
+ }
2307
+ };
2308
+ _self.debugToConsole = function (message) {
2309
+ _logToConsole("debug", message);
2310
+ _debugExtMsg("warning", message);
2311
+ };
2312
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2313
+ _logToConsole("warn", message);
2314
+ _debugExtMsg("warning", message);
2315
+ };
2316
+ _self.errorToConsole = function (message) {
2317
+ _logToConsole("error", message);
2318
+ _debugExtMsg("error", message);
2319
+ };
2320
+ _self.resetInternalMessageCount = function () {
2321
+ _messageCount = 0;
2322
+ _messageLogged = {};
2323
+ };
2324
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2325
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2326
+ _unloadHandler && _unloadHandler.rm();
2327
+ _unloadHandler = null;
2328
+ };
2329
+ function _logInternalMessage(severity, message) {
2330
+ if (_areInternalMessagesThrottled()) {
2331
+ return;
2332
+ }
2333
+ var logMessage = true;
2334
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2335
+ if (_messageLogged[messageKey]) {
2336
+ logMessage = false;
2337
+ }
2338
+ else {
2339
+ _messageLogged[messageKey] = true;
2340
+ }
2341
+ if (logMessage) {
2342
+ if (severity <= _loggingLevelTelemetry) {
2343
+ _self.queue[_DYN_PUSH ](message);
2344
+ _messageCount++;
2345
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2346
+ }
2347
+ if (_messageCount === _maxInternalMessageLimit) {
2348
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2349
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2350
+ _self.queue[_DYN_PUSH ](throttleMessage);
2351
+ if (severity === 1 ) {
2352
+ _self.errorToConsole(throttleLimitMessage);
2353
+ }
2354
+ else {
2355
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2356
+ }
2357
+ }
2358
+ }
2359
+ }
2360
+ function _setDefaultsFromConfig(config) {
2361
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2362
+ var config = details.cfg;
2363
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2364
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2365
+ _maxInternalMessageLimit = config.maxMessageLimit;
2366
+ _enableDebug = config.enableDebug;
2367
+ });
2368
+ }
2369
+ function _areInternalMessagesThrottled() {
2370
+ return _messageCount >= _maxInternalMessageLimit;
2371
+ }
2372
+ function _debugExtMsg(name, data) {
2373
+ var dbgExt = getDebugExt(config || {});
2374
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2375
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2376
+ }
2377
+ }
2378
+ });
2379
+ }
2380
+ DiagnosticLogger.__ieDyn=1;
2381
+ return DiagnosticLogger;
2382
+ }());
2383
+ function _getLogger(logger) {
2384
+ return (logger || new DiagnosticLogger());
2385
+ }
2386
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2387
+ if (isUserAct === void 0) { isUserAct = false; }
2388
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2389
+ }
2390
+
2372
2391
  var strExecutionContextKey = "ctx";
2373
2392
  var strParentContextKey = "ParentContextKey";
2374
2393
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3048,7 +3067,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3048
3067
  function _setDefaults(config, core, pluginChain) {
3049
3068
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3050
3069
  if (!pluginChain && core) {
3051
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3070
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3052
3071
  }
3053
3072
  var nextPlugin = _nextPlugin;
3054
3073
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {