@microsoft/1ds-core-js 3.1.8 → 3.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundle/{ms.core-3.1.8.gbl.js → ms.core-3.1.11.gbl.js} +221 -101
- package/bundle/ms.core-3.1.11.gbl.js.map +1 -0
- package/bundle/ms.core-3.1.11.gbl.min.js +7 -0
- package/bundle/ms.core-3.1.11.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.1.11.integrity.json +46 -0
- package/bundle/{ms.core-3.1.8.js → ms.core-3.1.11.js} +221 -101
- package/bundle/ms.core-3.1.11.js.map +1 -0
- package/bundle/ms.core-3.1.11.min.js +7 -0
- package/bundle/ms.core-3.1.11.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +220 -100
- package/bundle/ms.core.gbl.js.map +1 -1
- package/bundle/ms.core.gbl.min.js +2 -2
- package/bundle/ms.core.gbl.min.js.map +1 -1
- package/bundle/ms.core.integrity.json +17 -17
- package/bundle/ms.core.js +220 -100
- package/bundle/ms.core.js.map +1 -1
- package/bundle/ms.core.min.js +2 -2
- package/bundle/ms.core.min.js.map +1 -1
- package/dist/ms.core.js +7 -3
- package/dist/ms.core.js.map +1 -1
- package/dist/ms.core.min.js +2 -2
- package/dist/ms.core.min.js.map +1 -1
- package/dist-esm/src/AppInsightsCore.js +1 -1
- package/dist-esm/src/BaseCore.d.ts +0 -8
- package/dist-esm/src/BaseCore.js +2 -2
- package/dist-esm/src/BaseCore.js.map +1 -1
- package/dist-esm/src/DataModels.js +1 -1
- package/dist-esm/src/ESPromise.js +1 -1
- package/dist-esm/src/ESPromiseScheduler.js +1 -1
- package/dist-esm/src/Enums.js +1 -1
- package/dist-esm/src/Index.js +1 -1
- package/dist-esm/src/Utils.d.ts +5 -4
- package/dist-esm/src/Utils.js +11 -3
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.js +1 -1
- package/package.json +3 -3
- package/src/BaseCore.ts +1 -1
- package/src/Utils.ts +11 -2
- package/bundle/ms.core-3.1.8.gbl.js.map +0 -1
- package/bundle/ms.core-3.1.8.gbl.min.js +0 -7
- package/bundle/ms.core-3.1.8.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.1.8.integrity.json +0 -46
- package/bundle/ms.core-3.1.8.js.map +0 -1
- package/bundle/ms.core-3.1.8.min.js +0 -7
- package/bundle/ms.core-3.1.8.min.js.map +0 -1
package/bundle/ms.core.gbl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 3.1.
|
|
2
|
+
* 1DS JS SDK Core, 3.1.11
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -18,20 +18,24 @@
|
|
|
18
18
|
var ObjDefineProperty = ObjClass["defineProperty"];
|
|
19
19
|
var ObjHasOwnProperty = ObjProto[strShimHasOwnProperty];
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
var _cachedGlobal = null;
|
|
22
|
+
function getGlobal(useCached) {
|
|
23
|
+
if (useCached === void 0) { useCached = true; }
|
|
24
|
+
if (!_cachedGlobal || !useCached) {
|
|
25
|
+
if (typeof globalThis !== strShimUndefined && globalThis) {
|
|
26
|
+
_cachedGlobal = globalThis;
|
|
27
|
+
}
|
|
28
|
+
if (typeof self !== strShimUndefined && self) {
|
|
29
|
+
_cachedGlobal = self;
|
|
30
|
+
}
|
|
31
|
+
if (typeof window !== strShimUndefined && window) {
|
|
32
|
+
_cachedGlobal = window;
|
|
33
|
+
}
|
|
34
|
+
if (typeof global !== strShimUndefined && global) {
|
|
35
|
+
_cachedGlobal = global;
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
|
-
return
|
|
38
|
+
return _cachedGlobal;
|
|
35
39
|
}
|
|
36
40
|
function throwTypeError(message) {
|
|
37
41
|
throw new TypeError(message);
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
}
|
|
47
51
|
var type = typeof obj;
|
|
48
52
|
if (type !== strShimObject && type !== strShimFunction) {
|
|
49
|
-
throwTypeError(
|
|
53
|
+
throwTypeError("Object prototype may only be an Object:" + obj);
|
|
50
54
|
}
|
|
51
55
|
function tmpFunc() { }
|
|
52
56
|
tmpFunc[strShimPrototype] = obj;
|
|
@@ -441,10 +445,29 @@
|
|
|
441
445
|
var strAddEventHelper = "addEventListener";
|
|
442
446
|
var strDetachEvent = "detachEvent";
|
|
443
447
|
var strRemoveEventListener = "removeEventListener";
|
|
448
|
+
var strToISOString = "toISOString";
|
|
449
|
+
var cStrEndsWith = "endsWith";
|
|
450
|
+
var cStrStartsWith = "startsWith";
|
|
451
|
+
var strIndexOf = "indexOf";
|
|
452
|
+
var strMap = "map";
|
|
453
|
+
var strReduce = "reduce";
|
|
454
|
+
var cStrTrim = "trim";
|
|
455
|
+
var strToString = "toString";
|
|
444
456
|
var _objDefineProperty = ObjDefineProperty;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
457
|
+
var _objKeys = ObjClass.keys;
|
|
458
|
+
var StringProto = String[strShimPrototype];
|
|
459
|
+
var _strTrim = StringProto[cStrTrim];
|
|
460
|
+
var _strEndsWith = StringProto[cStrEndsWith];
|
|
461
|
+
var _strStartsWith = StringProto[cStrStartsWith];
|
|
462
|
+
var DateProto = Date[strShimPrototype];
|
|
463
|
+
var _dataToISOString = DateProto[strToISOString];
|
|
464
|
+
var _isArray = Array.isArray;
|
|
465
|
+
var _objToString = ObjProto[strToString];
|
|
466
|
+
var _fnToString = ObjHasOwnProperty[strToString];
|
|
467
|
+
_fnToString.call(ObjClass);
|
|
468
|
+
var rCamelCase = /-([a-z])/g;
|
|
469
|
+
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
470
|
+
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
448
471
|
function isTypeof(value, theType) {
|
|
449
472
|
return typeof value === theType;
|
|
450
473
|
}
|
|
@@ -458,13 +481,13 @@
|
|
|
458
481
|
return !isNullOrUndefined(value);
|
|
459
482
|
}
|
|
460
483
|
function hasOwnProperty(obj, prop) {
|
|
461
|
-
return obj && ObjHasOwnProperty.call(obj, prop);
|
|
484
|
+
return !!(obj && ObjHasOwnProperty.call(obj, prop));
|
|
462
485
|
}
|
|
463
486
|
function isObject(value) {
|
|
464
|
-
return typeof value === strShimObject;
|
|
487
|
+
return !!(value && typeof value === strShimObject);
|
|
465
488
|
}
|
|
466
489
|
function isFunction(value) {
|
|
467
|
-
return typeof value === strShimFunction;
|
|
490
|
+
return !!(value && typeof value === strShimFunction);
|
|
468
491
|
}
|
|
469
492
|
function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
|
|
470
493
|
if (useCapture === void 0) { useCapture = false; }
|
|
@@ -502,9 +525,14 @@
|
|
|
502
525
|
}
|
|
503
526
|
function normalizeJsName(name) {
|
|
504
527
|
var value = name;
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
528
|
+
if (value && isString(value)) {
|
|
529
|
+
value = value.replace(rCamelCase, function (_all, letter) {
|
|
530
|
+
return letter.toUpperCase();
|
|
531
|
+
});
|
|
532
|
+
value = value.replace(rNormalizeInvalid, "_");
|
|
533
|
+
value = value.replace(rLeadingNumeric, function (_all, match) {
|
|
534
|
+
return "_" + match;
|
|
535
|
+
});
|
|
508
536
|
}
|
|
509
537
|
return value;
|
|
510
538
|
}
|
|
@@ -518,40 +546,45 @@
|
|
|
518
546
|
}
|
|
519
547
|
}
|
|
520
548
|
function strEndsWith(value, search) {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
549
|
+
var result = false;
|
|
550
|
+
if (value && search && !(result = value === search)) {
|
|
551
|
+
result = _strEndsWith ? value[cStrEndsWith](search) : _strEndsWithPoly(value, search);
|
|
552
|
+
}
|
|
553
|
+
return result;
|
|
554
|
+
}
|
|
555
|
+
function _strEndsWithPoly(value, search) {
|
|
556
|
+
var result = false;
|
|
557
|
+
var searchLen = search ? search.length : 0;
|
|
558
|
+
var valLen = value ? value.length : 0;
|
|
559
|
+
if (searchLen && valLen && valLen >= searchLen && !(result = value === search)) {
|
|
560
|
+
var pos = valLen - 1;
|
|
561
|
+
for (var lp = searchLen - 1; lp >= 0; lp--) {
|
|
562
|
+
if (value[pos] != search[lp]) {
|
|
563
|
+
return false;
|
|
534
564
|
}
|
|
535
|
-
|
|
565
|
+
pos--;
|
|
536
566
|
}
|
|
567
|
+
result = true;
|
|
537
568
|
}
|
|
538
|
-
return
|
|
569
|
+
return result;
|
|
539
570
|
}
|
|
540
571
|
function strStartsWith(value, checkValue) {
|
|
541
572
|
var result = false;
|
|
542
|
-
if (value && checkValue) {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
573
|
+
if (value && checkValue && !(result = value === checkValue)) {
|
|
574
|
+
result = _strStartsWith ? value[cStrStartsWith](checkValue) : _strStartsWithPoly(value, checkValue);
|
|
575
|
+
}
|
|
576
|
+
return result;
|
|
577
|
+
}
|
|
578
|
+
function _strStartsWithPoly(value, checkValue) {
|
|
579
|
+
var result = false;
|
|
580
|
+
var chkLen = checkValue ? checkValue.length : 0;
|
|
581
|
+
if (value && chkLen && value.length >= chkLen && !(result = value === checkValue)) {
|
|
582
|
+
for (var lp = 0; lp < chkLen; lp++) {
|
|
583
|
+
if (value[lp] !== checkValue[lp]) {
|
|
584
|
+
return false;
|
|
552
585
|
}
|
|
553
|
-
result = true;
|
|
554
586
|
}
|
|
587
|
+
result = true;
|
|
555
588
|
}
|
|
556
589
|
return result;
|
|
557
590
|
}
|
|
@@ -562,13 +595,14 @@
|
|
|
562
595
|
return false;
|
|
563
596
|
}
|
|
564
597
|
function isDate(obj) {
|
|
565
|
-
return
|
|
598
|
+
return !!(obj && _objToString.call(obj) === "[object Date]");
|
|
566
599
|
}
|
|
567
|
-
|
|
568
|
-
|
|
600
|
+
var isArray = _isArray || _isArrayPoly;
|
|
601
|
+
function _isArrayPoly(obj) {
|
|
602
|
+
return !!(obj && _objToString.call(obj) === "[object Array]");
|
|
569
603
|
}
|
|
570
604
|
function isError(obj) {
|
|
571
|
-
return
|
|
605
|
+
return !!(obj && _objToString.call(obj) === "[object Error]");
|
|
572
606
|
}
|
|
573
607
|
function isString(value) {
|
|
574
608
|
return typeof value === "string";
|
|
@@ -580,7 +614,12 @@
|
|
|
580
614
|
return typeof value === "boolean";
|
|
581
615
|
}
|
|
582
616
|
function toISOString(date) {
|
|
583
|
-
if (
|
|
617
|
+
if (date) {
|
|
618
|
+
return _dataToISOString ? date[strToISOString]() : _toISOStringPoly(date);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
function _toISOStringPoly(date) {
|
|
622
|
+
if (date && date.getUTCFullYear) {
|
|
584
623
|
var pad = function (num) {
|
|
585
624
|
var r = String(num);
|
|
586
625
|
if (r.length === 1) {
|
|
@@ -613,60 +652,76 @@
|
|
|
613
652
|
}
|
|
614
653
|
}
|
|
615
654
|
function arrIndexOf(arr, searchElement, fromIndex) {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
655
|
+
if (arr) {
|
|
656
|
+
if (arr[strIndexOf]) {
|
|
657
|
+
return arr[strIndexOf](searchElement, fromIndex);
|
|
658
|
+
}
|
|
659
|
+
var len = arr.length;
|
|
660
|
+
var from = fromIndex || 0;
|
|
661
|
+
try {
|
|
662
|
+
for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
|
|
663
|
+
if (lp in arr && arr[lp] === searchElement) {
|
|
664
|
+
return lp;
|
|
665
|
+
}
|
|
622
666
|
}
|
|
623
667
|
}
|
|
624
|
-
|
|
625
|
-
|
|
668
|
+
catch (e) {
|
|
669
|
+
}
|
|
626
670
|
}
|
|
627
671
|
return -1;
|
|
628
672
|
}
|
|
629
673
|
function arrMap(arr, callbackfn, thisArg) {
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
674
|
+
var results;
|
|
675
|
+
if (arr) {
|
|
676
|
+
if (arr[strMap]) {
|
|
677
|
+
return arr[strMap](callbackfn, thisArg);
|
|
678
|
+
}
|
|
679
|
+
var len = arr.length;
|
|
680
|
+
var _this = thisArg || arr;
|
|
681
|
+
results = new Array(len);
|
|
682
|
+
try {
|
|
683
|
+
for (var lp = 0; lp < len; lp++) {
|
|
684
|
+
if (lp in arr) {
|
|
685
|
+
results[lp] = callbackfn.call(_this, arr[lp], arr);
|
|
686
|
+
}
|
|
637
687
|
}
|
|
638
688
|
}
|
|
639
|
-
|
|
640
|
-
|
|
689
|
+
catch (e) {
|
|
690
|
+
}
|
|
641
691
|
}
|
|
642
692
|
return results;
|
|
643
693
|
}
|
|
644
694
|
function arrReduce(arr, callbackfn, initialValue) {
|
|
645
|
-
var len = arr.length;
|
|
646
|
-
var lp = 0;
|
|
647
695
|
var value;
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
else {
|
|
652
|
-
while (lp < len && !(lp in arr)) {
|
|
653
|
-
lp++;
|
|
696
|
+
if (arr) {
|
|
697
|
+
if (arr[strReduce]) {
|
|
698
|
+
return arr[strReduce](callbackfn, initialValue);
|
|
654
699
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
700
|
+
var len = arr.length;
|
|
701
|
+
var lp = 0;
|
|
702
|
+
if (arguments.length >= 3) {
|
|
703
|
+
value = arguments[2];
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
while (lp < len && !(lp in arr)) {
|
|
707
|
+
lp++;
|
|
708
|
+
}
|
|
709
|
+
value = arr[lp++];
|
|
710
|
+
}
|
|
711
|
+
while (lp < len) {
|
|
712
|
+
if (lp in arr) {
|
|
713
|
+
value = callbackfn(value, arr[lp], lp, arr);
|
|
714
|
+
}
|
|
715
|
+
lp++;
|
|
660
716
|
}
|
|
661
|
-
lp++;
|
|
662
717
|
}
|
|
663
718
|
return value;
|
|
664
719
|
}
|
|
665
720
|
function strTrim(str) {
|
|
666
|
-
if (
|
|
667
|
-
|
|
721
|
+
if (str) {
|
|
722
|
+
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str.replace ? str.replace(/^\s+|\s+$/g, "") : str);
|
|
668
723
|
}
|
|
669
|
-
return str
|
|
724
|
+
return str;
|
|
670
725
|
}
|
|
671
726
|
var _objKeysHasDontEnumBug = !({ toString: null }).propertyIsEnumerable("toString");
|
|
672
727
|
var _objKeysDontEnums = [
|
|
@@ -683,6 +738,9 @@
|
|
|
683
738
|
if (objType !== strShimFunction && (objType !== strShimObject || obj === null)) {
|
|
684
739
|
throwTypeError("objKeys called on non-object");
|
|
685
740
|
}
|
|
741
|
+
if (!_objKeysHasDontEnumBug && _objKeys) {
|
|
742
|
+
return _objKeys(obj);
|
|
743
|
+
}
|
|
686
744
|
var result = [];
|
|
687
745
|
for (var prop in obj) {
|
|
688
746
|
if (obj && ObjHasOwnProperty.call(obj, prop)) {
|
|
@@ -722,10 +780,7 @@
|
|
|
722
780
|
}
|
|
723
781
|
function dateNow() {
|
|
724
782
|
var dt = Date;
|
|
725
|
-
|
|
726
|
-
return dt.now();
|
|
727
|
-
}
|
|
728
|
-
return new dt().getTime();
|
|
783
|
+
return dt.now ? dt.now() : new dt().getTime();
|
|
729
784
|
}
|
|
730
785
|
function getExceptionName(object) {
|
|
731
786
|
if (isError(object)) {
|
|
@@ -803,14 +858,15 @@
|
|
|
803
858
|
return target;
|
|
804
859
|
}
|
|
805
860
|
function optimizeObject(theObject) {
|
|
806
|
-
if (theObject) {
|
|
807
|
-
theObject = ObjClass(ObjAssign
|
|
861
|
+
if (theObject && ObjAssign) {
|
|
862
|
+
theObject = ObjClass(ObjAssign({}, theObject));
|
|
808
863
|
}
|
|
809
864
|
return theObject;
|
|
810
865
|
}
|
|
811
866
|
|
|
812
867
|
var strWindow = "window";
|
|
813
868
|
var strDocument = "document";
|
|
869
|
+
var strDocumentMode = "documentMode";
|
|
814
870
|
var strNavigator = "navigator";
|
|
815
871
|
var strHistory = "history";
|
|
816
872
|
var strLocation = "location";
|
|
@@ -961,7 +1017,8 @@
|
|
|
961
1017
|
}
|
|
962
1018
|
var ua = (userAgentStr || "").toLowerCase();
|
|
963
1019
|
if (strContains(ua, strMsie)) {
|
|
964
|
-
|
|
1020
|
+
var doc = getDocument() || {};
|
|
1021
|
+
return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
|
|
965
1022
|
}
|
|
966
1023
|
else if (strContains(ua, strTrident)) {
|
|
967
1024
|
var tridentVer = parseInt(ua.split(strTrident)[1]);
|
|
@@ -1004,7 +1061,7 @@
|
|
|
1004
1061
|
}
|
|
1005
1062
|
function useXDomainRequest() {
|
|
1006
1063
|
if (_useXDomainRequest === null) {
|
|
1007
|
-
_useXDomainRequest = (typeof XDomainRequest !== undefined);
|
|
1064
|
+
_useXDomainRequest = (typeof XDomainRequest !== "undefined");
|
|
1008
1065
|
if (_useXDomainRequest && isXhrSupported()) {
|
|
1009
1066
|
_useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
|
|
1010
1067
|
}
|
|
@@ -1022,6 +1079,45 @@
|
|
|
1022
1079
|
return isSupported;
|
|
1023
1080
|
}
|
|
1024
1081
|
|
|
1082
|
+
var listenerFuncs = ["eventsSent", "eventsDiscarded", "eventsSendRequest", "perfEvent"];
|
|
1083
|
+
var _aiNamespace = null;
|
|
1084
|
+
var _debugListener;
|
|
1085
|
+
function _listenerProxyFunc(name, config) {
|
|
1086
|
+
return function () {
|
|
1087
|
+
var args = arguments;
|
|
1088
|
+
var dbgExt = getDebugExt(config);
|
|
1089
|
+
if (dbgExt) {
|
|
1090
|
+
var listener = dbgExt.listener;
|
|
1091
|
+
if (listener && listener[name]) {
|
|
1092
|
+
listener[name].apply(listener, args);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
function _getExtensionNamespace() {
|
|
1098
|
+
var target = getGlobalInst("Microsoft");
|
|
1099
|
+
if (target) {
|
|
1100
|
+
_aiNamespace = target["ApplicationInsights"];
|
|
1101
|
+
}
|
|
1102
|
+
return _aiNamespace;
|
|
1103
|
+
}
|
|
1104
|
+
function getDebugExt(config) {
|
|
1105
|
+
var ns = _aiNamespace;
|
|
1106
|
+
if (!ns && config.disableDbgExt !== true) {
|
|
1107
|
+
ns = _aiNamespace || _getExtensionNamespace();
|
|
1108
|
+
}
|
|
1109
|
+
return ns ? ns["ChromeDbgExt"] : null;
|
|
1110
|
+
}
|
|
1111
|
+
function getDebugListener(config) {
|
|
1112
|
+
if (!_debugListener) {
|
|
1113
|
+
_debugListener = {};
|
|
1114
|
+
for (var lp = 0; lp < listenerFuncs.length; lp++) {
|
|
1115
|
+
_debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
return _debugListener;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1025
1121
|
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
1026
1122
|
var AiUserActionablePrefix = "AI: ";
|
|
1027
1123
|
var AIInternalMessagePrefix = "AITR_";
|
|
@@ -1105,13 +1201,18 @@
|
|
|
1105
1201
|
}
|
|
1106
1202
|
_self.logInternalMessage(severity, message);
|
|
1107
1203
|
}
|
|
1204
|
+
else {
|
|
1205
|
+
_debugExtMsg("throw" + (severity === exports.LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
|
|
1206
|
+
}
|
|
1108
1207
|
}
|
|
1109
1208
|
};
|
|
1110
1209
|
_self.warnToConsole = function (message) {
|
|
1111
1210
|
_logToConsole("warn", message);
|
|
1211
|
+
_debugExtMsg("warning", message);
|
|
1112
1212
|
};
|
|
1113
1213
|
_self.errorToConsole = function (message) {
|
|
1114
1214
|
_logToConsole("error", message);
|
|
1215
|
+
_debugExtMsg("error", message);
|
|
1115
1216
|
};
|
|
1116
1217
|
_self.resetInternalMessageCount = function () {
|
|
1117
1218
|
_messageCount = 0;
|
|
@@ -1133,12 +1234,18 @@
|
|
|
1133
1234
|
if (severity <= _self.telemetryLoggingLevel()) {
|
|
1134
1235
|
_self.queue.push(message);
|
|
1135
1236
|
_messageCount++;
|
|
1237
|
+
_debugExtMsg((severity === exports.LoggingSeverity.CRITICAL ? "error" : "warn"), message);
|
|
1136
1238
|
}
|
|
1137
1239
|
if (_messageCount === _self.maxInternalMessageLimit()) {
|
|
1138
1240
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
1139
1241
|
var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
|
|
1140
1242
|
_self.queue.push(throttleMessage);
|
|
1141
|
-
|
|
1243
|
+
if (severity === exports.LoggingSeverity.CRITICAL) {
|
|
1244
|
+
_self.errorToConsole(throttleLimitMessage);
|
|
1245
|
+
}
|
|
1246
|
+
else {
|
|
1247
|
+
_self.warnToConsole(throttleLimitMessage);
|
|
1248
|
+
}
|
|
1142
1249
|
}
|
|
1143
1250
|
}
|
|
1144
1251
|
};
|
|
@@ -1152,6 +1259,12 @@
|
|
|
1152
1259
|
function _areInternalMessagesThrottled() {
|
|
1153
1260
|
return _messageCount >= _self.maxInternalMessageLimit();
|
|
1154
1261
|
}
|
|
1262
|
+
function _debugExtMsg(name, data) {
|
|
1263
|
+
var dbgExt = getDebugExt(config);
|
|
1264
|
+
if (dbgExt && dbgExt.diagLog) {
|
|
1265
|
+
dbgExt.diagLog(name, data);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1155
1268
|
});
|
|
1156
1269
|
}
|
|
1157
1270
|
return DiagnosticLogger;
|
|
@@ -1940,6 +2053,9 @@
|
|
|
1940
2053
|
_notificationManager = notificationManager;
|
|
1941
2054
|
_self[strNotificationManager] = notificationManager;
|
|
1942
2055
|
_self.config = config || {};
|
|
2056
|
+
if (notificationManager && _self.config.disableDbgExt !== true) {
|
|
2057
|
+
notificationManager.addNotificationListener(getDebugListener(config));
|
|
2058
|
+
}
|
|
1943
2059
|
if (_self.config.enablePerfMgr) {
|
|
1944
2060
|
setValue(_self.config, "createPerfMgr", _createPerfManager);
|
|
1945
2061
|
}
|
|
@@ -2454,10 +2570,11 @@
|
|
|
2454
2570
|
var _ExtendedInternalMessageId = __assignFn(__assignFn({}, _InternalMessageId), { AuthHandShakeError: 501, AuthRedirectFail: 502, BrowserCannotReadLocalStorage: 503, BrowserCannotWriteLocalStorage: 504, BrowserDoesNotSupportLocalStorage: 505, CannotParseBiBlobValue: 506, CannotParseDataAttribute: 507, CVPluginNotAvailable: 508, DroppedEvent: 509, ErrorParsingAISessionCookie: 510, ErrorProvidedChannels: 511, FailedToGetCookies: 512, FailedToInitializeCorrelationVector: 513, FailedToInitializeSDK: 514, InvalidContentBlob: 515, InvalidCorrelationValue: 516, SessionRenewalDateIsZero: 517, SendPostOnCompleteFailure: 518, PostResponseHandler: 519, SDKNotInitialized: 520 });
|
|
2455
2571
|
|
|
2456
2572
|
var _a;
|
|
2457
|
-
var Version = '3.1.
|
|
2573
|
+
var Version = '3.1.11';
|
|
2458
2574
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
2459
2575
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2460
2576
|
var strWithCredentials = "withCredentials";
|
|
2577
|
+
var strTimeout = "timeout";
|
|
2461
2578
|
var _fieldTypeEventPropMap = (_a = {},
|
|
2462
2579
|
_a[0 ] = EventPropertyType.Unspecified,
|
|
2463
2580
|
_a[2 ] = EventPropertyType.Double,
|
|
@@ -2781,7 +2898,7 @@
|
|
|
2781
2898
|
function isChromium() {
|
|
2782
2899
|
return !!getGlobalInst("chrome");
|
|
2783
2900
|
}
|
|
2784
|
-
function openXhr(method, urlString, withCredentials, disabled, isSync) {
|
|
2901
|
+
function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
|
|
2785
2902
|
if (disabled === void 0) { disabled = false; }
|
|
2786
2903
|
if (isSync === void 0) { isSync = false; }
|
|
2787
2904
|
function _wrapSetXhrProp(xhr, prop, value) {
|
|
@@ -2802,6 +2919,9 @@
|
|
|
2802
2919
|
if (withCredentials) {
|
|
2803
2920
|
_wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
|
|
2804
2921
|
}
|
|
2922
|
+
if (!isSync && timeout) {
|
|
2923
|
+
_wrapSetXhrProp(xhr, strTimeout, timeout);
|
|
2924
|
+
}
|
|
2805
2925
|
return xhr;
|
|
2806
2926
|
}
|
|
2807
2927
|
|