@microsoft/applicationinsights-web-basic 3.0.0-beta.2210-17 → 3.0.0-beta.2210-18
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/browser/aib.2.js +138 -129
- package/browser/aib.2.js.map +1 -1
- package/browser/aib.2.min.js +2 -2
- package/browser/aib.2.min.js.map +1 -1
- package/browser/aib.3.0.0-beta.2210-18.integrity.json +26 -0
- package/browser/{aib.3.0.0-beta.2210-17.js → aib.3.0.0-beta.2210-18.js} +139 -130
- package/browser/aib.3.0.0-beta.2210-18.js.map +1 -0
- package/browser/aib.3.0.0-beta.2210-18.min.js +6 -0
- package/browser/aib.3.0.0-beta.2210-18.min.js.map +1 -0
- package/dist/applicationinsights-web-basic.d.ts +1 -1
- package/dist/applicationinsights-web-basic.js +138 -129
- package/dist/applicationinsights-web-basic.js.map +1 -1
- package/dist/applicationinsights-web-basic.min.js +2 -2
- package/dist/applicationinsights-web-basic.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.rollup.d.ts +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/index.js +1 -1
- package/package.json +4 -4
- package/browser/aib.3.0.0-beta.2210-17.integrity.json +0 -26
- package/browser/aib.3.0.0-beta.2210-17.js.map +0 -1
- package/browser/aib.3.0.0-beta.2210-17.min.js +0 -6
- package/browser/aib.3.0.0-beta.2210-17.min.js.map +0 -1
package/browser/aib.2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2210-18
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
function _isObjectArrayOrFunctionPrototype(target) {
|
|
68
68
|
return _isObjectOrArrayPrototype(target) || target === Function[Prototype];
|
|
69
69
|
}
|
|
70
|
-
function _getObjProto
|
|
70
|
+
function _getObjProto(target) {
|
|
71
71
|
var newProto;
|
|
72
72
|
if (target) {
|
|
73
73
|
if (_objGetPrototypeOf) {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
_forEachProp(instFuncs, function (name) {
|
|
142
142
|
baseFuncs[name] = _instFuncProxy(thisTarget, instFuncs, name);
|
|
143
143
|
});
|
|
144
|
-
var baseProto = _getObjProto
|
|
144
|
+
var baseProto = _getObjProto(classProto);
|
|
145
145
|
var visited = [];
|
|
146
146
|
while (baseProto && !_isObjectArrayOrFunctionPrototype(baseProto) && !_hasVisited(visited, baseProto)) {
|
|
147
147
|
_forEachProp(baseProto, function (name) {
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
visited.push(baseProto);
|
|
153
|
-
baseProto = _getObjProto
|
|
153
|
+
baseProto = _getObjProto(baseProto);
|
|
154
154
|
}
|
|
155
155
|
return baseFuncs;
|
|
156
156
|
}
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
}
|
|
165
165
|
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
|
|
166
166
|
var canAddInst = !_hasOwnProperty(target, funcName);
|
|
167
|
-
var objProto = _getObjProto
|
|
167
|
+
var objProto = _getObjProto(target);
|
|
168
168
|
var visited = [];
|
|
169
169
|
while (canAddInst && objProto && !_isObjectArrayOrFunctionPrototype(objProto) && !_hasVisited(visited, objProto)) {
|
|
170
170
|
var protoFunc = objProto[funcName];
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
break;
|
|
174
174
|
}
|
|
175
175
|
visited.push(objProto);
|
|
176
|
-
objProto = _getObjProto
|
|
176
|
+
objProto = _getObjProto(objProto);
|
|
177
177
|
}
|
|
178
178
|
try {
|
|
179
179
|
if (canAddInst) {
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
function _getProtoFunc(funcName, proto, currentDynProtoProxy) {
|
|
192
192
|
var protoFunc = proto[funcName];
|
|
193
193
|
if (protoFunc === currentDynProtoProxy) {
|
|
194
|
-
protoFunc = _getObjProto
|
|
194
|
+
protoFunc = _getObjProto(proto)[funcName];
|
|
195
195
|
}
|
|
196
196
|
if (typeof protoFunc !== strFunction) {
|
|
197
197
|
_throwTypeError("[" + funcName + "] is not a " + strFunction);
|
|
@@ -227,13 +227,13 @@
|
|
|
227
227
|
function _checkPrototype(classProto, thisTarget) {
|
|
228
228
|
if (_objGetPrototypeOf) {
|
|
229
229
|
var visited = [];
|
|
230
|
-
var thisProto = _getObjProto
|
|
230
|
+
var thisProto = _getObjProto(thisTarget);
|
|
231
231
|
while (thisProto && !_isObjectArrayOrFunctionPrototype(thisProto) && !_hasVisited(visited, thisProto)) {
|
|
232
232
|
if (thisProto === classProto) {
|
|
233
233
|
return true;
|
|
234
234
|
}
|
|
235
235
|
visited.push(thisProto);
|
|
236
|
-
thisProto = _getObjProto
|
|
236
|
+
thisProto = _getObjProto(thisProto);
|
|
237
237
|
}
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
function objForEachKey
|
|
469
|
+
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
470
470
|
if (theObject && isObject(theObject)) {
|
|
471
471
|
for (var prop in theObject) {
|
|
472
472
|
if (objHasOwn(theObject, prop)) {
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
}
|
|
498
498
|
function objDeepFreeze(value) {
|
|
499
499
|
if (_objFreeze) {
|
|
500
|
-
objForEachKey
|
|
500
|
+
objForEachKey(value, function (key, value) {
|
|
501
501
|
if (isArray(value) || isObject(value)) {
|
|
502
502
|
_objFreeze(value);
|
|
503
503
|
}
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
|
|
511
511
|
function createEnum(values) {
|
|
512
512
|
var theEnum = {};
|
|
513
|
-
objForEachKey
|
|
513
|
+
objForEachKey(values, function (field, value) {
|
|
514
514
|
theEnum[field] = value;
|
|
515
515
|
theEnum[value] = field;
|
|
516
516
|
});
|
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
}
|
|
519
519
|
function createSimpleMap(values) {
|
|
520
520
|
var mapClass = {};
|
|
521
|
-
objForEachKey
|
|
521
|
+
objForEachKey(values, function (field, value) {
|
|
522
522
|
mapClass[field] = value[1];
|
|
523
523
|
mapClass[value[0]] = value[1];
|
|
524
524
|
});
|
|
@@ -588,7 +588,7 @@
|
|
|
588
588
|
d.__proto__ = b;
|
|
589
589
|
}) ||
|
|
590
590
|
function (d, b) {
|
|
591
|
-
objForEachKey
|
|
591
|
+
objForEachKey(b, function (key, value) {
|
|
592
592
|
d[key] = value;
|
|
593
593
|
});
|
|
594
594
|
};
|
|
@@ -838,10 +838,17 @@
|
|
|
838
838
|
|
|
839
839
|
var arrMap = _unwrapFunction("map");
|
|
840
840
|
|
|
841
|
+
function utcNow() {
|
|
842
|
+
return (Date.now || polyUtcNow)();
|
|
843
|
+
}
|
|
844
|
+
function polyUtcNow() {
|
|
845
|
+
return new Date().getTime();
|
|
846
|
+
}
|
|
847
|
+
|
|
841
848
|
var _fnToString$1;
|
|
842
849
|
var _objCtrFnString;
|
|
843
850
|
var _gblWindow;
|
|
844
|
-
function isPlainObject
|
|
851
|
+
function isPlainObject(value) {
|
|
845
852
|
if (!value || typeof value !== OBJECT) {
|
|
846
853
|
return false;
|
|
847
854
|
}
|
|
@@ -986,7 +993,7 @@
|
|
|
986
993
|
}
|
|
987
994
|
function plainObjDeepCopyHandler(details) {
|
|
988
995
|
var value = details.value;
|
|
989
|
-
if (isPlainObject
|
|
996
|
+
if (isPlainObject(value)) {
|
|
990
997
|
var target = details.result = {};
|
|
991
998
|
details.copyTo(target, value);
|
|
992
999
|
return true;
|
|
@@ -1009,6 +1016,9 @@
|
|
|
1009
1016
|
}
|
|
1010
1017
|
|
|
1011
1018
|
var strSubstring = _unwrapFunction("substring");
|
|
1019
|
+
function strLeft(value, count) {
|
|
1020
|
+
return strSubstring(value, 0, count);
|
|
1021
|
+
}
|
|
1012
1022
|
|
|
1013
1023
|
var ENDS_WITH = "endsWith";
|
|
1014
1024
|
var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;
|
|
@@ -1079,11 +1089,10 @@
|
|
|
1079
1089
|
var _DYN_CONFIGURABLE = "configurable";
|
|
1080
1090
|
var _DYN_ENUMERABLE = "enumerable";
|
|
1081
1091
|
var _DYN_APPLY = "apply";
|
|
1082
|
-
var _DYN_INDEX_OF$1 = "indexOf";
|
|
1083
1092
|
var _DYN_PUSH$1 = "push";
|
|
1093
|
+
var _DYN_SPLICE = "splice";
|
|
1084
1094
|
var _DYN_INITIALIZE$1 = "initialize";
|
|
1085
1095
|
var _DYN_IDENTIFIER = "identifier";
|
|
1086
|
-
var _DYN_SPLICE = "splice";
|
|
1087
1096
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
1088
1097
|
var _DYN_NAME$2 = "name";
|
|
1089
1098
|
var _DYN_TIME = "time";
|
|
@@ -1110,7 +1119,6 @@
|
|
|
1110
1119
|
var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
1111
1120
|
var _DYN_CREATE_NEW = "createNew";
|
|
1112
1121
|
var _DYN_CONFIG = "config";
|
|
1113
|
-
var _DYN_SUBSTRING$1 = "substring";
|
|
1114
1122
|
var _DYN_USER_AGENT = "userAgent";
|
|
1115
1123
|
var _DYN_SPLIT$1 = "split";
|
|
1116
1124
|
var _DYN_NODE_TYPE = "nodeType";
|
|
@@ -1167,14 +1175,11 @@
|
|
|
1167
1175
|
var STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
|
|
1168
1176
|
|
|
1169
1177
|
var strToString = "toString";
|
|
1170
|
-
var strGetPrototypeOf = "getPrototypeOf";
|
|
1171
|
-
var strConstructor = "constructor";
|
|
1172
1178
|
var _fnToString = ObjClass$1[strToString];
|
|
1173
|
-
|
|
1179
|
+
_fnToString[_DYN_CALL ](ObjClass$1);
|
|
1174
1180
|
var rCamelCase = /-([a-z])/g;
|
|
1175
1181
|
var rNormalizeInvalid = /([^\w\d_$])/g;
|
|
1176
1182
|
var rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
1177
|
-
var _getObjProto = Object[strGetPrototypeOf];
|
|
1178
1183
|
function isNotNullOrUndefined(value) {
|
|
1179
1184
|
return !isNullOrUndefined(value);
|
|
1180
1185
|
}
|
|
@@ -1191,36 +1196,15 @@
|
|
|
1191
1196
|
}
|
|
1192
1197
|
return value;
|
|
1193
1198
|
}
|
|
1194
|
-
var objForEachKey = objForEachKey$1;
|
|
1195
1199
|
function strContains(value, search) {
|
|
1196
1200
|
if (value && search) {
|
|
1197
1201
|
return strIndexOf(value, search) !== -1;
|
|
1198
1202
|
}
|
|
1199
1203
|
return false;
|
|
1200
1204
|
}
|
|
1201
|
-
function isPlainObject(value) {
|
|
1202
|
-
var result = false;
|
|
1203
|
-
if (value && typeof value === "object") {
|
|
1204
|
-
var proto = _getObjProto(value);
|
|
1205
|
-
if (!proto) {
|
|
1206
|
-
result = true;
|
|
1207
|
-
}
|
|
1208
|
-
else {
|
|
1209
|
-
if (proto[strConstructor] && objHasOwnProperty(proto, strConstructor)) {
|
|
1210
|
-
proto = proto[strConstructor];
|
|
1211
|
-
}
|
|
1212
|
-
result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
return result;
|
|
1216
|
-
}
|
|
1217
1205
|
function toISOString(date) {
|
|
1218
1206
|
return date && date.toISOString() || "";
|
|
1219
1207
|
}
|
|
1220
|
-
function dateNow() {
|
|
1221
|
-
var dt = Date;
|
|
1222
|
-
return dt.now ? dt.now() : new dt().getTime();
|
|
1223
|
-
}
|
|
1224
1208
|
function getExceptionName(object) {
|
|
1225
1209
|
if (isError(object)) {
|
|
1226
1210
|
return object[_DYN_NAME$2 ];
|
|
@@ -1506,7 +1490,7 @@
|
|
|
1506
1490
|
}
|
|
1507
1491
|
function _autoSeedMwc() {
|
|
1508
1492
|
try {
|
|
1509
|
-
var now =
|
|
1493
|
+
var now = utcNow() & 0x7fffffff;
|
|
1510
1494
|
_mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
|
|
1511
1495
|
}
|
|
1512
1496
|
catch (e) {
|
|
@@ -1560,7 +1544,7 @@
|
|
|
1560
1544
|
}
|
|
1561
1545
|
|
|
1562
1546
|
var _objDefineProperty = ObjDefineProperty;
|
|
1563
|
-
var version = "3.0.0-beta.2210-
|
|
1547
|
+
var version = "3.0.0-beta.2210-18";
|
|
1564
1548
|
var instanceName = "." + newId(6);
|
|
1565
1549
|
var _dataUid = 0;
|
|
1566
1550
|
function _createAccessor(target, prop, value) {
|
|
@@ -1645,7 +1629,7 @@
|
|
|
1645
1629
|
target_1 = {};
|
|
1646
1630
|
}
|
|
1647
1631
|
if (target_1) {
|
|
1648
|
-
objForEachKey
|
|
1632
|
+
objForEachKey(source, function (key, value) {
|
|
1649
1633
|
target_1[key] = _cfgDeepCopy(value);
|
|
1650
1634
|
});
|
|
1651
1635
|
return target_1;
|
|
@@ -1760,9 +1744,18 @@
|
|
|
1760
1744
|
var detail = {
|
|
1761
1745
|
n: name,
|
|
1762
1746
|
h: [],
|
|
1763
|
-
|
|
1764
|
-
if (handler && handler.fn
|
|
1765
|
-
detail.h
|
|
1747
|
+
trk: function (handler) {
|
|
1748
|
+
if (handler && handler.fn) {
|
|
1749
|
+
if (arrIndexOf(detail.h, handler) === -1) {
|
|
1750
|
+
detail.h[_DYN_PUSH$1 ](handler);
|
|
1751
|
+
}
|
|
1752
|
+
state.trk(handler, detail);
|
|
1753
|
+
}
|
|
1754
|
+
},
|
|
1755
|
+
clr: function (handler) {
|
|
1756
|
+
var idx = arrIndexOf(detail.h, handler);
|
|
1757
|
+
if (idx !== -1) {
|
|
1758
|
+
detail.h[_DYN_SPLICE ](idx, 1);
|
|
1766
1759
|
}
|
|
1767
1760
|
}
|
|
1768
1761
|
};
|
|
@@ -1776,25 +1769,28 @@
|
|
|
1776
1769
|
}
|
|
1777
1770
|
var activeHandler = state.act;
|
|
1778
1771
|
if (activeHandler) {
|
|
1779
|
-
detail.
|
|
1772
|
+
detail.trk(activeHandler);
|
|
1780
1773
|
}
|
|
1781
1774
|
return value;
|
|
1782
1775
|
}
|
|
1783
|
-
_getProperty[state.prop] =
|
|
1776
|
+
_getProperty[state.prop] = {
|
|
1777
|
+
chng: function () {
|
|
1778
|
+
state.add(detail);
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1784
1781
|
function _setProperty(newValue) {
|
|
1785
1782
|
if (value !== newValue) {
|
|
1786
1783
|
if (!!_setProperty[state.ro] && state.upd) {
|
|
1787
1784
|
throwInvalidAccess("[" + name + "] is sealed from " + dumpObj(theConfig));
|
|
1788
1785
|
}
|
|
1789
1786
|
if (value && value[CFG_HANDLER_LINK]) {
|
|
1790
|
-
if (isPlainObject(value)) {
|
|
1791
|
-
objForEachKey
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
value[idx] = UNDEFINED_VALUE$1;
|
|
1787
|
+
if (isPlainObject(value) || isArray(value)) {
|
|
1788
|
+
objForEachKey(value, function (key) {
|
|
1789
|
+
var propDesc = objGetOwnPropertyDescriptor(value, key);
|
|
1790
|
+
if (propDesc && propDesc.get) {
|
|
1791
|
+
var valueState = propDesc.get[state.prop];
|
|
1792
|
+
valueState && valueState.chng();
|
|
1793
|
+
}
|
|
1798
1794
|
});
|
|
1799
1795
|
}
|
|
1800
1796
|
}
|
|
@@ -1826,7 +1822,7 @@
|
|
|
1826
1822
|
}
|
|
1827
1823
|
function _makeDynamicObject(state, target ) {
|
|
1828
1824
|
var _a;
|
|
1829
|
-
objForEachKey
|
|
1825
|
+
objForEachKey( target, function (key, value) {
|
|
1830
1826
|
_setDynamicProperty(state, target, key, value);
|
|
1831
1827
|
});
|
|
1832
1828
|
if (!target[CFG_HANDLER_LINK]) {
|
|
@@ -1844,19 +1840,10 @@
|
|
|
1844
1840
|
|
|
1845
1841
|
var symPrefix = "[[ai_";
|
|
1846
1842
|
var symPostfix = "]]";
|
|
1847
|
-
function _insertWatcher(watchers, theDetail) {
|
|
1848
|
-
if (theDetail && theDetail.h && theDetail.h[_DYN_LENGTH$2 ] > 0) {
|
|
1849
|
-
arrForEach(theDetail.h, function (handler) {
|
|
1850
|
-
if (handler && handler.fn && watchers[_DYN_INDEX_OF$1 ](handler) === -1) {
|
|
1851
|
-
watchers[_DYN_PUSH$1 ](handler);
|
|
1852
|
-
}
|
|
1853
|
-
});
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
1843
|
function _createState(cfgHandler) {
|
|
1857
|
-
var _a;
|
|
1858
1844
|
var dynamicPropertySymbol = newSymbol(symPrefix + "get" + cfgHandler.uid + symPostfix);
|
|
1859
1845
|
var dynamicPropertyReadOnly = newSymbol(symPrefix + "ro" + cfgHandler.uid + symPostfix);
|
|
1846
|
+
var dynamicPropertyDetail = newSymbol(symPrefix + "dtl" + cfgHandler.uid + symPostfix);
|
|
1860
1847
|
var _waitingHandlers = null;
|
|
1861
1848
|
var _watcherTimer = null;
|
|
1862
1849
|
var theState;
|
|
@@ -1864,6 +1851,12 @@
|
|
|
1864
1851
|
var prevWatcher = theState.act;
|
|
1865
1852
|
try {
|
|
1866
1853
|
theState.act = activeHandler;
|
|
1854
|
+
if (activeHandler && activeHandler[dynamicPropertyDetail]) {
|
|
1855
|
+
arrForEach(activeHandler[dynamicPropertyDetail], function (detail) {
|
|
1856
|
+
detail.clr(activeHandler);
|
|
1857
|
+
});
|
|
1858
|
+
activeHandler[dynamicPropertyDetail] = [];
|
|
1859
|
+
}
|
|
1867
1860
|
callback({
|
|
1868
1861
|
cfg: cfgHandler.cfg,
|
|
1869
1862
|
set: cfgHandler.set.bind(cfgHandler),
|
|
@@ -1873,7 +1866,7 @@
|
|
|
1873
1866
|
catch (e) {
|
|
1874
1867
|
var logger = cfgHandler[_DYN_LOGGER ];
|
|
1875
1868
|
if (logger) {
|
|
1876
|
-
logger[_DYN_THROW_INTERNAL ](1 , 107 ,
|
|
1869
|
+
logger[_DYN_THROW_INTERNAL ](1 , 107 , dumpObj(e));
|
|
1877
1870
|
}
|
|
1878
1871
|
throw e;
|
|
1879
1872
|
}
|
|
@@ -1885,18 +1878,24 @@
|
|
|
1885
1878
|
if (_waitingHandlers) {
|
|
1886
1879
|
var notifyHandlers = _waitingHandlers;
|
|
1887
1880
|
_waitingHandlers = null;
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
_watcherTimer = null;
|
|
1891
|
-
}
|
|
1881
|
+
_watcherTimer && _watcherTimer.cancel();
|
|
1882
|
+
_watcherTimer = null;
|
|
1892
1883
|
var watcherFailures_1 = [];
|
|
1893
1884
|
arrForEach(notifyHandlers, function (handler) {
|
|
1894
|
-
if (handler
|
|
1895
|
-
|
|
1896
|
-
|
|
1885
|
+
if (handler) {
|
|
1886
|
+
if (handler[dynamicPropertyDetail]) {
|
|
1887
|
+
arrForEach(handler[dynamicPropertyDetail], function (detail) {
|
|
1888
|
+
detail.clr(handler);
|
|
1889
|
+
});
|
|
1890
|
+
handler[dynamicPropertyDetail] = null;
|
|
1897
1891
|
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1892
|
+
if (handler.fn) {
|
|
1893
|
+
try {
|
|
1894
|
+
_useHandler(handler, handler.fn);
|
|
1895
|
+
}
|
|
1896
|
+
catch (e) {
|
|
1897
|
+
watcherFailures_1[_DYN_PUSH$1 ](e);
|
|
1898
|
+
}
|
|
1900
1899
|
}
|
|
1901
1900
|
}
|
|
1902
1901
|
});
|
|
@@ -1909,7 +1908,7 @@
|
|
|
1909
1908
|
}
|
|
1910
1909
|
}
|
|
1911
1910
|
if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
|
|
1912
|
-
throwAggregationError("
|
|
1911
|
+
throwAggregationError("Watcher error(s): ", watcherFailures_1);
|
|
1913
1912
|
}
|
|
1914
1913
|
}
|
|
1915
1914
|
}
|
|
@@ -1924,18 +1923,31 @@
|
|
|
1924
1923
|
_notifyWatchers();
|
|
1925
1924
|
}, 0);
|
|
1926
1925
|
}
|
|
1927
|
-
|
|
1926
|
+
for (var idx = 0; idx < detail.h[_DYN_LENGTH$2 ]; idx++) {
|
|
1927
|
+
var handler = detail.h[idx];
|
|
1928
|
+
if (handler && arrIndexOf(_waitingHandlers, handler) === -1) {
|
|
1929
|
+
_waitingHandlers[_DYN_PUSH$1 ](handler);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1928
1932
|
}
|
|
1929
1933
|
}
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1934
|
+
function _trackHandler(handler, detail) {
|
|
1935
|
+
if (handler) {
|
|
1936
|
+
var details = handler[dynamicPropertyDetail] = handler[dynamicPropertyDetail] || [];
|
|
1937
|
+
if (arrIndexOf(details, detail) === -1) {
|
|
1938
|
+
details[_DYN_PUSH$1 ](detail);
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
theState = {
|
|
1943
|
+
prop: dynamicPropertySymbol,
|
|
1944
|
+
ro: dynamicPropertyReadOnly,
|
|
1945
|
+
hdlr: cfgHandler,
|
|
1946
|
+
add: _addWatcher,
|
|
1947
|
+
notify: _notifyWatchers,
|
|
1948
|
+
use: _useHandler,
|
|
1949
|
+
trk: _trackHandler
|
|
1950
|
+
};
|
|
1939
1951
|
return theState;
|
|
1940
1952
|
}
|
|
1941
1953
|
|
|
@@ -2026,7 +2038,7 @@
|
|
|
2026
2038
|
createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
|
|
2027
2039
|
}
|
|
2028
2040
|
|
|
2029
|
-
var listenerFuncs = [
|
|
2041
|
+
var listenerFuncs = [STR_EVENTS_SENT, STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_PERF_EVENT];
|
|
2030
2042
|
var _aiNamespace = null;
|
|
2031
2043
|
var _debugListener;
|
|
2032
2044
|
function _listenerProxyFunc(name, config) {
|
|
@@ -2246,7 +2258,7 @@
|
|
|
2246
2258
|
var PerfEvent = /** @class */ (function () {
|
|
2247
2259
|
function PerfEvent(name, payloadDetails, isAsync) {
|
|
2248
2260
|
var _self = this;
|
|
2249
|
-
_self.start =
|
|
2261
|
+
_self.start = utcNow();
|
|
2250
2262
|
_self[_DYN_NAME$2 ] = name;
|
|
2251
2263
|
_self[_DYN_IS_ASYNC ] = isAsync;
|
|
2252
2264
|
_self[_DYN_IS_CHILD_EVT ] = function () { return false; };
|
|
@@ -2297,7 +2309,7 @@
|
|
|
2297
2309
|
}
|
|
2298
2310
|
}
|
|
2299
2311
|
}
|
|
2300
|
-
_self[_DYN_TIME ] =
|
|
2312
|
+
_self[_DYN_TIME ] = utcNow() - _self.start;
|
|
2301
2313
|
_self.exTime = _self[_DYN_TIME ] - childTime;
|
|
2302
2314
|
_self[_DYN_COMPLETE ] = function () { };
|
|
2303
2315
|
};
|
|
@@ -2583,7 +2595,7 @@
|
|
|
2583
2595
|
if (!extCfg && createIfMissing) {
|
|
2584
2596
|
extCfg = {};
|
|
2585
2597
|
}
|
|
2586
|
-
dynamicHandler.set(cfg,
|
|
2598
|
+
dynamicHandler.set(cfg, STR_EXTENSION_CONFIG, extCfg);
|
|
2587
2599
|
extCfg = cfg[STR_EXTENSION_CONFIG ];
|
|
2588
2600
|
if (extCfg) {
|
|
2589
2601
|
idCfg = extCfg[identifier];
|
|
@@ -2990,10 +3002,8 @@
|
|
|
2990
3002
|
function doCallback() {
|
|
2991
3003
|
waiting--;
|
|
2992
3004
|
if (doneIterating && waiting === 0) {
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
cbTimer = null;
|
|
2996
|
-
}
|
|
3005
|
+
cbTimer && cbTimer.cancel();
|
|
3006
|
+
cbTimer = null;
|
|
2997
3007
|
callBack && callBack(doneIterating);
|
|
2998
3008
|
callBack = null;
|
|
2999
3009
|
}
|
|
@@ -3009,7 +3019,7 @@
|
|
|
3009
3019
|
}, sendReason)) {
|
|
3010
3020
|
if (!handled_1) {
|
|
3011
3021
|
if (isAsync && cbTimer == null) {
|
|
3012
|
-
cbTimer =
|
|
3022
|
+
cbTimer = scheduleTimeout(function () {
|
|
3013
3023
|
cbTimer = null;
|
|
3014
3024
|
doCallback();
|
|
3015
3025
|
}, cbTimeout);
|
|
@@ -3084,13 +3094,13 @@
|
|
|
3084
3094
|
}
|
|
3085
3095
|
function _isIgnoredCookie(cookieMgrCfg, name) {
|
|
3086
3096
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
|
|
3087
|
-
return cookieMgrCfg.ignoreCookies
|
|
3097
|
+
return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;
|
|
3088
3098
|
}
|
|
3089
3099
|
return false;
|
|
3090
3100
|
}
|
|
3091
3101
|
function _isBlockedCookie(cookieMgrCfg, name) {
|
|
3092
3102
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
|
|
3093
|
-
if (cookieMgrCfg.blockedCookies
|
|
3103
|
+
if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {
|
|
3094
3104
|
return true;
|
|
3095
3105
|
}
|
|
3096
3106
|
}
|
|
@@ -3143,16 +3153,16 @@
|
|
|
3143
3153
|
if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
|
|
3144
3154
|
var values = {};
|
|
3145
3155
|
var theValue = strTrim(value || STR_EMPTY);
|
|
3146
|
-
var idx = theValue
|
|
3156
|
+
var idx = strIndexOf(theValue, ";");
|
|
3147
3157
|
if (idx !== -1) {
|
|
3148
|
-
theValue = strTrim(value
|
|
3149
|
-
values = _extractParts(value
|
|
3158
|
+
theValue = strTrim(strLeft(value, idx));
|
|
3159
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
3150
3160
|
}
|
|
3151
3161
|
setValue(values, STR_DOMAIN, domain || _domain, isTruthy, isUndefined);
|
|
3152
3162
|
if (!isNullOrUndefined(maxAgeSec)) {
|
|
3153
3163
|
var _isIE = isIE();
|
|
3154
3164
|
if (isUndefined(values[strExpires])) {
|
|
3155
|
-
var nowMs =
|
|
3165
|
+
var nowMs = utcNow();
|
|
3156
3166
|
var expireMs = nowMs + (maxAgeSec * 1000);
|
|
3157
3167
|
if (expireMs > 0) {
|
|
3158
3168
|
var expiry = new Date();
|
|
@@ -3234,12 +3244,12 @@
|
|
|
3234
3244
|
arrForEach(parts, function (thePart) {
|
|
3235
3245
|
thePart = strTrim(thePart || STR_EMPTY);
|
|
3236
3246
|
if (thePart) {
|
|
3237
|
-
var idx = thePart
|
|
3247
|
+
var idx = strIndexOf(thePart, "=");
|
|
3238
3248
|
if (idx === -1) {
|
|
3239
3249
|
values[thePart] = null;
|
|
3240
3250
|
}
|
|
3241
3251
|
else {
|
|
3242
|
-
values[strTrim(thePart
|
|
3252
|
+
values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));
|
|
3243
3253
|
}
|
|
3244
3254
|
}
|
|
3245
3255
|
});
|
|
@@ -3254,7 +3264,7 @@
|
|
|
3254
3264
|
}
|
|
3255
3265
|
function _formatCookieValue(value, values) {
|
|
3256
3266
|
var cookieValue = value || STR_EMPTY;
|
|
3257
|
-
objForEachKey
|
|
3267
|
+
objForEachKey(values, function (name, theValue) {
|
|
3258
3268
|
cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : STR_EMPTY);
|
|
3259
3269
|
});
|
|
3260
3270
|
return cookieValue;
|
|
@@ -3308,7 +3318,7 @@
|
|
|
3308
3318
|
arrForEach(listeners, function (listener) {
|
|
3309
3319
|
if (listener && listener[name]) {
|
|
3310
3320
|
if (isAsync) {
|
|
3311
|
-
|
|
3321
|
+
scheduleTimeout(function () { return callback(listener); }, 0);
|
|
3312
3322
|
}
|
|
3313
3323
|
else {
|
|
3314
3324
|
try {
|
|
@@ -3359,7 +3369,7 @@
|
|
|
3359
3369
|
if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT ]()) {
|
|
3360
3370
|
_runListeners(_self[_DYN_LISTENERS ], STR_PERF_EVENT, false, function (listener) {
|
|
3361
3371
|
if (perfEvent[_DYN_IS_ASYNC ]) {
|
|
3362
|
-
|
|
3372
|
+
scheduleTimeout(function () { return listener[STR_PERF_EVENT ](perfEvent); }, 0);
|
|
3363
3373
|
}
|
|
3364
3374
|
else {
|
|
3365
3375
|
listener[STR_PERF_EVENT ](perfEvent);
|
|
@@ -4489,7 +4499,6 @@
|
|
|
4489
4499
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
4490
4500
|
var _DYN_NAME$1 = "name";
|
|
4491
4501
|
var _DYN_PATHNAME = "pathname";
|
|
4492
|
-
var _DYN_INDEX_OF = "indexOf";
|
|
4493
4502
|
var _DYN_EXCEPTIONS = "exceptions";
|
|
4494
4503
|
var _DYN_PARSED_STACK = "parsedStack";
|
|
4495
4504
|
var _DYN_PROPERTIES = "properties";
|
|
@@ -4577,7 +4586,7 @@
|
|
|
4577
4586
|
function dataSanitizeProperties(logger, properties) {
|
|
4578
4587
|
if (properties) {
|
|
4579
4588
|
var tempProps_1 = {};
|
|
4580
|
-
objForEachKey
|
|
4589
|
+
objForEachKey(properties, function (prop, value) {
|
|
4581
4590
|
if (isObject(value) && hasJSON()) {
|
|
4582
4591
|
try {
|
|
4583
4592
|
value = getJSON()[_DYN_STRINGIFY$1 ](value);
|
|
@@ -4597,7 +4606,7 @@
|
|
|
4597
4606
|
function dataSanitizeMeasurements(logger, measurements) {
|
|
4598
4607
|
if (measurements) {
|
|
4599
4608
|
var tempMeasurements_1 = {};
|
|
4600
|
-
objForEachKey
|
|
4609
|
+
objForEachKey(measurements, function (measure, value) {
|
|
4601
4610
|
measure = dataSanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements_1);
|
|
4602
4611
|
tempMeasurements_1[measure] = value;
|
|
4603
4612
|
});
|
|
@@ -4798,7 +4807,7 @@
|
|
|
4798
4807
|
evtMessage = evtMessage + " @" + (theEvent["filename"] || "") + ":" + (theEvent["lineno"] || "?") + ":" + (theEvent["colno"] || "?");
|
|
4799
4808
|
}
|
|
4800
4809
|
}
|
|
4801
|
-
if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && (evtMessage || ""
|
|
4810
|
+
if (errorType && errorType !== "String" && errorType !== "Object" && errorType !== "Error" && strIndexOf(evtMessage || "", errorType) === -1) {
|
|
4802
4811
|
evtMessage = errorType + ": " + evtMessage;
|
|
4803
4812
|
}
|
|
4804
4813
|
return evtMessage || "";
|
|
@@ -4991,7 +5000,7 @@
|
|
|
4991
5000
|
}
|
|
4992
5001
|
result = _stringify(errorObj, true);
|
|
4993
5002
|
}
|
|
4994
|
-
if (result
|
|
5003
|
+
if (strIndexOf(result, errorType) !== 0 && errorType !== "String") {
|
|
4995
5004
|
return errorType + ":" + result;
|
|
4996
5005
|
}
|
|
4997
5006
|
return result;
|
|
@@ -5696,12 +5705,12 @@
|
|
|
5696
5705
|
var tgs = {};
|
|
5697
5706
|
for (var i = itmTags[_DYN_LENGTH ] - 1; i >= 0; i--) {
|
|
5698
5707
|
var tg = itmTags[i];
|
|
5699
|
-
objForEachKey
|
|
5708
|
+
objForEachKey(tg, function (key, value) {
|
|
5700
5709
|
tgs[key] = value;
|
|
5701
5710
|
});
|
|
5702
5711
|
itmTags.splice(i, 1);
|
|
5703
5712
|
}
|
|
5704
|
-
objForEachKey
|
|
5713
|
+
objForEachKey(itmTags, function (tg, value) {
|
|
5705
5714
|
tgs[tg] = value;
|
|
5706
5715
|
});
|
|
5707
5716
|
var theTags = __assignFn(__assignFn({}, envTags), tgs);
|
|
@@ -5712,7 +5721,7 @@
|
|
|
5712
5721
|
}
|
|
5713
5722
|
function _extractPropsAndMeasurements(data, properties, measurements) {
|
|
5714
5723
|
if (!isNullOrUndefined(data)) {
|
|
5715
|
-
objForEachKey
|
|
5724
|
+
objForEachKey(data, function (key, value) {
|
|
5716
5725
|
if (isNumber(value)) {
|
|
5717
5726
|
measurements[key] = value;
|
|
5718
5727
|
}
|
|
@@ -5727,7 +5736,7 @@
|
|
|
5727
5736
|
}
|
|
5728
5737
|
function _convertPropsUndefinedToCustomDefinedValue(properties, customUndefinedValue) {
|
|
5729
5738
|
if (!isNullOrUndefined(properties)) {
|
|
5730
|
-
objForEachKey
|
|
5739
|
+
objForEachKey(properties, function (key, value) {
|
|
5731
5740
|
properties[key] = value || customUndefinedValue;
|
|
5732
5741
|
});
|
|
5733
5742
|
}
|
|
@@ -5751,7 +5760,7 @@
|
|
|
5751
5760
|
}
|
|
5752
5761
|
}
|
|
5753
5762
|
var EnvelopeCreator = {
|
|
5754
|
-
Version: "3.0.0-beta.2210-
|
|
5763
|
+
Version: "3.0.0-beta.2210-18"
|
|
5755
5764
|
};
|
|
5756
5765
|
function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
|
|
5757
5766
|
EnvelopeCreatorInit(logger, telemetryItem);
|
|
@@ -5858,7 +5867,7 @@
|
|
|
5858
5867
|
}
|
|
5859
5868
|
if (!isNullOrUndefined(bd[strProperties])) {
|
|
5860
5869
|
var pageTags = bd[strProperties];
|
|
5861
|
-
objForEachKey
|
|
5870
|
+
objForEachKey(pageTags, function (key, value) {
|
|
5862
5871
|
properties[key] = value;
|
|
5863
5872
|
});
|
|
5864
5873
|
}
|
|
@@ -6195,7 +6204,7 @@
|
|
|
6195
6204
|
return output;
|
|
6196
6205
|
}
|
|
6197
6206
|
source[circularReferenceCheck] = true;
|
|
6198
|
-
objForEachKey
|
|
6207
|
+
objForEachKey(source.aiDataContract, function (field, contract) {
|
|
6199
6208
|
var isRequired = (isFunction(contract)) ? (contract() & 1 ) : (contract & 1 );
|
|
6200
6209
|
var isHidden = (isFunction(contract)) ? (contract() & 4 ) : (contract & 4 );
|
|
6201
6210
|
var isArray = contract & 2 ;
|
|
@@ -6246,7 +6255,7 @@
|
|
|
6246
6255
|
var output;
|
|
6247
6256
|
if (map) {
|
|
6248
6257
|
output = {};
|
|
6249
|
-
objForEachKey
|
|
6258
|
+
objForEachKey(map, function (field, value) {
|
|
6250
6259
|
if (expectedType === "string") {
|
|
6251
6260
|
if (value === undefined) {
|
|
6252
6261
|
output[field] = "undefined";
|
|
@@ -7000,21 +7009,21 @@
|
|
|
7000
7009
|
backOffDelay = linearFactor * backOffDelay;
|
|
7001
7010
|
delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);
|
|
7002
7011
|
}
|
|
7003
|
-
var retryAfterTimeSpan =
|
|
7012
|
+
var retryAfterTimeSpan = utcNow() + (delayInSeconds * 1000);
|
|
7004
7013
|
_retryAt = retryAfterTimeSpan;
|
|
7005
7014
|
}
|
|
7006
7015
|
function _setupTimer() {
|
|
7007
7016
|
if (!_timeoutHandle && !_paused) {
|
|
7008
|
-
var retryInterval = _retryAt ? Math.max(0, _retryAt -
|
|
7017
|
+
var retryInterval = _retryAt ? Math.max(0, _retryAt - utcNow()) : 0;
|
|
7009
7018
|
var timerValue = Math.max(_maxBatchInterval, retryInterval);
|
|
7010
|
-
_timeoutHandle =
|
|
7019
|
+
_timeoutHandle = scheduleTimeout(function () {
|
|
7011
7020
|
_timeoutHandle = null;
|
|
7012
7021
|
_self[_DYN_TRIGGER_SEND ](true, null, 1 );
|
|
7013
7022
|
}, timerValue);
|
|
7014
7023
|
}
|
|
7015
7024
|
}
|
|
7016
7025
|
function _clearScheduledTimer() {
|
|
7017
|
-
|
|
7026
|
+
_timeoutHandle && _timeoutHandle.cancel();
|
|
7018
7027
|
_timeoutHandle = null;
|
|
7019
7028
|
_retryAt = null;
|
|
7020
7029
|
}
|