@microsoft/1ds-post-js 4.1.2-nightly3.2403-07 → 4.1.3-nightly3.2403-09

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 (47) hide show
  1. package/bundle/es5/{ms.post-4.1.2-nightly3.2403-07.gbl.js → ms.post-4.1.3-nightly3.2403-09.gbl.js} +452 -469
  2. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.js.map +1 -0
  3. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.min.js +7 -0
  4. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.integrity.json +46 -0
  6. package/bundle/es5/{ms.post-4.1.2-nightly3.2403-07.js → ms.post-4.1.3-nightly3.2403-09.js} +452 -469
  7. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.js.map +1 -0
  8. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.min.js +7 -0
  9. package/bundle/es5/ms.post-4.1.3-nightly3.2403-09.min.js.map +1 -0
  10. package/bundle/es5/ms.post.gbl.js +451 -468
  11. package/bundle/es5/ms.post.gbl.js.map +1 -1
  12. package/bundle/es5/ms.post.gbl.min.js +2 -2
  13. package/bundle/es5/ms.post.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.post.integrity.json +17 -17
  15. package/bundle/es5/ms.post.js +451 -468
  16. package/bundle/es5/ms.post.js.map +1 -1
  17. package/bundle/es5/ms.post.min.js +2 -2
  18. package/bundle/es5/ms.post.min.js.map +1 -1
  19. package/dist/es5/ms.post.js +449 -466
  20. package/dist/es5/ms.post.js.map +1 -1
  21. package/dist/es5/ms.post.min.js +2 -2
  22. package/dist/es5/ms.post.min.js.map +1 -1
  23. package/dist-es5/BatchNotificationActions.js +1 -1
  24. package/dist-es5/ClockSkewManager.js +1 -1
  25. package/dist-es5/DataModels.js +1 -1
  26. package/dist-es5/EventBatch.js +1 -1
  27. package/dist-es5/HttpManager.js +1 -1
  28. package/dist-es5/Index.js +1 -1
  29. package/dist-es5/InternalConstants.js +1 -1
  30. package/dist-es5/KillSwitch.js +1 -1
  31. package/dist-es5/PostChannel.js +2 -2
  32. package/dist-es5/PostChannel.js.map +1 -1
  33. package/dist-es5/RetryPolicy.js +1 -1
  34. package/dist-es5/Serializer.js +1 -1
  35. package/dist-es5/TimeoutOverrideWrapper.js +1 -1
  36. package/dist-es5/__DynamicConstants.js +1 -1
  37. package/dist-es5/typings/XDomainRequest.js +1 -1
  38. package/package.json +3 -3
  39. package/types/1ds-post-js.d.ts +1 -1
  40. package/types/1ds-post-js.namespaced.d.ts +2 -1
  41. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.js.map +0 -1
  42. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.min.js +0 -7
  43. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.gbl.min.js.map +0 -1
  44. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.integrity.json +0 -46
  45. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.js.map +0 -1
  46. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.min.js +0 -7
  47. package/bundle/es5/ms.post-4.1.2-nightly3.2403-07.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * 1DS JS SDK POST plugin, 4.1.2-nightly3.2403-07
2
+ * 1DS JS SDK POST plugin, 4.1.3-nightly3.2403-09
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -8,8 +8,8 @@
8
8
  typeof exports === "object" && typeof module !== undef ? factory(exports) :
9
9
  typeof define === "function" && define.amd ? define(["exports"], factory) :
10
10
  (function(global){
11
- var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_2_nightly3_2403_07", msMod="__ms$mod__";
12
- var mods={}, modDetail=mods[modName]={}, ver="4.1.2-nightly3.2403-07";
11
+ var nsKey, key, nm, theExports = {}, modName = "es5_ms_post_4_1_3_nightly3_2403_09", msMod="__ms$mod__";
12
+ var mods={}, modDetail=mods[modName]={}, ver="4.1.3-nightly3.2403-09";
13
13
  // Versioned namespace "oneDS4"
14
14
  var exportNs=global, nsKey="oneDS4", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
15
15
  // Global namespace "oneDS"
@@ -44,23 +44,16 @@ var ObjProto$1 = ObjClass$1[strShimPrototype];
44
44
  var UNDEF_VALUE = undefined;
45
45
  var NULL_VALUE = null;
46
46
  var EMPTY = "";
47
- var BOOLEAN = "boolean";
48
47
  var FUNCTION = "function";
49
- var NUMBER = "number";
50
48
  var OBJECT = "object";
51
49
  var PROTOTYPE = "prototype";
52
50
  var __PROTO__ = "__proto__";
53
- var STRING = "string";
54
51
  var UNDEFINED = "undefined";
55
52
  var CONSTRUCTOR = "constructor";
56
53
  var SYMBOL = "Symbol";
57
54
  var POLYFILL_TAG = "_polyfill";
58
- var INDEX_OF = "indexOf";
59
55
  var LENGTH = "length";
60
- var DONE = "done";
61
- var VALUE = "value";
62
56
  var NAME = "name";
63
- var SLICE = "slice";
64
57
  var CALL = "call";
65
58
  var TO_STRING = "toString";
66
59
  var ObjClass = Object;
@@ -70,6 +63,7 @@ var StrProto = StrCls[PROTOTYPE];
70
63
  var MathCls = Math;
71
64
  var ArrCls = Array;
72
65
  var ArrProto = ArrCls[PROTOTYPE];
66
+ var ArrSlice = ArrProto["slice"];
73
67
 
74
68
  function safe(func, argArray) {
75
69
  try {
@@ -104,7 +98,7 @@ function isStrictNullOrUndefined(value) {
104
98
  function isDefined(arg) {
105
99
  return !!arg || arg !== UNDEF_VALUE;
106
100
  }
107
- var isString = ( /*#__PURE__*/_createIs(STRING));
101
+ var isString = ( /*#__PURE__*/_createIs("string"));
108
102
  var isFunction = ( /*#__PURE__*/_createIs(FUNCTION));
109
103
  /*#__NO_SIDE_EFFECTS__*/
110
104
  function isObject(value) {
@@ -114,8 +108,8 @@ function isObject(value) {
114
108
  return !!value && typeof value === OBJECT;
115
109
  }
116
110
  var isArray = ArrCls.isArray;
117
- var isNumber = ( /*#__PURE__*/_createIs(NUMBER));
118
- var isBoolean = ( /*#__PURE__*/_createIs(BOOLEAN));
111
+ var isNumber = ( /*#__PURE__*/_createIs("number"));
112
+ var isBoolean = ( /*#__PURE__*/_createIs("boolean"));
119
113
  /*#__NO_SIDE_EFFECTS__*/
120
114
  function isPromiseLike(value) {
121
115
  return !!(value && value.then && isFunction(value.then));
@@ -212,6 +206,7 @@ var asString = StrCls;
212
206
 
213
207
  var GLOBAL_CONFIG_KEY = "__tsUtils$gblCfg";
214
208
  var _globalCfg;
209
+ /*#__NO_SIDE_EFFECTS__*/
215
210
  function _getGlobalValue() {
216
211
  var result;
217
212
  if (typeof globalThis !== UNDEFINED) {
@@ -246,7 +241,7 @@ function dumpObj(object, format) {
246
241
  object = { stack: asString(object.stack), message: asString(object.message), name: asString(object.name) };
247
242
  }
248
243
  try {
249
- propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === NUMBER) ? format : 4) : UNDEF_VALUE);
244
+ propertyValueDump = JSON.stringify(object, NULL_VALUE, format ? ((typeof format === "number") ? format : 4) : UNDEF_VALUE);
250
245
  propertyValueDump = (propertyValueDump && propertyValueDump.replace(/"(\w+)"\s*:\s{0,1}/g, "$1: ")) || asString(object);
251
246
  }
252
247
  catch (e) {
@@ -255,18 +250,15 @@ function dumpObj(object, format) {
255
250
  return objType + ": " + propertyValueDump;
256
251
  }
257
252
 
258
- var _slice;
259
- var _unwrapInstFunction = _unwrapFunctionWithPoly;
260
253
  var _unwrapFunction = _unwrapFunctionWithPoly;
261
254
  /*#__NO_SIDE_EFFECTS__*/
262
255
  function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
263
- _slice = _slice || ArrProto[SLICE];
264
256
  var clsFn = clsProto && clsProto[funcName];
265
257
  return function (thisArg) {
266
258
  var theFunc = (thisArg && thisArg[funcName]) || clsFn;
267
259
  if (theFunc || polyFunc) {
268
260
  var theArgs = arguments;
269
- return (theFunc || polyFunc).apply(thisArg, theFunc ? _slice[CALL](theArgs, 1) : theArgs);
261
+ return (theFunc || polyFunc).apply(thisArg, theFunc ? ArrSlice[CALL](theArgs, 1) : theArgs);
270
262
  }
271
263
  throwTypeError("\"" + asString(funcName) + "\" not defined for " + dumpObj(thisArg));
272
264
  };
@@ -274,7 +266,7 @@ function _unwrapFunctionWithPoly(funcName, clsProto, polyFunc) {
274
266
 
275
267
  var mathMax = MathCls.max;
276
268
 
277
- var strSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, StrProto));
269
+ var strSlice = ( /*#__PURE__*/_unwrapFunction("slice", StrProto));
278
270
 
279
271
  var strSubstring = ( /*#__PURE__*/_unwrapFunction("substring", StrProto));
280
272
  var strSubstr = ( /*#__PURE__*/_unwrapFunctionWithPoly("substr", StrProto, polyStrSubstr));
@@ -346,7 +338,7 @@ function polyGetKnownSymbol(name) {
346
338
  var propMap = {
347
339
  e: "enumerable",
348
340
  c: "configurable",
349
- v: VALUE,
341
+ v: "value",
350
342
  w: "writable",
351
343
  g: "get",
352
344
  s: "set"
@@ -379,6 +371,7 @@ var _globalLazyTestHooks;
379
371
  function _initTestHooks() {
380
372
  _globalLazyTestHooks = _getGlobalConfig();
381
373
  }
374
+ /*#__NO_SIDE_EFFECTS__*/
382
375
  function getLazy(cb) {
383
376
  var lazyValue = {};
384
377
  !_globalLazyTestHooks && _initTestHooks();
@@ -416,10 +409,14 @@ function createCachedValue(value) {
416
409
 
417
410
  var WINDOW = "window";
418
411
  var _cachedGlobal;
419
- var _cachedWindow;
420
- var _cachedDocument;
421
- var _cachedNavigator;
422
- var _isNode;
412
+ function _getGlobalInstFn(getFn, theArgs) {
413
+ var cachedValue;
414
+ return function () {
415
+ !_globalLazyTestHooks && _initTestHooks();
416
+ (!cachedValue || _globalLazyTestHooks.lzy) && (cachedValue = createCachedValue(safe(getFn, theArgs).v));
417
+ return cachedValue.v;
418
+ };
419
+ }
423
420
  /*#__NO_SIDE_EFFECTS__*/
424
421
  function lazySafeGetInst(name) {
425
422
  return getLazy(function () { return safe((getInst), [name]).v || UNDEF_VALUE; });
@@ -436,41 +433,25 @@ function getInst(name, useCached) {
436
433
  if (gbl && gbl[name]) {
437
434
  return gbl[name];
438
435
  }
439
- if (name === WINDOW && _cachedWindow) {
440
- return _cachedWindow.v;
436
+ if (name === WINDOW) {
437
+ return getWindow();
441
438
  }
442
439
  return NULL_VALUE;
443
440
  }
444
- /*#__NO_SIDE_EFFECTS__*/
445
- function getDocument() {
446
- !_globalLazyTestHooks && _initTestHooks();
447
- (!_cachedDocument || _globalLazyTestHooks.lzy) && (_cachedDocument = createCachedValue(safe((getInst), ["document"]).v));
448
- return _cachedDocument.v;
449
- }
441
+ var getDocument = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["document"]));
450
442
  /*#__NO_SIDE_EFFECTS__*/
451
443
  function hasWindow() {
452
444
  return !!getWindow();
453
445
  }
454
- /*#__NO_SIDE_EFFECTS__*/
455
- function getWindow() {
456
- !_globalLazyTestHooks && _initTestHooks();
457
- (!_cachedWindow || _globalLazyTestHooks.lzy) && (_cachedWindow = createCachedValue(safe((getInst), [WINDOW]).v));
458
- return _cachedWindow.v;
459
- }
446
+ var getWindow = ( /*#__PURE__*/_getGlobalInstFn(getInst, [WINDOW]));
460
447
  /*#__NO_SIDE_EFFECTS__*/
461
448
  function hasNavigator() {
462
449
  return !!getNavigator();
463
450
  }
464
- /*#__NO_SIDE_EFFECTS__*/
465
- function getNavigator() {
466
- !_globalLazyTestHooks && _initTestHooks();
467
- (!_cachedNavigator || _globalLazyTestHooks.lzy) && (_cachedNavigator = createCachedValue(safe((getInst), ["navigator"]).v));
468
- return _cachedNavigator.v;
469
- }
470
- function isNode() {
471
- !_isNode && (_isNode = createCachedValue(!!safe(function () { return (process && (process.versions || {}).node); }).v));
472
- return _isNode.v;
473
- }
451
+ var getNavigator = ( /*#__PURE__*/_getGlobalInstFn(getInst, ["navigator"]));
452
+ var isNode = ( /*#__PURE__*/_getGlobalInstFn(function () {
453
+ return !!safe(function () { return (process && (process.versions || {}).node); }).v;
454
+ }));
474
455
 
475
456
  var _symbol;
476
457
  var _symbolFor;
@@ -531,8 +512,8 @@ function iterForOf(iter, callbackfn, thisArg) {
531
512
  var iterResult = void 0;
532
513
  try {
533
514
  var count = 0;
534
- while (!(iterResult = iter.next())[DONE]) {
535
- if (callbackfn[CALL](thisArg || iter, iterResult[VALUE], count, iter) === -1) {
515
+ while (!(iterResult = iter.next()).done) {
516
+ if (callbackfn[CALL](thisArg || iter, iterResult.value, count, iter) === -1) {
536
517
  break;
537
518
  }
538
519
  count++;
@@ -547,7 +528,7 @@ function iterForOf(iter, callbackfn, thisArg) {
547
528
  }
548
529
  finally {
549
530
  try {
550
- if (iterResult && !iterResult[DONE]) {
531
+ if (iterResult && !iterResult.done) {
551
532
  iter.return && iter.return(iterResult);
552
533
  }
553
534
  }
@@ -561,7 +542,9 @@ function iterForOf(iter, callbackfn, thisArg) {
561
542
  }
562
543
  }
563
544
 
564
- var fnApply = ( /*#__PURE__*/_unwrapInstFunction("apply"));
545
+ function fnApply(fn, thisArg, argArray) {
546
+ return fn.apply(thisArg, argArray);
547
+ }
565
548
 
566
549
  function arrAppend(target, elms) {
567
550
  if (!isUndefined(elms) && target) {
@@ -593,9 +576,11 @@ function arrForEach(theArray, callbackfn, thisArg) {
593
576
  }
594
577
  }
595
578
 
596
- var arrIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, ArrProto));
579
+ var arrIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", ArrProto));
597
580
 
598
- var arrSlice = ( /*#__PURE__*/_unwrapFunction(SLICE, ArrProto));
581
+ function arrSlice(theArray, start, end) {
582
+ return ((theArray && theArray["slice"]) || ArrSlice).apply(theArray, ArrSlice[CALL](arguments, 1));
583
+ }
599
584
 
600
585
  var objCreate = ObjClass["create"] || polyObjCreate;
601
586
  /*#__NO_SIDE_EFFECTS__*/
@@ -625,6 +610,7 @@ function objSetPrototypeOf(obj, proto) {
625
610
  return fn(obj, proto);
626
611
  }
627
612
 
613
+ /*#__NO_SIDE_EFFECTS__*/
628
614
  function _createCustomError(name, d, b) {
629
615
  safe(objDefine, [d, NAME, { v: name, c: true, e: false }]);
630
616
  d = objSetPrototypeOf(d, b);
@@ -648,7 +634,7 @@ function createCustomError(name, constructCb, errorBase) {
648
634
  var theArgs = arguments;
649
635
  try {
650
636
  safe(_setName, [theBaseClass, name]);
651
- var _self = fnApply(theBaseClass, _this, ArrProto[SLICE][CALL](theArgs)) || _this;
637
+ var _self = fnApply(theBaseClass, _this, ArrSlice[CALL](theArgs)) || _this;
652
638
  if (_self !== _this) {
653
639
  var orgProto = objGetPrototypeOf(_this);
654
640
  if (orgProto !== objGetPrototypeOf(_self)) {
@@ -728,7 +714,7 @@ function perfNow() {
728
714
  return utcNow();
729
715
  }
730
716
 
731
- var strIndexOf = ( /*#__PURE__*/_unwrapFunction(INDEX_OF, StrProto));
717
+ var strIndexOf = ( /*#__PURE__*/_unwrapFunction("indexOf", StrProto));
732
718
 
733
719
  var strStartsWith = ( /*#__PURE__*/_unwrapFunctionWithPoly("startsWith", StrProto, polyStrStartsWith));
734
720
  /*#__NO_SIDE_EFFECTS__*/
@@ -742,55 +728,51 @@ function polyStrStartsWith(value, searchString, position) {
742
728
  }
743
729
 
744
730
  var REF = "ref";
745
- var UNREF = "un" + REF;
731
+ var UNREF = "unref";
746
732
  var HAS_REF = "hasRef";
747
733
  var ENABLED = "enabled";
734
+ /*#__NO_SIDE_EFFECTS__*/
748
735
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
749
- var _a;
750
736
  var ref = true;
751
737
  var timerId = startTimer ? refreshFn(NULL_VALUE) : NULL_VALUE;
752
738
  var theTimerHandler;
753
- var _unref = function () {
739
+ function _unref() {
754
740
  ref = false;
755
741
  timerId && timerId[UNREF] && timerId[UNREF]();
756
742
  return theTimerHandler;
757
- };
758
- var _ref = function () {
759
- ref = true;
760
- timerId && timerId[REF] && timerId[REF]();
743
+ }
744
+ function _cancel() {
745
+ timerId && cancelFn(timerId);
746
+ timerId = NULL_VALUE;
747
+ }
748
+ function _refresh() {
749
+ timerId = refreshFn(timerId);
750
+ if (!ref) {
751
+ _unref();
752
+ }
761
753
  return theTimerHandler;
754
+ }
755
+ function _setEnabled(value) {
756
+ !value && timerId && _cancel();
757
+ value && !timerId && _refresh();
758
+ }
759
+ theTimerHandler = {
760
+ cancel: _cancel,
761
+ refresh: _refresh
762
762
  };
763
- var _hasRef = function () {
763
+ theTimerHandler[HAS_REF] = function () {
764
764
  if (timerId && timerId[HAS_REF]) {
765
765
  return timerId[HAS_REF]();
766
766
  }
767
767
  return ref;
768
768
  };
769
- var _refresh = function () {
770
- timerId = refreshFn(timerId);
771
- if (!ref) {
772
- _unref();
773
- }
769
+ theTimerHandler[REF] = function () {
770
+ ref = true;
771
+ timerId && timerId[REF] && timerId[REF]();
774
772
  return theTimerHandler;
775
773
  };
776
- var _cancel = function () {
777
- timerId && cancelFn(timerId);
778
- timerId = NULL_VALUE;
779
- };
780
- var _setEnabled = function (value) {
781
- !value && timerId && _cancel();
782
- value && !timerId && _refresh();
783
- };
784
- theTimerHandler = (_a = {
785
- cancel: _cancel,
786
- refresh: _refresh
787
- },
788
- _a[HAS_REF] = _hasRef,
789
- _a[REF] = _ref,
790
- _a[UNREF] = _unref,
791
- _a[ENABLED] = false,
792
- _a);
793
- objDefineProp(theTimerHandler, ENABLED, {
774
+ theTimerHandler[UNREF] = _unref;
775
+ theTimerHandler = objDefineProp(theTimerHandler, ENABLED, {
794
776
  get: function () { return !!timerId; },
795
777
  set: _setEnabled
796
778
  });
@@ -802,7 +784,7 @@ function _createTimerHandler(startTimer, refreshFn, cancelFn) {
802
784
  };
803
785
  }
804
786
 
805
- function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
787
+ function _createTimeoutWith(startTimer, overrideFn, theArgs) {
806
788
  var isArr = isArray(overrideFn);
807
789
  var len = isArr ? overrideFn.length : 0;
808
790
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
@@ -810,7 +792,7 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
810
792
  var timerFn = theArgs[0];
811
793
  theArgs[0] = function () {
812
794
  handler.dn();
813
- fnApply(timerFn, self, ArrProto[SLICE][CALL](arguments));
795
+ fnApply(timerFn, UNDEF_VALUE, ArrSlice[CALL](arguments));
814
796
  };
815
797
  var handler = _createTimerHandler(startTimer, function (timerId) {
816
798
  if (timerId) {
@@ -818,19 +800,19 @@ function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
818
800
  timerId.refresh();
819
801
  return timerId;
820
802
  }
821
- fnApply(clearFn, self, [timerId]);
803
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
822
804
  }
823
- return fnApply(setFn, self, theArgs);
805
+ return fnApply(setFn, UNDEF_VALUE, theArgs);
824
806
  }, function (timerId) {
825
- fnApply(clearFn, self, [timerId]);
807
+ fnApply(clearFn, UNDEF_VALUE, [timerId]);
826
808
  });
827
809
  return handler.h;
828
810
  }
829
811
  function scheduleTimeout(callback, timeout) {
830
- return _createTimeoutWith(this, true, UNDEF_VALUE, ArrProto[SLICE][CALL](arguments));
812
+ return _createTimeoutWith(true, UNDEF_VALUE, ArrSlice[CALL](arguments));
831
813
  }
832
814
  function scheduleTimeoutWith(overrideFn, callback, timeout) {
833
- return _createTimeoutWith(this, true, overrideFn, ArrProto[SLICE][CALL](arguments, 1));
815
+ return _createTimeoutWith(true, overrideFn, ArrSlice[CALL](arguments, 1));
834
816
  }
835
817
 
836
818
  var strHasOwnProperty = "hasOwnProperty";
@@ -1142,7 +1124,7 @@ var _DYN_GET_PLUGIN = "getPlugin";
1142
1124
  var _DYN_NAME = "name";
1143
1125
  var _DYN_TIME = "time";
1144
1126
  var _DYN_PROCESS_NEXT = "processNext";
1145
- var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
1127
+ var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
1146
1128
  var _DYN_UNLOAD = "unload";
1147
1129
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
1148
1130
  var _DYN_CREATE_NEW = "createNew";
@@ -1503,20 +1485,178 @@ var STR_PRIORITY = "priority";
1503
1485
  var STR_GET_PERF_MGR = "getPerfMgr";
1504
1486
  var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
1505
1487
 
1506
- var _aiNamespace = null;
1507
- function _getExtensionNamespace() {
1508
- var target = getInst("Microsoft");
1509
- if (target) {
1510
- _aiNamespace = target["ApplicationInsights"];
1488
+ var rCamelCase = /-([a-z])/g;
1489
+ var rNormalizeInvalid = /([^\w\d_$])/g;
1490
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
1491
+ function isNotNullOrUndefined(value) {
1492
+ return !isNullOrUndefined(value);
1493
+ }
1494
+ function normalizeJsName(name) {
1495
+ var value = name;
1496
+ if (value && isString(value)) {
1497
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1498
+ return letter.toUpperCase();
1499
+ });
1500
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1501
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1502
+ return "_" + match;
1503
+ });
1511
1504
  }
1512
- return _aiNamespace;
1505
+ return value;
1513
1506
  }
1514
- function getDebugExt(config) {
1515
- var ns = _aiNamespace;
1516
- if (!ns && config.disableDbgExt !== true) {
1517
- ns = _aiNamespace || _getExtensionNamespace();
1507
+ function strContains(value, search) {
1508
+ if (value && search) {
1509
+ return strIndexOf(value, search) !== -1;
1518
1510
  }
1519
- return ns ? ns["ChromeDbgExt"] : null;
1511
+ return false;
1512
+ }
1513
+ function _createProxyFunction(source, funcName) {
1514
+ var srcFunc = null;
1515
+ var src = null;
1516
+ if (isFunction(source)) {
1517
+ srcFunc = source;
1518
+ }
1519
+ else {
1520
+ src = source;
1521
+ }
1522
+ return function () {
1523
+ var originalArguments = arguments;
1524
+ if (srcFunc) {
1525
+ src = srcFunc();
1526
+ }
1527
+ if (src) {
1528
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
1529
+ }
1530
+ };
1531
+ }
1532
+ function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1533
+ if (target && name && source) {
1534
+ if (overwriteTarget !== false || isUndefined(target[name])) {
1535
+ target[name] = _createProxyFunction(source, theFunc);
1536
+ }
1537
+ }
1538
+ }
1539
+ function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1540
+ if (target && source && isObject(target) && isArray(functionsToProxy)) {
1541
+ arrForEach(functionsToProxy, function (theFuncName) {
1542
+ if (isString(theFuncName)) {
1543
+ proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1544
+ }
1545
+ });
1546
+ }
1547
+ return target;
1548
+ }
1549
+ function optimizeObject(theObject) {
1550
+ if (theObject && objAssign) {
1551
+ theObject = ObjClass$1(objAssign({}, theObject));
1552
+ }
1553
+ return theObject;
1554
+ }
1555
+ function getResponseText(xhr) {
1556
+ try {
1557
+ return xhr.responseText;
1558
+ }
1559
+ catch (e) {
1560
+ }
1561
+ return null;
1562
+ }
1563
+ function formatErrorMessageXdr(xdr, message) {
1564
+ if (xdr) {
1565
+ return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1566
+ }
1567
+ return message;
1568
+ }
1569
+ function formatErrorMessageXhr(xhr, message) {
1570
+ if (xhr) {
1571
+ return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1572
+ }
1573
+ return message;
1574
+ }
1575
+ function prependTransports(theTransports, newTransports) {
1576
+ if (newTransports) {
1577
+ if (isNumber(newTransports)) {
1578
+ theTransports = [newTransports].concat(theTransports);
1579
+ }
1580
+ else if (isArray(newTransports)) {
1581
+ theTransports = newTransports.concat(theTransports);
1582
+ }
1583
+ }
1584
+ return theTransports;
1585
+ }
1586
+ var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1587
+ var strWithCredentials = "withCredentials";
1588
+ var strTimeout = "timeout";
1589
+ function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1590
+ if (disabled === void 0) { disabled = false; }
1591
+ if (isSync === void 0) { isSync = false; }
1592
+ function _wrapSetXhrProp(xhr, prop, value) {
1593
+ try {
1594
+ xhr[prop] = value;
1595
+ }
1596
+ catch (e) {
1597
+ }
1598
+ }
1599
+ var xhr = new XMLHttpRequest();
1600
+ if (disabled) {
1601
+ _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1602
+ }
1603
+ if (withCredentials) {
1604
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1605
+ }
1606
+ xhr.open(method, urlString, !isSync);
1607
+ if (withCredentials) {
1608
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1609
+ }
1610
+ if (!isSync && timeout) {
1611
+ _wrapSetXhrProp(xhr, strTimeout, timeout);
1612
+ }
1613
+ return xhr;
1614
+ }
1615
+ function convertAllHeadersToMap(headersString) {
1616
+ var headers = {};
1617
+ if (isString(headersString)) {
1618
+ var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1619
+ arrForEach(headersArray, function (headerEntry) {
1620
+ if (headerEntry) {
1621
+ var idx = headerEntry.indexOf(": ");
1622
+ if (idx !== -1) {
1623
+ var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1624
+ var value = strTrim(headerEntry.substring(idx + 1));
1625
+ headers[header] = value;
1626
+ }
1627
+ else {
1628
+ headers[strTrim(headerEntry)] = 1;
1629
+ }
1630
+ }
1631
+ });
1632
+ }
1633
+ return headers;
1634
+ }
1635
+ function _appendHeader(theHeaders, xhr, name) {
1636
+ if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1637
+ var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1638
+ if (value) {
1639
+ theHeaders[name] = strTrim(value);
1640
+ }
1641
+ }
1642
+ return theHeaders;
1643
+ }
1644
+ var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1645
+ var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1646
+ var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1647
+ function _getAllResponseHeaders(xhr, isOneDs) {
1648
+ var theHeaders = {};
1649
+ if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1650
+ if (!!isOneDs) {
1651
+ theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1652
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1653
+ theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
1654
+ }
1655
+ }
1656
+ else {
1657
+ theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
1658
+ }
1659
+ return theHeaders;
1520
1660
  }
1521
1661
 
1522
1662
  var strLocation = "location";
@@ -1646,365 +1786,6 @@ function isXhrSupported() {
1646
1786
  return isSupported;
1647
1787
  }
1648
1788
 
1649
- var _a$3;
1650
- var STR_WARN_TO_CONSOLE = "warnToConsole";
1651
- var AiNonUserActionablePrefix = "AI (Internal): ";
1652
- var AiUserActionablePrefix = "AI: ";
1653
- var AIInternalMessagePrefix = "AITR_";
1654
- var defaultValues$1 = {
1655
- loggingLevelConsole: 0,
1656
- loggingLevelTelemetry: 1,
1657
- maxMessageLimit: 25,
1658
- enableDebug: false
1659
- };
1660
- var _logFuncs = (_a$3 = {},
1661
- _a$3[0 ] = null,
1662
- _a$3[1 ] = "errorToConsole",
1663
- _a$3[2 ] = STR_WARN_TO_CONSOLE,
1664
- _a$3[3 ] = "debugToConsole",
1665
- _a$3);
1666
- function _sanitizeDiagnosticText(text) {
1667
- if (text) {
1668
- return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
1669
- }
1670
- return STR_EMPTY$3;
1671
- }
1672
- function _logToConsole(func, message) {
1673
- var theConsole = getConsole();
1674
- if (!!theConsole) {
1675
- var logFunc = "log";
1676
- if (theConsole[func]) {
1677
- logFunc = func;
1678
- }
1679
- if (isFunction(theConsole[logFunc])) {
1680
- theConsole[logFunc](message);
1681
- }
1682
- }
1683
- }
1684
- var _InternalLogMessage = /** @class */ (function () {
1685
- function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1686
- if (isUserAct === void 0) { isUserAct = false; }
1687
- var _self = this;
1688
- _self[_DYN_MESSAGE_ID ] = msgId;
1689
- _self[_DYN_MESSAGE ] =
1690
- (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1691
- msgId;
1692
- var strProps = STR_EMPTY$3;
1693
- if (hasJSON()) {
1694
- strProps = getJSON().stringify(properties);
1695
- }
1696
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
1697
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
1698
- _self[_DYN_MESSAGE ] += diagnosticText;
1699
- }
1700
- _InternalLogMessage.dataType = "MessageData";
1701
- return _InternalLogMessage;
1702
- }());
1703
- function safeGetLogger(core, config) {
1704
- return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1705
- }
1706
- var DiagnosticLogger = /** @class */ (function () {
1707
- function DiagnosticLogger(config) {
1708
- this.identifier = "DiagnosticLogger";
1709
- this.queue = [];
1710
- var _messageCount = 0;
1711
- var _messageLogged = {};
1712
- var _loggingLevelConsole;
1713
- var _loggingLevelTelemetry;
1714
- var _maxInternalMessageLimit;
1715
- var _enableDebug;
1716
- var _unloadHandler;
1717
- dynamicProto(DiagnosticLogger, this, function (_self) {
1718
- _unloadHandler = _setDefaultsFromConfig(config || {});
1719
- _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1720
- _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1721
- if (isUserAct === void 0) { isUserAct = false; }
1722
- var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1723
- if (_enableDebug) {
1724
- throw dumpObj(message);
1725
- }
1726
- else {
1727
- var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
1728
- if (!isUndefined(message[_DYN_MESSAGE ])) {
1729
- if (isUserAct) {
1730
- var messageKey = +message[_DYN_MESSAGE_ID ];
1731
- if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1732
- _self[logFunc](message[_DYN_MESSAGE ]);
1733
- _messageLogged[messageKey] = true;
1734
- }
1735
- }
1736
- else {
1737
- if (_loggingLevelConsole >= severity) {
1738
- _self[logFunc](message[_DYN_MESSAGE ]);
1739
- }
1740
- }
1741
- _logInternalMessage(severity, message);
1742
- }
1743
- else {
1744
- _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1745
- }
1746
- }
1747
- };
1748
- _self.debugToConsole = function (message) {
1749
- _logToConsole("debug", message);
1750
- _debugExtMsg("warning", message);
1751
- };
1752
- _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
1753
- _logToConsole("warn", message);
1754
- _debugExtMsg("warning", message);
1755
- };
1756
- _self.errorToConsole = function (message) {
1757
- _logToConsole("error", message);
1758
- _debugExtMsg("error", message);
1759
- };
1760
- _self.resetInternalMessageCount = function () {
1761
- _messageCount = 0;
1762
- _messageLogged = {};
1763
- };
1764
- _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1765
- _self[_DYN_UNLOAD ] = function (isAsync) {
1766
- _unloadHandler && _unloadHandler.rm();
1767
- _unloadHandler = null;
1768
- };
1769
- function _logInternalMessage(severity, message) {
1770
- if (_areInternalMessagesThrottled()) {
1771
- return;
1772
- }
1773
- var logMessage = true;
1774
- var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1775
- if (_messageLogged[messageKey]) {
1776
- logMessage = false;
1777
- }
1778
- else {
1779
- _messageLogged[messageKey] = true;
1780
- }
1781
- if (logMessage) {
1782
- if (severity <= _loggingLevelTelemetry) {
1783
- _self.queue[_DYN_PUSH$1 ](message);
1784
- _messageCount++;
1785
- _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1786
- }
1787
- if (_messageCount === _maxInternalMessageLimit) {
1788
- var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1789
- var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1790
- _self.queue[_DYN_PUSH$1 ](throttleMessage);
1791
- if (severity === 1 ) {
1792
- _self.errorToConsole(throttleLimitMessage);
1793
- }
1794
- else {
1795
- _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
1796
- }
1797
- }
1798
- }
1799
- }
1800
- function _setDefaultsFromConfig(config) {
1801
- return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
1802
- var config = details.cfg;
1803
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1804
- _loggingLevelTelemetry = config.loggingLevelTelemetry;
1805
- _maxInternalMessageLimit = config.maxMessageLimit;
1806
- _enableDebug = config.enableDebug;
1807
- });
1808
- }
1809
- function _areInternalMessagesThrottled() {
1810
- return _messageCount >= _maxInternalMessageLimit;
1811
- }
1812
- function _debugExtMsg(name, data) {
1813
- var dbgExt = getDebugExt(config || {});
1814
- if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1815
- dbgExt[_DYN_DIAG_LOG ](name, data);
1816
- }
1817
- }
1818
- });
1819
- }
1820
- DiagnosticLogger.__ieDyn=1;
1821
- return DiagnosticLogger;
1822
- }());
1823
- function _getLogger(logger) {
1824
- return (logger || new DiagnosticLogger());
1825
- }
1826
- function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1827
- if (isUserAct === void 0) { isUserAct = false; }
1828
- _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
1829
- }
1830
- function _warnToConsole(logger, message) {
1831
- _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
1832
- }
1833
-
1834
- var rCamelCase = /-([a-z])/g;
1835
- var rNormalizeInvalid = /([^\w\d_$])/g;
1836
- var rLeadingNumeric = /^(\d+[\w\d_$])/;
1837
- function isNotNullOrUndefined(value) {
1838
- return !isNullOrUndefined(value);
1839
- }
1840
- function normalizeJsName(name) {
1841
- var value = name;
1842
- if (value && isString(value)) {
1843
- value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
1844
- return letter.toUpperCase();
1845
- });
1846
- value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
1847
- value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
1848
- return "_" + match;
1849
- });
1850
- }
1851
- return value;
1852
- }
1853
- function strContains(value, search) {
1854
- if (value && search) {
1855
- return strIndexOf(value, search) !== -1;
1856
- }
1857
- return false;
1858
- }
1859
- function _createProxyFunction(source, funcName) {
1860
- var srcFunc = null;
1861
- var src = null;
1862
- if (isFunction(source)) {
1863
- srcFunc = source;
1864
- }
1865
- else {
1866
- src = source;
1867
- }
1868
- return function () {
1869
- var originalArguments = arguments;
1870
- if (srcFunc) {
1871
- src = srcFunc();
1872
- }
1873
- if (src) {
1874
- return src[funcName][_DYN_APPLY ](src, originalArguments);
1875
- }
1876
- };
1877
- }
1878
- function proxyFunctionAs(target, name, source, theFunc, overwriteTarget) {
1879
- if (target && name && source) {
1880
- if (overwriteTarget !== false || isUndefined(target[name])) {
1881
- target[name] = _createProxyFunction(source, theFunc);
1882
- }
1883
- }
1884
- }
1885
- function proxyFunctions(target, source, functionsToProxy, overwriteTarget) {
1886
- if (target && source && isObject(target) && isArray(functionsToProxy)) {
1887
- arrForEach(functionsToProxy, function (theFuncName) {
1888
- if (isString(theFuncName)) {
1889
- proxyFunctionAs(target, theFuncName, source, theFuncName, overwriteTarget);
1890
- }
1891
- });
1892
- }
1893
- return target;
1894
- }
1895
- function optimizeObject(theObject) {
1896
- if (theObject && objAssign) {
1897
- theObject = ObjClass$1(objAssign({}, theObject));
1898
- }
1899
- return theObject;
1900
- }
1901
- function getResponseText(xhr) {
1902
- try {
1903
- return xhr.responseText;
1904
- }
1905
- catch (e) {
1906
- }
1907
- return null;
1908
- }
1909
- function formatErrorMessageXdr(xdr, message) {
1910
- if (xdr) {
1911
- return "XDomainRequest,Response:" + getResponseText(xdr) || "";
1912
- }
1913
- return message;
1914
- }
1915
- function formatErrorMessageXhr(xhr, message) {
1916
- if (xhr) {
1917
- return "XMLHttpRequest,Status:" + xhr[_DYN_STATUS ] + ",Response:" + getResponseText(xhr) || xhr.response || "";
1918
- }
1919
- return message;
1920
- }
1921
- function prependTransports(theTransports, newTransports) {
1922
- if (newTransports) {
1923
- if (isNumber(newTransports)) {
1924
- theTransports = [newTransports].concat(theTransports);
1925
- }
1926
- else if (isArray(newTransports)) {
1927
- theTransports = newTransports.concat(theTransports);
1928
- }
1929
- }
1930
- return theTransports;
1931
- }
1932
- var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
1933
- var strWithCredentials = "withCredentials";
1934
- var strTimeout = "timeout";
1935
- function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
1936
- if (disabled === void 0) { disabled = false; }
1937
- if (isSync === void 0) { isSync = false; }
1938
- function _wrapSetXhrProp(xhr, prop, value) {
1939
- try {
1940
- xhr[prop] = value;
1941
- }
1942
- catch (e) {
1943
- }
1944
- }
1945
- var xhr = new XMLHttpRequest();
1946
- if (disabled) {
1947
- _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
1948
- }
1949
- if (withCredentials) {
1950
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1951
- }
1952
- xhr.open(method, urlString, !isSync);
1953
- if (withCredentials) {
1954
- _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
1955
- }
1956
- if (!isSync && timeout) {
1957
- _wrapSetXhrProp(xhr, strTimeout, timeout);
1958
- }
1959
- return xhr;
1960
- }
1961
- function convertAllHeadersToMap(headersString) {
1962
- var headers = {};
1963
- if (isString(headersString)) {
1964
- var headersArray = strTrim(headersString)[_DYN_SPLIT$1 ](/[\r\n]+/);
1965
- arrForEach(headersArray, function (headerEntry) {
1966
- if (headerEntry) {
1967
- var idx = headerEntry.indexOf(": ");
1968
- if (idx !== -1) {
1969
- var header = strTrim(headerEntry.substring(0, idx))[_DYN_TO_LOWER_CASE$1 ]();
1970
- var value = strTrim(headerEntry.substring(idx + 1));
1971
- headers[header] = value;
1972
- }
1973
- else {
1974
- headers[strTrim(headerEntry)] = 1;
1975
- }
1976
- }
1977
- });
1978
- }
1979
- return headers;
1980
- }
1981
- function _appendHeader(theHeaders, xhr, name) {
1982
- if (!theHeaders[name] && xhr && xhr[_DYN_GET_RESPONSE_HEADER ]) {
1983
- var value = xhr[_DYN_GET_RESPONSE_HEADER ](name);
1984
- if (value) {
1985
- theHeaders[name] = strTrim(value);
1986
- }
1987
- }
1988
- return theHeaders;
1989
- }
1990
- var STR_KILL_DURATION_HEADER$1 = "kill-duration";
1991
- var STR_KILL_DURATION_SECONDS_HEADER = "kill-duration-seconds";
1992
- var STR_TIME_DELTA_HEADER$1 = "time-delta-millis";
1993
- function _getAllResponseHeaders(xhr, isOneDs) {
1994
- var theHeaders = {};
1995
- if (!xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]) {
1996
- if (!!isOneDs) {
1997
- theHeaders = _appendHeader(theHeaders, xhr, STR_TIME_DELTA_HEADER$1);
1998
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_HEADER$1);
1999
- theHeaders = _appendHeader(theHeaders, xhr, STR_KILL_DURATION_SECONDS_HEADER);
2000
- }
2001
- }
2002
- else {
2003
- theHeaders = convertAllHeadersToMap(xhr[_DYN_GET_ALL_RESPONSE_HEA5 ]());
2004
- }
2005
- return theHeaders;
2006
- }
2007
-
2008
1789
  var UInt32Mask = 0x100000000;
2009
1790
  var MaxUInt32 = 0xffffffff;
2010
1791
  var SEED1 = 123456789;
@@ -2634,6 +2415,7 @@ function _createAndUseHandler(state, configHandler) {
2634
2415
  configHandler = null;
2635
2416
  }
2636
2417
  };
2418
+ objDefine(handler, "toJSON", { v: function () { return "WatcherHandler" + (handler.fn ? "" : "[X]"); } });
2637
2419
  state.use(handler, configHandler);
2638
2420
  return handler;
2639
2421
  }
@@ -2746,6 +2528,207 @@ function onConfigChange(config, configHandler, logger) {
2746
2528
 
2747
2529
  var DisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
2748
2530
 
2531
+ var _aiNamespace = null;
2532
+ function _getExtensionNamespace() {
2533
+ var target = getInst("Microsoft");
2534
+ if (target) {
2535
+ _aiNamespace = target["ApplicationInsights"];
2536
+ }
2537
+ return _aiNamespace;
2538
+ }
2539
+ function getDebugExt(config) {
2540
+ var ns = _aiNamespace;
2541
+ if (!ns && config.disableDbgExt !== true) {
2542
+ ns = _aiNamespace || _getExtensionNamespace();
2543
+ }
2544
+ return ns ? ns["ChromeDbgExt"] : null;
2545
+ }
2546
+
2547
+ var _a$3;
2548
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
2549
+ var AiNonUserActionablePrefix = "AI (Internal): ";
2550
+ var AiUserActionablePrefix = "AI: ";
2551
+ var AIInternalMessagePrefix = "AITR_";
2552
+ var defaultValues$1 = {
2553
+ loggingLevelConsole: 0,
2554
+ loggingLevelTelemetry: 1,
2555
+ maxMessageLimit: 25,
2556
+ enableDebug: false
2557
+ };
2558
+ var _logFuncs = (_a$3 = {},
2559
+ _a$3[0 ] = null,
2560
+ _a$3[1 ] = "errorToConsole",
2561
+ _a$3[2 ] = STR_WARN_TO_CONSOLE,
2562
+ _a$3[3 ] = "debugToConsole",
2563
+ _a$3);
2564
+ function _sanitizeDiagnosticText(text) {
2565
+ if (text) {
2566
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$3) + "\"";
2567
+ }
2568
+ return STR_EMPTY$3;
2569
+ }
2570
+ function _logToConsole(func, message) {
2571
+ var theConsole = getConsole();
2572
+ if (!!theConsole) {
2573
+ var logFunc = "log";
2574
+ if (theConsole[func]) {
2575
+ logFunc = func;
2576
+ }
2577
+ if (isFunction(theConsole[logFunc])) {
2578
+ theConsole[logFunc](message);
2579
+ }
2580
+ }
2581
+ }
2582
+ var _InternalLogMessage = /** @class */ (function () {
2583
+ function _InternalLogMessage(msgId, msg, isUserAct, properties) {
2584
+ if (isUserAct === void 0) { isUserAct = false; }
2585
+ var _self = this;
2586
+ _self[_DYN_MESSAGE_ID ] = msgId;
2587
+ _self[_DYN_MESSAGE ] =
2588
+ (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
2589
+ msgId;
2590
+ var strProps = STR_EMPTY$3;
2591
+ if (hasJSON()) {
2592
+ strProps = getJSON().stringify(properties);
2593
+ }
2594
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$3) +
2595
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$3);
2596
+ _self[_DYN_MESSAGE ] += diagnosticText;
2597
+ }
2598
+ _InternalLogMessage.dataType = "MessageData";
2599
+ return _InternalLogMessage;
2600
+ }());
2601
+ function safeGetLogger(core, config) {
2602
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
2603
+ }
2604
+ var DiagnosticLogger = /** @class */ (function () {
2605
+ function DiagnosticLogger(config) {
2606
+ this.identifier = "DiagnosticLogger";
2607
+ this.queue = [];
2608
+ var _messageCount = 0;
2609
+ var _messageLogged = {};
2610
+ var _loggingLevelConsole;
2611
+ var _loggingLevelTelemetry;
2612
+ var _maxInternalMessageLimit;
2613
+ var _enableDebug;
2614
+ var _unloadHandler;
2615
+ dynamicProto(DiagnosticLogger, this, function (_self) {
2616
+ _unloadHandler = _setDefaultsFromConfig(config || {});
2617
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
2618
+ _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
2619
+ if (isUserAct === void 0) { isUserAct = false; }
2620
+ var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
2621
+ if (_enableDebug) {
2622
+ throw dumpObj(message);
2623
+ }
2624
+ else {
2625
+ var logFunc = _logFuncs[severity] || STR_WARN_TO_CONSOLE;
2626
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
2627
+ if (isUserAct) {
2628
+ var messageKey = +message[_DYN_MESSAGE_ID ];
2629
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
2630
+ _self[logFunc](message[_DYN_MESSAGE ]);
2631
+ _messageLogged[messageKey] = true;
2632
+ }
2633
+ }
2634
+ else {
2635
+ if (_loggingLevelConsole >= severity) {
2636
+ _self[logFunc](message[_DYN_MESSAGE ]);
2637
+ }
2638
+ }
2639
+ _logInternalMessage(severity, message);
2640
+ }
2641
+ else {
2642
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
2643
+ }
2644
+ }
2645
+ };
2646
+ _self.debugToConsole = function (message) {
2647
+ _logToConsole("debug", message);
2648
+ _debugExtMsg("warning", message);
2649
+ };
2650
+ _self[_DYN_WARN_TO_CONSOLE ] = function (message) {
2651
+ _logToConsole("warn", message);
2652
+ _debugExtMsg("warning", message);
2653
+ };
2654
+ _self.errorToConsole = function (message) {
2655
+ _logToConsole("error", message);
2656
+ _debugExtMsg("error", message);
2657
+ };
2658
+ _self.resetInternalMessageCount = function () {
2659
+ _messageCount = 0;
2660
+ _messageLogged = {};
2661
+ };
2662
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
2663
+ _self[_DYN_UNLOAD ] = function (isAsync) {
2664
+ _unloadHandler && _unloadHandler.rm();
2665
+ _unloadHandler = null;
2666
+ };
2667
+ function _logInternalMessage(severity, message) {
2668
+ if (_areInternalMessagesThrottled()) {
2669
+ return;
2670
+ }
2671
+ var logMessage = true;
2672
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
2673
+ if (_messageLogged[messageKey]) {
2674
+ logMessage = false;
2675
+ }
2676
+ else {
2677
+ _messageLogged[messageKey] = true;
2678
+ }
2679
+ if (logMessage) {
2680
+ if (severity <= _loggingLevelTelemetry) {
2681
+ _self.queue[_DYN_PUSH$1 ](message);
2682
+ _messageCount++;
2683
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
2684
+ }
2685
+ if (_messageCount === _maxInternalMessageLimit) {
2686
+ var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
2687
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
2688
+ _self.queue[_DYN_PUSH$1 ](throttleMessage);
2689
+ if (severity === 1 ) {
2690
+ _self.errorToConsole(throttleLimitMessage);
2691
+ }
2692
+ else {
2693
+ _self[_DYN_WARN_TO_CONSOLE ](throttleLimitMessage);
2694
+ }
2695
+ }
2696
+ }
2697
+ }
2698
+ function _setDefaultsFromConfig(config) {
2699
+ return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
2700
+ var config = details.cfg;
2701
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
2702
+ _loggingLevelTelemetry = config.loggingLevelTelemetry;
2703
+ _maxInternalMessageLimit = config.maxMessageLimit;
2704
+ _enableDebug = config.enableDebug;
2705
+ });
2706
+ }
2707
+ function _areInternalMessagesThrottled() {
2708
+ return _messageCount >= _maxInternalMessageLimit;
2709
+ }
2710
+ function _debugExtMsg(name, data) {
2711
+ var dbgExt = getDebugExt(config || {});
2712
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
2713
+ dbgExt[_DYN_DIAG_LOG ](name, data);
2714
+ }
2715
+ }
2716
+ });
2717
+ }
2718
+ DiagnosticLogger.__ieDyn=1;
2719
+ return DiagnosticLogger;
2720
+ }());
2721
+ function _getLogger(logger) {
2722
+ return (logger || new DiagnosticLogger());
2723
+ }
2724
+ function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
2725
+ if (isUserAct === void 0) { isUserAct = false; }
2726
+ _getLogger(logger)[_DYN_THROW_INTERNAL ](severity, msgId, msg, properties, isUserAct);
2727
+ }
2728
+ function _warnToConsole(logger, message) {
2729
+ _getLogger(logger)[_DYN_WARN_TO_CONSOLE ](message);
2730
+ }
2731
+
2749
2732
  var strExecutionContextKey = "ctx";
2750
2733
  var strParentContextKey = "ParentContextKey";
2751
2734
  var strChildrenContextKey = "ChildrenContextKey";
@@ -3391,7 +3374,7 @@ var BaseTelemetryPlugin = /** @class */ (function () {
3391
3374
  function _setDefaults(config, core, pluginChain) {
3392
3375
  createDynamicConfig(config, defaultValues, safeGetLogger(core));
3393
3376
  if (!pluginChain && core) {
3394
- pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3377
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT2 ]()[_DYN_GET_NEXT ]();
3395
3378
  }
3396
3379
  var nextPlugin = _nextPlugin;
3397
3380
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
@@ -4136,7 +4119,7 @@ var _DYN_LENGTH$1 = "length";
4136
4119
  var _DYN_PROCESS_TELEMETRY_ST0 = "processTelemetryStart";
4137
4120
 
4138
4121
  var _a$1;
4139
- var Version = '4.1.2-nightly3.2403-07';
4122
+ var Version = '4.1.3-nightly3.2403-09';
4140
4123
  var FullVersionString = "1DS-Web-JS-" + Version;
4141
4124
  var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
4142
4125
  var _fieldTypeEventPropMap = (_a$1 = {},
@@ -5777,7 +5760,7 @@ var PostChannel = /** @class */ (function (_super) {
5777
5760
  var _this = _super.call(this) || this;
5778
5761
  _this.identifier = "PostChannel";
5779
5762
  _this.priority = 1011;
5780
- _this.version = '4.1.2-nightly3.2403-07';
5763
+ _this.version = '4.1.3-nightly3.2403-09';
5781
5764
  var _postConfig;
5782
5765
  var _isTeardownCalled = false;
5783
5766
  var _flushCallbackQueue = [];
@@ -6552,4 +6535,4 @@ exports.PostChannel = PostChannel;
6552
6535
  exports.RT_PROFILE = RT_PROFILE;
6553
6536
 
6554
6537
  }));
6555
- //# sourceMappingURL=ms.post-4.1.2-nightly3.2403-07.js.map
6538
+ //# sourceMappingURL=ms.post-4.1.3-nightly3.2403-09.js.map