@microsoft/applicationinsights-react-js 3.3.0-beta.2203-01 → 3.3.0-beta.2203-02

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.3.0-beta.2203-01
2
+ * Application Insights JavaScript SDK - React Plugin, 3.3.0-beta.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -358,99 +358,14 @@
358
358
  };
359
359
  dynamicProto[DynProtoDefaultOptions] = perfDefaults;
360
360
 
361
- var LoggingSeverity;
362
- (function (LoggingSeverity) {
363
- LoggingSeverity[LoggingSeverity["CRITICAL"] = 1] = "CRITICAL";
364
- LoggingSeverity[LoggingSeverity["WARNING"] = 2] = "WARNING";
365
- })(LoggingSeverity || (LoggingSeverity = {}));
366
- var _InternalMessageId = {
367
- BrowserDoesNotSupportLocalStorage: 0,
368
- BrowserCannotReadLocalStorage: 1,
369
- BrowserCannotReadSessionStorage: 2,
370
- BrowserCannotWriteLocalStorage: 3,
371
- BrowserCannotWriteSessionStorage: 4,
372
- BrowserFailedRemovalFromLocalStorage: 5,
373
- BrowserFailedRemovalFromSessionStorage: 6,
374
- CannotSendEmptyTelemetry: 7,
375
- ClientPerformanceMathError: 8,
376
- ErrorParsingAISessionCookie: 9,
377
- ErrorPVCalc: 10,
378
- ExceptionWhileLoggingError: 11,
379
- FailedAddingTelemetryToBuffer: 12,
380
- FailedMonitorAjaxAbort: 13,
381
- FailedMonitorAjaxDur: 14,
382
- FailedMonitorAjaxOpen: 15,
383
- FailedMonitorAjaxRSC: 16,
384
- FailedMonitorAjaxSend: 17,
385
- FailedMonitorAjaxGetCorrelationHeader: 18,
386
- FailedToAddHandlerForOnBeforeUnload: 19,
387
- FailedToSendQueuedTelemetry: 20,
388
- FailedToReportDataLoss: 21,
389
- FlushFailed: 22,
390
- MessageLimitPerPVExceeded: 23,
391
- MissingRequiredFieldSpecification: 24,
392
- NavigationTimingNotSupported: 25,
393
- OnError: 26,
394
- SessionRenewalDateIsZero: 27,
395
- SenderNotInitialized: 28,
396
- StartTrackEventFailed: 29,
397
- StopTrackEventFailed: 30,
398
- StartTrackFailed: 31,
399
- StopTrackFailed: 32,
400
- TelemetrySampledAndNotSent: 33,
401
- TrackEventFailed: 34,
402
- TrackExceptionFailed: 35,
403
- TrackMetricFailed: 36,
404
- TrackPVFailed: 37,
405
- TrackPVFailedCalc: 38,
406
- TrackTraceFailed: 39,
407
- TransmissionFailed: 40,
408
- FailedToSetStorageBuffer: 41,
409
- FailedToRestoreStorageBuffer: 42,
410
- InvalidBackendResponse: 43,
411
- FailedToFixDepricatedValues: 44,
412
- InvalidDurationValue: 45,
413
- TelemetryEnvelopeInvalid: 46,
414
- CreateEnvelopeError: 47,
415
- CannotSerializeObject: 48,
416
- CannotSerializeObjectNonSerializable: 49,
417
- CircularReferenceDetected: 50,
418
- ClearAuthContextFailed: 51,
419
- ExceptionTruncated: 52,
420
- IllegalCharsInName: 53,
421
- ItemNotInArray: 54,
422
- MaxAjaxPerPVExceeded: 55,
423
- MessageTruncated: 56,
424
- NameTooLong: 57,
425
- SampleRateOutOfRange: 58,
426
- SetAuthContextFailed: 59,
427
- SetAuthContextFailedAccountName: 60,
428
- StringValueTooLong: 61,
429
- StartCalledMoreThanOnce: 62,
430
- StopCalledWithoutStart: 63,
431
- TelemetryInitializerFailed: 64,
432
- TrackArgumentsNotSpecified: 65,
433
- UrlTooLong: 66,
434
- SessionStorageBufferFull: 67,
435
- CannotAccessCookie: 68,
436
- IdTooLong: 69,
437
- InvalidEvent: 70,
438
- FailedMonitorAjaxSetRequestHeader: 71,
439
- SendBrowserInfoOnUserInit: 72,
440
- PluginException: 73,
441
- NotificationException: 74,
442
- SnippetScriptLoadFailure: 99,
443
- InvalidInstrumentationKey: 100,
444
- CannotParseAiBlobValue: 101,
445
- InvalidContentBlob: 102,
446
- TrackPageActionEventFailed: 103,
447
- FailedAddingCustomDefinedRequestContext: 104,
448
- InMemoryStorageBufferFull: 105
449
- };
361
+ var strEmpty = "";
362
+ var strSetNextPlugin = "setNextPlugin";
363
+ var strIsInitialized = "isInitialized";
364
+ var strTeardown = "teardown";
365
+ var strCore = "core";
366
+ var strDisabled = "disabled";
367
+ var strDoTeardown = "_doTeardown";
450
368
 
451
- var strOnPrefix = "on";
452
- var strAttachEvent = "attachEvent";
453
- var strAddEventHelper = "addEventListener";
454
369
  var strToISOString = "toISOString";
455
370
  var cStrEndsWith = "endsWith";
456
371
  var strIndexOf = "indexOf";
@@ -460,7 +375,7 @@
460
375
  var strToString = "toString";
461
376
  var str__Proto = "__proto__";
462
377
  var strConstructor = "constructor";
463
- var _objDefineProperty = ObjDefineProperty;
378
+ var _objDefineProperty$1 = ObjDefineProperty;
464
379
  var _objFreeze = ObjClass.freeze;
465
380
  var _objKeys = ObjClass.keys;
466
381
  var StringProto = String[strShimPrototype];
@@ -472,6 +387,9 @@
472
387
  var _objToString = ObjProto[strToString];
473
388
  var _fnToString = ObjHasOwnProperty[strToString];
474
389
  var _objFunctionString = _fnToString.call(ObjClass);
390
+ var rCamelCase = /-([a-z])/g;
391
+ var rNormalizeInvalid = /([^\w\d_$])/g;
392
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
475
393
  var _objGetPrototypeOf = Object["getPrototypeOf"];
476
394
  function _getObjProto(target) {
477
395
  if (target) {
@@ -506,24 +424,18 @@
506
424
  function isFunction(value) {
507
425
  return !!(value && typeof value === strShimFunction);
508
426
  }
509
- function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
510
- if (useCapture === void 0) { useCapture = false; }
511
- var result = false;
512
- if (!isNullOrUndefined(obj)) {
513
- try {
514
- if (!isNullOrUndefined(obj[strAddEventHelper])) {
515
- obj[strAddEventHelper](eventNameWithoutOn, handlerRef, useCapture);
516
- result = true;
517
- }
518
- else if (!isNullOrUndefined(obj[strAttachEvent])) {
519
- obj[strAttachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);
520
- result = true;
521
- }
522
- }
523
- catch (e) {
524
- }
427
+ function normalizeJsName(name) {
428
+ var value = name;
429
+ if (value && isString(value)) {
430
+ value = value.replace(rCamelCase, function (_all, letter) {
431
+ return letter.toUpperCase();
432
+ });
433
+ value = value.replace(rNormalizeInvalid, "_");
434
+ value = value.replace(rLeadingNumeric, function (_all, match) {
435
+ return "_" + match;
436
+ });
525
437
  }
526
- return result;
438
+ return value;
527
439
  }
528
440
  function objForEachKey(target, callbackfn) {
529
441
  if (target) {
@@ -743,7 +655,7 @@
743
655
  return result;
744
656
  }
745
657
  function objDefineAccessors(target, prop, getProp, setProp) {
746
- if (_objDefineProperty) {
658
+ if (_objDefineProperty$1) {
747
659
  try {
748
660
  var descriptor = {
749
661
  enumerable: true,
@@ -755,7 +667,7 @@
755
667
  if (setProp) {
756
668
  descriptor.set = setProp;
757
669
  }
758
- _objDefineProperty(target, prop, descriptor);
670
+ _objDefineProperty$1(target, prop, descriptor);
759
671
  return true;
760
672
  }
761
673
  catch (e) {
@@ -775,7 +687,7 @@
775
687
  if (isError(object)) {
776
688
  return object.name;
777
689
  }
778
- return "";
690
+ return strEmpty;
779
691
  }
780
692
  function setValue(target, field, value, valChk, srcChk) {
781
693
  var theValue = value;
@@ -791,6 +703,20 @@
791
703
  function isTruthy(value) {
792
704
  return !!value;
793
705
  }
706
+ function throwError(message) {
707
+ throw new Error(message);
708
+ }
709
+ function createEnumStyle(values) {
710
+ var enumClass = {};
711
+ objForEachKey(values, function (field, value) {
712
+ enumClass[field] = value;
713
+ if (!isUndefined(enumClass[value])) {
714
+ throwError("Value: [" + value + "] already exists for " + field);
715
+ }
716
+ enumClass[value] = field;
717
+ });
718
+ return objFreeze(enumClass);
719
+ }
794
720
  function objExtend(obj, obj2, obj3, obj4, obj5, obj6) {
795
721
  var theArgs = arguments;
796
722
  var extended = theArgs[0] || {};
@@ -927,14 +853,14 @@
927
853
  var nav = getNavigator();
928
854
  if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
929
855
  _navUserAgentCheck = nav.userAgent;
930
- var userAgent = (_navUserAgentCheck || "").toLowerCase();
856
+ var userAgent = (_navUserAgentCheck || strEmpty).toLowerCase();
931
857
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
932
858
  }
933
859
  return _isTrident;
934
860
  }
935
861
  function dumpObj(object) {
936
862
  var objectTypeDump = Object[strShimPrototype].toString.call(object);
937
- var propertyValueDump = "";
863
+ var propertyValueDump = strEmpty;
938
864
  if (objectTypeDump === "[object Error]") {
939
865
  propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
940
866
  }
@@ -967,9 +893,9 @@
967
893
  var strWarnToConsole = "warnToConsole";
968
894
  function _sanitizeDiagnosticText(text) {
969
895
  if (text) {
970
- return "\"" + text.replace(/\"/g, "") + "\"";
896
+ return "\"" + text.replace(/\"/g, strEmpty) + "\"";
971
897
  }
972
- return "";
898
+ return strEmpty;
973
899
  }
974
900
  function _logToConsole(func, message) {
975
901
  var theConsole = getConsole();
@@ -991,12 +917,12 @@
991
917
  _self.message =
992
918
  (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
993
919
  msgId;
994
- var strProps = "";
920
+ var strProps = strEmpty;
995
921
  if (hasJSON()) {
996
922
  strProps = getJSON().stringify(properties);
997
923
  }
998
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : "") +
999
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : "");
924
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : strEmpty) +
925
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : strEmpty);
1000
926
  _self.message += diagnosticText;
1001
927
  }
1002
928
  _InternalLogMessage.dataType = "MessageData";
@@ -1026,7 +952,7 @@
1026
952
  throw message;
1027
953
  }
1028
954
  else {
1029
- var logFunc = severity === LoggingSeverity.CRITICAL ? strErrorToConsole : strWarnToConsole;
955
+ var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
1030
956
  if (!isUndefined(message.message)) {
1031
957
  var logLevel = _self.consoleLoggingLevel();
1032
958
  if (isUserAct) {
@@ -1044,7 +970,7 @@
1044
970
  _self.logInternalMessage(severity, message);
1045
971
  }
1046
972
  else {
1047
- _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
973
+ _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1048
974
  }
1049
975
  }
1050
976
  };
@@ -1076,13 +1002,13 @@
1076
1002
  if (severity <= _self.telemetryLoggingLevel()) {
1077
1003
  _self.queue.push(message);
1078
1004
  _messageCount++;
1079
- _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
1005
+ _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1080
1006
  }
1081
1007
  if (_messageCount === _self.maxInternalMessageLimit()) {
1082
1008
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1083
- var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
1009
+ var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1084
1010
  _self.queue.push(throttleMessage);
1085
- if (severity === LoggingSeverity.CRITICAL) {
1011
+ if (severity === 1 ) {
1086
1012
  _self.errorToConsole(throttleLimitMessage);
1087
1013
  }
1088
1014
  else {
@@ -1224,6 +1150,165 @@
1224
1150
  return func();
1225
1151
  }
1226
1152
 
1153
+ var UInt32Mask = 0x100000000;
1154
+ var MaxUInt32 = 0xffffffff;
1155
+ var _mwcSeeded = false;
1156
+ var _mwcW = 123456789;
1157
+ var _mwcZ = 987654321;
1158
+ function _mwcSeed(seedValue) {
1159
+ if (seedValue < 0) {
1160
+ seedValue >>>= 0;
1161
+ }
1162
+ _mwcW = (123456789 + seedValue) & MaxUInt32;
1163
+ _mwcZ = (987654321 - seedValue) & MaxUInt32;
1164
+ _mwcSeeded = true;
1165
+ }
1166
+ function _autoSeedMwc() {
1167
+ try {
1168
+ var now = dateNow() & 0x7fffffff;
1169
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1170
+ }
1171
+ catch (e) {
1172
+ }
1173
+ }
1174
+ function randomValue(maxValue) {
1175
+ if (maxValue > 0) {
1176
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1177
+ }
1178
+ return 0;
1179
+ }
1180
+ function random32(signed) {
1181
+ var value = 0;
1182
+ var c = getCrypto() || getMsCrypto();
1183
+ if (c && c.getRandomValues) {
1184
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1185
+ }
1186
+ if (value === 0 && isIE()) {
1187
+ if (!_mwcSeeded) {
1188
+ _autoSeedMwc();
1189
+ }
1190
+ value = mwcRandom32() & MaxUInt32;
1191
+ }
1192
+ if (value === 0) {
1193
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
1194
+ }
1195
+ if (!signed) {
1196
+ value >>>= 0;
1197
+ }
1198
+ return value;
1199
+ }
1200
+ function mwcRandomSeed(value) {
1201
+ if (!value) {
1202
+ _autoSeedMwc();
1203
+ }
1204
+ else {
1205
+ _mwcSeed(value);
1206
+ }
1207
+ }
1208
+ function mwcRandom32(signed) {
1209
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1210
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1211
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1212
+ if (!signed) {
1213
+ value >>>= 0;
1214
+ }
1215
+ return value;
1216
+ }
1217
+ function newId(maxLength) {
1218
+ if (maxLength === void 0) { maxLength = 22; }
1219
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1220
+ var number = random32() >>> 0;
1221
+ var chars = 0;
1222
+ var result = strEmpty;
1223
+ while (result.length < maxLength) {
1224
+ chars++;
1225
+ result += base64chars.charAt(number & 0x3F);
1226
+ number >>>= 6;
1227
+ if (chars === 5) {
1228
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1229
+ chars = 0;
1230
+ }
1231
+ }
1232
+ return result;
1233
+ }
1234
+
1235
+ var _objDefineProperty = ObjDefineProperty;
1236
+ var version = "2.7.3";
1237
+ var instanceName = "." + newId(6);
1238
+ var _dataUid = 0;
1239
+ function _createAccessor(target, prop, value) {
1240
+ if (_objDefineProperty) {
1241
+ try {
1242
+ _objDefineProperty(target, prop, {
1243
+ value: value,
1244
+ enumerable: false,
1245
+ configurable: true
1246
+ });
1247
+ return true;
1248
+ }
1249
+ catch (e) {
1250
+ }
1251
+ }
1252
+ return false;
1253
+ }
1254
+ function _canAcceptData(target) {
1255
+ return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
1256
+ }
1257
+ function _getCache(data, target) {
1258
+ var theCache = target[data.id];
1259
+ if (!theCache) {
1260
+ theCache = {};
1261
+ try {
1262
+ if (_canAcceptData(target)) {
1263
+ if (!_createAccessor(target, data.id, theCache)) {
1264
+ target[data.id] = theCache;
1265
+ }
1266
+ }
1267
+ }
1268
+ catch (e) {
1269
+ }
1270
+ }
1271
+ return theCache;
1272
+ }
1273
+ function createUniqueNamespace(name, includeVersion) {
1274
+ if (includeVersion === void 0) { includeVersion = false; }
1275
+ return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
1276
+ }
1277
+ function createElmNodeData(name) {
1278
+ var data = {
1279
+ id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
1280
+ accept: function (target) {
1281
+ return _canAcceptData(target);
1282
+ },
1283
+ get: function (target, name, defValue, addDefault) {
1284
+ var theCache = target[data.id];
1285
+ if (!theCache) {
1286
+ if (addDefault) {
1287
+ theCache = _getCache(data, target);
1288
+ theCache[normalizeJsName(name)] = defValue;
1289
+ }
1290
+ return defValue;
1291
+ }
1292
+ return theCache[normalizeJsName(name)];
1293
+ },
1294
+ kill: function (target, name) {
1295
+ if (target && target[name]) {
1296
+ try {
1297
+ delete target[name];
1298
+ }
1299
+ catch (e) {
1300
+ }
1301
+ }
1302
+ }
1303
+ };
1304
+ return data;
1305
+ }
1306
+
1307
+ var pluginStateData = createElmNodeData("plugin");
1308
+ function _getPluginState(plugin) {
1309
+ return pluginStateData.get(plugin, "state", {}, true);
1310
+ }
1311
+
1227
1312
  var strTelemetryPluginChain = "TelemetryPluginChain";
1228
1313
  var strHasRunFlags = "_hasRun";
1229
1314
  var strGetTelCtx = "_getTelCtx";
@@ -1237,53 +1322,66 @@
1237
1322
  }
1238
1323
  return createTelemetryProxyChain([startAt], config, core);
1239
1324
  }
1240
- function createProcessTelemetryContext(telemetryChain, config, core, startAt) {
1241
- var _nextProxy = null;
1242
- var _onComplete = null;
1243
- if (startAt) {
1244
- _nextProxy = _getNextProxyStart(telemetryChain, config, core, startAt);
1245
- }
1246
- else {
1247
- _nextProxy = telemetryChain;
1248
- }
1325
+ function _createInternalContext(telemetryChain, config, core, startAt) {
1326
+ var _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;
1327
+ var _onComplete = [];
1249
1328
  var context = {
1250
- core: function () {
1251
- return core;
1252
- },
1253
- diagLog: function () {
1254
- return safeGetLogger(core, config);
1255
- },
1256
- getCfg: function () {
1257
- return config;
1258
- },
1259
- getExtCfg: _getExtCfg,
1260
- getConfig: _getConfig,
1261
- hasNext: function () {
1262
- return _nextProxy != null;
1263
- },
1264
- getNext: function () {
1265
- return _nextProxy;
1266
- },
1267
- setNext: function (nextPlugin) {
1268
- _nextProxy = nextPlugin;
1269
- },
1270
- processNext: function (env) {
1271
- _processChain(function (nextPlugin) {
1272
- nextPlugin.processTelemetry(env, context);
1329
+ _next: _moveNext,
1330
+ ctx: {
1331
+ core: function () { return core; },
1332
+ diagLog: function () {
1333
+ return safeGetLogger(core, config);
1334
+ },
1335
+ getCfg: function () {
1336
+ return config;
1337
+ },
1338
+ getExtCfg: _getExtCfg,
1339
+ getConfig: _getConfig,
1340
+ hasNext: function () {
1341
+ return !!_nextProxy;
1342
+ },
1343
+ getNext: function () {
1344
+ return _nextProxy;
1345
+ },
1346
+ setNext: function (nextPlugin) {
1347
+ _nextProxy = nextPlugin;
1348
+ },
1349
+ iterate: _iterateChain,
1350
+ onComplete: _addOnComplete
1351
+ }
1352
+ };
1353
+ function _addOnComplete(onComplete, that) {
1354
+ var args = [];
1355
+ for (var _i = 2; _i < arguments.length; _i++) {
1356
+ args[_i - 2] = arguments[_i];
1357
+ }
1358
+ if (onComplete) {
1359
+ _onComplete.push({
1360
+ func: onComplete,
1361
+ self: !isUndefined(that) ? that : context.ctx,
1362
+ args: args
1273
1363
  });
1274
- },
1275
- iterate: _iterateChain,
1276
- createNew: function (plugins, startAt) {
1277
- if (plugins === void 0) { plugins = null; }
1278
- if (isArray(plugins)) {
1279
- plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1364
+ }
1365
+ }
1366
+ function _moveNext() {
1367
+ var nextProxy = _nextProxy;
1368
+ _nextProxy = nextProxy ? nextProxy.getNext() : null;
1369
+ if (!nextProxy) {
1370
+ var onComplete = _onComplete;
1371
+ if (onComplete && onComplete.length > 0) {
1372
+ arrForEach(onComplete, function (completeDetails) {
1373
+ try {
1374
+ completeDetails.func.call(completeDetails.self, completeDetails.args);
1375
+ }
1376
+ catch (e) {
1377
+ core.logger.throwInternal(2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
1378
+ }
1379
+ });
1380
+ _onComplete = [];
1280
1381
  }
1281
- return createProcessTelemetryContext(plugins || _nextProxy, config, core, startAt);
1282
- },
1283
- onComplete: function (onComplete) {
1284
- _onComplete = onComplete;
1285
1382
  }
1286
- };
1383
+ return nextProxy;
1384
+ }
1287
1385
  function _getExtCfg(identifier, defaultValue, mergeDefault) {
1288
1386
  if (defaultValue === void 0) { defaultValue = {}; }
1289
1387
  if (mergeDefault === void 0) { mergeDefault = 0 ; }
@@ -1326,29 +1424,53 @@
1326
1424
  }
1327
1425
  return !isNullOrUndefined(theValue) ? theValue : defaultValue;
1328
1426
  }
1329
- function _processChain(cb) {
1330
- var nextPlugin = _nextProxy;
1331
- if (nextPlugin) {
1332
- _nextProxy = nextPlugin.getNext();
1333
- cb(nextPlugin);
1334
- }
1335
- else {
1336
- if (_onComplete) {
1337
- _onComplete();
1338
- _onComplete = null;
1427
+ function _iterateChain(cb) {
1428
+ var nextPlugin;
1429
+ while (!!(nextPlugin = context._next())) {
1430
+ var plugin = nextPlugin.getPlugin();
1431
+ if (plugin) {
1432
+ cb(plugin);
1339
1433
  }
1340
1434
  }
1341
1435
  }
1342
- function _iterateChain(cb) {
1343
- while (_nextProxy) {
1344
- _processChain(function (nextPlugin) {
1345
- var plugin = nextPlugin.getPlugin();
1346
- if (plugin) {
1347
- cb(plugin);
1348
- }
1349
- });
1436
+ return context;
1437
+ }
1438
+ function createProcessTelemetryContext(telemetryChain, config, core, startAt) {
1439
+ var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1440
+ var context = internalContext.ctx;
1441
+ function _processNext(env) {
1442
+ var nextPlugin = internalContext._next();
1443
+ nextPlugin && nextPlugin.processTelemetry(env, context);
1444
+ return !nextPlugin;
1445
+ }
1446
+ function _createNew(plugins, startAt) {
1447
+ if (plugins === void 0) { plugins = null; }
1448
+ if (isArray(plugins)) {
1449
+ plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1450
+ }
1451
+ return createProcessTelemetryContext(plugins || context.getNext(), config, core, startAt);
1452
+ }
1453
+ context.processNext = _processNext;
1454
+ context.createNew = _createNew;
1455
+ return context;
1456
+ }
1457
+ function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {
1458
+ var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1459
+ var context = internalContext.ctx;
1460
+ function _processNext(unloadState) {
1461
+ var nextPlugin = internalContext._next();
1462
+ nextPlugin && nextPlugin.unload(context, unloadState);
1463
+ return !nextPlugin;
1464
+ }
1465
+ function _createNew(plugins, startAt) {
1466
+ if (plugins === void 0) { plugins = null; }
1467
+ if (isArray(plugins)) {
1468
+ plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1350
1469
  }
1470
+ return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);
1351
1471
  }
1472
+ context.processNext = _processNext;
1473
+ context.createNew = _createNew;
1352
1474
  return context;
1353
1475
  }
1354
1476
  function createTelemetryProxyChain(plugins, config, core, startAt) {
@@ -1396,32 +1518,35 @@
1396
1518
  return nextProxy;
1397
1519
  },
1398
1520
  processTelemetry: _processTelemetry,
1521
+ unload: _unloadPlugin,
1399
1522
  _id: chainId,
1400
1523
  _setNext: function (nextPlugin) {
1401
1524
  nextProxy = nextPlugin;
1402
1525
  }
1403
1526
  };
1404
- function _processChain(itemCtx, processPluginFn, processProxyFn, name, details, isAsync) {
1527
+ function _getTelCtx() {
1528
+ var itemCtx;
1529
+ if (plugin && isFunction(plugin[strGetTelCtx])) {
1530
+ itemCtx = plugin[strGetTelCtx]();
1531
+ }
1405
1532
  if (!itemCtx) {
1406
- if (plugin && isFunction(plugin[strGetTelCtx])) {
1407
- itemCtx = plugin[strGetTelCtx]();
1408
- }
1409
- if (!itemCtx) {
1410
- itemCtx = createProcessTelemetryContext(proxyChain, config, core);
1411
- }
1533
+ itemCtx = createProcessTelemetryContext(proxyChain, config, core);
1412
1534
  }
1535
+ return itemCtx;
1536
+ }
1537
+ function _processChain(itemCtx, processPluginFn, name, details, isAsync) {
1538
+ var hasRun = false;
1413
1539
  var identifier = plugin ? plugin.identifier : strTelemetryPluginChain;
1414
1540
  var hasRunContext = itemCtx[strHasRunFlags];
1415
1541
  if (!hasRunContext) {
1416
1542
  hasRunContext = itemCtx[strHasRunFlags] = {};
1417
1543
  }
1418
- doPerf(itemCtx.core(), function () { return identifier + ":" + name; }, function () {
1419
- hasRunContext[chainId] = true;
1420
- var hasRun = false;
1421
- itemCtx.setNext(nextProxy);
1422
- if (plugin) {
1544
+ itemCtx.setNext(nextProxy);
1545
+ if (plugin) {
1546
+ doPerf(itemCtx[strCore](), function () { return identifier + ":" + name; }, function () {
1547
+ hasRunContext[chainId] = true;
1423
1548
  try {
1424
- var nextId = nextProxy ? nextProxy._id : "";
1549
+ var nextId = nextProxy ? nextProxy._id : strEmpty;
1425
1550
  if (nextId) {
1426
1551
  hasRunContext[nextId] = false;
1427
1552
  }
@@ -1433,18 +1558,21 @@
1433
1558
  hasRun = true;
1434
1559
  }
1435
1560
  if (!nextProxy || !hasNextRun) {
1436
- itemCtx.diagLog().throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1561
+ itemCtx.diagLog().throwInternal(1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1437
1562
  }
1438
1563
  }
1439
- }
1440
- if (nextProxy && !hasRun) {
1441
- processProxyFn(itemCtx);
1442
- }
1443
- }, details, isAsync);
1564
+ }, details, isAsync);
1565
+ }
1566
+ return hasRun;
1444
1567
  }
1445
1568
  function _processTelemetry(env, itemCtx) {
1446
- _processChain(itemCtx, function (itemCtx) {
1447
- if (!hasProcessTelemetry) {
1569
+ itemCtx = itemCtx || _getTelCtx();
1570
+ function _callProcessTelemetry(itemCtx) {
1571
+ if (!plugin || !hasProcessTelemetry) {
1572
+ return false;
1573
+ }
1574
+ var pluginState = _getPluginState(plugin);
1575
+ if (pluginState[strTeardown] || pluginState[strDisabled]) {
1448
1576
  return false;
1449
1577
  }
1450
1578
  if (hasSetNext) {
@@ -1452,9 +1580,31 @@
1452
1580
  }
1453
1581
  plugin.processTelemetry(env, itemCtx);
1454
1582
  return true;
1455
- }, function (itemCtx) {
1456
- nextProxy.processTelemetry(env, itemCtx);
1457
- }, "processTelemetry", function () { return ({ item: env }); }, !(env.sync));
1583
+ }
1584
+ if (!_processChain(itemCtx, _callProcessTelemetry, "processTelemetry", function () { return ({ item: env }); }, !(env.sync))) {
1585
+ itemCtx.processNext(env);
1586
+ }
1587
+ }
1588
+ function _unloadPlugin(unloadCtx, unloadState) {
1589
+ function _callTeardown() {
1590
+ var hasRun = false;
1591
+ if (plugin) {
1592
+ var pluginState = _getPluginState(plugin);
1593
+ var pluginCore = plugin[strCore] || pluginState.core;
1594
+ if (plugin && (!pluginCore || pluginCore === unloadCtx[strCore]()) && !pluginState[strTeardown]) {
1595
+ pluginState[strCore] = null;
1596
+ pluginState[strTeardown] = true;
1597
+ pluginState[strIsInitialized] = false;
1598
+ if (plugin[strTeardown] && plugin[strTeardown](unloadCtx, unloadState) === true) {
1599
+ hasRun = true;
1600
+ }
1601
+ }
1602
+ }
1603
+ return hasRun;
1604
+ }
1605
+ if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState.isAsync)) {
1606
+ unloadCtx.processNext(unloadState);
1607
+ }
1458
1608
  }
1459
1609
  return objFreeze(proxyChain);
1460
1610
  }
@@ -1467,7 +1617,6 @@
1467
1617
  var strIsCookieUseDisabled = "isCookieUseDisabled";
1468
1618
  var strDisableCookiesUsage = "disableCookiesUsage";
1469
1619
  var strConfigCookieMgr = "_ckMgr";
1470
- var strEmpty = "";
1471
1620
  var _supportsCookies = null;
1472
1621
  var _allowUaSameSite = null;
1473
1622
  var _parsedCookieValue = null;
@@ -1626,7 +1775,7 @@
1626
1775
  _supportsCookies = doc[strCookie] !== undefined;
1627
1776
  }
1628
1777
  catch (e) {
1629
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
1778
+ logger && logger.throwInternal(2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
1630
1779
  }
1631
1780
  }
1632
1781
  return _supportsCookies;
@@ -1721,6 +1870,38 @@
1721
1870
  _setDefaults(config, core, pluginChain);
1722
1871
  _isinitialized = true;
1723
1872
  };
1873
+ _self.teardown = function (unloadCtx, unloadState) {
1874
+ if (!_self.core || (unloadCtx && _self.core !== unloadCtx.core())) {
1875
+ return;
1876
+ }
1877
+ var result;
1878
+ var unloadDone = false;
1879
+ var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
1880
+ var theUnloadState = unloadState || {
1881
+ reason: 0 ,
1882
+ isAsync: false
1883
+ };
1884
+ function _unloadCallback() {
1885
+ if (!unloadDone) {
1886
+ unloadDone = true;
1887
+ arrForEach(_hooks, function (fn) {
1888
+ fn.rm();
1889
+ });
1890
+ _hooks = [];
1891
+ if (result === true) {
1892
+ theUnloadCtx.processNext(theUnloadState);
1893
+ }
1894
+ _initDefaults();
1895
+ }
1896
+ }
1897
+ if (!_self[strDoTeardown] || _self[strDoTeardown](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
1898
+ _unloadCallback();
1899
+ }
1900
+ else {
1901
+ result = true;
1902
+ }
1903
+ return result;
1904
+ };
1724
1905
  _self._addHook = function (hooks) {
1725
1906
  if (hooks) {
1726
1907
  if (isArray(hooks)) {
@@ -1735,13 +1916,13 @@
1735
1916
  _self.diagLog = function (itemCtx) {
1736
1917
  return _getTelCtx(itemCtx).diagLog();
1737
1918
  };
1738
- _self.isInitialized = function () {
1919
+ _self[strIsInitialized] = function () {
1739
1920
  return _isinitialized;
1740
1921
  };
1741
1922
  _self.setInitialized = function (isInitialized) {
1742
1923
  _isinitialized = isInitialized;
1743
1924
  };
1744
- _self.setNextPlugin = function (next) {
1925
+ _self[strSetNextPlugin] = function (next) {
1745
1926
  _nextPlugin = next;
1746
1927
  };
1747
1928
  _self.processNext = function (env, itemCtx) {
@@ -1792,103 +1973,113 @@
1792
1973
  return BaseTelemetryPlugin;
1793
1974
  }());
1794
1975
 
1795
- var UInt32Mask = 0x100000000;
1796
- var MaxUInt32 = 0xffffffff;
1797
- var _mwcSeeded = false;
1798
- var _mwcW = 123456789;
1799
- var _mwcZ = 987654321;
1800
- function _mwcSeed(seedValue) {
1801
- if (seedValue < 0) {
1802
- seedValue >>>= 0;
1803
- }
1804
- _mwcW = (123456789 + seedValue) & MaxUInt32;
1805
- _mwcZ = (987654321 - seedValue) & MaxUInt32;
1806
- _mwcSeeded = true;
1807
- }
1808
- function _autoSeedMwc() {
1809
- try {
1810
- var now = dateNow() & 0x7fffffff;
1811
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
1812
- }
1813
- catch (e) {
1814
- }
1815
- }
1816
- function randomValue(maxValue) {
1817
- if (maxValue > 0) {
1818
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
1819
- }
1820
- return 0;
1821
- }
1822
- function random32(signed) {
1823
- var value = 0;
1824
- var c = getCrypto() || getMsCrypto();
1825
- if (c && c.getRandomValues) {
1826
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
1827
- }
1828
- if (value === 0 && isIE()) {
1829
- if (!_mwcSeeded) {
1830
- _autoSeedMwc();
1976
+ var strOnPrefix = "on";
1977
+ var strAttachEvent = "attachEvent";
1978
+ var strAddEventHelper = "addEventListener";
1979
+ var strEvents = "events";
1980
+ createUniqueNamespace("aiEvtPageHide");
1981
+ createUniqueNamespace("aiEvtPageShow");
1982
+ var _guid = 1;
1983
+ var elmNodeData = createElmNodeData("events");
1984
+ var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
1985
+ function _normalizeNamespace(name) {
1986
+ if (name && name.replace) {
1987
+ return name.replace(/^\s*\.*|\.*\s*$/g, "");
1988
+ }
1989
+ return name;
1990
+ }
1991
+ function _getEvtNamespace(eventName, namespaces) {
1992
+ if (namespaces) {
1993
+ var theNamespace_1 = "";
1994
+ if (isArray(namespaces)) {
1995
+ theNamespace_1 = "";
1996
+ arrForEach(namespaces, function (name) {
1997
+ name = _normalizeNamespace(name);
1998
+ if (name) {
1999
+ if (name[0] !== ".") {
2000
+ name = "." + name;
2001
+ }
2002
+ theNamespace_1 += name;
2003
+ }
2004
+ });
2005
+ }
2006
+ else {
2007
+ theNamespace_1 = _normalizeNamespace(namespaces);
2008
+ }
2009
+ if (theNamespace_1) {
2010
+ if (theNamespace_1[0] !== ".") {
2011
+ theNamespace_1 = "." + theNamespace_1;
2012
+ }
2013
+ eventName = (eventName || "") + theNamespace_1;
1831
2014
  }
1832
- value = mwcRandom32() & MaxUInt32;
1833
- }
1834
- if (value === 0) {
1835
- value = Math.floor((UInt32Mask * Math.random()) | 0);
1836
- }
1837
- if (!signed) {
1838
- value >>>= 0;
1839
2015
  }
1840
- return value;
2016
+ var parsedEvent = (eventNamespace.exec(eventName) || []);
2017
+ return {
2018
+ type: parsedEvent[1],
2019
+ ns: ((parsedEvent[2] || "").split(".").sort()).join(".")
2020
+ };
1841
2021
  }
1842
- function mwcRandomSeed(value) {
1843
- if (!value) {
1844
- _autoSeedMwc();
1845
- }
1846
- else {
1847
- _mwcSeed(value);
2022
+ function _getRegisteredEvents(target, evtName, addDefault) {
2023
+ if (addDefault === void 0) { addDefault = true; }
2024
+ var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
2025
+ var registeredEvents = aiEvts[evtName];
2026
+ if (!registeredEvents) {
2027
+ registeredEvents = aiEvts[evtName] = [];
1848
2028
  }
2029
+ return registeredEvents;
1849
2030
  }
1850
- function mwcRandom32(signed) {
1851
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
1852
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
1853
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
1854
- if (!signed) {
1855
- value >>>= 0;
2031
+ function _doAttach(obj, evtName, handlerRef, useCapture) {
2032
+ var result = false;
2033
+ if (obj && evtName && evtName.type && handlerRef) {
2034
+ if (obj[strAddEventHelper]) {
2035
+ obj[strAddEventHelper](evtName.type, handlerRef, useCapture);
2036
+ result = true;
2037
+ }
2038
+ else if (obj[strAttachEvent]) {
2039
+ obj[strAttachEvent](strOnPrefix + evtName.type, handlerRef);
2040
+ result = true;
2041
+ }
1856
2042
  }
1857
- return value;
2043
+ return result;
1858
2044
  }
1859
- function newId(maxLength) {
1860
- if (maxLength === void 0) { maxLength = 22; }
1861
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1862
- var number = random32() >>> 0;
1863
- var chars = 0;
1864
- var result = "";
1865
- while (result.length < maxLength) {
1866
- chars++;
1867
- result += base64chars.charAt(number & 0x3F);
1868
- number >>>= 6;
1869
- if (chars === 5) {
1870
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
1871
- chars = 0;
2045
+ function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
2046
+ if (useCapture === void 0) { useCapture = false; }
2047
+ var result = false;
2048
+ if (target) {
2049
+ try {
2050
+ var evtName = _getEvtNamespace(eventName, evtNamespace);
2051
+ result = _doAttach(target, evtName, handlerRef, useCapture);
2052
+ if (result && elmNodeData.accept(target)) {
2053
+ var registeredEvent = {
2054
+ guid: _guid++,
2055
+ evtName: evtName,
2056
+ handler: handlerRef,
2057
+ capture: useCapture
2058
+ };
2059
+ _getRegisteredEvents(target, evtName.type).push(registeredEvent);
2060
+ }
2061
+ }
2062
+ catch (e) {
1872
2063
  }
1873
2064
  }
1874
2065
  return result;
1875
2066
  }
1876
-
1877
- var _cookieMgrs = null;
1878
- var _canUseCookies;
1879
- function addEventHandler(eventName, callback) {
2067
+ function addEventHandler(eventName, callback, evtNamespace) {
1880
2068
  var result = false;
1881
2069
  var w = getWindow();
1882
2070
  if (w) {
1883
- result = attachEvent(w, eventName, callback);
1884
- result = attachEvent(w["body"], eventName, callback) || result;
2071
+ result = eventOn(w, eventName, callback, evtNamespace);
2072
+ result = eventOn(w["body"], eventName, callback, evtNamespace) || result;
1885
2073
  }
1886
2074
  var doc = getDocument();
1887
2075
  if (doc) {
1888
- result = attachEvent(doc, eventName, callback) || result;
2076
+ result = eventOn(doc, eventName, callback, evtNamespace) || result;
1889
2077
  }
1890
2078
  return result;
1891
2079
  }
2080
+
2081
+ var _cookieMgrs = null;
2082
+ var _canUseCookies;
1892
2083
  function newGuid() {
1893
2084
  function randomHexDigit() {
1894
2085
  return randomValue(15);
@@ -1907,7 +2098,7 @@
1907
2098
  }
1908
2099
  function generateW3CId() {
1909
2100
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
1910
- var oct = "", tmp;
2101
+ var oct = strEmpty, tmp;
1911
2102
  for (var a = 0; a < 4; a++) {
1912
2103
  tmp = random32();
1913
2104
  oct +=
@@ -1990,6 +2181,95 @@
1990
2181
  _legacyCookieMgr().setEnabled(false);
1991
2182
  }
1992
2183
 
2184
+ var LoggingSeverity = createEnumStyle({
2185
+ CRITICAL: 1 ,
2186
+ WARNING: 2
2187
+ });
2188
+ var _InternalMessageId = createEnumStyle({
2189
+ BrowserDoesNotSupportLocalStorage: 0 ,
2190
+ BrowserCannotReadLocalStorage: 1 ,
2191
+ BrowserCannotReadSessionStorage: 2 ,
2192
+ BrowserCannotWriteLocalStorage: 3 ,
2193
+ BrowserCannotWriteSessionStorage: 4 ,
2194
+ BrowserFailedRemovalFromLocalStorage: 5 ,
2195
+ BrowserFailedRemovalFromSessionStorage: 6 ,
2196
+ CannotSendEmptyTelemetry: 7 ,
2197
+ ClientPerformanceMathError: 8 ,
2198
+ ErrorParsingAISessionCookie: 9 ,
2199
+ ErrorPVCalc: 10 ,
2200
+ ExceptionWhileLoggingError: 11 ,
2201
+ FailedAddingTelemetryToBuffer: 12 ,
2202
+ FailedMonitorAjaxAbort: 13 ,
2203
+ FailedMonitorAjaxDur: 14 ,
2204
+ FailedMonitorAjaxOpen: 15 ,
2205
+ FailedMonitorAjaxRSC: 16 ,
2206
+ FailedMonitorAjaxSend: 17 ,
2207
+ FailedMonitorAjaxGetCorrelationHeader: 18 ,
2208
+ FailedToAddHandlerForOnBeforeUnload: 19 ,
2209
+ FailedToSendQueuedTelemetry: 20 ,
2210
+ FailedToReportDataLoss: 21 ,
2211
+ FlushFailed: 22 ,
2212
+ MessageLimitPerPVExceeded: 23 ,
2213
+ MissingRequiredFieldSpecification: 24 ,
2214
+ NavigationTimingNotSupported: 25 ,
2215
+ OnError: 26 ,
2216
+ SessionRenewalDateIsZero: 27 ,
2217
+ SenderNotInitialized: 28 ,
2218
+ StartTrackEventFailed: 29 ,
2219
+ StopTrackEventFailed: 30 ,
2220
+ StartTrackFailed: 31 ,
2221
+ StopTrackFailed: 32 ,
2222
+ TelemetrySampledAndNotSent: 33 ,
2223
+ TrackEventFailed: 34 ,
2224
+ TrackExceptionFailed: 35 ,
2225
+ TrackMetricFailed: 36 ,
2226
+ TrackPVFailed: 37 ,
2227
+ TrackPVFailedCalc: 38 ,
2228
+ TrackTraceFailed: 39 ,
2229
+ TransmissionFailed: 40 ,
2230
+ FailedToSetStorageBuffer: 41 ,
2231
+ FailedToRestoreStorageBuffer: 42 ,
2232
+ InvalidBackendResponse: 43 ,
2233
+ FailedToFixDepricatedValues: 44 ,
2234
+ InvalidDurationValue: 45 ,
2235
+ TelemetryEnvelopeInvalid: 46 ,
2236
+ CreateEnvelopeError: 47 ,
2237
+ CannotSerializeObject: 48 ,
2238
+ CannotSerializeObjectNonSerializable: 49 ,
2239
+ CircularReferenceDetected: 50 ,
2240
+ ClearAuthContextFailed: 51 ,
2241
+ ExceptionTruncated: 52 ,
2242
+ IllegalCharsInName: 53 ,
2243
+ ItemNotInArray: 54 ,
2244
+ MaxAjaxPerPVExceeded: 55 ,
2245
+ MessageTruncated: 56 ,
2246
+ NameTooLong: 57 ,
2247
+ SampleRateOutOfRange: 58 ,
2248
+ SetAuthContextFailed: 59 ,
2249
+ SetAuthContextFailedAccountName: 60 ,
2250
+ StringValueTooLong: 61 ,
2251
+ StartCalledMoreThanOnce: 62 ,
2252
+ StopCalledWithoutStart: 63 ,
2253
+ TelemetryInitializerFailed: 64 ,
2254
+ TrackArgumentsNotSpecified: 65 ,
2255
+ UrlTooLong: 66 ,
2256
+ SessionStorageBufferFull: 67 ,
2257
+ CannotAccessCookie: 68 ,
2258
+ IdTooLong: 69 ,
2259
+ InvalidEvent: 70 ,
2260
+ FailedMonitorAjaxSetRequestHeader: 71 ,
2261
+ SendBrowserInfoOnUserInit: 72 ,
2262
+ PluginException: 73 ,
2263
+ NotificationException: 74 ,
2264
+ SnippetScriptLoadFailure: 99 ,
2265
+ InvalidInstrumentationKey: 100 ,
2266
+ CannotParseAiBlobValue: 101 ,
2267
+ InvalidContentBlob: 102 ,
2268
+ TrackPageActionEventFailed: 103 ,
2269
+ FailedAddingCustomDefinedRequestContext: 104 ,
2270
+ InMemoryStorageBufferFull: 105
2271
+ });
2272
+
1993
2273
  var ReactPlugin = /** @class */ (function (_super) {
1994
2274
  __extendsFn(ReactPlugin, _super);
1995
2275
  function ReactPlugin() {