@microsoft/applicationinsights-common 2.8.0-beta.2203-01 → 2.8.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.
Files changed (182) hide show
  1. package/browser/applicationinsights-common.integrity.json +9 -9
  2. package/browser/applicationinsights-common.js +418 -237
  3. package/browser/applicationinsights-common.js.map +1 -1
  4. package/browser/applicationinsights-common.min.js +2 -2
  5. package/browser/applicationinsights-common.min.js.map +1 -1
  6. package/dist/applicationinsights-common.api.json +102 -51
  7. package/dist/applicationinsights-common.api.md +14 -4
  8. package/dist/applicationinsights-common.d.ts +18 -10
  9. package/dist/applicationinsights-common.js +418 -237
  10. package/dist/applicationinsights-common.js.map +1 -1
  11. package/dist/applicationinsights-common.min.js +2 -2
  12. package/dist/applicationinsights-common.min.js.map +1 -1
  13. package/dist/applicationinsights-common.rollup.d.ts +18 -10
  14. package/dist-esm/ConnectionStringParser.js +1 -1
  15. package/dist-esm/Constants.js +1 -1
  16. package/dist-esm/DomHelperFuncs.js +1 -1
  17. package/dist-esm/Enums.js +11 -24
  18. package/dist-esm/Enums.js.map +1 -1
  19. package/dist-esm/HelperFuncs.js +7 -6
  20. package/dist-esm/HelperFuncs.js.map +1 -1
  21. package/dist-esm/Interfaces/ConnectionString.js +1 -1
  22. package/dist-esm/Interfaces/Context/IApplication.js +1 -1
  23. package/dist-esm/Interfaces/Context/IDevice.js +1 -1
  24. package/dist-esm/Interfaces/Context/IInternal.js +1 -1
  25. package/dist-esm/Interfaces/Context/ILocation.js +1 -1
  26. package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
  27. package/dist-esm/Interfaces/Context/ISample.js +1 -1
  28. package/dist-esm/Interfaces/Context/ISession.js +1 -1
  29. package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
  30. package/dist-esm/Interfaces/Context/IUser.js +1 -1
  31. package/dist-esm/Interfaces/Context/IWeb.js +1 -1
  32. package/dist-esm/Interfaces/Contracts/AvailabilityData.js +52 -0
  33. package/dist-esm/Interfaces/Contracts/AvailabilityData.js.map +1 -0
  34. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +89 -0
  35. package/dist-esm/Interfaces/Contracts/ContextTagKeys.js.map +1 -0
  36. package/dist-esm/Interfaces/Contracts/DataPointType.js +8 -0
  37. package/dist-esm/Interfaces/Contracts/DataPointType.js.map +1 -0
  38. package/dist-esm/Interfaces/Contracts/DependencyKind.js +8 -0
  39. package/dist-esm/Interfaces/Contracts/DependencyKind.js.map +1 -0
  40. package/dist-esm/Interfaces/Contracts/DependencySourceType.js +8 -0
  41. package/dist-esm/Interfaces/Contracts/DependencySourceType.js.map +1 -0
  42. package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +1 -1
  43. package/dist-esm/Interfaces/Contracts/Generated/Base.js +1 -1
  44. package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +1 -1
  45. package/dist-esm/Interfaces/Contracts/Generated/Data.js +1 -1
  46. package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +1 -1
  47. package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +1 -1
  48. package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +1 -1
  49. package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +1 -1
  50. package/dist-esm/Interfaces/Contracts/Generated/Domain.js +1 -1
  51. package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +1 -1
  52. package/dist-esm/Interfaces/Contracts/Generated/EventData.js +1 -1
  53. package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +1 -1
  54. package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +1 -1
  55. package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +1 -1
  56. package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +1 -1
  57. package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +1 -1
  58. package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +1 -1
  59. package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +1 -1
  60. package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +1 -1
  61. package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +1 -1
  62. package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +1 -1
  63. package/dist-esm/Interfaces/Contracts/IBase.js +8 -0
  64. package/dist-esm/Interfaces/Contracts/IBase.js.map +1 -0
  65. package/dist-esm/Interfaces/Contracts/IData.js +8 -0
  66. package/dist-esm/Interfaces/Contracts/IData.js.map +1 -0
  67. package/dist-esm/Interfaces/Contracts/IDataPoint.js +6 -0
  68. package/dist-esm/Interfaces/Contracts/IDataPoint.js.map +1 -0
  69. package/dist-esm/Interfaces/Contracts/IDomain.js +8 -0
  70. package/dist-esm/Interfaces/Contracts/IDomain.js.map +1 -0
  71. package/dist-esm/Interfaces/Contracts/IEnvelope.js +46 -0
  72. package/dist-esm/Interfaces/Contracts/IEnvelope.js.map +1 -0
  73. package/dist-esm/Interfaces/Contracts/IEventData.js +8 -0
  74. package/dist-esm/Interfaces/Contracts/IEventData.js.map +1 -0
  75. package/dist-esm/Interfaces/Contracts/IExceptionData.js +8 -0
  76. package/dist-esm/Interfaces/Contracts/IExceptionData.js.map +1 -0
  77. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +8 -0
  78. package/dist-esm/Interfaces/Contracts/IExceptionDetails.js.map +1 -0
  79. package/dist-esm/Interfaces/Contracts/IMessageData.js +8 -0
  80. package/dist-esm/Interfaces/Contracts/IMessageData.js.map +1 -0
  81. package/dist-esm/Interfaces/Contracts/IMetricData.js +8 -0
  82. package/dist-esm/Interfaces/Contracts/IMetricData.js.map +1 -0
  83. package/dist-esm/Interfaces/Contracts/IPageViewData.js +8 -0
  84. package/dist-esm/Interfaces/Contracts/IPageViewData.js.map +1 -0
  85. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +8 -0
  86. package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js.map +1 -0
  87. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +8 -0
  88. package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js.map +1 -0
  89. package/dist-esm/Interfaces/Contracts/IStackFrame.js +8 -0
  90. package/dist-esm/Interfaces/Contracts/IStackFrame.js.map +1 -0
  91. package/dist-esm/Interfaces/Contracts/RequestData.js +46 -0
  92. package/dist-esm/Interfaces/Contracts/RequestData.js.map +1 -0
  93. package/dist-esm/Interfaces/Contracts/SeverityLevel.js +19 -0
  94. package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +1 -0
  95. package/dist-esm/Interfaces/IAppInsights.js +1 -1
  96. package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
  97. package/dist-esm/Interfaces/IConfig.js +1 -1
  98. package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
  99. package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
  100. package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
  101. package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
  102. package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
  103. package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  104. package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
  105. package/dist-esm/Interfaces/IPartC.js +1 -1
  106. package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
  107. package/dist-esm/Interfaces/IRequestContext.js +1 -1
  108. package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
  109. package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
  110. package/dist-esm/Interfaces/PartAExtensions.js +1 -1
  111. package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
  112. package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
  113. package/dist-esm/RequestResponseHeaders.js +1 -1
  114. package/dist-esm/StorageHelperFuncs.js +8 -8
  115. package/dist-esm/StorageHelperFuncs.js.map +1 -1
  116. package/dist-esm/Telemetry/Common/Base.js +1 -1
  117. package/dist-esm/Telemetry/Common/Data.js +1 -1
  118. package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
  119. package/dist-esm/Telemetry/Common/DataSanitizer.js +8 -8
  120. package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
  121. package/dist-esm/Telemetry/Common/Envelope.js +1 -1
  122. package/dist-esm/Telemetry/Event.js +1 -1
  123. package/dist-esm/Telemetry/Exception.js +1 -1
  124. package/dist-esm/Telemetry/Metric.js +1 -1
  125. package/dist-esm/Telemetry/PageView.js +1 -1
  126. package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
  127. package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
  128. package/dist-esm/Telemetry/Trace.js +1 -1
  129. package/dist-esm/TelemetryItemCreator.js +1 -1
  130. package/dist-esm/UrlHelperFuncs.js +1 -1
  131. package/dist-esm/Util.js +1 -1
  132. package/dist-esm/applicationinsights-common.js +1 -1
  133. package/package.json +2 -2
  134. package/src/Enums.ts +19 -3
  135. package/src/HelperFuncs.ts +7 -5
  136. package/src/Interfaces/Contracts/AvailabilityData.ts +57 -0
  137. package/src/Interfaces/Contracts/ContextTagKeys.ts +299 -0
  138. package/src/Interfaces/Contracts/DataPointType.ts +10 -0
  139. package/src/Interfaces/Contracts/DependencyKind.ts +11 -0
  140. package/src/Interfaces/Contracts/DependencySourceType.ts +11 -0
  141. package/src/Interfaces/Contracts/IBase.ts +13 -0
  142. package/src/Interfaces/Contracts/IData.ts +19 -0
  143. package/src/Interfaces/Contracts/IDataPoint.ts +44 -0
  144. package/src/Interfaces/Contracts/IDomain.ts +8 -0
  145. package/src/Interfaces/Contracts/IEnvelope.ts +50 -0
  146. package/src/Interfaces/Contracts/IEventData.ts +30 -0
  147. package/src/Interfaces/Contracts/IExceptionData.ts +37 -0
  148. package/src/Interfaces/Contracts/IExceptionDetails.ts +45 -0
  149. package/src/Interfaces/Contracts/IMessageData.ts +36 -0
  150. package/src/Interfaces/Contracts/IMetricData.ts +31 -0
  151. package/src/Interfaces/Contracts/IPageViewData.ts +26 -0
  152. package/src/Interfaces/Contracts/IPageViewPerfData.ts +35 -0
  153. package/src/Interfaces/Contracts/IRemoteDependencyData.ts +65 -0
  154. package/src/Interfaces/Contracts/IStackFrame.ts +33 -0
  155. package/src/Interfaces/Contracts/RequestData.ts +50 -0
  156. package/src/Interfaces/Contracts/SeverityLevel.ts +15 -0
  157. package/src/StorageHelperFuncs.ts +7 -7
  158. package/src/Telemetry/Common/DataSanitizer.ts +7 -7
  159. package/src/applicationinsights-common.ts +1 -1
  160. package/types/Enums.d.ts +13 -2
  161. package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
  162. package/types/Interfaces/Contracts/ContextTagKeys.d.ts +175 -0
  163. package/types/Interfaces/Contracts/DataPointType.d.ts +7 -0
  164. package/types/Interfaces/Contracts/DependencyKind.d.ts +8 -0
  165. package/types/Interfaces/Contracts/DependencySourceType.d.ts +8 -0
  166. package/types/Interfaces/Contracts/IBase.d.ts +9 -0
  167. package/types/Interfaces/Contracts/IData.d.ts +14 -0
  168. package/types/Interfaces/Contracts/IDataPoint.d.ts +34 -0
  169. package/types/Interfaces/Contracts/IDomain.d.ts +5 -0
  170. package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
  171. package/types/Interfaces/Contracts/IEventData.d.ts +22 -0
  172. package/types/Interfaces/Contracts/IExceptionData.d.ts +28 -0
  173. package/types/Interfaces/Contracts/IExceptionDetails.d.ts +34 -0
  174. package/types/Interfaces/Contracts/IMessageData.d.ts +27 -0
  175. package/types/Interfaces/Contracts/IMetricData.d.ts +23 -0
  176. package/types/Interfaces/Contracts/IPageViewData.d.ts +18 -0
  177. package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +26 -0
  178. package/types/Interfaces/Contracts/IRemoteDependencyData.d.ts +50 -0
  179. package/types/Interfaces/Contracts/IStackFrame.d.ts +25 -0
  180. package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
  181. package/types/Interfaces/Contracts/SeverityLevel.d.ts +10 -0
  182. package/types/applicationinsights-common.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-01
2
+ * Application Insights JavaScript SDK - Common, 2.8.0-beta.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -94,99 +94,8 @@
94
94
  d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
95
95
  }
96
96
 
97
- var LoggingSeverity;
98
- (function (LoggingSeverity) {
99
- LoggingSeverity[LoggingSeverity["CRITICAL"] = 1] = "CRITICAL";
100
- LoggingSeverity[LoggingSeverity["WARNING"] = 2] = "WARNING";
101
- })(LoggingSeverity || (LoggingSeverity = {}));
102
- var _InternalMessageId = {
103
- BrowserDoesNotSupportLocalStorage: 0,
104
- BrowserCannotReadLocalStorage: 1,
105
- BrowserCannotReadSessionStorage: 2,
106
- BrowserCannotWriteLocalStorage: 3,
107
- BrowserCannotWriteSessionStorage: 4,
108
- BrowserFailedRemovalFromLocalStorage: 5,
109
- BrowserFailedRemovalFromSessionStorage: 6,
110
- CannotSendEmptyTelemetry: 7,
111
- ClientPerformanceMathError: 8,
112
- ErrorParsingAISessionCookie: 9,
113
- ErrorPVCalc: 10,
114
- ExceptionWhileLoggingError: 11,
115
- FailedAddingTelemetryToBuffer: 12,
116
- FailedMonitorAjaxAbort: 13,
117
- FailedMonitorAjaxDur: 14,
118
- FailedMonitorAjaxOpen: 15,
119
- FailedMonitorAjaxRSC: 16,
120
- FailedMonitorAjaxSend: 17,
121
- FailedMonitorAjaxGetCorrelationHeader: 18,
122
- FailedToAddHandlerForOnBeforeUnload: 19,
123
- FailedToSendQueuedTelemetry: 20,
124
- FailedToReportDataLoss: 21,
125
- FlushFailed: 22,
126
- MessageLimitPerPVExceeded: 23,
127
- MissingRequiredFieldSpecification: 24,
128
- NavigationTimingNotSupported: 25,
129
- OnError: 26,
130
- SessionRenewalDateIsZero: 27,
131
- SenderNotInitialized: 28,
132
- StartTrackEventFailed: 29,
133
- StopTrackEventFailed: 30,
134
- StartTrackFailed: 31,
135
- StopTrackFailed: 32,
136
- TelemetrySampledAndNotSent: 33,
137
- TrackEventFailed: 34,
138
- TrackExceptionFailed: 35,
139
- TrackMetricFailed: 36,
140
- TrackPVFailed: 37,
141
- TrackPVFailedCalc: 38,
142
- TrackTraceFailed: 39,
143
- TransmissionFailed: 40,
144
- FailedToSetStorageBuffer: 41,
145
- FailedToRestoreStorageBuffer: 42,
146
- InvalidBackendResponse: 43,
147
- FailedToFixDepricatedValues: 44,
148
- InvalidDurationValue: 45,
149
- TelemetryEnvelopeInvalid: 46,
150
- CreateEnvelopeError: 47,
151
- CannotSerializeObject: 48,
152
- CannotSerializeObjectNonSerializable: 49,
153
- CircularReferenceDetected: 50,
154
- ClearAuthContextFailed: 51,
155
- ExceptionTruncated: 52,
156
- IllegalCharsInName: 53,
157
- ItemNotInArray: 54,
158
- MaxAjaxPerPVExceeded: 55,
159
- MessageTruncated: 56,
160
- NameTooLong: 57,
161
- SampleRateOutOfRange: 58,
162
- SetAuthContextFailed: 59,
163
- SetAuthContextFailedAccountName: 60,
164
- StringValueTooLong: 61,
165
- StartCalledMoreThanOnce: 62,
166
- StopCalledWithoutStart: 63,
167
- TelemetryInitializerFailed: 64,
168
- TrackArgumentsNotSpecified: 65,
169
- UrlTooLong: 66,
170
- SessionStorageBufferFull: 67,
171
- CannotAccessCookie: 68,
172
- IdTooLong: 69,
173
- InvalidEvent: 70,
174
- FailedMonitorAjaxSetRequestHeader: 71,
175
- SendBrowserInfoOnUserInit: 72,
176
- PluginException: 73,
177
- NotificationException: 74,
178
- SnippetScriptLoadFailure: 99,
179
- InvalidInstrumentationKey: 100,
180
- CannotParseAiBlobValue: 101,
181
- InvalidContentBlob: 102,
182
- TrackPageActionEventFailed: 103,
183
- FailedAddingCustomDefinedRequestContext: 104,
184
- InMemoryStorageBufferFull: 105
185
- };
97
+ var strEmpty$1 = "";
186
98
 
187
- var strOnPrefix = "on";
188
- var strAttachEvent = "attachEvent";
189
- var strAddEventHelper = "addEventListener";
190
99
  var strToISOString = "toISOString";
191
100
  var cStrEndsWith = "endsWith";
192
101
  var strIndexOf = "indexOf";
@@ -194,7 +103,8 @@
194
103
  var strReduce = "reduce";
195
104
  var cStrTrim = "trim";
196
105
  var strToString = "toString";
197
- var _objDefineProperty = ObjDefineProperty;
106
+ var _objDefineProperty$1 = ObjDefineProperty;
107
+ var _objFreeze = ObjClass.freeze;
198
108
  var _objKeys = ObjClass.keys;
199
109
  var StringProto = String[strShimPrototype];
200
110
  var _strTrim = StringProto[cStrTrim];
@@ -205,6 +115,9 @@
205
115
  var _objToString = ObjProto[strToString];
206
116
  var _fnToString = ObjHasOwnProperty[strToString];
207
117
  _fnToString.call(ObjClass);
118
+ var rCamelCase = /-([a-z])/g;
119
+ var rNormalizeInvalid = /([^\w\d_$])/g;
120
+ var rLeadingNumeric = /^(\d+[\w\d_$])/;
208
121
  function isTypeof(value, theType) {
209
122
  return typeof value === theType;
210
123
  }
@@ -226,24 +139,18 @@
226
139
  function isFunction(value) {
227
140
  return !!(value && typeof value === strShimFunction);
228
141
  }
229
- function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
230
- if (useCapture === void 0) { useCapture = false; }
231
- var result = false;
232
- if (!isNullOrUndefined(obj)) {
233
- try {
234
- if (!isNullOrUndefined(obj[strAddEventHelper])) {
235
- obj[strAddEventHelper](eventNameWithoutOn, handlerRef, useCapture);
236
- result = true;
237
- }
238
- else if (!isNullOrUndefined(obj[strAttachEvent])) {
239
- obj[strAttachEvent](strOnPrefix + eventNameWithoutOn, handlerRef);
240
- result = true;
241
- }
242
- }
243
- catch (e) {
244
- }
142
+ function normalizeJsName(name) {
143
+ var value = name;
144
+ if (value && isString(value)) {
145
+ value = value.replace(rCamelCase, function (_all, letter) {
146
+ return letter.toUpperCase();
147
+ });
148
+ value = value.replace(rNormalizeInvalid, "_");
149
+ value = value.replace(rLeadingNumeric, function (_all, match) {
150
+ return "_" + match;
151
+ });
245
152
  }
246
- return result;
153
+ return value;
247
154
  }
248
155
  function objForEachKey(target, callbackfn) {
249
156
  if (target) {
@@ -447,7 +354,7 @@
447
354
  return result;
448
355
  }
449
356
  function objDefineAccessors(target, prop, getProp, setProp) {
450
- if (_objDefineProperty) {
357
+ if (_objDefineProperty$1) {
451
358
  try {
452
359
  var descriptor = {
453
360
  enumerable: true,
@@ -459,7 +366,7 @@
459
366
  if (setProp) {
460
367
  descriptor.set = setProp;
461
368
  }
462
- _objDefineProperty(target, prop, descriptor);
369
+ _objDefineProperty$1(target, prop, descriptor);
463
370
  return true;
464
371
  }
465
372
  catch (e) {
@@ -467,6 +374,10 @@
467
374
  }
468
375
  return false;
469
376
  }
377
+ function _doNothing(value) {
378
+ return value;
379
+ }
380
+ var objFreeze = _objFreeze || _doNothing;
470
381
  function dateNow() {
471
382
  var dt = Date;
472
383
  return dt.now ? dt.now() : new dt().getTime();
@@ -475,7 +386,7 @@
475
386
  if (isError(object)) {
476
387
  return object.name;
477
388
  }
478
- return "";
389
+ return strEmpty$1;
479
390
  }
480
391
  function setValue(target, field, value, valChk, srcChk) {
481
392
  var theValue = value;
@@ -491,6 +402,9 @@
491
402
  function isTruthy(value) {
492
403
  return !!value;
493
404
  }
405
+ function throwError(message) {
406
+ throw new Error(message);
407
+ }
494
408
  function createClassFromInterface(defaults) {
495
409
  return /** @class */ (function () {
496
410
  function class_1() {
@@ -504,6 +418,17 @@
504
418
  return class_1;
505
419
  }());
506
420
  }
421
+ function createEnumStyle(values) {
422
+ var enumClass = {};
423
+ objForEachKey(values, function (field, value) {
424
+ enumClass[field] = value;
425
+ if (!isUndefined(enumClass[value])) {
426
+ throwError("Value: [" + value + "] already exists for " + field);
427
+ }
428
+ enumClass[value] = field;
429
+ });
430
+ return objFreeze(enumClass);
431
+ }
507
432
 
508
433
  var strWindow = "window";
509
434
  var strDocument = "document";
@@ -591,7 +516,7 @@
591
516
  var nav = getNavigator();
592
517
  if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
593
518
  _navUserAgentCheck = nav.userAgent;
594
- var userAgent = (_navUserAgentCheck || "").toLowerCase();
519
+ var userAgent = (_navUserAgentCheck || strEmpty$1).toLowerCase();
595
520
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
596
521
  }
597
522
  return _isTrident;
@@ -600,9 +525,9 @@
600
525
  if (userAgentStr === void 0) { userAgentStr = null; }
601
526
  if (!userAgentStr) {
602
527
  var navigator_1 = getNavigator() || {};
603
- userAgentStr = navigator_1 ? (navigator_1.userAgent || "").toLowerCase() : "";
528
+ userAgentStr = navigator_1 ? (navigator_1.userAgent || strEmpty$1).toLowerCase() : strEmpty$1;
604
529
  }
605
- var ua = (userAgentStr || "").toLowerCase();
530
+ var ua = (userAgentStr || strEmpty$1).toLowerCase();
606
531
  if (strContains(ua, strMsie)) {
607
532
  var doc = getDocument() || {};
608
533
  return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
@@ -617,7 +542,7 @@
617
542
  }
618
543
  function dumpObj(object) {
619
544
  var objectTypeDump = Object[strShimPrototype].toString.call(object);
620
- var propertyValueDump = "";
545
+ var propertyValueDump = strEmpty$1;
621
546
  if (objectTypeDump === "[object Error]") {
622
547
  propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
623
548
  }
@@ -633,6 +558,160 @@
633
558
  return _beaconsSupported;
634
559
  }
635
560
 
561
+ var UInt32Mask = 0x100000000;
562
+ var MaxUInt32 = 0xffffffff;
563
+ var _mwcSeeded = false;
564
+ var _mwcW = 123456789;
565
+ var _mwcZ = 987654321;
566
+ function _mwcSeed(seedValue) {
567
+ if (seedValue < 0) {
568
+ seedValue >>>= 0;
569
+ }
570
+ _mwcW = (123456789 + seedValue) & MaxUInt32;
571
+ _mwcZ = (987654321 - seedValue) & MaxUInt32;
572
+ _mwcSeeded = true;
573
+ }
574
+ function _autoSeedMwc() {
575
+ try {
576
+ var now = dateNow() & 0x7fffffff;
577
+ _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
578
+ }
579
+ catch (e) {
580
+ }
581
+ }
582
+ function randomValue(maxValue) {
583
+ if (maxValue > 0) {
584
+ return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
585
+ }
586
+ return 0;
587
+ }
588
+ function random32(signed) {
589
+ var value = 0;
590
+ var c = getCrypto() || getMsCrypto();
591
+ if (c && c.getRandomValues) {
592
+ value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
593
+ }
594
+ if (value === 0 && isIE()) {
595
+ if (!_mwcSeeded) {
596
+ _autoSeedMwc();
597
+ }
598
+ value = mwcRandom32() & MaxUInt32;
599
+ }
600
+ if (value === 0) {
601
+ value = Math.floor((UInt32Mask * Math.random()) | 0);
602
+ }
603
+ if (!signed) {
604
+ value >>>= 0;
605
+ }
606
+ return value;
607
+ }
608
+ function mwcRandomSeed(value) {
609
+ if (!value) {
610
+ _autoSeedMwc();
611
+ }
612
+ else {
613
+ _mwcSeed(value);
614
+ }
615
+ }
616
+ function mwcRandom32(signed) {
617
+ _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
618
+ _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
619
+ var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
620
+ if (!signed) {
621
+ value >>>= 0;
622
+ }
623
+ return value;
624
+ }
625
+ function newId(maxLength) {
626
+ if (maxLength === void 0) { maxLength = 22; }
627
+ var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
628
+ var number = random32() >>> 0;
629
+ var chars = 0;
630
+ var result = strEmpty$1;
631
+ while (result.length < maxLength) {
632
+ chars++;
633
+ result += base64chars.charAt(number & 0x3F);
634
+ number >>>= 6;
635
+ if (chars === 5) {
636
+ number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
637
+ chars = 0;
638
+ }
639
+ }
640
+ return result;
641
+ }
642
+
643
+ var _objDefineProperty = ObjDefineProperty;
644
+ var version = "2.7.3";
645
+ var instanceName = "." + newId(6);
646
+ var _dataUid = 0;
647
+ function _createAccessor(target, prop, value) {
648
+ if (_objDefineProperty) {
649
+ try {
650
+ _objDefineProperty(target, prop, {
651
+ value: value,
652
+ enumerable: false,
653
+ configurable: true
654
+ });
655
+ return true;
656
+ }
657
+ catch (e) {
658
+ }
659
+ }
660
+ return false;
661
+ }
662
+ function _canAcceptData(target) {
663
+ return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
664
+ }
665
+ function _getCache(data, target) {
666
+ var theCache = target[data.id];
667
+ if (!theCache) {
668
+ theCache = {};
669
+ try {
670
+ if (_canAcceptData(target)) {
671
+ if (!_createAccessor(target, data.id, theCache)) {
672
+ target[data.id] = theCache;
673
+ }
674
+ }
675
+ }
676
+ catch (e) {
677
+ }
678
+ }
679
+ return theCache;
680
+ }
681
+ function createUniqueNamespace(name, includeVersion) {
682
+ if (includeVersion === void 0) { includeVersion = false; }
683
+ return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
684
+ }
685
+ function createElmNodeData(name) {
686
+ var data = {
687
+ id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
688
+ accept: function (target) {
689
+ return _canAcceptData(target);
690
+ },
691
+ get: function (target, name, defValue, addDefault) {
692
+ var theCache = target[data.id];
693
+ if (!theCache) {
694
+ if (addDefault) {
695
+ theCache = _getCache(data, target);
696
+ theCache[normalizeJsName(name)] = defValue;
697
+ }
698
+ return defValue;
699
+ }
700
+ return theCache[normalizeJsName(name)];
701
+ },
702
+ kill: function (target, name) {
703
+ if (target && target[name]) {
704
+ try {
705
+ delete target[name];
706
+ }
707
+ catch (e) {
708
+ }
709
+ }
710
+ }
711
+ };
712
+ return data;
713
+ }
714
+
636
715
  var strToGMTString = "toGMTString";
637
716
  var strToUTCString = "toUTCString";
638
717
  var strCookie = "cookie";
@@ -641,7 +720,6 @@
641
720
  var strIsCookieUseDisabled = "isCookieUseDisabled";
642
721
  var strDisableCookiesUsage = "disableCookiesUsage";
643
722
  var strConfigCookieMgr = "_ckMgr";
644
- var strEmpty = "";
645
723
  var _supportsCookies = null;
646
724
  var _allowUaSameSite = null;
647
725
  var _parsedCookieValue = null;
@@ -699,7 +777,7 @@
699
777
  var result = false;
700
778
  if (_isMgrEnabled(cookieMgr)) {
701
779
  var values = {};
702
- var theValue = strTrim(value || strEmpty);
780
+ var theValue = strTrim(value || strEmpty$1);
703
781
  var idx = theValue.indexOf(";");
704
782
  if (idx !== -1) {
705
783
  theValue = strTrim(value.substring(0, idx));
@@ -714,11 +792,11 @@
714
792
  if (expireMs > 0) {
715
793
  var expiry = new Date();
716
794
  expiry.setTime(expireMs);
717
- setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty, isTruthy);
795
+ setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty$1, isTruthy);
718
796
  }
719
797
  }
720
798
  if (!_isIE) {
721
- setValue(values, "max-age", strEmpty + maxAgeSec, null, isUndefined);
799
+ setValue(values, "max-age", strEmpty$1 + maxAgeSec, null, isUndefined);
722
800
  }
723
801
  }
724
802
  var location_1 = getLocation();
@@ -739,7 +817,7 @@
739
817
  return result;
740
818
  },
741
819
  get: function (name) {
742
- var value = strEmpty;
820
+ var value = strEmpty$1;
743
821
  if (_isMgrEnabled(cookieMgr)) {
744
822
  value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
745
823
  }
@@ -764,7 +842,7 @@
764
842
  values["max-age"] = "0";
765
843
  }
766
844
  var delCookie = cookieMgrConfig.delCookie || _setCookieValue;
767
- delCookie(name, _formatCookieValue(strEmpty, values));
845
+ delCookie(name, _formatCookieValue(strEmpty$1, values));
768
846
  result = true;
769
847
  }
770
848
  return result;
@@ -781,7 +859,7 @@
781
859
  _supportsCookies = doc[strCookie] !== undefined;
782
860
  }
783
861
  catch (e) {
784
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
862
+ logger && logger.throwInternal(2 , 68 , "Cannot access document.cookie - " + getExceptionName(e), { exception: dumpObj(e) });
785
863
  }
786
864
  }
787
865
  return _supportsCookies;
@@ -791,7 +869,7 @@
791
869
  if (theValue && theValue.length) {
792
870
  var parts = strTrim(theValue).split(";");
793
871
  arrForEach(parts, function (thePart) {
794
- thePart = strTrim(thePart || strEmpty);
872
+ thePart = strTrim(thePart || strEmpty$1);
795
873
  if (thePart) {
796
874
  var idx = thePart.indexOf("=");
797
875
  if (idx === -1) {
@@ -812,21 +890,21 @@
812
890
  return null;
813
891
  }
814
892
  function _formatCookieValue(value, values) {
815
- var cookieValue = value || strEmpty;
893
+ var cookieValue = value || strEmpty$1;
816
894
  objForEachKey(values, function (name, theValue) {
817
- cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty);
895
+ cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty$1);
818
896
  });
819
897
  return cookieValue;
820
898
  }
821
899
  function _getCookieValue(name) {
822
- var cookieValue = strEmpty;
900
+ var cookieValue = strEmpty$1;
823
901
  if (_doc) {
824
- var theCookie = _doc[strCookie] || strEmpty;
902
+ var theCookie = _doc[strCookie] || strEmpty$1;
825
903
  if (_parsedCookieValue !== theCookie) {
826
904
  _cookieCache = _extractParts(theCookie);
827
905
  _parsedCookieValue = theCookie;
828
906
  }
829
- cookieValue = strTrim(_cookieCache[name] || strEmpty);
907
+ cookieValue = strTrim(_cookieCache[name] || strEmpty$1);
830
908
  }
831
909
  return cookieValue;
832
910
  }
@@ -860,103 +938,117 @@
860
938
  return false;
861
939
  }
862
940
 
863
- var UInt32Mask = 0x100000000;
864
- var MaxUInt32 = 0xffffffff;
865
- var _mwcSeeded = false;
866
- var _mwcW = 123456789;
867
- var _mwcZ = 987654321;
868
- function _mwcSeed(seedValue) {
869
- if (seedValue < 0) {
870
- seedValue >>>= 0;
871
- }
872
- _mwcW = (123456789 + seedValue) & MaxUInt32;
873
- _mwcZ = (987654321 - seedValue) & MaxUInt32;
874
- _mwcSeeded = true;
875
- }
876
- function _autoSeedMwc() {
877
- try {
878
- var now = dateNow() & 0x7fffffff;
879
- _mwcSeed(((Math.random() * UInt32Mask) ^ now) + now);
880
- }
881
- catch (e) {
882
- }
883
- }
884
- function randomValue(maxValue) {
885
- if (maxValue > 0) {
886
- return Math.floor((random32() / MaxUInt32) * (maxValue + 1)) >>> 0;
887
- }
888
- return 0;
889
- }
890
- function random32(signed) {
891
- var value = 0;
892
- var c = getCrypto() || getMsCrypto();
893
- if (c && c.getRandomValues) {
894
- value = c.getRandomValues(new Uint32Array(1))[0] & MaxUInt32;
895
- }
896
- if (value === 0 && isIE()) {
897
- if (!_mwcSeeded) {
898
- _autoSeedMwc();
941
+ var strOnPrefix = "on";
942
+ var strAttachEvent = "attachEvent";
943
+ var strAddEventHelper = "addEventListener";
944
+ var strEvents = "events";
945
+ createUniqueNamespace("aiEvtPageHide");
946
+ createUniqueNamespace("aiEvtPageShow");
947
+ var _guid = 1;
948
+ var elmNodeData = createElmNodeData("events");
949
+ var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
950
+ function _normalizeNamespace(name) {
951
+ if (name && name.replace) {
952
+ return name.replace(/^\s*\.*|\.*\s*$/g, "");
953
+ }
954
+ return name;
955
+ }
956
+ function _getEvtNamespace(eventName, namespaces) {
957
+ if (namespaces) {
958
+ var theNamespace_1 = "";
959
+ if (isArray(namespaces)) {
960
+ theNamespace_1 = "";
961
+ arrForEach(namespaces, function (name) {
962
+ name = _normalizeNamespace(name);
963
+ if (name) {
964
+ if (name[0] !== ".") {
965
+ name = "." + name;
966
+ }
967
+ theNamespace_1 += name;
968
+ }
969
+ });
970
+ }
971
+ else {
972
+ theNamespace_1 = _normalizeNamespace(namespaces);
973
+ }
974
+ if (theNamespace_1) {
975
+ if (theNamespace_1[0] !== ".") {
976
+ theNamespace_1 = "." + theNamespace_1;
977
+ }
978
+ eventName = (eventName || "") + theNamespace_1;
899
979
  }
900
- value = mwcRandom32() & MaxUInt32;
901
- }
902
- if (value === 0) {
903
- value = Math.floor((UInt32Mask * Math.random()) | 0);
904
- }
905
- if (!signed) {
906
- value >>>= 0;
907
980
  }
908
- return value;
981
+ var parsedEvent = (eventNamespace.exec(eventName) || []);
982
+ return {
983
+ type: parsedEvent[1],
984
+ ns: ((parsedEvent[2] || "").split(".").sort()).join(".")
985
+ };
909
986
  }
910
- function mwcRandomSeed(value) {
911
- if (!value) {
912
- _autoSeedMwc();
913
- }
914
- else {
915
- _mwcSeed(value);
987
+ function _getRegisteredEvents(target, evtName, addDefault) {
988
+ if (addDefault === void 0) { addDefault = true; }
989
+ var aiEvts = elmNodeData.get(target, strEvents, {}, addDefault);
990
+ var registeredEvents = aiEvts[evtName];
991
+ if (!registeredEvents) {
992
+ registeredEvents = aiEvts[evtName] = [];
916
993
  }
994
+ return registeredEvents;
917
995
  }
918
- function mwcRandom32(signed) {
919
- _mwcZ = (36969 * (_mwcZ & 0xFFFF) + (_mwcZ >> 16)) & MaxUInt32;
920
- _mwcW = (18000 * (_mwcW & 0xFFFF) + (_mwcW >> 16)) & MaxUInt32;
921
- var value = (((_mwcZ << 16) + (_mwcW & 0xFFFF)) >>> 0) & MaxUInt32 | 0;
922
- if (!signed) {
923
- value >>>= 0;
996
+ function _doAttach(obj, evtName, handlerRef, useCapture) {
997
+ var result = false;
998
+ if (obj && evtName && evtName.type && handlerRef) {
999
+ if (obj[strAddEventHelper]) {
1000
+ obj[strAddEventHelper](evtName.type, handlerRef, useCapture);
1001
+ result = true;
1002
+ }
1003
+ else if (obj[strAttachEvent]) {
1004
+ obj[strAttachEvent](strOnPrefix + evtName.type, handlerRef);
1005
+ result = true;
1006
+ }
924
1007
  }
925
- return value;
1008
+ return result;
926
1009
  }
927
- function newId(maxLength) {
928
- if (maxLength === void 0) { maxLength = 22; }
929
- var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
930
- var number = random32() >>> 0;
931
- var chars = 0;
932
- var result = "";
933
- while (result.length < maxLength) {
934
- chars++;
935
- result += base64chars.charAt(number & 0x3F);
936
- number >>>= 6;
937
- if (chars === 5) {
938
- number = (((random32() << 2) & 0xFFFFFFFF) | (number & 0x03)) >>> 0;
939
- chars = 0;
1010
+ function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
1011
+ if (useCapture === void 0) { useCapture = false; }
1012
+ var result = false;
1013
+ if (target) {
1014
+ try {
1015
+ var evtName = _getEvtNamespace(eventName, evtNamespace);
1016
+ result = _doAttach(target, evtName, handlerRef, useCapture);
1017
+ if (result && elmNodeData.accept(target)) {
1018
+ var registeredEvent = {
1019
+ guid: _guid++,
1020
+ evtName: evtName,
1021
+ handler: handlerRef,
1022
+ capture: useCapture
1023
+ };
1024
+ _getRegisteredEvents(target, evtName.type).push(registeredEvent);
1025
+ }
1026
+ }
1027
+ catch (e) {
940
1028
  }
941
1029
  }
942
1030
  return result;
943
1031
  }
944
-
945
- var _cookieMgrs = null;
946
- var _canUseCookies;
947
- function addEventHandler(eventName, callback) {
1032
+ function attachEvent(obj, eventNameWithoutOn, handlerRef, useCapture) {
1033
+ if (useCapture === void 0) { useCapture = false; }
1034
+ return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);
1035
+ }
1036
+ function addEventHandler(eventName, callback, evtNamespace) {
948
1037
  var result = false;
949
1038
  var w = getWindow();
950
1039
  if (w) {
951
- result = attachEvent(w, eventName, callback);
952
- result = attachEvent(w["body"], eventName, callback) || result;
1040
+ result = eventOn(w, eventName, callback, evtNamespace);
1041
+ result = eventOn(w["body"], eventName, callback, evtNamespace) || result;
953
1042
  }
954
1043
  var doc = getDocument();
955
1044
  if (doc) {
956
- result = attachEvent(doc, eventName, callback) || result;
1045
+ result = eventOn(doc, eventName, callback, evtNamespace) || result;
957
1046
  }
958
1047
  return result;
959
1048
  }
1049
+
1050
+ var _cookieMgrs = null;
1051
+ var _canUseCookies;
960
1052
  function newGuid() {
961
1053
  function randomHexDigit() {
962
1054
  return randomValue(15);
@@ -975,7 +1067,7 @@
975
1067
  }
976
1068
  function generateW3CId() {
977
1069
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
978
- var oct = "", tmp;
1070
+ var oct = strEmpty$1, tmp;
979
1071
  for (var a = 0; a < 4; a++) {
980
1072
  tmp = random32();
981
1073
  oct +=
@@ -1070,6 +1162,95 @@
1070
1162
  return _legacyCookieMgr(null, logger).del(name);
1071
1163
  }
1072
1164
 
1165
+ createEnumStyle({
1166
+ CRITICAL: 1 ,
1167
+ WARNING: 2
1168
+ });
1169
+ var _InternalMessageId = createEnumStyle({
1170
+ BrowserDoesNotSupportLocalStorage: 0 ,
1171
+ BrowserCannotReadLocalStorage: 1 ,
1172
+ BrowserCannotReadSessionStorage: 2 ,
1173
+ BrowserCannotWriteLocalStorage: 3 ,
1174
+ BrowserCannotWriteSessionStorage: 4 ,
1175
+ BrowserFailedRemovalFromLocalStorage: 5 ,
1176
+ BrowserFailedRemovalFromSessionStorage: 6 ,
1177
+ CannotSendEmptyTelemetry: 7 ,
1178
+ ClientPerformanceMathError: 8 ,
1179
+ ErrorParsingAISessionCookie: 9 ,
1180
+ ErrorPVCalc: 10 ,
1181
+ ExceptionWhileLoggingError: 11 ,
1182
+ FailedAddingTelemetryToBuffer: 12 ,
1183
+ FailedMonitorAjaxAbort: 13 ,
1184
+ FailedMonitorAjaxDur: 14 ,
1185
+ FailedMonitorAjaxOpen: 15 ,
1186
+ FailedMonitorAjaxRSC: 16 ,
1187
+ FailedMonitorAjaxSend: 17 ,
1188
+ FailedMonitorAjaxGetCorrelationHeader: 18 ,
1189
+ FailedToAddHandlerForOnBeforeUnload: 19 ,
1190
+ FailedToSendQueuedTelemetry: 20 ,
1191
+ FailedToReportDataLoss: 21 ,
1192
+ FlushFailed: 22 ,
1193
+ MessageLimitPerPVExceeded: 23 ,
1194
+ MissingRequiredFieldSpecification: 24 ,
1195
+ NavigationTimingNotSupported: 25 ,
1196
+ OnError: 26 ,
1197
+ SessionRenewalDateIsZero: 27 ,
1198
+ SenderNotInitialized: 28 ,
1199
+ StartTrackEventFailed: 29 ,
1200
+ StopTrackEventFailed: 30 ,
1201
+ StartTrackFailed: 31 ,
1202
+ StopTrackFailed: 32 ,
1203
+ TelemetrySampledAndNotSent: 33 ,
1204
+ TrackEventFailed: 34 ,
1205
+ TrackExceptionFailed: 35 ,
1206
+ TrackMetricFailed: 36 ,
1207
+ TrackPVFailed: 37 ,
1208
+ TrackPVFailedCalc: 38 ,
1209
+ TrackTraceFailed: 39 ,
1210
+ TransmissionFailed: 40 ,
1211
+ FailedToSetStorageBuffer: 41 ,
1212
+ FailedToRestoreStorageBuffer: 42 ,
1213
+ InvalidBackendResponse: 43 ,
1214
+ FailedToFixDepricatedValues: 44 ,
1215
+ InvalidDurationValue: 45 ,
1216
+ TelemetryEnvelopeInvalid: 46 ,
1217
+ CreateEnvelopeError: 47 ,
1218
+ CannotSerializeObject: 48 ,
1219
+ CannotSerializeObjectNonSerializable: 49 ,
1220
+ CircularReferenceDetected: 50 ,
1221
+ ClearAuthContextFailed: 51 ,
1222
+ ExceptionTruncated: 52 ,
1223
+ IllegalCharsInName: 53 ,
1224
+ ItemNotInArray: 54 ,
1225
+ MaxAjaxPerPVExceeded: 55 ,
1226
+ MessageTruncated: 56 ,
1227
+ NameTooLong: 57 ,
1228
+ SampleRateOutOfRange: 58 ,
1229
+ SetAuthContextFailed: 59 ,
1230
+ SetAuthContextFailedAccountName: 60 ,
1231
+ StringValueTooLong: 61 ,
1232
+ StartCalledMoreThanOnce: 62 ,
1233
+ StopCalledWithoutStart: 63 ,
1234
+ TelemetryInitializerFailed: 64 ,
1235
+ TrackArgumentsNotSpecified: 65 ,
1236
+ UrlTooLong: 66 ,
1237
+ SessionStorageBufferFull: 67 ,
1238
+ CannotAccessCookie: 68 ,
1239
+ IdTooLong: 69 ,
1240
+ InvalidEvent: 70 ,
1241
+ FailedMonitorAjaxSetRequestHeader: 71 ,
1242
+ SendBrowserInfoOnUserInit: 72 ,
1243
+ PluginException: 73 ,
1244
+ NotificationException: 74 ,
1245
+ SnippetScriptLoadFailure: 99 ,
1246
+ InvalidInstrumentationKey: 100 ,
1247
+ CannotParseAiBlobValue: 101 ,
1248
+ InvalidContentBlob: 102 ,
1249
+ TrackPageActionEventFailed: 103 ,
1250
+ FailedAddingCustomDefinedRequestContext: 104 ,
1251
+ InMemoryStorageBufferFull: 105
1252
+ });
1253
+
1073
1254
  var RequestHeaders = {
1074
1255
  requestContextHeader: "Request-Context",
1075
1256
  requestContextTargetKey: "appId",
@@ -1102,7 +1283,7 @@
1102
1283
  name = strTrim(name.toString());
1103
1284
  if (name.length > 150 ) {
1104
1285
  nameTrunc = name.substring(0, 150 );
1105
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1286
+ logger && logger.throwInternal(2 , _InternalMessageId.NameTooLong, "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
1106
1287
  }
1107
1288
  }
1108
1289
  return nameTrunc || name;
@@ -1115,7 +1296,7 @@
1115
1296
  value = strTrim(value);
1116
1297
  if (value.toString().length > maxLength) {
1117
1298
  valueTrunc = value.toString().substring(0, maxLength);
1118
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1299
+ logger && logger.throwInternal(2 , _InternalMessageId.StringValueTooLong, "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
1119
1300
  }
1120
1301
  }
1121
1302
  return valueTrunc || value;
@@ -1128,7 +1309,7 @@
1128
1309
  if (message) {
1129
1310
  if (message.length > 32768 ) {
1130
1311
  messageTrunc = message.substring(0, 32768 );
1131
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1312
+ logger && logger.throwInternal(2 , _InternalMessageId.MessageTruncated, "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
1132
1313
  }
1133
1314
  }
1134
1315
  return messageTrunc || message;
@@ -1139,7 +1320,7 @@
1139
1320
  var value = "" + exception;
1140
1321
  if (value.length > 32768 ) {
1141
1322
  exceptionTrunc = value.substring(0, 32768 );
1142
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1323
+ logger && logger.throwInternal(2 , _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
1143
1324
  }
1144
1325
  }
1145
1326
  return exceptionTrunc || exception;
@@ -1153,7 +1334,7 @@
1153
1334
  value = getJSON().stringify(value);
1154
1335
  }
1155
1336
  catch (e) {
1156
- logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
1337
+ logger && logger.throwInternal(2 , _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e }, true);
1157
1338
  }
1158
1339
  }
1159
1340
  value = dataSanitizeString(logger, value, 8192 );
@@ -1184,7 +1365,7 @@
1184
1365
  input = strTrim(input);
1185
1366
  if (input.length > maxLength) {
1186
1367
  inputTrunc = input.substring(0, maxLength);
1187
- logger && logger.throwInternal(LoggingSeverity.WARNING, _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
1368
+ logger && logger.throwInternal(2 , _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
1188
1369
  }
1189
1370
  }
1190
1371
  return inputTrunc || input;
@@ -1230,6 +1411,7 @@
1230
1411
  return event;
1231
1412
  }
1232
1413
 
1414
+ var strEmpty = "";
1233
1415
  function stringToBoolOrDefault(str, defaultValue) {
1234
1416
  if (defaultValue === void 0) { defaultValue = false; }
1235
1417
  if (str === undefined || str === null) {
@@ -1242,16 +1424,16 @@
1242
1424
  totalms = 0;
1243
1425
  }
1244
1426
  totalms = Math.round(totalms);
1245
- var ms = "" + totalms % 1000;
1246
- var sec = "" + Math.floor(totalms / 1000) % 60;
1247
- var min = "" + Math.floor(totalms / (1000 * 60)) % 60;
1248
- var hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
1427
+ var ms = strEmpty + totalms % 1000;
1428
+ var sec = strEmpty + Math.floor(totalms / 1000) % 60;
1429
+ var min = strEmpty + Math.floor(totalms / (1000 * 60)) % 60;
1430
+ var hour = strEmpty + Math.floor(totalms / (1000 * 60 * 60)) % 24;
1249
1431
  var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
1250
1432
  ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
1251
1433
  sec = sec.length < 2 ? "0" + sec : sec;
1252
1434
  min = min.length < 2 ? "0" + min : min;
1253
1435
  hour = hour.length < 2 ? "0" + hour : hour;
1254
- return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
1436
+ return (days > 0 ? days + "." : strEmpty) + hour + ":" + min + ":" + sec + "." + ms;
1255
1437
  }
1256
1438
  function getExtensionByName(extensions, identifier) {
1257
1439
  var extension = null;
@@ -1275,17 +1457,15 @@
1275
1457
  var strNotSpecified = "not_specified";
1276
1458
  var strIkey = "iKey";
1277
1459
 
1278
- var StorageType;
1279
- (function (StorageType) {
1280
- StorageType[StorageType["LocalStorage"] = 0] = "LocalStorage";
1281
- StorageType[StorageType["SessionStorage"] = 1] = "SessionStorage";
1282
- })(StorageType || (StorageType = {}));
1283
- exports.DistributedTracingModes = void 0;
1284
- (function (DistributedTracingModes) {
1285
- DistributedTracingModes[DistributedTracingModes["AI"] = 0] = "AI";
1286
- DistributedTracingModes[DistributedTracingModes["AI_AND_W3C"] = 1] = "AI_AND_W3C";
1287
- DistributedTracingModes[DistributedTracingModes["W3C"] = 2] = "W3C";
1288
- })(exports.DistributedTracingModes || (exports.DistributedTracingModes = {}));
1460
+ var StorageType = createEnumStyle({
1461
+ LocalStorage: 0 ,
1462
+ SessionStorage: 1
1463
+ });
1464
+ var DistributedTracingModes = createEnumStyle({
1465
+ AI: 0 ,
1466
+ AI_AND_W3C: 1 ,
1467
+ W3C: 2
1468
+ });
1289
1469
 
1290
1470
  var _canUseLocalStorage = undefined;
1291
1471
  var _canUseSessionStorage = undefined;
@@ -1337,7 +1517,7 @@
1337
1517
  }
1338
1518
  catch (e) {
1339
1519
  _canUseLocalStorage = false;
1340
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1520
+ logger.throwInternal(2 , _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1341
1521
  }
1342
1522
  }
1343
1523
  return null;
@@ -1351,7 +1531,7 @@
1351
1531
  }
1352
1532
  catch (e) {
1353
1533
  _canUseLocalStorage = false;
1354
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1534
+ logger.throwInternal(2 , _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
1355
1535
  }
1356
1536
  }
1357
1537
  return false;
@@ -1365,7 +1545,7 @@
1365
1545
  }
1366
1546
  catch (e) {
1367
1547
  _canUseLocalStorage = false;
1368
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1548
+ logger.throwInternal(2 , _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1369
1549
  }
1370
1550
  }
1371
1551
  return false;
@@ -1393,7 +1573,7 @@
1393
1573
  }
1394
1574
  catch (e) {
1395
1575
  _canUseSessionStorage = false;
1396
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1576
+ logger.throwInternal(2 , _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1397
1577
  }
1398
1578
  }
1399
1579
  return null;
@@ -1407,7 +1587,7 @@
1407
1587
  }
1408
1588
  catch (e) {
1409
1589
  _canUseSessionStorage = false;
1410
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1590
+ logger.throwInternal(2 , _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + getExceptionName(e), { exception: dumpObj(e) });
1411
1591
  }
1412
1592
  }
1413
1593
  return false;
@@ -1421,7 +1601,7 @@
1421
1601
  }
1422
1602
  catch (e) {
1423
1603
  _canUseSessionStorage = false;
1424
- logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1604
+ logger.throwInternal(2 , _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + getExceptionName(e), { exception: dumpObj(e) });
1425
1605
  }
1426
1606
  }
1427
1607
  return false;
@@ -2691,6 +2871,7 @@
2691
2871
  exports.DataSanitizer = DataSanitizer;
2692
2872
  exports.DateTimeUtils = DateTimeUtils;
2693
2873
  exports.DisabledPropertyName = DisabledPropertyName;
2874
+ exports.DistributedTracingModes = DistributedTracingModes;
2694
2875
  exports.Envelope = Envelope;
2695
2876
  exports.Event = Event$1;
2696
2877
  exports.Exception = Exception;