@microsoft/applicationinsights-common 3.1.1-nightly3.2403-04 → 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 (97) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +394 -409
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-common.gbl.js +396 -411
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-common.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-common.js +396 -411
  11. package/browser/es5/applicationinsights-common.js.map +1 -1
  12. package/browser/es5/applicationinsights-common.min.js +2 -2
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-common.js +394 -409
  15. package/dist/es5/applicationinsights-common.js.map +1 -1
  16. package/dist/es5/applicationinsights-common.min.js +2 -2
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -1
  18. package/dist-es5/ConnectionStringParser.js +1 -1
  19. package/dist-es5/Constants.js +1 -1
  20. package/dist-es5/DomHelperFuncs.js +1 -1
  21. package/dist-es5/Enums.js +1 -1
  22. package/dist-es5/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +1 -1
  24. package/dist-es5/Interfaces/Context/IApplication.js +1 -1
  25. package/dist-es5/Interfaces/Context/IDevice.js +1 -1
  26. package/dist-es5/Interfaces/Context/IInternal.js +1 -1
  27. package/dist-es5/Interfaces/Context/ILocation.js +1 -1
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
  29. package/dist-es5/Interfaces/Context/ISample.js +1 -1
  30. package/dist-es5/Interfaces/Context/ISession.js +1 -1
  31. package/dist-es5/Interfaces/Context/ISessionManager.js +1 -1
  32. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
  33. package/dist-es5/Interfaces/Context/IUser.js +1 -1
  34. package/dist-es5/Interfaces/Context/IWeb.js +1 -1
  35. package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
  37. package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
  38. package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
  39. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
  40. package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
  41. package/dist-es5/Interfaces/Contracts/IData.js +1 -1
  42. package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
  43. package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
  45. package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
  46. package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
  47. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
  48. package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
  49. package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
  50. package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
  51. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  52. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  53. package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
  54. package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
  55. package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
  56. package/dist-es5/Interfaces/IAppInsights.js +1 -1
  57. package/dist-es5/Interfaces/IConfig.js +1 -1
  58. package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
  59. package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
  60. package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
  61. package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
  62. package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
  63. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  64. package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
  65. package/dist-es5/Interfaces/IPartC.js +1 -1
  66. package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
  67. package/dist-es5/Interfaces/IRequestContext.js +1 -1
  68. package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
  69. package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
  70. package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
  71. package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
  72. package/dist-es5/Interfaces/PartAExtensions.js +1 -1
  73. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
  74. package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
  75. package/dist-es5/Offline.js +1 -1
  76. package/dist-es5/RequestResponseHeaders.js +1 -1
  77. package/dist-es5/StorageHelperFuncs.js +1 -1
  78. package/dist-es5/Telemetry/Common/Data.js +1 -1
  79. package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
  80. package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
  81. package/dist-es5/Telemetry/Common/Envelope.js +1 -1
  82. package/dist-es5/Telemetry/Event.js +1 -1
  83. package/dist-es5/Telemetry/Exception.js +1 -1
  84. package/dist-es5/Telemetry/Metric.js +1 -1
  85. package/dist-es5/Telemetry/PageView.js +1 -1
  86. package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
  87. package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
  88. package/dist-es5/Telemetry/Trace.js +1 -1
  89. package/dist-es5/TelemetryItemCreator.js +1 -1
  90. package/dist-es5/ThrottleMgr.js +1 -1
  91. package/dist-es5/UrlHelperFuncs.js +1 -1
  92. package/dist-es5/Util.js +1 -1
  93. package/dist-es5/__DynamicConstants.js +1 -1
  94. package/dist-es5/applicationinsights-common.js +1 -1
  95. package/package.json +63 -66
  96. package/types/applicationinsights-common.d.ts +1 -1
  97. package/types/applicationinsights-common.namespaced.d.ts +2 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 3.1.1-nightly3.2403-04
2
+ * Application Insights JavaScript SDK - Common, 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_common_3_1_1_nightly3_2403_04", msMod="__ms$mod__";
11
- var mods={}, modDetail=mods[modName]={}, ver="3.1.1-nightly3.2403-04";
10
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_common_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]||{});
@@ -34,20 +34,15 @@ var UNDEF_VALUE = undefined;
34
34
  var NULL_VALUE = null;
35
35
  var EMPTY = "";
36
36
  var FUNCTION = "function";
37
- var NUMBER = "number";
38
37
  var OBJECT = "object";
39
38
  var PROTOTYPE = "prototype";
40
39
  var __PROTO__ = "__proto__";
41
- var STRING = "string";
42
40
  var UNDEFINED = "undefined";
43
41
  var CONSTRUCTOR = "constructor";
44
42
  var SYMBOL = "Symbol";
45
43
  var POLYFILL_TAG = "_polyfill";
46
- var INDEX_OF = "indexOf";
47
44
  var LENGTH = "length";
48
- var VALUE = "value";
49
45
  var NAME = "name";
50
- var SLICE = "slice";
51
46
  var CALL = "call";
52
47
  var TO_STRING = "toString";
53
48
  var ObjClass$1 = Object;
@@ -57,6 +52,7 @@ var StrProto = StrCls[PROTOTYPE];
57
52
  var MathCls = Math;
58
53
  var ArrCls = Array;
59
54
  var ArrProto = ArrCls[PROTOTYPE];
55
+ var ArrSlice = ArrProto["slice"];
60
56
 
61
57
  function safe(func, argArray) {
62
58
  try {
@@ -98,7 +94,7 @@ function isNullOrUndefined(value) {
98
94
  function isDefined(arg) {
99
95
  return !!arg || arg !== UNDEF_VALUE;
100
96
  }
101
- var isString = ( /*#__PURE__*/_createIs(STRING));
97
+ var isString = ( /*#__PURE__*/_createIs("string"));
102
98
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
103
99
  /*#__NO_SIDE_EFFECTS__*/
104
100
  function isObject(value) {
@@ -197,6 +193,7 @@ var asString = StrCls;
197
193
 
198
194
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
199
195
  var _globalCfg;
196
+ /*#__NO_SIDE_EFFECTS__*/
200
197
  function _getGlobalValue() {
201
198
  var result;
202
199
  if (typeof globalThis !== UNDEFINED) {
@@ -231,7 +228,7 @@ function dumpObj(object, format) {
231
228
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
232
229
  }
233
230
  try {
234
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
231
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
235
232
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
236
233
  }
237
234
  catch (e) {
@@ -240,18 +237,15 @@ function dumpObj(object, format) {
240
237
  return objType + ": " + propertyValueDump;
241
238
  }
242
239
 
243
- var _slice;
244
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
245
240
  var _unwrapFunction = _unwrapFunctionWithPoly;
246
241
  /*#__NO_SIDE_EFFECTS__*/
247
242
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
248
- _slice = _slice || ArrProto[SLICE];
249
243
  var clsFn = clsProto && clsProto[funcName];
250
244
  return function (thisArg) {
251
245
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
252
246
  if (theFunc || polyFunc) {
253
247
  var theArgs = arguments;
254
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
248
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
255
249
  }
256
250
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
257
251
  };
@@ -259,7 +253,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
259
253
 
260
254
  var mathMax = MathCls.max;
261
255
 
262
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
256
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
263
257
 
264
258
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
265
259
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -320,7 +314,7 @@ function polySymbolFor(key) {
320
314
  var propMap = {
321
315
  e: "enumerable",
322
316
  c: "configurable",
323
- v: VALUE,
317
+ v: "value",
324
318
  w: "writable",
325
319
  g: "get",
326
320
  s: "set"
@@ -353,6 +347,7 @@ var _globalLazyTestHooks;
353
347
  function _initTestHooks() {
354
348
  _globalLazyTestHooks = _getGlobalConfig();
355
349
  }
350
+ /*#__NO_SIDE_EFFECTS__*/
356
351
  function getLazy(cb) {
357
352
  var lazyValue = {};
358
353
  !_globalLazyTestHooks && _initTestHooks();
@@ -390,9 +385,14 @@ function createCachedValue(value) {
390
385
 
391
386
  var WINDOW = "window";
392
387
  var _cachedGlobal;
393
- var _cachedWindow;
394
- var _cachedDocument;
395
- var _cachedNavigator;
388
+ function _getGlobalInstFn(getFn, theArgs) {
389
+ var cachedValue;
390
+ return function () {
391
+ !_globalLazyTestHooks && _initTestHooks();
392
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
393
+ return cachedValue.v;
394
+ };
395
+ }
396
396
  /*#__NO_SIDE_EFFECTS__*/
397
397
  function lazySafeGetInst(name) {
398
398
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -409,37 +409,22 @@ function getInst(name, useCached) {
409
409
  if (gbl && gbl[name]) {
410
410
  return gbl[name];
411
411
  }
412
- if (name === WINDOW && _cachedWindow) {
413
- return _cachedWindow.v;
412
+ if (name === WINDOW) {
413
+ return getWindow();
414
414
  }
415
415
  return NULL_VALUE;
416
416
  }
417
- /*#__NO_SIDE_EFFECTS__*/
418
- function getDocument() {
419
- !_globalLazyTestHooks && _initTestHooks();
420
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
421
- return _cachedDocument.v;
422
- }
417
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
423
418
  /*#__NO_SIDE_EFFECTS__*/
424
419
  function hasWindow() {
425
420
  return !!getWindow();
426
421
  }
427
- /*#__NO_SIDE_EFFECTS__*/
428
- function getWindow() {
429
- !_globalLazyTestHooks && _initTestHooks();
430
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
431
- return _cachedWindow.v;
432
- }
422
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
433
423
  /*#__NO_SIDE_EFFECTS__*/
434
424
  function hasNavigator() {
435
425
  return !!getNavigator();
436
426
  }
437
- /*#__NO_SIDE_EFFECTS__*/
438
- function getNavigator() {
439
- !_globalLazyTestHooks && _initTestHooks();
440
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
441
- return _cachedNavigator.v;
442
- }
427
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
443
428
 
444
429
  var _symbol;
445
430
  var _symbolFor;
@@ -462,7 +447,9 @@ function symbolFor(key) {
462
447
  return (_symbolFor.v || polySymbolFor)(key);
463
448
  }
464
449
 
465
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
450
+ function fnApply(fn, thisArg, argArray) {
451
+ return fn.apply(thisArg, argArray);
452
+ }
466
453
 
467
454
  function arrForEach(theArray, callbackfn, thisArg) {
468
455
  if (theArray) {
@@ -477,7 +464,7 @@ function arrForEach(theArray, callbackfn, thisArg) {
477
464
  }
478
465
  }
479
466
 
480
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
467
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
481
468
 
482
469
  var arrMap = ( /*#__PURE__*/_unwrapFunction("map", ArrProto));
483
470
 
@@ -511,6 +498,7 @@ function objSetPrototypeOf(obj, proto) {
511
498
  return fn(obj, proto);
512
499
  }
513
500
 
501
+ /*#__NO_SIDE_EFFECTS__*/
514
502
  function _createCustomError(name, d, b) {
515
503
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
516
504
  d = objSetPrototypeOf(d, b);
@@ -534,7 +522,7 @@ function createCustomError(name, constructCb, errorBase) {
534
522
  var theArgs = arguments;
535
523
  try {
536
524
  safe(_setName, [theBaseClass, name]);
537
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
525
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
538
526
  if (_self !== _this) {
539
527
  var orgProto = objGetPrototypeOf(_this);
540
528
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -628,58 +616,54 @@ function polyStrEndsWith(value, searchString, length) {
628
616
  return strSubstring(value, end - searchValue[LENGTH], end) === searchValue;
629
617
  }
630
618
 
631
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
619
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
632
620
 
633
621
  var REF = "ref";
634
- var UNREF = "un" + REF;
622
+ var UNREF = "unref";
635
623
  var HAS_REF = "hasRef";
636
624
  var ENABLED = "enabled";
625
+ /*#__NO_SIDE_EFFECTS__*/
637
626
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
638
- var _a;
639
627
  var ref = true;
640
628
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
641
629
  var theTimerHandler;
642
- var _unref = function () {
630
+ function _unref() {
643
631
  ref = false;
644
632
  timerId && timerId[UNREF] && timerId[UNREF]();
645
633
  return theTimerHandler;
646
- };
647
- var _ref = function () {
648
- ref = true;
649
- timerId && timerId[REF] && timerId[REF]();
634
+ }
635
+ function _cancel() {
636
+ timerId && cancelFn(timerId);
637
+ timerId = NULL_VALUE;
638
+ }
639
+ function _refresh() {
640
+ timerId = refreshFn(timerId);
641
+ if (!ref) {
642
+ _unref();
643
+ }
650
644
  return theTimerHandler;
645
+ }
646
+ function _setEnabled(value) {
647
+ !value && timerId && _cancel();
648
+ value && !timerId && _refresh();
649
+ }
650
+ theTimerHandler = {
651
+ cancel: _cancel,
652
+ refresh: _refresh
651
653
  };
652
- var _hasRef = function () {
654
+ theTimerHandler[HAS_REF] = function () {
653
655
  if (timerId && timerId[HAS_REF]) {
654
656
  return timerId[HAS_REF]();
655
657
  }
656
658
  return ref;
657
659
  };
658
- var _refresh = function () {
659
- timerId = refreshFn(timerId);
660
- if (!ref) {
661
- _unref();
662
- }
660
+ theTimerHandler[REF] = function () {
661
+ ref = true;
662
+ timerId && timerId[REF] && timerId[REF]();
663
663
  return theTimerHandler;
664
664
  };
665
- var _cancel = function () {
666
- timerId && cancelFn(timerId);
667
- timerId = NULL_VALUE;
668
- };
669
- var _setEnabled = function (value) {
670
- !value && timerId && _cancel();
671
- value && !timerId && _refresh();
672
- };
673
- theTimerHandler = (_a = {
674
- cancel: _cancel,
675
- refresh: _refresh
676
- },
677
- _a[HAS_REF] = _hasRef,
678
- _a[REF] = _ref,
679
- _a[UNREF] = _unref,
680
- _a[ENABLED] = false,
681
- _a);
682
- objDefineProp(theTimerHandler, ENABLED, {
665
+ theTimerHandler[UNREF] = _unref;
666
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
683
667
  get: function () { return !!timerId; },
684
668
  set: _setEnabled
685
669
  });
@@ -691,7 +675,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
691
675
  };
692
676
  }
693
677
 
694
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
678
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
695
679
  var isArr = isArray(overrideFn);
696
680
  var len = isArr ? overrideFn.length : 0;
697
681
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -699,7 +683,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
699
683
  var timerFn = theArgs[0];
700
684
  theArgs[0] = function () {
701
685
  handler.dn();
702
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
686
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
703
687
  };
704
688
  var handler = _createTimerHandler(startTimer, function (timerId) {
705
689
  if (timerId) {
@@ -707,16 +691,16 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
707
691
  timerId.refresh();
708
692
  return timerId;
709
693
  }
710
- fnApply(clearFn, self, [timerId]);
694
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
711
695
  }
712
- return fnApply(setFn, self, theArgs);
696
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
713
697
  }, function (timerId) {
714
- fnApply(clearFn, self, [timerId]);
698
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
715
699
  });
716
700
  return handler.h;
717
701
  }
718
702
  function scheduleTimeout(callback, timeout) {
719
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
703
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
720
704
  }
721
705
 
722
706
  var createEnumStyle = createEnum;
@@ -1070,20 +1054,52 @@ var UNDEFINED_VALUE = undefined;
1070
1054
  var STR_EMPTY = "";
1071
1055
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1072
1056
 
1073
- var _aiNamespace = null;
1074
- function _getExtensionNamespace() {
1075
- var target = getInst("Microsoft");
1076
- if (target) {
1077
- _aiNamespace = target["ApplicationInsights"];
1057
+ var rCamelCase = /-([a-z])/g;
1058
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1059
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1060
+ function isNotNullOrUndefined(value) {
1061
+ return !isNullOrUndefined(value);
1062
+ }
1063
+ function normalizeJsName(name) {
1064
+ var value = name;
1065
+ if (value && isString(value)) {
1066
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1067
+ return letter.toUpperCase();
1068
+ });
1069
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1070
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1071
+ return "_" + match;
1072
+ });
1078
1073
  }
1079
- return _aiNamespace;
1074
+ return value;
1080
1075
  }
1081
- function getDebugExt(config) {
1082
- var ns = _aiNamespace;
1083
- if (!ns && config.disableDbgExt !== true) {
1084
- ns = _aiNamespace || _getExtensionNamespace();
1076
+ function strContains(value, search) {
1077
+ if (value && search) {
1078
+ return strIndexOf(value, search) !== -1;
1085
1079
  }
1086
- return ns ? ns["ChromeDbgExt"] : null;
1080
+ return false;
1081
+ }
1082
+ function toISOString(date) {
1083
+ return date && date.toISOString() || "";
1084
+ }
1085
+ function getExceptionName(object) {
1086
+ if (isError(object)) {
1087
+ return object[_DYN_NAME$1 ];
1088
+ }
1089
+ return STR_EMPTY;
1090
+ }
1091
+ function createClassFromInterface(defaults) {
1092
+ return /** @class */ (function () {
1093
+ function class_1() {
1094
+ var _this = this;
1095
+ if (defaults) {
1096
+ objForEachKey(defaults, function (field, value) {
1097
+ _this[field] = value;
1098
+ });
1099
+ }
1100
+ }
1101
+ return class_1;
1102
+ }());
1087
1103
  }
1088
1104
 
1089
1105
  var strConsole = "console";
@@ -1161,334 +1177,104 @@ function findNamedServerTiming(name) {
1161
1177
  return value;
1162
1178
  }
1163
1179
 
1164
- var _a;
1165
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1166
- var AiNonUserActionablePrefix = "AI (Internal): ";
1167
- var AiUserActionablePrefix = "AI: ";
1168
- var AIInternalMessagePrefix = "AITR_";
1169
- var defaultValues = {
1170
- loggingLevelConsole: 0,
1171
- loggingLevelTelemetry: 1,
1172
- maxMessageLimit: 25,
1173
- enableDebug: false
1174
- };
1175
- var _logFuncs = (_a = {},
1176
- _a[0 ] = null,
1177
- _a[1 ] = "errorToConsole",
1178
- _a[2 ] = STR_WARN_TO_CONSOLE,
1179
- _a[3 ] = "debugToConsole",
1180
- _a);
1181
- function _sanitizeDiagnosticText(text) {
1182
- if (text) {
1183
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1180
+ var UInt32Mask = 0x100000000;
1181
+ var MaxUInt32 = 0xffffffff;
1182
+ var SEED1 = 123456789;
1183
+ var SEED2 = 987654321;
1184
+ var _mwcSeeded = false;
1185
+ var _mwcW = SEED1;
1186
+ var _mwcZ = SEED2;
1187
+ function _mwcSeed(seedValue) {
1188
+ if (seedValue < 0) {
1189
+ seedValue >>>= 0;
1184
1190
  }
1185
- return STR_EMPTY;
1191
+ _mwcW = (SEED1 + seedValue) & MaxUInt32;
1192
+ _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1193
+ _mwcSeeded = true;
1186
1194
  }
1187
- function _logToConsole(func, message) {
1188
- var theConsole = getConsole();
1189
- if (!!theConsole) {
1190
- var logFunc = "log";
1191
- if (theConsole[func]) {
1192
- logFunc = func;
1195
+ function _autoSeedMwc() {
1196
+ try {
1197
+ var now = utcNow() & 0x7fffffff;
1198
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1199
+ }
1200
+ catch (e) {
1201
+ }
1202
+ }
1203
+ function randomValue(maxValue) {
1204
+ if (maxValue > 0) {
1205
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1206
+ }
1207
+ return 0;
1208
+ }
1209
+ function random32(signed) {
1210
+ var value = 0;
1211
+ var c = getCrypto() || getMsCrypto();
1212
+ if (c && c.getRandomValues) {
1213
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1214
+ }
1215
+ if (value === 0 && isIE()) {
1216
+ if (!_mwcSeeded) {
1217
+ _autoSeedMwc();
1193
1218
  }
1194
- if (isFunction(theConsole[logFunc])) {
1195
- theConsole[logFunc](message);
1219
+ value = mwcRandom32() & MaxUInt32;
1220
+ }
1221
+ if (value === 0) {
1222
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1223
+ }
1224
+ if (!signed) {
1225
+ value >>>= 0;
1226
+ }
1227
+ return value;
1228
+ }
1229
+ function mwcRandom32(signed) {
1230
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1231
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1232
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1233
+ if (!signed) {
1234
+ value >>>= 0;
1235
+ }
1236
+ return value;
1237
+ }
1238
+ function newId(maxLength) {
1239
+ if (maxLength === void 0) { maxLength = 22; }
1240
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1241
+ var number = random32() >>> 0;
1242
+ var chars = 0;
1243
+ var result = STR_EMPTY;
1244
+ while (result[_DYN_LENGTH$1 ] < maxLength) {
1245
+ chars++;
1246
+ result += base64chars.charAt(number & 0x3F);
1247
+ number >>>= 6;
1248
+ if (chars === 5) {
1249
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1250
+ chars = 0;
1196
1251
  }
1197
1252
  }
1253
+ return result;
1198
1254
  }
1199
- var _InternalLogMessage = /** @class */ (function () {
1200
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1201
- if (isUserAct === void 0) { isUserAct = false; }
1202
- var _self = this;
1203
- _self[_DYN_MESSAGE_ID ] = msgId;
1204
- _self[_DYN_MESSAGE$1 ] =
1205
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1206
- msgId;
1207
- var strProps = STR_EMPTY;
1208
- if (hasJSON()) {
1209
- strProps = getJSON().stringify(properties);
1255
+
1256
+ var version = "3.0.5";
1257
+ var instanceName = "." + newId(6);
1258
+ var _dataUid = 0;
1259
+ function _canAcceptData(target) {
1260
+ return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1261
+ }
1262
+ function _getCache(data, target) {
1263
+ var theCache = target[data.id];
1264
+ if (!theCache) {
1265
+ theCache = {};
1266
+ try {
1267
+ if (_canAcceptData(target)) {
1268
+ objDefine(target, data.id, {
1269
+ e: false,
1270
+ v: theCache
1271
+ });
1272
+ }
1273
+ }
1274
+ catch (e) {
1210
1275
  }
1211
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1212
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1213
- _self[_DYN_MESSAGE$1 ] += diagnosticText;
1214
1276
  }
1215
- _InternalLogMessage.dataType = "MessageData";
1216
- return _InternalLogMessage;
1217
- }());
1218
- function safeGetLogger(core, config) {
1219
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1220
- }
1221
- var DiagnosticLogger = /** @class */ (function () {
1222
- function DiagnosticLogger(config) {
1223
- this.identifier = "DiagnosticLogger";
1224
- this.queue = [];
1225
- var _messageCount = 0;
1226
- var _messageLogged = {};
1227
- var _loggingLevelConsole;
1228
- var _loggingLevelTelemetry;
1229
- var _maxInternalMessageLimit;
1230
- var _enableDebug;
1231
- var _unloadHandler;
1232
- dynamicProto(DiagnosticLogger, this, function (_self) {
1233
- _unloadHandler = _setDefaultsFromConfig(config || {});
1234
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1235
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1236
- if (isUserAct === void 0) { isUserAct = false; }
1237
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1238
- if (_enableDebug) {
1239
- throw dumpObj(message);
1240
- }
1241
- else {
1242
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1243
- if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
1244
- if (isUserAct) {
1245
- var messageKey = +message[_DYN_MESSAGE_ID ];
1246
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1247
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1248
- _messageLogged[messageKey] = true;
1249
- }
1250
- }
1251
- else {
1252
- if (_loggingLevelConsole >= severity) {
1253
- _self[logFunc](message[_DYN_MESSAGE$1 ]);
1254
- }
1255
- }
1256
- _logInternalMessage(severity, message);
1257
- }
1258
- else {
1259
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1260
- }
1261
- }
1262
- };
1263
- _self.debugToConsole = function (message) {
1264
- _logToConsole("debug", message);
1265
- _debugExtMsg("warning", message);
1266
- };
1267
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1268
- _logToConsole("warn", message);
1269
- _debugExtMsg("warning", message);
1270
- };
1271
- _self.errorToConsole = function (message) {
1272
- _logToConsole("error", message);
1273
- _debugExtMsg("error", message);
1274
- };
1275
- _self.resetInternalMessageCount = function () {
1276
- _messageCount = 0;
1277
- _messageLogged = {};
1278
- };
1279
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1280
- _self[_DYN_UNLOAD ] = function (isAsync) {
1281
- _unloadHandler && _unloadHandler.rm();
1282
- _unloadHandler = null;
1283
- };
1284
- function _logInternalMessage(severity, message) {
1285
- if (_areInternalMessagesThrottled()) {
1286
- return;
1287
- }
1288
- var logMessage = true;
1289
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1290
- if (_messageLogged[messageKey]) {
1291
- logMessage = false;
1292
- }
1293
- else {
1294
- _messageLogged[messageKey] = true;
1295
- }
1296
- if (logMessage) {
1297
- if (severity <= _loggingLevelTelemetry) {
1298
- _self.queue[_DYN_PUSH$1 ](message);
1299
- _messageCount++;
1300
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1301
- }
1302
- if (_messageCount === _maxInternalMessageLimit) {
1303
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1304
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1305
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1306
- if (severity === 1 ) {
1307
- _self.errorToConsole(throttleLimitMessage);
1308
- }
1309
- else {
1310
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1311
- }
1312
- }
1313
- }
1314
- }
1315
- function _setDefaultsFromConfig(config) {
1316
- return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
1317
- var config = details.cfg;
1318
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1319
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1320
- _maxInternalMessageLimit = config.maxMessageLimit;
1321
- _enableDebug = config.enableDebug;
1322
- });
1323
- }
1324
- function _areInternalMessagesThrottled() {
1325
- return _messageCount >= _maxInternalMessageLimit;
1326
- }
1327
- function _debugExtMsg(name, data) {
1328
- var dbgExt = getDebugExt(config || {});
1329
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1330
- dbgExt[_DYN_DIAG_LOG ](name, data);
1331
- }
1332
- }
1333
- });
1334
- }
1335
- DiagnosticLogger.__ieDyn=1;
1336
- return DiagnosticLogger;
1337
- }());
1338
- function _getLogger(logger) {
1339
- return (logger || new DiagnosticLogger());
1340
- }
1341
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1342
- if (isUserAct === void 0) { isUserAct = false; }
1343
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1344
- }
1345
-
1346
- var rCamelCase = /-([a-z])/g;
1347
- var rNormalizeInvalid = /([^\w\d_$])/g;
1348
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1349
- function isNotNullOrUndefined(value) {
1350
- return !isNullOrUndefined(value);
1351
- }
1352
- function normalizeJsName(name) {
1353
- var value = name;
1354
- if (value && isString(value)) {
1355
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1356
- return letter.toUpperCase();
1357
- });
1358
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1359
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1360
- return "_" + match;
1361
- });
1362
- }
1363
- return value;
1364
- }
1365
- function strContains(value, search) {
1366
- if (value && search) {
1367
- return strIndexOf(value, search) !== -1;
1368
- }
1369
- return false;
1370
- }
1371
- function toISOString(date) {
1372
- return date && date.toISOString() || "";
1373
- }
1374
- function getExceptionName(object) {
1375
- if (isError(object)) {
1376
- return object[_DYN_NAME$1 ];
1377
- }
1378
- return STR_EMPTY;
1379
- }
1380
- function createClassFromInterface(defaults) {
1381
- return /** @class */ (function () {
1382
- function class_1() {
1383
- var _this = this;
1384
- if (defaults) {
1385
- objForEachKey(defaults, function (field, value) {
1386
- _this[field] = value;
1387
- });
1388
- }
1389
- }
1390
- return class_1;
1391
- }());
1392
- }
1393
-
1394
- var UInt32Mask = 0x100000000;
1395
- var MaxUInt32 = 0xffffffff;
1396
- var SEED1 = 123456789;
1397
- var SEED2 = 987654321;
1398
- var _mwcSeeded = false;
1399
- var _mwcW = SEED1;
1400
- var _mwcZ = SEED2;
1401
- function _mwcSeed(seedValue) {
1402
- if (seedValue < 0) {
1403
- seedValue >>>= 0;
1404
- }
1405
- _mwcW = (SEED1 + seedValue) & MaxUInt32;
1406
- _mwcZ = (SEED2 - seedValue) & MaxUInt32;
1407
- _mwcSeeded = true;
1408
- }
1409
- function _autoSeedMwc() {
1410
- try {
1411
- var now = utcNow() & 0x7fffffff;
1412
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1413
- }
1414
- catch (e) {
1415
- }
1416
- }
1417
- function randomValue(maxValue) {
1418
- if (maxValue > 0) {
1419
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1420
- }
1421
- return 0;
1422
- }
1423
- function random32(signed) {
1424
- var value = 0;
1425
- var c = getCrypto() || getMsCrypto();
1426
- if (c && c.getRandomValues) {
1427
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1428
- }
1429
- if (value === 0 && isIE()) {
1430
- if (!_mwcSeeded) {
1431
- _autoSeedMwc();
1432
- }
1433
- value = mwcRandom32() & MaxUInt32;
1434
- }
1435
- if (value === 0) {
1436
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1437
- }
1438
- if (!signed) {
1439
- value >>>= 0;
1440
- }
1441
- return value;
1442
- }
1443
- function mwcRandom32(signed) {
1444
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1445
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1446
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1447
- if (!signed) {
1448
- value >>>= 0;
1449
- }
1450
- return value;
1451
- }
1452
- function newId(maxLength) {
1453
- if (maxLength === void 0) { maxLength = 22; }
1454
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1455
- var number = random32() >>> 0;
1456
- var chars = 0;
1457
- var result = STR_EMPTY;
1458
- while (result[_DYN_LENGTH$1 ] < maxLength) {
1459
- chars++;
1460
- result += base64chars.charAt(number & 0x3F);
1461
- number >>>= 6;
1462
- if (chars === 5) {
1463
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1464
- chars = 0;
1465
- }
1466
- }
1467
- return result;
1468
- }
1469
-
1470
- var version = "3.0.5";
1471
- var instanceName = "." + newId(6);
1472
- var _dataUid = 0;
1473
- function _canAcceptData(target) {
1474
- return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1475
- }
1476
- function _getCache(data, target) {
1477
- var theCache = target[data.id];
1478
- if (!theCache) {
1479
- theCache = {};
1480
- try {
1481
- if (_canAcceptData(target)) {
1482
- objDefine(target, data.id, {
1483
- e: false,
1484
- v: theCache
1485
- });
1486
- }
1487
- }
1488
- catch (e) {
1489
- }
1490
- }
1491
- return theCache;
1277
+ return theCache;
1492
1278
  }
1493
1279
  function createUniqueNamespace(name, includeVersion) {
1494
1280
  if (includeVersion === void 0) { includeVersion = false; }
@@ -2026,6 +1812,7 @@ function _createAndUseHandler(state, configHandler) {
2026
1812
  configHandler = null;
2027
1813
  }
2028
1814
  };
1815
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2029
1816
  state.use(handler, configHandler);
2030
1817
  return handler;
2031
1818
  }
@@ -2136,6 +1923,204 @@ function onConfigChange(config, configHandler, logger) {
2136
1923
  return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
2137
1924
  }
2138
1925
 
1926
+ var _aiNamespace = null;
1927
+ function _getExtensionNamespace() {
1928
+ var target = getInst("Microsoft");
1929
+ if (target) {
1930
+ _aiNamespace = target["ApplicationInsights"];
1931
+ }
1932
+ return _aiNamespace;
1933
+ }
1934
+ function getDebugExt(config) {
1935
+ var ns = _aiNamespace;
1936
+ if (!ns && config.disableDbgExt !== true) {
1937
+ ns = _aiNamespace || _getExtensionNamespace();
1938
+ }
1939
+ return ns ? ns["ChromeDbgExt"] : null;
1940
+ }
1941
+
1942
+ var _a;
1943
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
1944
+ var AiNonUserActionablePrefix = "AI (Internal): ";
1945
+ var AiUserActionablePrefix = "AI: ";
1946
+ var AIInternalMessagePrefix = "AITR_";
1947
+ var defaultValues = {
1948
+ loggingLevelConsole: 0,
1949
+ loggingLevelTelemetry: 1,
1950
+ maxMessageLimit: 25,
1951
+ enableDebug: false
1952
+ };
1953
+ var _logFuncs = (_a = {},
1954
+ _a[0 ] = null,
1955
+ _a[1 ] = "errorToConsole",
1956
+ _a[2 ] = STR_WARN_TO_CONSOLE,
1957
+ _a[3 ] = "debugToConsole",
1958
+ _a);
1959
+ function _sanitizeDiagnosticText(text) {
1960
+ if (text) {
1961
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY) + "\"";
1962
+ }
1963
+ return STR_EMPTY;
1964
+ }
1965
+ function _logToConsole(func, message) {
1966
+ var theConsole = getConsole();
1967
+ if (!!theConsole) {
1968
+ var logFunc = "log";
1969
+ if (theConsole[func]) {
1970
+ logFunc = func;
1971
+ }
1972
+ if (isFunction(theConsole[logFunc])) {
1973
+ theConsole[logFunc](message);
1974
+ }
1975
+ }
1976
+ }
1977
+ var _InternalLogMessage = /** @class */ (function () {
1978
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1979
+ if (isUserAct === void 0) { isUserAct = false; }
1980
+ var _self = this;
1981
+ _self[_DYN_MESSAGE_ID ] = msgId;
1982
+ _self[_DYN_MESSAGE$1 ] =
1983
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1984
+ msgId;
1985
+ var strProps = STR_EMPTY;
1986
+ if (hasJSON()) {
1987
+ strProps = getJSON().stringify(properties);
1988
+ }
1989
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY) +
1990
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY);
1991
+ _self[_DYN_MESSAGE$1 ] += diagnosticText;
1992
+ }
1993
+ _InternalLogMessage.dataType = "MessageData";
1994
+ return _InternalLogMessage;
1995
+ }());
1996
+ function safeGetLogger(core, config) {
1997
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1998
+ }
1999
+ var DiagnosticLogger = /** @class */ (function () {
2000
+ function DiagnosticLogger(config) {
2001
+ this.identifier = "DiagnosticLogger";
2002
+ this.queue = [];
2003
+ var _messageCount = 0;
2004
+ var _messageLogged = {};
2005
+ var _loggingLevelConsole;
2006
+ var _loggingLevelTelemetry;
2007
+ var _maxInternalMessageLimit;
2008
+ var _enableDebug;
2009
+ var _unloadHandler;
2010
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2011
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2012
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2013
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2014
+ if (isUserAct === void 0) { isUserAct = false; }
2015
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2016
+ if (_enableDebug) {
2017
+ throw dumpObj(message);
2018
+ }
2019
+ else {
2020
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2021
+ if (!isUndefined(message[_DYN_MESSAGE$1 ])) {
2022
+ if (isUserAct) {
2023
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2024
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2025
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2026
+ _messageLogged[messageKey] = true;
2027
+ }
2028
+ }
2029
+ else {
2030
+ if (_loggingLevelConsole >= severity) {
2031
+ _self[logFunc](message[_DYN_MESSAGE$1 ]);
2032
+ }
2033
+ }
2034
+ _logInternalMessage(severity, message);
2035
+ }
2036
+ else {
2037
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2038
+ }
2039
+ }
2040
+ };
2041
+ _self.debugToConsole = function (message) {
2042
+ _logToConsole("debug", message);
2043
+ _debugExtMsg("warning", message);
2044
+ };
2045
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2046
+ _logToConsole("warn", message);
2047
+ _debugExtMsg("warning", message);
2048
+ };
2049
+ _self.errorToConsole = function (message) {
2050
+ _logToConsole("error", message);
2051
+ _debugExtMsg("error", message);
2052
+ };
2053
+ _self.resetInternalMessageCount = function () {
2054
+ _messageCount = 0;
2055
+ _messageLogged = {};
2056
+ };
2057
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2058
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2059
+ _unloadHandler && _unloadHandler.rm();
2060
+ _unloadHandler = null;
2061
+ };
2062
+ function _logInternalMessage(severity, message) {
2063
+ if (_areInternalMessagesThrottled()) {
2064
+ return;
2065
+ }
2066
+ var logMessage = true;
2067
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2068
+ if (_messageLogged[messageKey]) {
2069
+ logMessage = false;
2070
+ }
2071
+ else {
2072
+ _messageLogged[messageKey] = true;
2073
+ }
2074
+ if (logMessage) {
2075
+ if (severity <= _loggingLevelTelemetry) {
2076
+ _self.queue[_DYN_PUSH$1 ](message);
2077
+ _messageCount++;
2078
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2079
+ }
2080
+ if (_messageCount === _maxInternalMessageLimit) {
2081
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2082
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2083
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2084
+ if (severity === 1 ) {
2085
+ _self.errorToConsole(throttleLimitMessage);
2086
+ }
2087
+ else {
2088
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2089
+ }
2090
+ }
2091
+ }
2092
+ }
2093
+ function _setDefaultsFromConfig(config) {
2094
+ return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
2095
+ var config = details.cfg;
2096
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2097
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2098
+ _maxInternalMessageLimit = config.maxMessageLimit;
2099
+ _enableDebug = config.enableDebug;
2100
+ });
2101
+ }
2102
+ function _areInternalMessagesThrottled() {
2103
+ return _messageCount >= _maxInternalMessageLimit;
2104
+ }
2105
+ function _debugExtMsg(name, data) {
2106
+ var dbgExt = getDebugExt(config || {});
2107
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2108
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2109
+ }
2110
+ }
2111
+ });
2112
+ }
2113
+ DiagnosticLogger.__ieDyn=1;
2114
+ return DiagnosticLogger;
2115
+ }());
2116
+ function _getLogger(logger) {
2117
+ return (logger || new DiagnosticLogger());
2118
+ }
2119
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2120
+ if (isUserAct === void 0) { isUserAct = false; }
2121
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2122
+ }
2123
+
2139
2124
  function generateW3CId() {
2140
2125
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
2141
2126
  var oct = STR_EMPTY, tmp;