@microsoft/1ds-core-js 3.2.3 → 3.2.6

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 (77) hide show
  1. package/CODE_OF_CONDUCT.md +9 -0
  2. package/CONTRIBUTING.md +14 -0
  3. package/LICENSE.TXT +3 -3
  4. package/NOTICE +17 -0
  5. package/PRIVACY +3 -0
  6. package/README.md +15 -1
  7. package/SECURITY.md +41 -0
  8. package/SUPPORT.md +14 -0
  9. package/bundle/{ms.core-3.2.3.gbl.js → ms.core-3.2.6.gbl.js} +826 -725
  10. package/bundle/ms.core-3.2.6.gbl.js.map +1 -0
  11. package/bundle/ms.core-3.2.6.gbl.min.js +7 -0
  12. package/bundle/ms.core-3.2.6.gbl.min.js.map +1 -0
  13. package/bundle/ms.core-3.2.6.integrity.json +46 -0
  14. package/bundle/{ms.core-3.2.3.js → ms.core-3.2.6.js} +826 -725
  15. package/bundle/ms.core-3.2.6.js.map +1 -0
  16. package/bundle/ms.core-3.2.6.min.js +7 -0
  17. package/bundle/ms.core-3.2.6.min.js.map +1 -0
  18. package/bundle/ms.core.gbl.js +825 -724
  19. package/bundle/ms.core.gbl.js.map +1 -1
  20. package/bundle/ms.core.gbl.min.js +2 -2
  21. package/bundle/ms.core.gbl.min.js.map +1 -1
  22. package/bundle/ms.core.integrity.json +17 -17
  23. package/bundle/ms.core.js +825 -724
  24. package/bundle/ms.core.js.map +1 -1
  25. package/bundle/ms.core.min.js +2 -2
  26. package/bundle/ms.core.min.js.map +1 -1
  27. package/dist/ms.core.js +36 -35
  28. package/dist/ms.core.js.map +1 -1
  29. package/dist/ms.core.min.js +2 -2
  30. package/dist/ms.core.min.js.map +1 -1
  31. package/dist-esm/src/AppInsightsCore.d.ts +2 -7
  32. package/dist-esm/src/AppInsightsCore.js +25 -27
  33. package/dist-esm/src/AppInsightsCore.js.map +1 -1
  34. package/dist-esm/src/BaseCore.d.ts +2 -2
  35. package/dist-esm/src/BaseCore.js +17 -11
  36. package/dist-esm/src/BaseCore.js.map +1 -1
  37. package/dist-esm/src/DataModels.d.ts +5 -0
  38. package/dist-esm/src/DataModels.js +1 -1
  39. package/dist-esm/src/ESPromise.d.ts +5 -5
  40. package/dist-esm/src/ESPromise.js +7 -7
  41. package/dist-esm/src/ESPromise.js.map +1 -1
  42. package/dist-esm/src/ESPromiseScheduler.d.ts +4 -4
  43. package/dist-esm/src/ESPromiseScheduler.js +8 -8
  44. package/dist-esm/src/ESPromiseScheduler.js.map +1 -1
  45. package/dist-esm/src/Enums.d.ts +5 -5
  46. package/dist-esm/src/Enums.js +6 -6
  47. package/dist-esm/src/Enums.js.map +1 -1
  48. package/dist-esm/src/Index.d.ts +1 -2
  49. package/dist-esm/src/Index.js +2 -2
  50. package/dist-esm/src/Index.js.map +1 -1
  51. package/dist-esm/src/InternalConstants.d.ts +6 -0
  52. package/dist-esm/src/InternalConstants.js +19 -0
  53. package/dist-esm/src/InternalConstants.js.map +1 -0
  54. package/dist-esm/src/Utils.d.ts +9 -3
  55. package/dist-esm/src/Utils.js +19 -18
  56. package/dist-esm/src/Utils.js.map +1 -1
  57. package/dist-esm/src/ValueSanitizer.d.ts +1 -1
  58. package/dist-esm/src/ValueSanitizer.js +5 -4
  59. package/dist-esm/src/ValueSanitizer.js.map +1 -1
  60. package/package.json +4 -2
  61. package/src/AppInsightsCore.ts +29 -31
  62. package/src/BaseCore.ts +14 -11
  63. package/src/DataModels.ts +6 -0
  64. package/src/ESPromise.ts +6 -6
  65. package/src/ESPromiseScheduler.ts +8 -8
  66. package/src/Enums.ts +5 -5
  67. package/src/Index.ts +1 -1
  68. package/src/InternalConstants.ts +16 -0
  69. package/src/Utils.ts +24 -24
  70. package/src/ValueSanitizer.ts +5 -4
  71. package/bundle/ms.core-3.2.3.gbl.js.map +0 -1
  72. package/bundle/ms.core-3.2.3.gbl.min.js +0 -7
  73. package/bundle/ms.core-3.2.3.gbl.min.js.map +0 -1
  74. package/bundle/ms.core-3.2.3.integrity.json +0 -46
  75. package/bundle/ms.core-3.2.3.js.map +0 -1
  76. package/bundle/ms.core-3.2.3.min.js +0 -7
  77. package/bundle/ms.core-3.2.3.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * 1DS JS SDK Core, 3.2.3
2
+ * 1DS JS SDK Core, 3.2.6
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -103,26 +103,79 @@
103
103
 
104
104
  var MinChannelPriorty = 100;
105
105
 
106
- var strEmpty = "";
107
- var strProcessTelemetry = "processTelemetry";
108
- var strPriority = "priority";
109
- var strSetNextPlugin = "setNextPlugin";
110
- var strIsInitialized = "isInitialized";
111
- var strTeardown = "teardown";
112
- var strCore = "core";
113
- var strUpdate = "update";
114
- var strDisabled = "disabled";
115
- var strDoTeardown = "_doTeardown";
116
- var strProcessNext = "processNext";
117
- var strResume = "resume";
118
- var strPause = "pause";
119
- var strNotificationListener = "NotificationListener";
120
- var strAddNotificationListener = "add" + strNotificationListener;
121
- var strRemoveNotificationListener = "remove" + strNotificationListener;
122
- var strEventsSent = "eventsSent";
123
- var strEventsDiscarded = "eventsDiscarded";
124
- var strEventsSendRequest = "eventsSendRequest";
125
- var strPerfEvent = "perfEvent";
106
+ var _DYN_INITIALIZE = "initialize";
107
+ var _DYN_NAME = "name";
108
+ var _DYN_GET_NOTIFY_MGR = "getNotifyMgr";
109
+ var _DYN_IDENTIFIER = "identifier";
110
+ var _DYN_PUSH = "push";
111
+ var _DYN_IS_INITIALIZED = "isInitialized";
112
+ var _DYN_CONFIG = "config";
113
+ var _DYN_INSTRUMENTATION_KEY = "instrumentationKey";
114
+ var _DYN_LOGGER = "logger";
115
+ var _DYN_LENGTH = "length";
116
+ var _DYN_TIME = "time";
117
+ var _DYN_PROCESS_NEXT = "processNext";
118
+ var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
119
+ var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener";
120
+ var _DYN_REMOVE_NOTIFICATION_2 = "removeNotificationListener";
121
+ var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs";
122
+ var _DYN_ON_COMPLETE = "onComplete";
123
+ var _DYN_GET_PLUGIN = "getPlugin";
124
+ var _DYN_FLUSH = "flush";
125
+ var _DYN__EXTENSIONS = "_extensions";
126
+ var _DYN_SPLICE = "splice";
127
+ var _DYN_TEARDOWN = "teardown";
128
+ var _DYN_MESSAGE_ID = "messageId";
129
+ var _DYN_MESSAGE = "message";
130
+ var _DYN_IS_ASYNC = "isAsync";
131
+ var _DYN__DO_TEARDOWN = "_doTeardown";
132
+ var _DYN_UPDATE = "update";
133
+ var _DYN_GET_NEXT = "getNext";
134
+ var _DYN_DIAG_LOG = "diagLog";
135
+ var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
136
+ var _DYN_CREATE_NEW = "createNew";
137
+ var _DYN_COOKIE_CFG = "cookieCfg";
138
+ var _DYN_INDEX_OF = "indexOf";
139
+ var _DYN_SUBSTRING = "substring";
140
+ var _DYN_USER_AGENT = "userAgent";
141
+ var _DYN_SPLIT = "split";
142
+ var _DYN_SET_ENABLED = "setEnabled";
143
+ var _DYN_SUBSTR = "substr";
144
+ var _DYN_NODE_TYPE = "nodeType";
145
+ var _DYN_APPLY = "apply";
146
+ var _DYN_REPLACE = "replace";
147
+ var _DYN_ENABLE_DEBUG_EXCEPTI4 = "enableDebugExceptions";
148
+ var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
149
+ var _DYN_TO_LOWER_CASE = "toLowerCase";
150
+ var _DYN_CALL = "call";
151
+ var _DYN_TYPE = "type";
152
+ var _DYN_HANDLER = "handler";
153
+ var _DYN_LISTENERS = "listeners";
154
+ var _DYN_IS_CHILD_EVT = "isChildEvt";
155
+ var _DYN_GET_CTX = "getCtx";
156
+ var _DYN_SET_CTX = "setCtx";
157
+ var _DYN_COMPLETE = "complete";
158
+ var _DYN_TRACE_ID = "traceId";
159
+ var _DYN_SPAN_ID = "spanId";
160
+ var _DYN_TRACE_FLAGS = "traceFlags";
161
+ var _DYN_VERSION = "version";
162
+
163
+ var STR_EMPTY$1 = "";
164
+ var STR_CHANNELS = "channels";
165
+ var STR_CORE = "core";
166
+ var STR_CREATE_PERF_MGR = "createPerfMgr";
167
+ var STR_DISABLED = "disabled";
168
+ var STR_EXTENSION_CONFIG = "extensionConfig";
169
+ var STR_EXTENSIONS = "extensions";
170
+ var STR_PROCESS_TELEMETRY = "processTelemetry";
171
+ var STR_PRIORITY = "priority";
172
+ var STR_EVENTS_SENT = "eventsSent";
173
+ var STR_EVENTS_DISCARDED = "eventsDiscarded";
174
+ var STR_EVENTS_SEND_REQUEST = "eventsSendRequest";
175
+ var STR_PERF_EVENT = "perfEvent";
176
+ var STR_ERROR_TO_CONSOLE = "errorToConsole";
177
+ var STR_WARN_TO_CONSOLE = "warnToConsole";
178
+ var STR_GET_PERF_MGR = "getPerfMgr";
126
179
 
127
180
  var strToISOString = "toISOString";
128
181
  var cStrEndsWith = "endsWith";
@@ -147,7 +200,7 @@
147
200
  var _isArray = Array.isArray;
148
201
  var _objToString = ObjProto[strToString];
149
202
  var _fnToString = ObjHasOwnProperty[strToString];
150
- var _objFunctionString = _fnToString.call(ObjClass);
203
+ var _objFunctionString = _fnToString[_DYN_CALL ](ObjClass);
151
204
  var rCamelCase = /-([a-z])/g;
152
205
  var rNormalizeInvalid = /([^\w\d_$])/g;
153
206
  var rLeadingNumeric = /^(\d+[\w\d_$])/;
@@ -177,7 +230,7 @@
177
230
  return !isNullOrUndefined(value);
178
231
  }
179
232
  function hasOwnProperty(obj, prop) {
180
- return !!(obj && ObjHasOwnProperty.call(obj, prop));
233
+ return !!(obj && ObjHasOwnProperty[_DYN_CALL ](obj, prop));
181
234
  }
182
235
  function isObject(value) {
183
236
  return !!(value && typeof value === strShimObject);
@@ -188,11 +241,11 @@
188
241
  function normalizeJsName(name) {
189
242
  var value = name;
190
243
  if (value && isString(value)) {
191
- value = value.replace(rCamelCase, function (_all, letter) {
244
+ value = value[_DYN_REPLACE ](rCamelCase, function (_all, letter) {
192
245
  return letter.toUpperCase();
193
246
  });
194
- value = value.replace(rNormalizeInvalid, "_");
195
- value = value.replace(rLeadingNumeric, function (_all, match) {
247
+ value = value[_DYN_REPLACE ](rNormalizeInvalid, "_");
248
+ value = value[_DYN_REPLACE ](rLeadingNumeric, function (_all, match) {
196
249
  return "_" + match;
197
250
  });
198
251
  }
@@ -201,8 +254,8 @@
201
254
  function objForEachKey(target, callbackfn) {
202
255
  if (target) {
203
256
  for (var prop in target) {
204
- if (ObjHasOwnProperty.call(target, prop)) {
205
- callbackfn.call(target, prop, target[prop]);
257
+ if (ObjHasOwnProperty[_DYN_CALL ](target, prop)) {
258
+ callbackfn[_DYN_CALL ](target, prop, target[prop]);
206
259
  }
207
260
  }
208
261
  }
@@ -216,8 +269,8 @@
216
269
  }
217
270
  function _strEndsWithPoly(value, search) {
218
271
  var result = false;
219
- var searchLen = search ? search.length : 0;
220
- var valLen = value ? value.length : 0;
272
+ var searchLen = search ? search[_DYN_LENGTH ] : 0;
273
+ var valLen = value ? value[_DYN_LENGTH ] : 0;
221
274
  if (searchLen && valLen && valLen >= searchLen && !(result = value === search)) {
222
275
  var pos = valLen - 1;
223
276
  for (var lp = searchLen - 1; lp >= 0; lp--) {
@@ -239,8 +292,8 @@
239
292
  }
240
293
  function _strStartsWithPoly(value, checkValue) {
241
294
  var result = false;
242
- var chkLen = checkValue ? checkValue.length : 0;
243
- if (value && chkLen && value.length >= chkLen && !(result = value === checkValue)) {
295
+ var chkLen = checkValue ? checkValue[_DYN_LENGTH ] : 0;
296
+ if (value && chkLen && value[_DYN_LENGTH ] >= chkLen && !(result = value === checkValue)) {
244
297
  for (var lp = 0; lp < chkLen; lp++) {
245
298
  if (value[lp] !== checkValue[lp]) {
246
299
  return false;
@@ -252,19 +305,19 @@
252
305
  }
253
306
  function strContains(value, search) {
254
307
  if (value && search) {
255
- return value.indexOf(search) !== -1;
308
+ return value[_DYN_INDEX_OF ](search) !== -1;
256
309
  }
257
310
  return false;
258
311
  }
259
312
  function isDate(obj) {
260
- return !!(obj && _objToString.call(obj) === "[object Date]");
313
+ return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Date]");
261
314
  }
262
315
  var isArray = _isArray || _isArrayPoly;
263
316
  function _isArrayPoly(obj) {
264
- return !!(obj && _objToString.call(obj) === "[object Array]");
317
+ return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Array]");
265
318
  }
266
319
  function isError(obj) {
267
- return !!(obj && _objToString.call(obj) === "[object Error]");
320
+ return !!(obj && _objToString[_DYN_CALL ](obj) === "[object Error]");
268
321
  }
269
322
  function isString(value) {
270
323
  return typeof value === "string";
@@ -283,10 +336,10 @@
283
336
  result = true;
284
337
  }
285
338
  else {
286
- if (proto[strConstructor] && ObjHasOwnProperty.call(proto, strConstructor)) {
339
+ if (proto[strConstructor] && ObjHasOwnProperty[_DYN_CALL ](proto, strConstructor)) {
287
340
  proto = proto[strConstructor];
288
341
  }
289
- result = typeof proto === strShimFunction && _fnToString.call(proto) === _objFunctionString;
342
+ result = typeof proto === strShimFunction && _fnToString[_DYN_CALL ](proto) === _objFunctionString;
290
343
  }
291
344
  }
292
345
  return result;
@@ -300,7 +353,7 @@
300
353
  if (date && date.getUTCFullYear) {
301
354
  var pad = function (num) {
302
355
  var r = String(num);
303
- if (r.length === 1) {
356
+ if (r[_DYN_LENGTH ] === 1) {
304
357
  r = "0" + r;
305
358
  }
306
359
  return r;
@@ -316,11 +369,11 @@
316
369
  }
317
370
  }
318
371
  function arrForEach(arr, callbackfn, thisArg) {
319
- var len = arr.length;
372
+ var len = arr[_DYN_LENGTH ];
320
373
  try {
321
374
  for (var idx = 0; idx < len; idx++) {
322
375
  if (idx in arr) {
323
- if (callbackfn.call(thisArg || arr, arr[idx], idx, arr) === -1) {
376
+ if (callbackfn[_DYN_CALL ](thisArg || arr, arr[idx], idx, arr) === -1) {
324
377
  break;
325
378
  }
326
379
  }
@@ -334,7 +387,7 @@
334
387
  if (arr[strIndexOf]) {
335
388
  return arr[strIndexOf](searchElement, fromIndex);
336
389
  }
337
- var len = arr.length;
390
+ var len = arr[_DYN_LENGTH ];
338
391
  var from = fromIndex || 0;
339
392
  try {
340
393
  for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
@@ -354,13 +407,13 @@
354
407
  if (arr[strMap]) {
355
408
  return arr[strMap](callbackfn, thisArg);
356
409
  }
357
- var len = arr.length;
410
+ var len = arr[_DYN_LENGTH ];
358
411
  var _this = thisArg || arr;
359
412
  results = new Array(len);
360
413
  try {
361
414
  for (var lp = 0; lp < len; lp++) {
362
415
  if (lp in arr) {
363
- results[lp] = callbackfn.call(_this, arr[lp], arr);
416
+ results[lp] = callbackfn[_DYN_CALL ](_this, arr[lp], arr);
364
417
  }
365
418
  }
366
419
  }
@@ -375,9 +428,9 @@
375
428
  if (arr[strReduce]) {
376
429
  return arr[strReduce](callbackfn, initialValue);
377
430
  }
378
- var len = arr.length;
431
+ var len = arr[_DYN_LENGTH ];
379
432
  var lp = 0;
380
- if (arguments.length >= 3) {
433
+ if (arguments[_DYN_LENGTH ] >= 3) {
381
434
  value = arguments[2];
382
435
  }
383
436
  else {
@@ -397,7 +450,7 @@
397
450
  }
398
451
  function strTrim(str) {
399
452
  if (str) {
400
- str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str.replace ? str.replace(/^\s+|\s+$/g, "") : str);
453
+ str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str[_DYN_REPLACE ] ? str[_DYN_REPLACE ](/^\s+|\s+$/g, STR_EMPTY$1) : str);
401
454
  }
402
455
  return str;
403
456
  }
@@ -421,15 +474,15 @@
421
474
  }
422
475
  var result = [];
423
476
  for (var prop in obj) {
424
- if (obj && ObjHasOwnProperty.call(obj, prop)) {
425
- result.push(prop);
477
+ if (obj && ObjHasOwnProperty[_DYN_CALL ](obj, prop)) {
478
+ result[_DYN_PUSH ](prop);
426
479
  }
427
480
  }
428
481
  if (_objKeysHasDontEnumBug) {
429
- var dontEnumsLength = _objKeysDontEnums.length;
482
+ var dontEnumsLength = _objKeysDontEnums[_DYN_LENGTH ];
430
483
  for (var lp = 0; lp < dontEnumsLength; lp++) {
431
- if (obj && ObjHasOwnProperty.call(obj, _objKeysDontEnums[lp])) {
432
- result.push(_objKeysDontEnums[lp]);
484
+ if (obj && ObjHasOwnProperty[_DYN_CALL ](obj, _objKeysDontEnums[lp])) {
485
+ result[_DYN_PUSH ](_objKeysDontEnums[lp]);
433
486
  }
434
487
  }
435
488
  }
@@ -477,9 +530,9 @@
477
530
  }
478
531
  function getExceptionName(object) {
479
532
  if (isError(object)) {
480
- return object.name;
533
+ return object[_DYN_NAME ];
481
534
  }
482
- return strEmpty;
535
+ return STR_EMPTY$1;
483
536
  }
484
537
  function setValue(target, field, value, valChk, srcChk) {
485
538
  var theValue = value;
@@ -506,6 +559,9 @@
506
559
  }
507
560
  return theValue;
508
561
  }
562
+ function getCfgValue(theValue, defaultValue) {
563
+ return !isNullOrUndefined(theValue) ? theValue : defaultValue;
564
+ }
509
565
  function isNotTruthy(value) {
510
566
  return !value;
511
567
  }
@@ -530,7 +586,7 @@
530
586
  src = srcFunc();
531
587
  }
532
588
  if (src) {
533
- return src[funcName].apply(src, originalArguments);
589
+ return src[funcName][_DYN_APPLY ](src, originalArguments);
534
590
  }
535
591
  };
536
592
  }
@@ -590,7 +646,7 @@
590
646
  function objExtend(obj1, obj2, obj3, obj4, obj5, obj6) {
591
647
  var theArgs = arguments;
592
648
  var extended = theArgs[0] || {};
593
- var argLen = theArgs.length;
649
+ var argLen = theArgs[_DYN_LENGTH ];
594
650
  var deep = false;
595
651
  var idx = 1;
596
652
  if (argLen > 0 && isBoolean(extended)) {
@@ -606,7 +662,7 @@
606
662
  var isArgArray = isArray(arg);
607
663
  var isArgObj = isObject(arg);
608
664
  for (var prop in arg) {
609
- var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty.call(arg, prop)));
665
+ var propOk = (isArgArray && (prop in arg)) || (isArgObj && (ObjHasOwnProperty[_DYN_CALL ](arg, prop)));
610
666
  if (!propOk) {
611
667
  continue;
612
668
  }
@@ -1037,9 +1093,9 @@
1037
1093
  }
1038
1094
  function isIE() {
1039
1095
  var nav = getNavigator();
1040
- if (nav && (nav.userAgent !== _navUserAgentCheck || _isTrident === null)) {
1041
- _navUserAgentCheck = nav.userAgent;
1042
- var userAgent = (_navUserAgentCheck || strEmpty).toLowerCase();
1096
+ if (nav && (nav[_DYN_USER_AGENT ] !== _navUserAgentCheck || _isTrident === null)) {
1097
+ _navUserAgentCheck = nav[_DYN_USER_AGENT ];
1098
+ var userAgent = (_navUserAgentCheck || STR_EMPTY$1)[_DYN_TO_LOWER_CASE ]();
1043
1099
  _isTrident = (strContains(userAgent, strMsie) || strContains(userAgent, strTrident));
1044
1100
  }
1045
1101
  return _isTrident;
@@ -1048,15 +1104,15 @@
1048
1104
  if (userAgentStr === void 0) { userAgentStr = null; }
1049
1105
  if (!userAgentStr) {
1050
1106
  var navigator_1 = getNavigator() || {};
1051
- userAgentStr = navigator_1 ? (navigator_1.userAgent || strEmpty).toLowerCase() : strEmpty;
1107
+ userAgentStr = navigator_1 ? (navigator_1[_DYN_USER_AGENT ] || STR_EMPTY$1)[_DYN_TO_LOWER_CASE ]() : STR_EMPTY$1;
1052
1108
  }
1053
- var ua = (userAgentStr || strEmpty).toLowerCase();
1109
+ var ua = (userAgentStr || STR_EMPTY$1)[_DYN_TO_LOWER_CASE ]();
1054
1110
  if (strContains(ua, strMsie)) {
1055
1111
  var doc = getDocument() || {};
1056
- return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
1112
+ return Math.max(parseInt(ua[_DYN_SPLIT ](strMsie)[1]), (doc[strDocumentMode] || 0));
1057
1113
  }
1058
1114
  else if (strContains(ua, strTrident)) {
1059
- var tridentVer = parseInt(ua.split(strTrident)[1]);
1115
+ var tridentVer = parseInt(ua[_DYN_SPLIT ](strTrident)[1]);
1060
1116
  if (tridentVer) {
1061
1117
  return tridentVer + 4;
1062
1118
  }
@@ -1064,10 +1120,10 @@
1064
1120
  return null;
1065
1121
  }
1066
1122
  function dumpObj(object) {
1067
- var objectTypeDump = Object[strShimPrototype].toString.call(object);
1068
- var propertyValueDump = strEmpty;
1123
+ var objectTypeDump = Object[strShimPrototype].toString[_DYN_CALL ](object);
1124
+ var propertyValueDump = STR_EMPTY$1;
1069
1125
  if (objectTypeDump === "[object Error]") {
1070
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
1126
+ propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object[_DYN_NAME ] + "'";
1071
1127
  }
1072
1128
  else if (hasJSON()) {
1073
1129
  propertyValueDump = getJSON().stringify(object);
@@ -1114,10 +1170,10 @@
1114
1170
  }
1115
1171
  function _getNamedValue(values, name) {
1116
1172
  if (values) {
1117
- for (var i = 0; i < values.length; i++) {
1173
+ for (var i = 0; i < values[_DYN_LENGTH ]; i++) {
1118
1174
  var value = values[i];
1119
- if (value.name) {
1120
- if (value.name === name) {
1175
+ if (value[_DYN_NAME ]) {
1176
+ if (value[_DYN_NAME ] === name) {
1121
1177
  return value;
1122
1178
  }
1123
1179
  }
@@ -1137,7 +1193,7 @@
1137
1193
  var perf = getPerformance();
1138
1194
  if (perf) {
1139
1195
  var navPerf = perf.getEntriesByType("navigation") || [];
1140
- value = _getNamedValue((navPerf.length > 0 ? navPerf[0] : {}).serverTiming, name).description;
1196
+ value = _getNamedValue((navPerf[_DYN_LENGTH ] > 0 ? navPerf[0] : {}).serverTiming, name).description;
1141
1197
  }
1142
1198
  return value;
1143
1199
  }
@@ -1152,7 +1208,7 @@
1152
1208
  if (dbgExt) {
1153
1209
  var listener = dbgExt.listener;
1154
1210
  if (listener && listener[name]) {
1155
- listener[name].apply(listener, args);
1211
+ listener[name][_DYN_APPLY ](listener, args);
1156
1212
  }
1157
1213
  }
1158
1214
  };
@@ -1174,7 +1230,7 @@
1174
1230
  function getDebugListener(config) {
1175
1231
  if (!_debugListener) {
1176
1232
  _debugListener = {};
1177
- for (var lp = 0; lp < listenerFuncs.length; lp++) {
1233
+ for (var lp = 0; lp < listenerFuncs[_DYN_LENGTH ]; lp++) {
1178
1234
  _debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
1179
1235
  }
1180
1236
  }
@@ -1184,13 +1240,11 @@
1184
1240
  var AiNonUserActionablePrefix = "AI (Internal): ";
1185
1241
  var AiUserActionablePrefix = "AI: ";
1186
1242
  var AIInternalMessagePrefix = "AITR_";
1187
- var strErrorToConsole = "errorToConsole";
1188
- var strWarnToConsole = "warnToConsole";
1189
1243
  function _sanitizeDiagnosticText(text) {
1190
1244
  if (text) {
1191
- return "\"" + text.replace(/\"/g, strEmpty) + "\"";
1245
+ return "\"" + text[_DYN_REPLACE ](/\"/g, STR_EMPTY$1) + "\"";
1192
1246
  }
1193
- return strEmpty;
1247
+ return STR_EMPTY$1;
1194
1248
  }
1195
1249
  function _logToConsole(func, message) {
1196
1250
  var theConsole = getConsole();
@@ -1208,23 +1262,23 @@
1208
1262
  function _InternalLogMessage(msgId, msg, isUserAct, properties) {
1209
1263
  if (isUserAct === void 0) { isUserAct = false; }
1210
1264
  var _self = this;
1211
- _self.messageId = msgId;
1212
- _self.message =
1265
+ _self[_DYN_MESSAGE_ID ] = msgId;
1266
+ _self[_DYN_MESSAGE ] =
1213
1267
  (isUserAct ? AiUserActionablePrefix : AiNonUserActionablePrefix) +
1214
1268
  msgId;
1215
- var strProps = strEmpty;
1269
+ var strProps = STR_EMPTY$1;
1216
1270
  if (hasJSON()) {
1217
1271
  strProps = getJSON().stringify(properties);
1218
1272
  }
1219
- var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : strEmpty) +
1220
- (properties ? " props:" + _sanitizeDiagnosticText(strProps) : strEmpty);
1221
- _self.message += diagnosticText;
1273
+ var diagnosticText = (msg ? " message:" + _sanitizeDiagnosticText(msg) : STR_EMPTY$1) +
1274
+ (properties ? " props:" + _sanitizeDiagnosticText(strProps) : STR_EMPTY$1);
1275
+ _self[_DYN_MESSAGE ] += diagnosticText;
1222
1276
  }
1223
1277
  _InternalLogMessage.dataType = "MessageData";
1224
1278
  return _InternalLogMessage;
1225
1279
  }());
1226
1280
  function safeGetLogger(core, config) {
1227
- return (core || {}).logger || new DiagnosticLogger(config);
1281
+ return (core || {})[_DYN_LOGGER ] || new DiagnosticLogger(config);
1228
1282
  }
1229
1283
  var DiagnosticLogger = /** @class */ (function () {
1230
1284
  function DiagnosticLogger(config) {
@@ -1232,48 +1286,49 @@
1232
1286
  this.queue = [];
1233
1287
  var _messageCount = 0;
1234
1288
  var _messageLogged = {};
1289
+ var _loggingLevelConsole;
1290
+ var _loggingLevelTelemetry;
1291
+ var _maxInternalMessageLimit;
1292
+ var _enableDebugExceptions;
1235
1293
  dynamicProto(DiagnosticLogger, this, function (_self) {
1236
- if (isNullOrUndefined(config)) {
1237
- config = {};
1238
- }
1239
- _self.consoleLoggingLevel = function () { return _getConfigValue("loggingLevelConsole", 0); };
1240
- _self.telemetryLoggingLevel = function () { return _getConfigValue("loggingLevelTelemetry", 1); };
1241
- _self.maxInternalMessageLimit = function () { return _getConfigValue("maxMessageLimit", 25); };
1242
- _self.enableDebugExceptions = function () { return _getConfigValue("enableDebugExceptions", false); };
1294
+ _setDefaultsFromConfig(config || {});
1295
+ _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1296
+ _self.telemetryLoggingLevel = function () { return _loggingLevelTelemetry; };
1297
+ _self.maxInternalMessageLimit = function () { return _maxInternalMessageLimit; };
1298
+ _self[_DYN_ENABLE_DEBUG_EXCEPTI4 ] = function () { return _enableDebugExceptions; };
1243
1299
  _self.throwInternal = function (severity, msgId, msg, properties, isUserAct) {
1244
1300
  if (isUserAct === void 0) { isUserAct = false; }
1245
1301
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
1246
- if (_self.enableDebugExceptions()) {
1302
+ if (_enableDebugExceptions) {
1247
1303
  throw dumpObj(message);
1248
1304
  }
1249
1305
  else {
1250
- var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
1251
- if (!isUndefined(message.message)) {
1252
- var logLevel = _self.consoleLoggingLevel();
1306
+ var logFunc = severity === 1 ? STR_ERROR_TO_CONSOLE : STR_WARN_TO_CONSOLE;
1307
+ if (!isUndefined(message[_DYN_MESSAGE ])) {
1253
1308
  if (isUserAct) {
1254
- var messageKey = +message.messageId;
1255
- if (!_messageLogged[messageKey] && logLevel >= severity) {
1256
- _self[logFunc](message.message);
1309
+ var messageKey = +message[_DYN_MESSAGE_ID ];
1310
+ if (!_messageLogged[messageKey] && _loggingLevelConsole >= severity) {
1311
+ _self[logFunc](message[_DYN_MESSAGE ]);
1257
1312
  _messageLogged[messageKey] = true;
1258
1313
  }
1259
1314
  }
1260
1315
  else {
1261
- if (logLevel >= severity) {
1262
- _self[logFunc](message.message);
1316
+ if (_loggingLevelConsole >= severity) {
1317
+ _self[logFunc](message[_DYN_MESSAGE ]);
1263
1318
  }
1264
1319
  }
1265
- _self.logInternalMessage(severity, message);
1320
+ _logInternalMessage(severity, message);
1266
1321
  }
1267
1322
  else {
1268
1323
  _debugExtMsg("throw" + (severity === 1 ? "Critical" : "Warning"), message);
1269
1324
  }
1270
1325
  }
1271
1326
  };
1272
- _self.warnToConsole = function (message) {
1327
+ _self[STR_WARN_TO_CONSOLE ] = function (message) {
1273
1328
  _logToConsole("warn", message);
1274
1329
  _debugExtMsg("warning", message);
1275
1330
  };
1276
- _self.errorToConsole = function (message) {
1331
+ _self[STR_ERROR_TO_CONSOLE ] = function (message) {
1277
1332
  _logToConsole("error", message);
1278
1333
  _debugExtMsg("error", message);
1279
1334
  };
@@ -1281,12 +1336,13 @@
1281
1336
  _messageCount = 0;
1282
1337
  _messageLogged = {};
1283
1338
  };
1284
- _self.logInternalMessage = function (severity, message) {
1339
+ _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1340
+ function _logInternalMessage(severity, message) {
1285
1341
  if (_areInternalMessagesThrottled()) {
1286
1342
  return;
1287
1343
  }
1288
1344
  var logMessage = true;
1289
- var messageKey = AIInternalMessagePrefix + message.messageId;
1345
+ var messageKey = AIInternalMessagePrefix + message[_DYN_MESSAGE_ID ];
1290
1346
  if (_messageLogged[messageKey]) {
1291
1347
  logMessage = false;
1292
1348
  }
@@ -1294,42 +1350,42 @@
1294
1350
  _messageLogged[messageKey] = true;
1295
1351
  }
1296
1352
  if (logMessage) {
1297
- if (severity <= _self.telemetryLoggingLevel()) {
1298
- _self.queue.push(message);
1353
+ if (severity <= _loggingLevelTelemetry) {
1354
+ _self.queue[_DYN_PUSH ](message);
1299
1355
  _messageCount++;
1300
1356
  _debugExtMsg((severity === 1 ? "error" : "warn"), message);
1301
1357
  }
1302
- if (_messageCount === _self.maxInternalMessageLimit()) {
1358
+ if (_messageCount === _maxInternalMessageLimit) {
1303
1359
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1304
1360
  var throttleMessage = new _InternalLogMessage(23 , throttleLimitMessage, false);
1305
- _self.queue.push(throttleMessage);
1361
+ _self.queue[_DYN_PUSH ](throttleMessage);
1306
1362
  if (severity === 1 ) {
1307
- _self.errorToConsole(throttleLimitMessage);
1363
+ _self[STR_ERROR_TO_CONSOLE ](throttleLimitMessage);
1308
1364
  }
1309
1365
  else {
1310
- _self.warnToConsole(throttleLimitMessage);
1366
+ _self[STR_WARN_TO_CONSOLE ](throttleLimitMessage);
1311
1367
  }
1312
1368
  }
1313
1369
  }
1314
- };
1315
- function _getConfigValue(name, defValue) {
1316
- var value = config[name];
1317
- if (!isNullOrUndefined(value)) {
1318
- return value;
1319
- }
1320
- return defValue;
1370
+ }
1371
+ function _setDefaultsFromConfig(config) {
1372
+ _loggingLevelConsole = getCfgValue(config.loggingLevelConsole, 0);
1373
+ _loggingLevelTelemetry = getCfgValue(config.loggingLevelTelemetry, 1);
1374
+ _maxInternalMessageLimit = getCfgValue(config.maxMessageLimit, 25);
1375
+ _enableDebugExceptions = getCfgValue(config[_DYN_ENABLE_DEBUG_EXCEPTI4 ], false);
1321
1376
  }
1322
1377
  function _areInternalMessagesThrottled() {
1323
- return _messageCount >= _self.maxInternalMessageLimit();
1378
+ return _messageCount >= _maxInternalMessageLimit;
1324
1379
  }
1325
1380
  function _debugExtMsg(name, data) {
1326
- var dbgExt = getDebugExt(config);
1327
- if (dbgExt && dbgExt.diagLog) {
1328
- dbgExt.diagLog(name, data);
1381
+ var dbgExt = getDebugExt(config || {});
1382
+ if (dbgExt && dbgExt[_DYN_DIAG_LOG ]) {
1383
+ dbgExt[_DYN_DIAG_LOG ](name, data);
1329
1384
  }
1330
1385
  }
1331
1386
  });
1332
1387
  }
1388
+ DiagnosticLogger.__ieDyn=1;
1333
1389
  return DiagnosticLogger;
1334
1390
  }());
1335
1391
  function _getLogger(logger) {
@@ -1337,22 +1393,27 @@
1337
1393
  }
1338
1394
  function _throwInternal(logger, severity, msgId, msg, properties, isUserAct) {
1339
1395
  if (isUserAct === void 0) { isUserAct = false; }
1340
- (logger || new DiagnosticLogger()).throwInternal(severity, msgId, msg, properties, isUserAct);
1396
+ _getLogger(logger).throwInternal(severity, msgId, msg, properties, isUserAct);
1341
1397
  }
1342
1398
  function _warnToConsole(logger, message) {
1343
- _getLogger(logger).warnToConsole(message);
1399
+ _getLogger(logger)[STR_WARN_TO_CONSOLE ](message);
1400
+ }
1401
+ function _logInternalMessage(logger, severity, message) {
1402
+ _getLogger(logger)[_DYN_LOG_INTERNAL_MESSAGE ](severity, message);
1344
1403
  }
1345
1404
 
1346
1405
  var strExecutionContextKey = "ctx";
1406
+ var strParentContextKey = "ParentContextKey";
1407
+ var strChildrenContextKey = "ChildrenContextKey";
1347
1408
  var _defaultPerfManager = null;
1348
1409
  var PerfEvent = /** @class */ (function () {
1349
1410
  function PerfEvent(name, payloadDetails, isAsync) {
1350
1411
  var _self = this;
1351
1412
  var accessorDefined = false;
1352
1413
  _self.start = dateNow();
1353
- _self.name = name;
1354
- _self.isAsync = isAsync;
1355
- _self.isChildEvt = function () { return false; };
1414
+ _self[_DYN_NAME ] = name;
1415
+ _self[_DYN_IS_ASYNC ] = isAsync;
1416
+ _self[_DYN_IS_CHILD_EVT ] = function () { return false; };
1356
1417
  if (isFunction(payloadDetails)) {
1357
1418
  var theDetails_1;
1358
1419
  accessorDefined = objDefineAccessors(_self, "payload", function () {
@@ -1363,24 +1424,24 @@
1363
1424
  return theDetails_1;
1364
1425
  });
1365
1426
  }
1366
- _self.getCtx = function (key) {
1427
+ _self[_DYN_GET_CTX ] = function (key) {
1367
1428
  if (key) {
1368
- if (key === PerfEvent.ParentContextKey || key === PerfEvent.ChildrenContextKey) {
1429
+ if (key === PerfEvent[strParentContextKey] || key === PerfEvent[strChildrenContextKey]) {
1369
1430
  return _self[key];
1370
1431
  }
1371
1432
  return (_self[strExecutionContextKey] || {})[key];
1372
1433
  }
1373
1434
  return null;
1374
1435
  };
1375
- _self.setCtx = function (key, value) {
1436
+ _self[_DYN_SET_CTX ] = function (key, value) {
1376
1437
  if (key) {
1377
- if (key === PerfEvent.ParentContextKey) {
1438
+ if (key === PerfEvent[strParentContextKey]) {
1378
1439
  if (!_self[key]) {
1379
- _self.isChildEvt = function () { return true; };
1440
+ _self[_DYN_IS_CHILD_EVT ] = function () { return true; };
1380
1441
  }
1381
1442
  _self[key] = value;
1382
1443
  }
1383
- else if (key === PerfEvent.ChildrenContextKey) {
1444
+ else if (key === PerfEvent[strChildrenContextKey]) {
1384
1445
  _self[key] = value;
1385
1446
  }
1386
1447
  else {
@@ -1389,20 +1450,20 @@
1389
1450
  }
1390
1451
  }
1391
1452
  };
1392
- _self.complete = function () {
1453
+ _self[_DYN_COMPLETE ] = function () {
1393
1454
  var childTime = 0;
1394
- var childEvts = _self.getCtx(PerfEvent.ChildrenContextKey);
1455
+ var childEvts = _self[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
1395
1456
  if (isArray(childEvts)) {
1396
- for (var lp = 0; lp < childEvts.length; lp++) {
1457
+ for (var lp = 0; lp < childEvts[_DYN_LENGTH ]; lp++) {
1397
1458
  var childEvt = childEvts[lp];
1398
1459
  if (childEvt) {
1399
- childTime += childEvt.time;
1460
+ childTime += childEvt[_DYN_TIME ];
1400
1461
  }
1401
1462
  }
1402
1463
  }
1403
- _self.time = dateNow() - _self.start;
1404
- _self.exTime = _self.time - childTime;
1405
- _self.complete = function () { };
1464
+ _self[_DYN_TIME ] = dateNow() - _self.start;
1465
+ _self.exTime = _self[_DYN_TIME ] - childTime;
1466
+ _self[_DYN_COMPLETE ] = function () { };
1406
1467
  if (!accessorDefined && isFunction(payloadDetails)) {
1407
1468
  _self.payload = payloadDetails();
1408
1469
  }
@@ -1421,63 +1482,64 @@
1421
1482
  };
1422
1483
  _self.fire = function (perfEvent) {
1423
1484
  if (perfEvent) {
1424
- perfEvent.complete();
1425
- if (manager && isFunction(manager.perfEvent)) {
1426
- manager.perfEvent(perfEvent);
1485
+ perfEvent[_DYN_COMPLETE ]();
1486
+ if (manager && isFunction(manager[STR_PERF_EVENT ])) {
1487
+ manager[STR_PERF_EVENT ](perfEvent);
1427
1488
  }
1428
1489
  }
1429
1490
  };
1430
- _self.setCtx = function (key, value) {
1491
+ _self[_DYN_SET_CTX ] = function (key, value) {
1431
1492
  if (key) {
1432
1493
  var ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};
1433
1494
  ctx[key] = value;
1434
1495
  }
1435
1496
  };
1436
- _self.getCtx = function (key) {
1497
+ _self[_DYN_GET_CTX ] = function (key) {
1437
1498
  return (_self[strExecutionContextKey] || {})[key];
1438
1499
  };
1439
1500
  });
1440
1501
  }
1502
+ PerfManager.__ieDyn=1;
1441
1503
  return PerfManager;
1442
1504
  }());
1443
1505
  var doPerfActiveKey = "CoreUtils.doPerf";
1444
1506
  function doPerf(mgrSource, getSource, func, details, isAsync) {
1445
1507
  if (mgrSource) {
1446
1508
  var perfMgr = mgrSource;
1447
- if (isFunction(perfMgr["getPerfMgr"])) {
1448
- perfMgr = perfMgr["getPerfMgr"]();
1509
+ if (perfMgr[STR_GET_PERF_MGR]) {
1510
+ perfMgr = perfMgr[STR_GET_PERF_MGR]();
1449
1511
  }
1450
1512
  if (perfMgr) {
1451
1513
  var perfEvt = void 0;
1452
- var currentActive = perfMgr.getCtx(doPerfActiveKey);
1514
+ var currentActive = perfMgr[_DYN_GET_CTX ](doPerfActiveKey);
1453
1515
  try {
1454
1516
  perfEvt = perfMgr.create(getSource(), details, isAsync);
1455
1517
  if (perfEvt) {
1456
- if (currentActive && perfEvt.setCtx) {
1457
- perfEvt.setCtx(PerfEvent.ParentContextKey, currentActive);
1458
- if (currentActive.getCtx && currentActive.setCtx) {
1459
- var children = currentActive.getCtx(PerfEvent.ChildrenContextKey);
1518
+ if (currentActive && perfEvt[_DYN_SET_CTX ]) {
1519
+ perfEvt[_DYN_SET_CTX ](PerfEvent[strParentContextKey], currentActive);
1520
+ if (currentActive[_DYN_GET_CTX ] && currentActive[_DYN_SET_CTX ]) {
1521
+ var children = currentActive[_DYN_GET_CTX ](PerfEvent[strChildrenContextKey]);
1460
1522
  if (!children) {
1461
1523
  children = [];
1462
- currentActive.setCtx(PerfEvent.ChildrenContextKey, children);
1524
+ currentActive[_DYN_SET_CTX ](PerfEvent[strChildrenContextKey], children);
1463
1525
  }
1464
- children.push(perfEvt);
1526
+ children[_DYN_PUSH ](perfEvt);
1465
1527
  }
1466
1528
  }
1467
- perfMgr.setCtx(doPerfActiveKey, perfEvt);
1529
+ perfMgr[_DYN_SET_CTX ](doPerfActiveKey, perfEvt);
1468
1530
  return func(perfEvt);
1469
1531
  }
1470
1532
  }
1471
1533
  catch (ex) {
1472
- if (perfEvt && perfEvt.setCtx) {
1473
- perfEvt.setCtx("exception", ex);
1534
+ if (perfEvt && perfEvt[_DYN_SET_CTX ]) {
1535
+ perfEvt[_DYN_SET_CTX ]("exception", ex);
1474
1536
  }
1475
1537
  }
1476
1538
  finally {
1477
1539
  if (perfEvt) {
1478
1540
  perfMgr.fire(perfEvt);
1479
1541
  }
1480
- perfMgr.setCtx(doPerfActiveKey, currentActive);
1542
+ perfMgr[_DYN_SET_CTX ](doPerfActiveKey, currentActive);
1481
1543
  }
1482
1544
  }
1483
1545
  }
@@ -1556,8 +1618,8 @@
1556
1618
  var base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1557
1619
  var number = random32() >>> 0;
1558
1620
  var chars = 0;
1559
- var result = strEmpty;
1560
- while (result.length < maxLength) {
1621
+ var result = STR_EMPTY$1;
1622
+ while (result[_DYN_LENGTH ] < maxLength) {
1561
1623
  chars++;
1562
1624
  result += base64chars.charAt(number & 0x3F);
1563
1625
  number >>>= 6;
@@ -1570,7 +1632,7 @@
1570
1632
  }
1571
1633
 
1572
1634
  var _objDefineProperty = ObjDefineProperty;
1573
- var version = "2.8.4";
1635
+ var version = '2.8.6';
1574
1636
  var instanceName = "." + newId(6);
1575
1637
  var _dataUid = 0;
1576
1638
  function _createAccessor(target, prop, value) {
@@ -1589,7 +1651,7 @@
1589
1651
  return false;
1590
1652
  }
1591
1653
  function _canAcceptData(target) {
1592
- return target.nodeType === 1 || target.nodeType === 9 || !(+target.nodeType);
1654
+ return target[_DYN_NODE_TYPE ] === 1 || target[_DYN_NODE_TYPE ] === 9 || !(+target[_DYN_NODE_TYPE ]);
1593
1655
  }
1594
1656
  function _getCache(data, target) {
1595
1657
  var theCache = target[data.id];
@@ -1609,11 +1671,11 @@
1609
1671
  }
1610
1672
  function createUniqueNamespace(name, includeVersion) {
1611
1673
  if (includeVersion === void 0) { includeVersion = false; }
1612
- return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : "") + instanceName);
1674
+ return normalizeJsName(name + (_dataUid++) + (includeVersion ? "." + version : STR_EMPTY$1) + instanceName);
1613
1675
  }
1614
1676
  function createElmNodeData(name) {
1615
1677
  var data = {
1616
- id: createUniqueNamespace("_aiData-" + (name || "") + "." + version),
1678
+ id: createUniqueNamespace("_aiData-" + (name || STR_EMPTY$1) + "." + version),
1617
1679
  accept: function (target) {
1618
1680
  return _canAcceptData(target);
1619
1681
  },
@@ -1670,7 +1732,7 @@
1670
1732
  return true;
1671
1733
  }
1672
1734
  function _createCookieMgrConfig(rootConfig) {
1673
- var cookieMgrCfg = rootConfig.cookieCfg = rootConfig.cookieCfg || {};
1735
+ var cookieMgrCfg = rootConfig[_DYN_COOKIE_CFG ] = rootConfig[_DYN_COOKIE_CFG ] || {};
1674
1736
  setValue(cookieMgrCfg, "domain", rootConfig.cookieDomain, isNotNullOrUndefined, isNullOrUndefined);
1675
1737
  setValue(cookieMgrCfg, "path", rootConfig.cookiePath || "/", null, isNullOrUndefined);
1676
1738
  if (isNullOrUndefined(cookieMgrCfg[strEnabled])) {
@@ -1691,7 +1753,7 @@
1691
1753
  cookieMgr = core.getCookieMgr();
1692
1754
  }
1693
1755
  else if (config) {
1694
- var cookieCfg = config.cookieCfg;
1756
+ var cookieCfg = config[_DYN_COOKIE_CFG ];
1695
1757
  if (cookieCfg[strConfigCookieMgr]) {
1696
1758
  cookieMgr = cookieCfg[strConfigCookieMgr];
1697
1759
  }
@@ -1700,36 +1762,38 @@
1700
1762
  }
1701
1763
  }
1702
1764
  if (!cookieMgr) {
1703
- cookieMgr = _gblCookieMgr(config, (core || {}).logger);
1765
+ cookieMgr = _gblCookieMgr(config, (core || {})[_DYN_LOGGER ]);
1704
1766
  }
1705
1767
  return cookieMgr;
1706
1768
  }
1707
1769
  function createCookieMgr(rootConfig, logger) {
1770
+ var _a;
1708
1771
  var cookieMgrConfig = _createCookieMgrConfig(rootConfig || _globalCookieConfig);
1709
1772
  var _path = cookieMgrConfig.path || "/";
1710
1773
  var _domain = cookieMgrConfig.domain;
1711
1774
  var _enabled = cookieMgrConfig[strEnabled] !== false;
1712
- var cookieMgr = {
1713
- isEnabled: function () {
1714
- var enabled = _enabled && areCookiesSupported(logger);
1715
- var gblManager = _globalCookieConfig[strConfigCookieMgr];
1716
- if (enabled && gblManager && cookieMgr !== gblManager) {
1717
- enabled = _isMgrEnabled(gblManager);
1718
- }
1719
- return enabled;
1775
+ var cookieMgr = (_a = {
1776
+ isEnabled: function () {
1777
+ var enabled = _enabled && areCookiesSupported(logger);
1778
+ var gblManager = _globalCookieConfig[strConfigCookieMgr];
1779
+ if (enabled && gblManager && cookieMgr !== gblManager) {
1780
+ enabled = _isMgrEnabled(gblManager);
1781
+ }
1782
+ return enabled;
1783
+ }
1720
1784
  },
1721
- setEnabled: function (value) {
1785
+ _a[_DYN_SET_ENABLED ] = function (value) {
1722
1786
  _enabled = value !== false;
1723
1787
  },
1724
- set: function (name, value, maxAgeSec, domain, path) {
1788
+ _a.set = function (name, value, maxAgeSec, domain, path) {
1725
1789
  var result = false;
1726
1790
  if (_isMgrEnabled(cookieMgr)) {
1727
1791
  var values = {};
1728
- var theValue = strTrim(value || strEmpty);
1729
- var idx = theValue.indexOf(";");
1792
+ var theValue = strTrim(value || STR_EMPTY$1);
1793
+ var idx = theValue[_DYN_INDEX_OF ](";");
1730
1794
  if (idx !== -1) {
1731
- theValue = strTrim(value.substring(0, idx));
1732
- values = _extractParts(value.substring(idx + 1));
1795
+ theValue = strTrim(value[_DYN_SUBSTRING ](0, idx));
1796
+ values = _extractParts(value[_DYN_SUBSTRING ](idx + 1));
1733
1797
  }
1734
1798
  setValue(values, "domain", domain || _domain, isTruthy, isUndefined);
1735
1799
  if (!isNullOrUndefined(maxAgeSec)) {
@@ -1740,18 +1804,18 @@
1740
1804
  if (expireMs > 0) {
1741
1805
  var expiry = new Date();
1742
1806
  expiry.setTime(expireMs);
1743
- setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || strEmpty, isTruthy);
1807
+ setValue(values, strExpires, _formatDate(expiry, !_isIE ? strToUTCString : strToGMTString) || _formatDate(expiry, _isIE ? strToGMTString : strToUTCString) || STR_EMPTY$1, isTruthy);
1744
1808
  }
1745
1809
  }
1746
1810
  if (!_isIE) {
1747
- setValue(values, "max-age", strEmpty + maxAgeSec, null, isUndefined);
1811
+ setValue(values, "max-age", STR_EMPTY$1 + maxAgeSec, null, isUndefined);
1748
1812
  }
1749
1813
  }
1750
1814
  var location_1 = getLocation();
1751
1815
  if (location_1 && location_1.protocol === "https:") {
1752
1816
  setValue(values, "secure", null, null, isUndefined);
1753
1817
  if (_allowUaSameSite === null) {
1754
- _allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {}).userAgent);
1818
+ _allowUaSameSite = !uaDisallowsSameSiteNone((getNavigator() || {})[_DYN_USER_AGENT ]);
1755
1819
  }
1756
1820
  if (_allowUaSameSite) {
1757
1821
  setValue(values, "SameSite", "None", null, isUndefined);
@@ -1764,21 +1828,21 @@
1764
1828
  }
1765
1829
  return result;
1766
1830
  },
1767
- get: function (name) {
1768
- var value = strEmpty;
1831
+ _a.get = function (name) {
1832
+ var value = STR_EMPTY$1;
1769
1833
  if (_isMgrEnabled(cookieMgr)) {
1770
1834
  value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
1771
1835
  }
1772
1836
  return value;
1773
1837
  },
1774
- del: function (name, path) {
1838
+ _a.del = function (name, path) {
1775
1839
  var result = false;
1776
1840
  if (_isMgrEnabled(cookieMgr)) {
1777
1841
  result = cookieMgr.purge(name, path);
1778
1842
  }
1779
1843
  return result;
1780
1844
  },
1781
- purge: function (name, path) {
1845
+ _a.purge = function (name, path) {
1782
1846
  var _a;
1783
1847
  var result = false;
1784
1848
  if (areCookiesSupported(logger)) {
@@ -1790,12 +1854,12 @@
1790
1854
  values["max-age"] = "0";
1791
1855
  }
1792
1856
  var delCookie = cookieMgrConfig.delCookie || _setCookieValue;
1793
- delCookie(name, _formatCookieValue(strEmpty, values));
1857
+ delCookie(name, _formatCookieValue(STR_EMPTY$1, values));
1794
1858
  result = true;
1795
1859
  }
1796
1860
  return result;
1797
- }
1798
- };
1861
+ },
1862
+ _a);
1799
1863
  cookieMgr[strConfigCookieMgr] = cookieMgr;
1800
1864
  return cookieMgr;
1801
1865
  }
@@ -1814,17 +1878,17 @@
1814
1878
  }
1815
1879
  function _extractParts(theValue) {
1816
1880
  var values = {};
1817
- if (theValue && theValue.length) {
1818
- var parts = strTrim(theValue).split(";");
1881
+ if (theValue && theValue[_DYN_LENGTH ]) {
1882
+ var parts = strTrim(theValue)[_DYN_SPLIT ](";");
1819
1883
  arrForEach(parts, function (thePart) {
1820
- thePart = strTrim(thePart || strEmpty);
1884
+ thePart = strTrim(thePart || STR_EMPTY$1);
1821
1885
  if (thePart) {
1822
- var idx = thePart.indexOf("=");
1886
+ var idx = thePart[_DYN_INDEX_OF ]("=");
1823
1887
  if (idx === -1) {
1824
1888
  values[thePart] = null;
1825
1889
  }
1826
1890
  else {
1827
- values[strTrim(thePart.substring(0, idx))] = strTrim(thePart.substring(idx + 1));
1891
+ values[strTrim(thePart[_DYN_SUBSTRING ](0, idx))] = strTrim(thePart[_DYN_SUBSTRING ](idx + 1));
1828
1892
  }
1829
1893
  }
1830
1894
  });
@@ -1838,21 +1902,21 @@
1838
1902
  return null;
1839
1903
  }
1840
1904
  function _formatCookieValue(value, values) {
1841
- var cookieValue = value || strEmpty;
1905
+ var cookieValue = value || STR_EMPTY$1;
1842
1906
  objForEachKey(values, function (name, theValue) {
1843
- cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : strEmpty);
1907
+ cookieValue += "; " + name + (!isNullOrUndefined(theValue) ? "=" + theValue : STR_EMPTY$1);
1844
1908
  });
1845
1909
  return cookieValue;
1846
1910
  }
1847
1911
  function _getCookieValue(name) {
1848
- var cookieValue = strEmpty;
1912
+ var cookieValue = STR_EMPTY$1;
1849
1913
  if (_doc) {
1850
- var theCookie = _doc[strCookie] || strEmpty;
1914
+ var theCookie = _doc[strCookie] || STR_EMPTY$1;
1851
1915
  if (_parsedCookieValue !== theCookie) {
1852
1916
  _cookieCache = _extractParts(theCookie);
1853
1917
  _parsedCookieValue = theCookie;
1854
1918
  }
1855
- cookieValue = strTrim(_cookieCache[name] || strEmpty);
1919
+ cookieValue = strTrim(_cookieCache[name] || STR_EMPTY$1);
1856
1920
  }
1857
1921
  return cookieValue;
1858
1922
  }
@@ -1905,16 +1969,17 @@
1905
1969
  var elmNodeData = createElmNodeData("events");
1906
1970
  var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
1907
1971
  function _normalizeNamespace(name) {
1908
- if (name && name.replace) {
1909
- return name.replace(/^\s*\.*|\.*\s*$/g, "");
1972
+ if (name && name[_DYN_REPLACE ]) {
1973
+ return name.replace(/^\s*\.*|\.*\s*$/g, STR_EMPTY$1);
1910
1974
  }
1911
1975
  return name;
1912
1976
  }
1913
1977
  function _getEvtNamespace(eventName, evtNamespace) {
1978
+ var _a;
1914
1979
  if (evtNamespace) {
1915
- var theNamespace_1 = "";
1980
+ var theNamespace_1 = STR_EMPTY$1;
1916
1981
  if (isArray(evtNamespace)) {
1917
- theNamespace_1 = "";
1982
+ theNamespace_1 = STR_EMPTY$1;
1918
1983
  arrForEach(evtNamespace, function (name) {
1919
1984
  name = _normalizeNamespace(name);
1920
1985
  if (name) {
@@ -1932,14 +1997,14 @@
1932
1997
  if (theNamespace_1[0] !== ".") {
1933
1998
  theNamespace_1 = "." + theNamespace_1;
1934
1999
  }
1935
- eventName = (eventName || "") + theNamespace_1;
2000
+ eventName = (eventName || STR_EMPTY$1) + theNamespace_1;
1936
2001
  }
1937
2002
  }
1938
- var parsedEvent = (eventNamespace.exec(eventName || "") || []);
1939
- return {
1940
- type: parsedEvent[1],
1941
- ns: ((parsedEvent[2] || "").replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, "").split(".").sort()).join(".")
1942
- };
2003
+ var parsedEvent = (eventNamespace.exec(eventName || STR_EMPTY$1) || []);
2004
+ return _a = {},
2005
+ _a[_DYN_TYPE ] = parsedEvent[1],
2006
+ _a.ns = ((parsedEvent[2] || STR_EMPTY$1).replace(rRemoveEmptyNs, ".").replace(rRemoveTrailingEmptyNs, STR_EMPTY$1)[_DYN_SPLIT ](".").sort()).join("."),
2007
+ _a;
1943
2008
  }
1944
2009
  function __getRegisteredEvents(target, eventName, evtNamespace) {
1945
2010
  var theEvents = [];
@@ -1947,12 +2012,13 @@
1947
2012
  var evtName = _getEvtNamespace(eventName, evtNamespace);
1948
2013
  objForEachKey(eventCache, function (evtType, registeredEvents) {
1949
2014
  arrForEach(registeredEvents, function (value) {
1950
- if (!evtName.type || evtName.type === value.evtName.type) {
2015
+ var _a;
2016
+ if (!evtName[_DYN_TYPE ] || evtName[_DYN_TYPE ] === value.evtName[_DYN_TYPE ]) {
1951
2017
  if (!evtName.ns || evtName.ns === evtName.ns) {
1952
- theEvents.push({
1953
- name: value.evtName.type + (value.evtName.ns ? "." + value.evtName.ns : ""),
1954
- handler: value.handler
1955
- });
2018
+ theEvents[_DYN_PUSH ]((_a = {},
2019
+ _a[_DYN_NAME ] = value.evtName[_DYN_TYPE ] + (value.evtName.ns ? "." + value.evtName.ns : STR_EMPTY$1),
2020
+ _a.handler = value[_DYN_HANDLER ],
2021
+ _a));
1956
2022
  }
1957
2023
  }
1958
2024
  });
@@ -1969,53 +2035,53 @@
1969
2035
  return registeredEvents;
1970
2036
  }
1971
2037
  function _doDetach(obj, evtName, handlerRef, useCapture) {
1972
- if (obj && evtName && evtName.type) {
2038
+ if (obj && evtName && evtName[_DYN_TYPE ]) {
1973
2039
  if (obj[strRemoveEventListener]) {
1974
- obj[strRemoveEventListener](evtName.type, handlerRef, useCapture);
2040
+ obj[strRemoveEventListener](evtName[_DYN_TYPE ], handlerRef, useCapture);
1975
2041
  }
1976
2042
  else if (obj[strDetachEvent]) {
1977
- obj[strDetachEvent](strOnPrefix + evtName.type, handlerRef);
2043
+ obj[strDetachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
1978
2044
  }
1979
2045
  }
1980
2046
  }
1981
2047
  function _doAttach(obj, evtName, handlerRef, useCapture) {
1982
2048
  var result = false;
1983
- if (obj && evtName && evtName.type && handlerRef) {
2049
+ if (obj && evtName && evtName[_DYN_TYPE ] && handlerRef) {
1984
2050
  if (obj[strAddEventHelper]) {
1985
- obj[strAddEventHelper](evtName.type, handlerRef, useCapture);
2051
+ obj[strAddEventHelper](evtName[_DYN_TYPE ], handlerRef, useCapture);
1986
2052
  result = true;
1987
2053
  }
1988
2054
  else if (obj[strAttachEvent]) {
1989
- obj[strAttachEvent](strOnPrefix + evtName.type, handlerRef);
2055
+ obj[strAttachEvent](strOnPrefix + evtName[_DYN_TYPE ], handlerRef);
1990
2056
  result = true;
1991
2057
  }
1992
2058
  }
1993
2059
  return result;
1994
2060
  }
1995
2061
  function _doUnregister(target, events, evtName, unRegFn) {
1996
- var idx = events.length;
2062
+ var idx = events[_DYN_LENGTH ];
1997
2063
  while (idx--) {
1998
2064
  var theEvent = events[idx];
1999
2065
  if (theEvent) {
2000
2066
  if (!evtName.ns || evtName.ns === theEvent.evtName.ns) {
2001
2067
  if (!unRegFn || unRegFn(theEvent)) {
2002
- _doDetach(target, theEvent.evtName, theEvent.handler, theEvent.capture);
2003
- events.splice(idx, 1);
2068
+ _doDetach(target, theEvent.evtName, theEvent[_DYN_HANDLER ], theEvent.capture);
2069
+ events[_DYN_SPLICE ](idx, 1);
2004
2070
  }
2005
2071
  }
2006
2072
  }
2007
2073
  }
2008
2074
  }
2009
2075
  function _unregisterEvents(target, evtName, unRegFn) {
2010
- if (evtName.type) {
2011
- _doUnregister(target, _getRegisteredEvents(target, evtName.type), evtName, unRegFn);
2076
+ if (evtName[_DYN_TYPE ]) {
2077
+ _doUnregister(target, _getRegisteredEvents(target, evtName[_DYN_TYPE ]), evtName, unRegFn);
2012
2078
  }
2013
2079
  else {
2014
2080
  var eventCache = elmNodeData.get(target, strEvents, {});
2015
2081
  objForEachKey(eventCache, function (evtType, events) {
2016
2082
  _doUnregister(target, events, evtName, unRegFn);
2017
2083
  });
2018
- if (objKeys(eventCache).length === 0) {
2084
+ if (objKeys(eventCache)[_DYN_LENGTH ] === 0) {
2019
2085
  elmNodeData.kill(target, strEvents);
2020
2086
  }
2021
2087
  }
@@ -2029,7 +2095,7 @@
2029
2095
  else {
2030
2096
  newNamespaces = [theNamespace, namespaces];
2031
2097
  }
2032
- newNamespaces = (_getEvtNamespace("xx", newNamespaces).ns).split(".");
2098
+ newNamespaces = (_getEvtNamespace("xx", newNamespaces).ns)[_DYN_SPLIT ](".");
2033
2099
  }
2034
2100
  else {
2035
2101
  newNamespaces = theNamespace;
@@ -2037,6 +2103,7 @@
2037
2103
  return newNamespaces;
2038
2104
  }
2039
2105
  function eventOn(target, eventName, handlerRef, evtNamespace, useCapture) {
2106
+ var _a;
2040
2107
  if (useCapture === void 0) { useCapture = false; }
2041
2108
  var result = false;
2042
2109
  if (target) {
@@ -2044,13 +2111,14 @@
2044
2111
  var evtName = _getEvtNamespace(eventName, evtNamespace);
2045
2112
  result = _doAttach(target, evtName, handlerRef, useCapture);
2046
2113
  if (result && elmNodeData.accept(target)) {
2047
- var registeredEvent = {
2048
- guid: _guid++,
2049
- evtName: evtName,
2050
- handler: handlerRef,
2051
- capture: useCapture
2052
- };
2053
- _getRegisteredEvents(target, evtName.type).push(registeredEvent);
2114
+ var registeredEvent = (_a = {
2115
+ guid: _guid++,
2116
+ evtName: evtName
2117
+ },
2118
+ _a[_DYN_HANDLER ] = handlerRef,
2119
+ _a.capture = useCapture,
2120
+ _a);
2121
+ _getRegisteredEvents(target, evtName.type)[_DYN_PUSH ](registeredEvent);
2054
2122
  }
2055
2123
  }
2056
2124
  catch (e) {
@@ -2065,7 +2133,7 @@
2065
2133
  var evtName_1 = _getEvtNamespace(eventName, evtNamespace);
2066
2134
  var found_1 = false;
2067
2135
  _unregisterEvents(target, evtName_1, function (regEvent) {
2068
- if ((evtName_1.ns && !handlerRef) || regEvent.handler === handlerRef) {
2136
+ if ((evtName_1.ns && !handlerRef) || regEvent[_DYN_HANDLER ] === handlerRef) {
2069
2137
  found_1 = true;
2070
2138
  return true;
2071
2139
  }
@@ -2113,7 +2181,7 @@
2113
2181
  }
2114
2182
  function _addEventListeners(events, listener, excludeEvents, evtNamespace) {
2115
2183
  var added = false;
2116
- if (listener && events && events.length > 0) {
2184
+ if (listener && events && events[_DYN_LENGTH ] > 0) {
2117
2185
  arrForEach(events, function (name) {
2118
2186
  if (name) {
2119
2187
  if (!excludeEvents || arrIndexOf(excludeEvents, name) === -1) {
@@ -2128,7 +2196,7 @@
2128
2196
  var added = false;
2129
2197
  if (listener && events && isArray(events)) {
2130
2198
  added = _addEventListeners(events, listener, excludeEvents, evtNamespace);
2131
- if (!added && excludeEvents && excludeEvents.length > 0) {
2199
+ if (!added && excludeEvents && excludeEvents[_DYN_LENGTH ] > 0) {
2132
2200
  added = _addEventListeners(events, listener, null, evtNamespace);
2133
2201
  }
2134
2202
  }
@@ -2193,13 +2261,8 @@
2193
2261
  }
2194
2262
 
2195
2263
  function newGuid() {
2196
- function randomHexDigit() {
2197
- return randomValue(15);
2198
- }
2199
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(GuidRegex, function (c) {
2200
- var r = (randomHexDigit() | 0), v = (c === "x" ? r : r & 0x3 | 0x8);
2201
- return v.toString(16);
2202
- });
2264
+ var uuid = generateW3CId();
2265
+ return uuid[_DYN_SUBSTRING ](0, 8) + "-" + uuid[_DYN_SUBSTRING ](8, 12) + "-" + uuid[_DYN_SUBSTRING ](12, 16) + "-" + uuid[_DYN_SUBSTRING ](16, 20) + "-" + uuid[_DYN_SUBSTRING ](20);
2203
2266
  }
2204
2267
  function perfNow() {
2205
2268
  var perf = getPerformance();
@@ -2210,7 +2273,7 @@
2210
2273
  }
2211
2274
  function generateW3CId() {
2212
2275
  var hexValues = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
2213
- var oct = strEmpty, tmp;
2276
+ var oct = STR_EMPTY$1, tmp;
2214
2277
  for (var a = 0; a < 4; a++) {
2215
2278
  tmp = random32();
2216
2279
  oct +=
@@ -2224,9 +2287,8 @@
2224
2287
  hexValues[tmp >> 28 & 0xF];
2225
2288
  }
2226
2289
  var clockSequenceHi = hexValues[8 + (random32() & 0x03) | 0];
2227
- return oct.substr(0, 8) + oct.substr(9, 4) + "4" + oct.substr(13, 3) + clockSequenceHi + oct.substr(16, 3) + oct.substr(19, 12);
2290
+ return oct[_DYN_SUBSTR ](0, 8) + oct[_DYN_SUBSTR ](9, 4) + "4" + oct[_DYN_SUBSTR ](13, 3) + clockSequenceHi + oct[_DYN_SUBSTR ](16, 3) + oct[_DYN_SUBSTR ](19, 12);
2228
2291
  }
2229
- var GuidRegex = /[xy]/g;
2230
2292
  var EventHelper = {
2231
2293
  Attach: attachEvent,
2232
2294
  AttachEvent: attachEvent,
@@ -2241,7 +2303,7 @@
2241
2303
  var INVALID_SPAN_ID = "0000000000000000";
2242
2304
  var SAMPLED_FLAG = 0x01;
2243
2305
  function _isValid(value, len, invalidValue) {
2244
- if (value && value.length === len && value !== invalidValue) {
2306
+ if (value && value[_DYN_LENGTH ] === len && value !== invalidValue) {
2245
2307
  return !!value.match(/^[\da-f]*$/);
2246
2308
  }
2247
2309
  return false;
@@ -2257,27 +2319,29 @@
2257
2319
  value = 0x01;
2258
2320
  }
2259
2321
  var result = value.toString(16);
2260
- while (result.length < 2) {
2322
+ while (result[_DYN_LENGTH ] < 2) {
2261
2323
  result = "0" + result;
2262
2324
  }
2263
2325
  return result;
2264
2326
  }
2265
2327
  function createTraceParent(traceId, spanId, flags, version) {
2266
- return {
2267
- version: _isValid(version, 2, INVALID_VERSION) ? version : DEFAULT_VERSION,
2268
- traceId: isValidTraceId(traceId) ? traceId : generateW3CId(),
2269
- spanId: isValidSpanId(spanId) ? spanId : generateW3CId().substr(0, 16),
2270
- traceFlags: flags >= 0 && flags <= 0xFF ? flags : 1
2271
- };
2328
+ var _a;
2329
+ return _a = {},
2330
+ _a[_DYN_VERSION ] = _isValid(version, 2, INVALID_VERSION) ? version : DEFAULT_VERSION,
2331
+ _a[_DYN_TRACE_ID ] = isValidTraceId(traceId) ? traceId : generateW3CId(),
2332
+ _a.spanId = isValidSpanId(spanId) ? spanId : generateW3CId()[_DYN_SUBSTR ](0, 16),
2333
+ _a.traceFlags = flags >= 0 && flags <= 0xFF ? flags : 1,
2334
+ _a;
2272
2335
  }
2273
2336
  function parseTraceParent(value) {
2337
+ var _a;
2274
2338
  if (!value) {
2275
2339
  return null;
2276
2340
  }
2277
2341
  if (isArray(value)) {
2278
2342
  value = value[0] || "";
2279
2343
  }
2280
- if (!value || !isString(value) || value.length > 8192) {
2344
+ if (!value || !isString(value) || value[_DYN_LENGTH ] > 8192) {
2281
2345
  return null;
2282
2346
  }
2283
2347
  var match = TRACE_PARENT_REGEX.exec(strTrim(value));
@@ -2287,12 +2351,12 @@
2287
2351
  match[3] === INVALID_SPAN_ID) {
2288
2352
  return null;
2289
2353
  }
2290
- return {
2291
- version: match[1],
2292
- traceId: match[2],
2293
- spanId: match[3],
2294
- traceFlags: parseInt(match[4], 16)
2295
- };
2354
+ return _a = {},
2355
+ _a[_DYN_VERSION ] = match[1],
2356
+ _a[_DYN_TRACE_ID ] = match[2],
2357
+ _a[_DYN_SPAN_ID ] = match[3],
2358
+ _a[_DYN_TRACE_FLAGS ] = parseInt(match[4], 16),
2359
+ _a;
2296
2360
  }
2297
2361
  function isValidTraceId(value) {
2298
2362
  return _isValid(value, 32, INVALID_TRACE_ID);
@@ -2302,27 +2366,27 @@
2302
2366
  }
2303
2367
  function isValidTraceParent(value) {
2304
2368
  if (!value ||
2305
- !_isValid(value.version, 2, INVALID_VERSION) ||
2306
- !_isValid(value.traceId, 32, INVALID_TRACE_ID) ||
2307
- !_isValid(value.spanId, 16, INVALID_SPAN_ID) ||
2308
- !_isValid(_formatFlags(value.traceFlags), 2)) {
2369
+ !_isValid(value[_DYN_VERSION ], 2, INVALID_VERSION) ||
2370
+ !_isValid(value[_DYN_TRACE_ID ], 32, INVALID_TRACE_ID) ||
2371
+ !_isValid(value[_DYN_SPAN_ID ], 16, INVALID_SPAN_ID) ||
2372
+ !_isValid(_formatFlags(value[_DYN_TRACE_FLAGS ]), 2)) {
2309
2373
  return false;
2310
2374
  }
2311
2375
  return true;
2312
2376
  }
2313
2377
  function isSampledFlag(value) {
2314
2378
  if (isValidTraceParent(value)) {
2315
- return (value.traceFlags & SAMPLED_FLAG) === SAMPLED_FLAG;
2379
+ return (value[_DYN_TRACE_FLAGS ] & SAMPLED_FLAG) === SAMPLED_FLAG;
2316
2380
  }
2317
2381
  return false;
2318
2382
  }
2319
2383
  function formatTraceParent(value) {
2320
2384
  if (value) {
2321
- var flags = _formatFlags(value.traceFlags);
2385
+ var flags = _formatFlags(value[_DYN_TRACE_FLAGS ]);
2322
2386
  if (!_isValid(flags, 2)) {
2323
2387
  flags = "01";
2324
2388
  }
2325
- var version = value.version || DEFAULT_VERSION;
2389
+ var version = value[_DYN_VERSION ] || DEFAULT_VERSION;
2326
2390
  if (version !== "00" && version !== "ff") {
2327
2391
  version = DEFAULT_VERSION;
2328
2392
  }
@@ -2346,49 +2410,49 @@
2346
2410
  function initializePlugins(processContext, extensions) {
2347
2411
  var initPlugins = [];
2348
2412
  var lastPlugin = null;
2349
- var proxy = processContext.getNext();
2413
+ var proxy = processContext[_DYN_GET_NEXT ]();
2350
2414
  var pluginState;
2351
2415
  while (proxy) {
2352
- var thePlugin = proxy.getPlugin();
2416
+ var thePlugin = proxy[_DYN_GET_PLUGIN ]();
2353
2417
  if (thePlugin) {
2354
2418
  if (lastPlugin &&
2355
- isFunction(lastPlugin[strSetNextPlugin]) &&
2356
- isFunction(thePlugin[strProcessTelemetry])) {
2357
- lastPlugin[strSetNextPlugin](thePlugin);
2419
+ isFunction(lastPlugin[_DYN_SET_NEXT_PLUGIN ]) &&
2420
+ isFunction(thePlugin[STR_PROCESS_TELEMETRY ])) {
2421
+ lastPlugin[_DYN_SET_NEXT_PLUGIN ](thePlugin);
2358
2422
  }
2359
2423
  var isInitialized = false;
2360
- if (isFunction(thePlugin[strIsInitialized])) {
2361
- isInitialized = thePlugin[strIsInitialized]();
2424
+ if (isFunction(thePlugin[_DYN_IS_INITIALIZED ])) {
2425
+ isInitialized = thePlugin[_DYN_IS_INITIALIZED ]();
2362
2426
  }
2363
2427
  else {
2364
2428
  pluginState = _getPluginState(thePlugin);
2365
- isInitialized = pluginState[strIsInitialized];
2429
+ isInitialized = pluginState[_DYN_IS_INITIALIZED ];
2366
2430
  }
2367
2431
  if (!isInitialized) {
2368
- initPlugins.push(thePlugin);
2432
+ initPlugins[_DYN_PUSH ](thePlugin);
2369
2433
  }
2370
2434
  lastPlugin = thePlugin;
2371
- proxy = proxy.getNext();
2435
+ proxy = proxy[_DYN_GET_NEXT ]();
2372
2436
  }
2373
2437
  }
2374
2438
  arrForEach(initPlugins, function (thePlugin) {
2375
- var core = processContext.core();
2376
- thePlugin.initialize(processContext.getCfg(), core, extensions, processContext.getNext());
2439
+ var core = processContext[STR_CORE]();
2440
+ thePlugin[_DYN_INITIALIZE ](processContext.getCfg(), core, extensions, processContext[_DYN_GET_NEXT ]());
2377
2441
  pluginState = _getPluginState(thePlugin);
2378
- if (!thePlugin[strCore] && !pluginState[strCore]) {
2379
- pluginState[strCore] = core;
2442
+ if (!thePlugin[STR_CORE] && !pluginState[STR_CORE]) {
2443
+ pluginState[STR_CORE] = core;
2380
2444
  }
2381
- pluginState[strIsInitialized] = true;
2382
- delete pluginState[strTeardown];
2445
+ pluginState[_DYN_IS_INITIALIZED ] = true;
2446
+ delete pluginState[_DYN_TEARDOWN ];
2383
2447
  });
2384
2448
  }
2385
2449
  function sortPlugins(plugins) {
2386
2450
  return plugins.sort(function (extA, extB) {
2387
2451
  var result = 0;
2388
2452
  if (extB) {
2389
- var bHasProcess = isFunction(extB[strProcessTelemetry]);
2390
- if (isFunction(extA[strProcessTelemetry])) {
2391
- result = bHasProcess ? extA[strPriority] - extB[strPriority] : 1;
2453
+ var bHasProcess = isFunction(extB[STR_PROCESS_TELEMETRY]);
2454
+ if (isFunction(extA[STR_PROCESS_TELEMETRY])) {
2455
+ result = bHasProcess ? extA[STR_PRIORITY] - extB[STR_PRIORITY] : 1;
2392
2456
  }
2393
2457
  else if (bHasProcess) {
2394
2458
  result = -1;
@@ -2404,36 +2468,36 @@
2404
2468
  var trace = {};
2405
2469
  return {
2406
2470
  getName: function () {
2407
- return trace.name;
2471
+ return trace[_DYN_NAME ];
2408
2472
  },
2409
2473
  setName: function (newValue) {
2410
2474
  parentCtx && parentCtx.setName(newValue);
2411
- trace.name = newValue;
2475
+ trace[_DYN_NAME ] = newValue;
2412
2476
  },
2413
2477
  getTraceId: function () {
2414
- return trace.traceId;
2478
+ return trace[_DYN_TRACE_ID ];
2415
2479
  },
2416
2480
  setTraceId: function (newValue) {
2417
2481
  parentCtx && parentCtx.setTraceId(newValue);
2418
2482
  if (isValidTraceId(newValue)) {
2419
- trace.traceId = newValue;
2483
+ trace[_DYN_TRACE_ID ] = newValue;
2420
2484
  }
2421
2485
  },
2422
2486
  getSpanId: function () {
2423
- return trace.spanId;
2487
+ return trace[_DYN_SPAN_ID ];
2424
2488
  },
2425
2489
  setSpanId: function (newValue) {
2426
2490
  parentCtx && parentCtx.setSpanId(newValue);
2427
2491
  if (isValidSpanId(newValue)) {
2428
- trace.spanId = newValue;
2492
+ trace[_DYN_SPAN_ID ] = newValue;
2429
2493
  }
2430
2494
  },
2431
2495
  getTraceFlags: function () {
2432
- return trace.traceFlags;
2496
+ return trace[_DYN_TRACE_FLAGS ];
2433
2497
  },
2434
2498
  setTraceFlags: function (newTraceFlags) {
2435
2499
  parentCtx && parentCtx.setTraceFlags(newTraceFlags);
2436
- trace.traceFlags = newTraceFlags;
2500
+ trace[_DYN_TRACE_FLAGS ] = newTraceFlags;
2437
2501
  }
2438
2502
  };
2439
2503
  }
@@ -2444,12 +2508,12 @@
2444
2508
  var _chainId = 0;
2445
2509
  function _getNextProxyStart(proxy, core, startAt) {
2446
2510
  while (proxy) {
2447
- if (proxy.getPlugin() === startAt) {
2511
+ if (proxy[_DYN_GET_PLUGIN ]() === startAt) {
2448
2512
  return proxy;
2449
2513
  }
2450
- proxy = proxy.getNext();
2514
+ proxy = proxy[_DYN_GET_NEXT ]();
2451
2515
  }
2452
- return createTelemetryProxyChain([startAt], core.config || {}, core);
2516
+ return createTelemetryProxyChain([startAt], core[_DYN_CONFIG ] || {}, core);
2453
2517
  }
2454
2518
  function _createInternalContext(telemetryChain, config, core, startAt) {
2455
2519
  var _nextProxy = null;
@@ -2490,7 +2554,7 @@
2490
2554
  args[_i - 2] = arguments[_i];
2491
2555
  }
2492
2556
  if (onComplete) {
2493
- _onComplete.push({
2557
+ _onComplete[_DYN_PUSH ]({
2494
2558
  func: onComplete,
2495
2559
  self: !isUndefined(that) ? that : context.ctx,
2496
2560
  args: args
@@ -2499,16 +2563,16 @@
2499
2563
  }
2500
2564
  function _moveNext() {
2501
2565
  var nextProxy = _nextProxy;
2502
- _nextProxy = nextProxy ? nextProxy.getNext() : null;
2566
+ _nextProxy = nextProxy ? nextProxy[_DYN_GET_NEXT ]() : null;
2503
2567
  if (!nextProxy) {
2504
2568
  var onComplete = _onComplete;
2505
- if (onComplete && onComplete.length > 0) {
2569
+ if (onComplete && onComplete[_DYN_LENGTH ] > 0) {
2506
2570
  arrForEach(onComplete, function (completeDetails) {
2507
2571
  try {
2508
- completeDetails.func.call(completeDetails.self, completeDetails.args);
2572
+ completeDetails.func[_DYN_CALL ](completeDetails.self, completeDetails.args);
2509
2573
  }
2510
2574
  catch (e) {
2511
- _throwInternal(core.logger, 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
2575
+ _throwInternal(core[_DYN_LOGGER ], 2 , 73 , "Unexpected Exception during onComplete - " + dumpObj(e));
2512
2576
  }
2513
2577
  });
2514
2578
  _onComplete = [];
@@ -2521,7 +2585,7 @@
2521
2585
  if (mergeDefault === void 0) { mergeDefault = 0 ; }
2522
2586
  var theConfig;
2523
2587
  if (config) {
2524
- var extConfig = config.extensionConfig;
2588
+ var extConfig = config[STR_EXTENSION_CONFIG ];
2525
2589
  if (extConfig && identifier) {
2526
2590
  theConfig = extConfig[identifier];
2527
2591
  }
@@ -2562,7 +2626,7 @@
2562
2626
  function _iterateChain(cb) {
2563
2627
  var nextPlugin;
2564
2628
  while (!!(nextPlugin = context._next())) {
2565
- var plugin = nextPlugin.getPlugin();
2629
+ var plugin = nextPlugin[_DYN_GET_PLUGIN ]();
2566
2630
  if (plugin) {
2567
2631
  cb(plugin);
2568
2632
  }
@@ -2575,7 +2639,7 @@
2575
2639
  var context = internalContext.ctx;
2576
2640
  function _processNext(env) {
2577
2641
  var nextPlugin = internalContext._next();
2578
- nextPlugin && nextPlugin.processTelemetry(env, context);
2642
+ nextPlugin && nextPlugin[STR_PROCESS_TELEMETRY ](env, context);
2579
2643
  return !nextPlugin;
2580
2644
  }
2581
2645
  function _createNew(plugins, startAt) {
@@ -2583,14 +2647,14 @@
2583
2647
  if (isArray(plugins)) {
2584
2648
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
2585
2649
  }
2586
- return createProcessTelemetryContext(plugins || context.getNext(), config, core, startAt);
2650
+ return createProcessTelemetryContext(plugins || context[_DYN_GET_NEXT ](), config, core, startAt);
2587
2651
  }
2588
- context.processNext = _processNext;
2589
- context.createNew = _createNew;
2652
+ context[_DYN_PROCESS_NEXT ] = _processNext;
2653
+ context[_DYN_CREATE_NEW ] = _createNew;
2590
2654
  return context;
2591
2655
  }
2592
2656
  function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
2593
- var config = core.config || {};
2657
+ var config = core[_DYN_CONFIG ] || {};
2594
2658
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
2595
2659
  var context = internalContext.ctx;
2596
2660
  function _processNext(unloadState) {
@@ -2603,20 +2667,20 @@
2603
2667
  if (isArray(plugins)) {
2604
2668
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
2605
2669
  }
2606
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
2670
+ return createProcessTelemetryUnloadContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
2607
2671
  }
2608
- context.processNext = _processNext;
2609
- context.createNew = _createNew;
2672
+ context[_DYN_PROCESS_NEXT ] = _processNext;
2673
+ context[_DYN_CREATE_NEW ] = _createNew;
2610
2674
  return context;
2611
2675
  }
2612
2676
  function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
2613
- var config = core.config || {};
2677
+ var config = core[_DYN_CONFIG ] || {};
2614
2678
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
2615
2679
  var context = internalContext.ctx;
2616
2680
  function _processNext(updateState) {
2617
2681
  return context.iterate(function (plugin) {
2618
- if (isFunction(plugin.update)) {
2619
- plugin.update(context, updateState);
2682
+ if (isFunction(plugin[_DYN_UPDATE ])) {
2683
+ plugin[_DYN_UPDATE ](context, updateState);
2620
2684
  }
2621
2685
  });
2622
2686
  }
@@ -2625,22 +2689,22 @@
2625
2689
  if (isArray(plugins)) {
2626
2690
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
2627
2691
  }
2628
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
2692
+ return createProcessTelemetryUpdateContext(plugins || context[_DYN_GET_NEXT ](), core, startAt);
2629
2693
  }
2630
- context.processNext = _processNext;
2631
- context.createNew = _createNew;
2694
+ context[_DYN_PROCESS_NEXT ] = _processNext;
2695
+ context[_DYN_CREATE_NEW ] = _createNew;
2632
2696
  return context;
2633
2697
  }
2634
2698
  function createTelemetryProxyChain(plugins, config, core, startAt) {
2635
2699
  var firstProxy = null;
2636
2700
  var add = startAt ? false : true;
2637
- if (isArray(plugins) && plugins.length > 0) {
2701
+ if (isArray(plugins) && plugins[_DYN_LENGTH ] > 0) {
2638
2702
  var lastProxy_1 = null;
2639
2703
  arrForEach(plugins, function (thePlugin) {
2640
2704
  if (!add && startAt === thePlugin) {
2641
2705
  add = true;
2642
2706
  }
2643
- if (add && thePlugin && isFunction(thePlugin.processTelemetry)) {
2707
+ if (add && thePlugin && isFunction(thePlugin[STR_PROCESS_TELEMETRY ])) {
2644
2708
  var newProxy = createTelemetryPluginProxy(thePlugin, config, core);
2645
2709
  if (!firstProxy) {
2646
2710
  firstProxy = newProxy;
@@ -2659,11 +2723,11 @@
2659
2723
  }
2660
2724
  function createTelemetryPluginProxy(plugin, config, core) {
2661
2725
  var nextProxy = null;
2662
- var hasProcessTelemetry = isFunction(plugin.processTelemetry);
2663
- var hasSetNext = isFunction(plugin.setNextPlugin);
2726
+ var hasProcessTelemetry = isFunction(plugin[STR_PROCESS_TELEMETRY ]);
2727
+ var hasSetNext = isFunction(plugin[_DYN_SET_NEXT_PLUGIN ]);
2664
2728
  var chainId;
2665
2729
  if (plugin) {
2666
- chainId = plugin.identifier + "-" + plugin.priority + "-" + _chainId++;
2730
+ chainId = plugin[_DYN_IDENTIFIER ] + "-" + plugin[STR_PRIORITY ] + "-" + _chainId++;
2667
2731
  }
2668
2732
  else {
2669
2733
  chainId = "Unknown-0-" + _chainId++;
@@ -2695,17 +2759,17 @@
2695
2759
  }
2696
2760
  function _processChain(itemCtx, processPluginFn, name, details, isAsync) {
2697
2761
  var hasRun = false;
2698
- var identifier = plugin ? plugin.identifier : strTelemetryPluginChain;
2762
+ var identifier = plugin ? plugin[_DYN_IDENTIFIER ] : strTelemetryPluginChain;
2699
2763
  var hasRunContext = itemCtx[strHasRunFlags];
2700
2764
  if (!hasRunContext) {
2701
2765
  hasRunContext = itemCtx[strHasRunFlags] = {};
2702
2766
  }
2703
2767
  itemCtx.setNext(nextProxy);
2704
2768
  if (plugin) {
2705
- doPerf(itemCtx[strCore](), function () { return identifier + ":" + name; }, function () {
2769
+ doPerf(itemCtx[STR_CORE ](), function () { return identifier + ":" + name; }, function () {
2706
2770
  hasRunContext[chainId] = true;
2707
2771
  try {
2708
- var nextId = nextProxy ? nextProxy._id : strEmpty;
2772
+ var nextId = nextProxy ? nextProxy._id : STR_EMPTY$1;
2709
2773
  if (nextId) {
2710
2774
  hasRunContext[nextId] = false;
2711
2775
  }
@@ -2717,7 +2781,7 @@
2717
2781
  hasRun = true;
2718
2782
  }
2719
2783
  if (!nextProxy || !hasNextRun) {
2720
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
2784
+ _throwInternal(itemCtx[_DYN_DIAG_LOG ](), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
2721
2785
  }
2722
2786
  }
2723
2787
  }, details, isAsync);
@@ -2731,17 +2795,17 @@
2731
2795
  return false;
2732
2796
  }
2733
2797
  var pluginState = _getPluginState(plugin);
2734
- if (pluginState.teardown || pluginState[strDisabled]) {
2798
+ if (pluginState[_DYN_TEARDOWN ] || pluginState[STR_DISABLED]) {
2735
2799
  return false;
2736
2800
  }
2737
2801
  if (hasSetNext) {
2738
- plugin.setNextPlugin(nextProxy);
2802
+ plugin[_DYN_SET_NEXT_PLUGIN ](nextProxy);
2739
2803
  }
2740
- plugin.processTelemetry(env, itemCtx);
2804
+ plugin[STR_PROCESS_TELEMETRY ](env, itemCtx);
2741
2805
  return true;
2742
2806
  }
2743
2807
  if (!_processChain(itemCtx, _callProcessTelemetry, "processTelemetry", function () { return ({ item: env }); }, !(env.sync))) {
2744
- itemCtx.processNext(env);
2808
+ itemCtx[_DYN_PROCESS_NEXT ](env);
2745
2809
  }
2746
2810
  }
2747
2811
  function _unloadPlugin(unloadCtx, unloadState) {
@@ -2749,20 +2813,20 @@
2749
2813
  var hasRun = false;
2750
2814
  if (plugin) {
2751
2815
  var pluginState = _getPluginState(plugin);
2752
- var pluginCore = plugin[strCore] || pluginState.core;
2753
- if (plugin && (!pluginCore || pluginCore === unloadCtx[strCore]()) && !pluginState[strTeardown]) {
2754
- pluginState[strCore] = null;
2755
- pluginState[strTeardown] = true;
2756
- pluginState[strIsInitialized] = false;
2757
- if (plugin[strTeardown] && plugin[strTeardown](unloadCtx, unloadState) === true) {
2816
+ var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
2817
+ if (plugin && (!pluginCore || pluginCore === unloadCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
2818
+ pluginState[STR_CORE ] = null;
2819
+ pluginState[_DYN_TEARDOWN ] = true;
2820
+ pluginState[_DYN_IS_INITIALIZED ] = false;
2821
+ if (plugin[_DYN_TEARDOWN ] && plugin[_DYN_TEARDOWN ](unloadCtx, unloadState) === true) {
2758
2822
  hasRun = true;
2759
2823
  }
2760
2824
  }
2761
2825
  }
2762
2826
  return hasRun;
2763
2827
  }
2764
- if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState.isAsync)) {
2765
- unloadCtx.processNext(unloadState);
2828
+ if (!_processChain(unloadCtx, _callTeardown, "unload", function () { }, unloadState[_DYN_IS_ASYNC ])) {
2829
+ unloadCtx[_DYN_PROCESS_NEXT ](unloadState);
2766
2830
  }
2767
2831
  }
2768
2832
  function _updatePlugin(updateCtx, updateState) {
@@ -2770,9 +2834,9 @@
2770
2834
  var hasRun = false;
2771
2835
  if (plugin) {
2772
2836
  var pluginState = _getPluginState(plugin);
2773
- var pluginCore = plugin[strCore] || pluginState.core;
2774
- if (plugin && (!pluginCore || pluginCore === updateCtx[strCore]()) && !pluginState[strTeardown]) {
2775
- if (plugin[strUpdate] && plugin[strUpdate](updateCtx, updateState) === true) {
2837
+ var pluginCore = plugin[STR_CORE] || pluginState[STR_CORE ];
2838
+ if (plugin && (!pluginCore || pluginCore === updateCtx.core()) && !pluginState[_DYN_TEARDOWN ]) {
2839
+ if (plugin[_DYN_UPDATE ] && plugin[_DYN_UPDATE ](updateCtx, updateState) === true) {
2776
2840
  hasRun = true;
2777
2841
  }
2778
2842
  }
@@ -2780,7 +2844,7 @@
2780
2844
  return hasRun;
2781
2845
  }
2782
2846
  if (!_processChain(updateCtx, _callUpdate, "update", function () { }, false)) {
2783
- updateCtx.processNext(updateState);
2847
+ updateCtx[_DYN_PROCESS_NEXT ](updateState);
2784
2848
  }
2785
2849
  }
2786
2850
  return objFreeze(proxyChain);
@@ -2794,34 +2858,30 @@
2794
2858
  return ProcessTelemetryContext;
2795
2859
  }());
2796
2860
 
2797
- var strIKey = "iKey";
2798
- var strExtensionConfig = "extensionConfig";
2799
-
2800
2861
  var ChannelControllerPriority = 500;
2801
2862
  var ChannelValidationMessage = "Channel has invalid priority - ";
2802
- function _addChannelQueue(channelQueue, queue, config, core) {
2803
- if (queue && isArray(queue) && queue.length > 0) {
2863
+ function _addChannelQueue(channelQueue, queue, core) {
2864
+ if (queue && isArray(queue) && queue[_DYN_LENGTH ] > 0) {
2804
2865
  queue = queue.sort(function (a, b) {
2805
- return a.priority - b.priority;
2866
+ return a[STR_PRIORITY ] - b[STR_PRIORITY ];
2806
2867
  });
2807
2868
  arrForEach(queue, function (queueItem) {
2808
- if (queueItem.priority < ChannelControllerPriority) {
2809
- throwError(ChannelValidationMessage + queueItem.identifier);
2869
+ if (queueItem[STR_PRIORITY ] < ChannelControllerPriority) {
2870
+ throwError(ChannelValidationMessage + queueItem[_DYN_IDENTIFIER ]);
2810
2871
  }
2811
2872
  });
2812
- channelQueue.push({
2873
+ channelQueue[_DYN_PUSH ]({
2813
2874
  queue: objFreeze(queue),
2814
- chain: createTelemetryProxyChain(queue, config, core)
2875
+ chain: createTelemetryProxyChain(queue, core[_DYN_CONFIG ], core)
2815
2876
  });
2816
2877
  }
2817
2878
  }
2818
2879
  function createChannelControllerPlugin(channelQueue, core) {
2819
- var _a;
2820
2880
  function _getTelCtx() {
2821
- return createProcessTelemetryContext(null, core.config, core, null);
2881
+ return createProcessTelemetryContext(null, core[_DYN_CONFIG ], core, null);
2822
2882
  }
2823
2883
  function _processChannelQueue(theChannels, itemCtx, processFn, onComplete) {
2824
- var waiting = theChannels ? (theChannels.length + 1) : 1;
2884
+ var waiting = theChannels ? (theChannels[_DYN_LENGTH ] + 1) : 1;
2825
2885
  function _runChainOnComplete() {
2826
2886
  waiting--;
2827
2887
  if (waiting === 0) {
@@ -2831,10 +2891,10 @@
2831
2891
  }
2832
2892
  if (waiting > 0) {
2833
2893
  arrForEach(theChannels, function (channels) {
2834
- if (channels && channels.queue.length > 0) {
2894
+ if (channels && channels.queue[_DYN_LENGTH ] > 0) {
2835
2895
  var channelChain = channels.chain;
2836
- var chainCtx = itemCtx.createNew(channelChain);
2837
- chainCtx.onComplete(_runChainOnComplete);
2896
+ var chainCtx = itemCtx[_DYN_CREATE_NEW ](channelChain);
2897
+ chainCtx[_DYN_ON_COMPLETE ](_runChainOnComplete);
2838
2898
  processFn(chainCtx);
2839
2899
  }
2840
2900
  else {
@@ -2849,9 +2909,9 @@
2849
2909
  reason: 0
2850
2910
  };
2851
2911
  _processChannelQueue(channelQueue, updateCtx, function (chainCtx) {
2852
- chainCtx[strProcessNext](theUpdateState);
2912
+ chainCtx[_DYN_PROCESS_NEXT ](theUpdateState);
2853
2913
  }, function () {
2854
- updateCtx[strProcessNext](theUpdateState);
2914
+ updateCtx[_DYN_PROCESS_NEXT ](theUpdateState);
2855
2915
  });
2856
2916
  return true;
2857
2917
  }
@@ -2861,20 +2921,20 @@
2861
2921
  isAsync: false
2862
2922
  };
2863
2923
  _processChannelQueue(channelQueue, unloadCtx, function (chainCtx) {
2864
- chainCtx[strProcessNext](theUnloadState);
2924
+ chainCtx[_DYN_PROCESS_NEXT ](theUnloadState);
2865
2925
  }, function () {
2866
- unloadCtx[strProcessNext](theUnloadState);
2926
+ unloadCtx[_DYN_PROCESS_NEXT ](theUnloadState);
2867
2927
  isInitialized = false;
2868
2928
  });
2869
2929
  return true;
2870
2930
  }
2871
2931
  function _getChannel(pluginIdentifier) {
2872
2932
  var thePlugin = null;
2873
- if (channelQueue && channelQueue.length > 0) {
2933
+ if (channelQueue && channelQueue[_DYN_LENGTH ] > 0) {
2874
2934
  arrForEach(channelQueue, function (channels) {
2875
- if (channels && channels.queue.length > 0) {
2935
+ if (channels && channels.queue[_DYN_LENGTH ] > 0) {
2876
2936
  arrForEach(channels.queue, function (ext) {
2877
- if (ext.identifier === pluginIdentifier) {
2937
+ if (ext[_DYN_IDENTIFIER ] === pluginIdentifier) {
2878
2938
  thePlugin = ext;
2879
2939
  return -1;
2880
2940
  }
@@ -2888,46 +2948,45 @@
2888
2948
  return thePlugin;
2889
2949
  }
2890
2950
  var isInitialized = false;
2891
- var channelController = (_a = {
2892
- identifier: "ChannelControllerPlugin",
2893
- priority: ChannelControllerPriority,
2894
- initialize: function (config, core, extensions, pluginChain) {
2895
- isInitialized = true;
2896
- arrForEach(channelQueue, function (channels) {
2897
- if (channels && channels.queue.length > 0) {
2898
- initializePlugins(createProcessTelemetryContext(channels.chain, config, core), extensions);
2899
- }
2900
- });
2901
- },
2902
- isInitialized: function () {
2903
- return isInitialized;
2904
- },
2905
- processTelemetry: function (item, itemCtx) {
2906
- _processChannelQueue(channelQueue, itemCtx || _getTelCtx(), function (chainCtx) {
2907
- chainCtx[strProcessNext](item);
2908
- }, function () {
2909
- itemCtx[strProcessNext](item);
2910
- });
2911
- },
2912
- update: _doUpdate
2951
+ var channelController = {
2952
+ identifier: "ChannelControllerPlugin",
2953
+ priority: ChannelControllerPriority,
2954
+ initialize: function (config, core, extensions, pluginChain) {
2955
+ isInitialized = true;
2956
+ arrForEach(channelQueue, function (channels) {
2957
+ if (channels && channels.queue[_DYN_LENGTH ] > 0) {
2958
+ initializePlugins(createProcessTelemetryContext(channels.chain, config, core), extensions);
2959
+ }
2960
+ });
2961
+ },
2962
+ isInitialized: function () {
2963
+ return isInitialized;
2913
2964
  },
2914
- _a[strPause] = function () {
2965
+ processTelemetry: function (item, itemCtx) {
2966
+ _processChannelQueue(channelQueue, itemCtx || _getTelCtx(), function (chainCtx) {
2967
+ chainCtx[_DYN_PROCESS_NEXT ](item);
2968
+ }, function () {
2969
+ itemCtx[_DYN_PROCESS_NEXT ](item);
2970
+ });
2971
+ },
2972
+ update: _doUpdate,
2973
+ pause: function () {
2915
2974
  _processChannelQueue(channelQueue, _getTelCtx(), function (chainCtx) {
2916
2975
  chainCtx.iterate(function (plugin) {
2917
- plugin[strPause] && plugin[strPause]();
2976
+ plugin.pause && plugin.pause();
2918
2977
  });
2919
2978
  }, null);
2920
2979
  },
2921
- _a[strResume] = function () {
2980
+ resume: function () {
2922
2981
  _processChannelQueue(channelQueue, _getTelCtx(), function (chainCtx) {
2923
2982
  chainCtx.iterate(function (plugin) {
2924
- plugin[strResume] && plugin[strResume]();
2983
+ plugin.resume && plugin.resume();
2925
2984
  });
2926
2985
  }, null);
2927
2986
  },
2928
- _a[strTeardown] = _doTeardown,
2929
- _a.getChannel = _getChannel,
2930
- _a.flush = function (isAsync, callBack, sendReason, cbTimeout) {
2987
+ teardown: _doTeardown,
2988
+ getChannel: _getChannel,
2989
+ flush: function (isAsync, callBack, sendReason, cbTimeout) {
2931
2990
  var waiting = 1;
2932
2991
  var doneIterating = false;
2933
2992
  var cbTimer = null;
@@ -2945,10 +3004,10 @@
2945
3004
  }
2946
3005
  _processChannelQueue(channelQueue, _getTelCtx(), function (chainCtx) {
2947
3006
  chainCtx.iterate(function (plugin) {
2948
- if (plugin.flush) {
3007
+ if (plugin[_DYN_FLUSH ]) {
2949
3008
  waiting++;
2950
3009
  var handled_1 = false;
2951
- if (!plugin.flush(isAsync, function () {
3010
+ if (!plugin[_DYN_FLUSH ](isAsync, function () {
2952
3011
  handled_1 = true;
2953
3012
  doCallback();
2954
3013
  }, sendReason)) {
@@ -2972,25 +3031,25 @@
2972
3031
  });
2973
3032
  return true;
2974
3033
  },
2975
- _a._setQueue = function (queue) {
3034
+ _setQueue: function (queue) {
2976
3035
  channelQueue = queue;
2977
- },
2978
- _a);
3036
+ }
3037
+ };
2979
3038
  return channelController;
2980
3039
  }
2981
- function createChannelQueues(channels, extensions, config, core) {
3040
+ function createChannelQueues(channels, extensions, core) {
2982
3041
  var channelQueue = [];
2983
3042
  if (channels) {
2984
- arrForEach(channels, function (queue) { return _addChannelQueue(channelQueue, queue, config, core); });
3043
+ arrForEach(channels, function (queue) { return _addChannelQueue(channelQueue, queue, core); });
2985
3044
  }
2986
3045
  if (extensions) {
2987
3046
  var extensionQueue_1 = [];
2988
3047
  arrForEach(extensions, function (plugin) {
2989
- if (plugin.priority > ChannelControllerPriority) {
2990
- extensionQueue_1.push(plugin);
3048
+ if (plugin[STR_PRIORITY ] > ChannelControllerPriority) {
3049
+ extensionQueue_1[_DYN_PUSH ](plugin);
2991
3050
  }
2992
3051
  });
2993
- _addChannelQueue(channelQueue, extensionQueue_1, config, core);
3052
+ _addChannelQueue(channelQueue, extensionQueue_1, core);
2994
3053
  }
2995
3054
  return channelQueue;
2996
3055
  }
@@ -2999,7 +3058,7 @@
2999
3058
  var handlers = [];
3000
3059
  function _addHandler(handler) {
3001
3060
  if (handler) {
3002
- handlers.push(handler);
3061
+ handlers[_DYN_PUSH ](handler);
3003
3062
  }
3004
3063
  }
3005
3064
  function _runHandlers(unloadCtx, unloadState) {
@@ -3008,7 +3067,7 @@
3008
3067
  handler(unloadCtx, unloadState);
3009
3068
  }
3010
3069
  catch (e) {
3011
- _throwInternal(unloadCtx.diagLog(), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
3070
+ _throwInternal(unloadCtx[_DYN_DIAG_LOG ](), 2 , 73 , "Unexpected error calling unload handler - " + dumpObj(e));
3012
3071
  }
3013
3072
  });
3014
3073
  handlers = [];
@@ -3030,37 +3089,40 @@
3030
3089
  var _hooks;
3031
3090
  _initDefaults();
3032
3091
  dynamicProto(BaseTelemetryPlugin, _self, function (_self) {
3033
- _self.initialize = function (config, core, extensions, pluginChain) {
3092
+ _self[_DYN_INITIALIZE ] = function (config, core, extensions, pluginChain) {
3034
3093
  _setDefaults(config, core, pluginChain);
3035
3094
  _isinitialized = true;
3036
3095
  };
3037
- _self.teardown = function (unloadCtx, unloadState) {
3038
- var core = _self.core;
3039
- if (!core || (unloadCtx && core !== unloadCtx.core())) {
3096
+ _self[_DYN_TEARDOWN ] = function (unloadCtx, unloadState) {
3097
+ var _a;
3098
+ var core = _self[STR_CORE ];
3099
+ if (!core || (unloadCtx && core !== unloadCtx[STR_CORE ]())) {
3040
3100
  return;
3041
3101
  }
3042
3102
  var result;
3043
3103
  var unloadDone = false;
3044
3104
  var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
3045
- var theUnloadState = unloadState || {
3046
- reason: 0 ,
3047
- isAsync: false
3048
- };
3105
+ var theUnloadState = unloadState || (_a = {
3106
+ reason: 0
3107
+ },
3108
+ _a[_DYN_IS_ASYNC ] = false,
3109
+ _a);
3049
3110
  function _unloadCallback() {
3050
3111
  if (!unloadDone) {
3051
3112
  unloadDone = true;
3052
3113
  _unloadHandlerContainer.run(theUnloadCtx, unloadState);
3053
- arrForEach(_hooks, function (fn) {
3114
+ var oldHooks = _hooks;
3115
+ _hooks = [];
3116
+ arrForEach(oldHooks, function (fn) {
3054
3117
  fn.rm();
3055
3118
  });
3056
- _hooks = [];
3057
3119
  if (result === true) {
3058
- theUnloadCtx.processNext(theUnloadState);
3120
+ theUnloadCtx[_DYN_PROCESS_NEXT ](theUnloadState);
3059
3121
  }
3060
3122
  _initDefaults();
3061
3123
  }
3062
3124
  }
3063
- if (!_self[strDoTeardown] || _self[strDoTeardown](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
3125
+ if (!_self[_DYN__DO_TEARDOWN ] || _self[_DYN__DO_TEARDOWN ](theUnloadCtx, theUnloadState, _unloadCallback) !== true) {
3064
3126
  _unloadCallback();
3065
3127
  }
3066
3128
  else {
@@ -3068,9 +3130,9 @@
3068
3130
  }
3069
3131
  return result;
3070
3132
  };
3071
- _self.update = function (updateCtx, updateState) {
3072
- var core = _self.core;
3073
- if (!core || (updateCtx && core !== updateCtx.core())) {
3133
+ _self[_DYN_UPDATE ] = function (updateCtx, updateState) {
3134
+ var core = _self[STR_CORE ];
3135
+ if (!core || (updateCtx && core !== updateCtx[STR_CORE ]())) {
3074
3136
  return;
3075
3137
  }
3076
3138
  var result;
@@ -3082,7 +3144,7 @@
3082
3144
  function _updateCallback() {
3083
3145
  if (!updateDone) {
3084
3146
  updateDone = true;
3085
- _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx.getNext());
3147
+ _setDefaults(theUpdateCtx.getCfg(), theUpdateCtx.core(), theUpdateCtx[_DYN_GET_NEXT ]());
3086
3148
  }
3087
3149
  }
3088
3150
  if (!_self._doUpdate || _self._doUpdate(theUpdateCtx, theUpdateState, _updateCallback) !== true) {
@@ -3099,30 +3161,30 @@
3099
3161
  _hooks = _hooks.concat(hooks);
3100
3162
  }
3101
3163
  else {
3102
- _hooks.push(hooks);
3164
+ _hooks[_DYN_PUSH ](hooks);
3103
3165
  }
3104
3166
  }
3105
3167
  };
3106
3168
  proxyFunctionAs(_self, "_addUnloadCb", function () { return _unloadHandlerContainer; }, "add");
3107
3169
  });
3108
- _self.diagLog = function (itemCtx) {
3109
- return _getTelCtx(itemCtx).diagLog();
3170
+ _self[_DYN_DIAG_LOG ] = function (itemCtx) {
3171
+ return _getTelCtx(itemCtx)[_DYN_DIAG_LOG ]();
3110
3172
  };
3111
- _self[strIsInitialized] = function () {
3173
+ _self[_DYN_IS_INITIALIZED ] = function () {
3112
3174
  return _isinitialized;
3113
3175
  };
3114
3176
  _self.setInitialized = function (isInitialized) {
3115
3177
  _isinitialized = isInitialized;
3116
3178
  };
3117
- _self[strSetNextPlugin] = function (next) {
3179
+ _self[_DYN_SET_NEXT_PLUGIN ] = function (next) {
3118
3180
  _nextPlugin = next;
3119
3181
  };
3120
- _self.processNext = function (env, itemCtx) {
3182
+ _self[_DYN_PROCESS_NEXT ] = function (env, itemCtx) {
3121
3183
  if (itemCtx) {
3122
- itemCtx.processNext(env);
3184
+ itemCtx[_DYN_PROCESS_NEXT ](env);
3123
3185
  }
3124
- else if (_nextPlugin && isFunction(_nextPlugin.processTelemetry)) {
3125
- _nextPlugin.processTelemetry(env, null);
3186
+ else if (_nextPlugin && isFunction(_nextPlugin[STR_PROCESS_TELEMETRY ])) {
3187
+ _nextPlugin[STR_PROCESS_TELEMETRY ](env, null);
3126
3188
  }
3127
3189
  };
3128
3190
  _self._getTelCtx = _getTelCtx;
@@ -3130,39 +3192,40 @@
3130
3192
  if (currentCtx === void 0) { currentCtx = null; }
3131
3193
  var itemCtx = currentCtx;
3132
3194
  if (!itemCtx) {
3133
- var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self.core);
3195
+ var rootCtx = _rootCtx || createProcessTelemetryContext(null, {}, _self[STR_CORE ]);
3134
3196
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
3135
- itemCtx = rootCtx.createNew(null, _nextPlugin[strGetPlugin]);
3197
+ itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin[strGetPlugin]);
3136
3198
  }
3137
3199
  else {
3138
- itemCtx = rootCtx.createNew(null, _nextPlugin);
3200
+ itemCtx = rootCtx[_DYN_CREATE_NEW ](null, _nextPlugin);
3139
3201
  }
3140
3202
  }
3141
3203
  return itemCtx;
3142
3204
  }
3143
3205
  function _setDefaults(config, core, pluginChain) {
3144
3206
  if (config) {
3145
- setValue(config, strExtensionConfig, [], null, isNullOrUndefined);
3207
+ setValue(config, STR_EXTENSION_CONFIG, [], null, isNullOrUndefined);
3146
3208
  }
3147
3209
  if (!pluginChain && core) {
3148
- pluginChain = core.getProcessTelContext().getNext();
3210
+ pluginChain = core[_DYN_GET_PROCESS_TEL_CONT0 ]()[_DYN_GET_NEXT ]();
3149
3211
  }
3150
3212
  var nextPlugin = _nextPlugin;
3151
3213
  if (_nextPlugin && _nextPlugin[strGetPlugin]) {
3152
3214
  nextPlugin = _nextPlugin[strGetPlugin]();
3153
3215
  }
3154
- _self.core = core;
3216
+ _self[STR_CORE ] = core;
3155
3217
  _rootCtx = createProcessTelemetryContext(pluginChain, config, core, nextPlugin);
3156
3218
  }
3157
3219
  function _initDefaults() {
3158
3220
  _isinitialized = false;
3159
- _self.core = null;
3221
+ _self[STR_CORE ] = null;
3160
3222
  _rootCtx = null;
3161
3223
  _nextPlugin = null;
3162
3224
  _hooks = [];
3163
3225
  _unloadHandlerContainer = createUnloadHandlerContainer();
3164
3226
  }
3165
3227
  }
3228
+ BaseTelemetryPlugin.__ieDyn=1;
3166
3229
  return BaseTelemetryPlugin;
3167
3230
  }());
3168
3231
 
@@ -3181,12 +3244,12 @@
3181
3244
  id: _id++,
3182
3245
  fn: telemetryInitializer
3183
3246
  };
3184
- _initializers.push(theInitializer);
3247
+ _initializers[_DYN_PUSH ](theInitializer);
3185
3248
  var handler = {
3186
3249
  remove: function () {
3187
3250
  arrForEach(_initializers, function (initializer, idx) {
3188
3251
  if (initializer.id === theInitializer.id) {
3189
- _initializers.splice(idx, 1);
3252
+ _initializers[_DYN_SPLICE ](idx, 1);
3190
3253
  return -1;
3191
3254
  }
3192
3255
  });
@@ -3194,28 +3257,28 @@
3194
3257
  };
3195
3258
  return handler;
3196
3259
  };
3197
- _self.processTelemetry = function (item, itemCtx) {
3260
+ _self[STR_PROCESS_TELEMETRY ] = function (item, itemCtx) {
3198
3261
  var doNotSendItem = false;
3199
- var telemetryInitializersCount = _initializers.length;
3262
+ var telemetryInitializersCount = _initializers[_DYN_LENGTH ];
3200
3263
  for (var i = 0; i < telemetryInitializersCount; ++i) {
3201
3264
  var telemetryInitializer = _initializers[i];
3202
3265
  if (telemetryInitializer) {
3203
3266
  try {
3204
- if (telemetryInitializer.fn.apply(null, [item]) === false) {
3267
+ if (telemetryInitializer.fn[_DYN_APPLY ](null, [item]) === false) {
3205
3268
  doNotSendItem = true;
3206
3269
  break;
3207
3270
  }
3208
3271
  }
3209
3272
  catch (e) {
3210
- _throwInternal(itemCtx.diagLog(), 1 , 64 , "One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e), { exception: dumpObj(e) }, true);
3273
+ _throwInternal(itemCtx[_DYN_DIAG_LOG ](), 1 , 64 , "One of telemetry initializers failed, telemetry item will not be sent: " + getExceptionName(e), { exception: dumpObj(e) }, true);
3211
3274
  }
3212
3275
  }
3213
3276
  }
3214
3277
  if (!doNotSendItem) {
3215
- _self.processNext(item, itemCtx);
3278
+ _self[_DYN_PROCESS_NEXT ](item, itemCtx);
3216
3279
  }
3217
3280
  };
3218
- _self[strDoTeardown] = function () {
3281
+ _self[_DYN__DO_TEARDOWN ] = function () {
3219
3282
  _initDefaults();
3220
3283
  };
3221
3284
  });
@@ -3225,6 +3288,7 @@
3225
3288
  }
3226
3289
  return _this;
3227
3290
  }
3291
+ TelemetryInitializerPlugin.__ieDyn=1;
3228
3292
  return TelemetryInitializerPlugin;
3229
3293
  }(BaseTelemetryPlugin));
3230
3294
 
@@ -3239,14 +3303,15 @@
3239
3303
  return new PerfManager(notificationMgr);
3240
3304
  }
3241
3305
  function _validateExtensions(logger, channelPriority, allExtensions) {
3306
+ var _a;
3242
3307
  var coreExtensions = [];
3243
3308
  var extPriorities = {};
3244
3309
  arrForEach(allExtensions, function (ext) {
3245
- if (isNullOrUndefined(ext) || isNullOrUndefined(ext.initialize)) {
3310
+ if (isNullOrUndefined(ext) || isNullOrUndefined(ext[_DYN_INITIALIZE ])) {
3246
3311
  throwError(strValidationError);
3247
3312
  }
3248
- var extPriority = ext.priority;
3249
- var identifier = ext.identifier;
3313
+ var extPriority = ext[STR_PRIORITY ];
3314
+ var identifier = ext[_DYN_IDENTIFIER ];
3250
3315
  if (ext && extPriority) {
3251
3316
  if (!isNullOrUndefined(extPriorities[extPriority])) {
3252
3317
  _warnToConsole(logger, "Two extensions have same priority #" + extPriority + " - " + extPriorities[extPriority] + ", " + identifier);
@@ -3256,13 +3321,14 @@
3256
3321
  }
3257
3322
  }
3258
3323
  if (!extPriority || extPriority < channelPriority) {
3259
- coreExtensions.push(ext);
3324
+ coreExtensions[_DYN_PUSH ](ext);
3260
3325
  }
3261
3326
  });
3262
- return {
3263
- all: allExtensions,
3264
- core: coreExtensions
3265
- };
3327
+ return _a = {
3328
+ all: allExtensions
3329
+ },
3330
+ _a[STR_CORE ] = coreExtensions,
3331
+ _a;
3266
3332
  }
3267
3333
  function _isPluginPresent(thePlugin, plugins) {
3268
3334
  var exists = false;
@@ -3277,15 +3343,16 @@
3277
3343
  function _createDummyNotificationManager() {
3278
3344
  var _a;
3279
3345
  return objCreateFn((_a = {},
3280
- _a[strAddNotificationListener] = function (listener) { },
3281
- _a[strRemoveNotificationListener] = function (listener) { },
3282
- _a[strEventsSent] = function (events) { },
3283
- _a[strEventsDiscarded] = function (events, reason) { },
3284
- _a[strEventsSendRequest] = function (sendReason, isAsync) { },
3346
+ _a[_DYN_ADD_NOTIFICATION_LIS1 ] = function (listener) { },
3347
+ _a[_DYN_REMOVE_NOTIFICATION_2 ] = function (listener) { },
3348
+ _a[STR_EVENTS_SENT ] = function (events) { },
3349
+ _a[STR_EVENTS_DISCARDED ] = function (events, reason) { },
3350
+ _a[STR_EVENTS_SEND_REQUEST ] = function (sendReason, isAsync) { },
3285
3351
  _a));
3286
3352
  }
3287
3353
  var BaseCore$2 = /** @class */ (function () {
3288
3354
  function BaseCore() {
3355
+ var _config;
3289
3356
  var _isInitialized;
3290
3357
  var _eventQueue;
3291
3358
  var _notificationManager;
@@ -3308,33 +3375,34 @@
3308
3375
  var _internalLogPoller = 0;
3309
3376
  dynamicProto(BaseCore, this, function (_self) {
3310
3377
  _initDefaults();
3311
- _self.isInitialized = function () { return _isInitialized; };
3312
- _self.initialize = function (config, extensions, logger, notificationManager) {
3378
+ _self[_DYN_IS_INITIALIZED ] = function () { return _isInitialized; };
3379
+ _self[_DYN_INITIALIZE ] = function (config, extensions, logger, notificationManager) {
3313
3380
  if (_isUnloading) {
3314
3381
  throwError(strSdkUnloadingError);
3315
3382
  }
3316
- if (_self.isInitialized()) {
3383
+ if (_self[_DYN_IS_INITIALIZED ]()) {
3317
3384
  throwError("Core should not be initialized more than once");
3318
3385
  }
3319
- if (!config || isNullOrUndefined(config.instrumentationKey)) {
3386
+ _config = config || {};
3387
+ _self[_DYN_CONFIG ] = _config;
3388
+ if (isNullOrUndefined(config[_DYN_INSTRUMENTATION_KEY ])) {
3320
3389
  throwError("Please provide instrumentation key");
3321
3390
  }
3322
3391
  _notificationManager = notificationManager;
3323
3392
  _self[strNotificationManager] = notificationManager;
3324
- _self.config = config || {};
3325
- _initDebugListener(config);
3326
- _initPerfManager(config);
3327
- config.extensions = isNullOrUndefined(config.extensions) ? [] : config.extensions;
3328
- _initExtConfig(config);
3393
+ _initDebugListener();
3394
+ _initPerfManager();
3395
+ _initExtConfig();
3329
3396
  if (logger) {
3330
- _self.logger = logger;
3397
+ _self[_DYN_LOGGER ] = logger;
3331
3398
  }
3399
+ var cfgExtensions = getSetValue(_config, STR_EXTENSIONS, []);
3332
3400
  _configExtensions = [];
3333
- _configExtensions.push.apply(_configExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), config.extensions));
3334
- _channelConfig = (config || {}).channels;
3335
- _initPluginChain(config, null);
3336
- if (!_channelQueue || _channelQueue.length === 0) {
3337
- throwError("No channels available");
3401
+ _configExtensions[_DYN_PUSH ].apply(_configExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), cfgExtensions));
3402
+ _channelConfig = getSetValue(_config, STR_CHANNELS, []);
3403
+ _initPluginChain(null);
3404
+ if (!_channelQueue || _channelQueue[_DYN_LENGTH ] === 0) {
3405
+ throwError("No " + STR_CHANNELS + " available");
3338
3406
  }
3339
3407
  _isInitialized = true;
3340
3408
  _self.releaseQueue();
@@ -3343,53 +3411,56 @@
3343
3411
  var controls = [];
3344
3412
  if (_channelQueue) {
3345
3413
  arrForEach(_channelQueue, function (channels) {
3346
- controls.push(channels.queue);
3414
+ controls[_DYN_PUSH ](channels.queue);
3347
3415
  });
3348
3416
  }
3349
3417
  return objFreeze(controls);
3350
3418
  };
3351
3419
  _self.track = function (telemetryItem) {
3352
- setValue(telemetryItem, strIKey, _self.config.instrumentationKey, null, isNotTruthy);
3353
- setValue(telemetryItem, "time", toISOString(new Date()), null, isNotTruthy);
3354
- setValue(telemetryItem, "ver", "4.0", null, isNullOrUndefined);
3355
- if (!_isUnloading && _self.isInitialized()) {
3356
- _createTelCtx().processNext(telemetryItem);
3420
+ telemetryItem.iKey = telemetryItem.iKey || _config[_DYN_INSTRUMENTATION_KEY ];
3421
+ telemetryItem[_DYN_TIME ] = telemetryItem[_DYN_TIME ] || toISOString(new Date());
3422
+ telemetryItem.ver = telemetryItem.ver || "4.0";
3423
+ if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]()) {
3424
+ _createTelCtx()[_DYN_PROCESS_NEXT ](telemetryItem);
3357
3425
  }
3358
3426
  else {
3359
- _eventQueue.push(telemetryItem);
3427
+ _eventQueue[_DYN_PUSH ](telemetryItem);
3360
3428
  }
3361
3429
  };
3362
- _self.getProcessTelContext = _createTelCtx;
3363
- _self.getNotifyMgr = function () {
3430
+ _self[_DYN_GET_PROCESS_TEL_CONT0 ] = _createTelCtx;
3431
+ _self[_DYN_GET_NOTIFY_MGR ] = function () {
3364
3432
  if (!_notificationManager) {
3365
3433
  _notificationManager = _createDummyNotificationManager();
3366
3434
  _self[strNotificationManager] = _notificationManager;
3367
3435
  }
3368
3436
  return _notificationManager;
3369
3437
  };
3370
- _self[strAddNotificationListener] = function (listener) {
3438
+ _self[_DYN_ADD_NOTIFICATION_LIS1 ] = function (listener) {
3371
3439
  if (_notificationManager) {
3372
- _notificationManager[strAddNotificationListener](listener);
3440
+ _notificationManager[_DYN_ADD_NOTIFICATION_LIS1 ](listener);
3373
3441
  }
3374
3442
  };
3375
- _self[strRemoveNotificationListener] = function (listener) {
3443
+ _self[_DYN_REMOVE_NOTIFICATION_2 ] = function (listener) {
3376
3444
  if (_notificationManager) {
3377
- _notificationManager[strRemoveNotificationListener](listener);
3445
+ _notificationManager[_DYN_REMOVE_NOTIFICATION_2 ](listener);
3378
3446
  }
3379
3447
  };
3380
3448
  _self.getCookieMgr = function () {
3381
3449
  if (!_cookieManager) {
3382
- _cookieManager = createCookieMgr(_self.config, _self.logger);
3450
+ _cookieManager = createCookieMgr(_config, _self[_DYN_LOGGER ]);
3383
3451
  }
3384
3452
  return _cookieManager;
3385
3453
  };
3386
3454
  _self.setCookieMgr = function (cookieMgr) {
3387
3455
  _cookieManager = cookieMgr;
3388
3456
  };
3389
- _self.getPerfMgr = function () {
3457
+ _self[STR_GET_PERF_MGR ] = function () {
3390
3458
  if (!_perfManager && !_cfgPerfManager) {
3391
- if (_self.config && _self.config.enablePerfMgr && isFunction(_self.config.createPerfMgr)) {
3392
- _cfgPerfManager = _self.config.createPerfMgr(_self, _self.getNotifyMgr());
3459
+ if (getCfgValue(_config.enablePerfMgr)) {
3460
+ var createPerfMgr = getCfgValue(_config[STR_CREATE_PERF_MGR ]);
3461
+ if (isFunction(createPerfMgr)) {
3462
+ _cfgPerfManager = createPerfMgr(_self, _self[_DYN_GET_NOTIFY_MGR ]());
3463
+ }
3393
3464
  }
3394
3465
  }
3395
3466
  return _perfManager || _cfgPerfManager || getGblPerfMgr();
@@ -3398,20 +3469,20 @@
3398
3469
  _perfManager = perfMgr;
3399
3470
  };
3400
3471
  _self.eventCnt = function () {
3401
- return _eventQueue.length;
3472
+ return _eventQueue[_DYN_LENGTH ];
3402
3473
  };
3403
3474
  _self.releaseQueue = function () {
3404
- if (_isInitialized && _eventQueue.length > 0) {
3475
+ if (_isInitialized && _eventQueue[_DYN_LENGTH ] > 0) {
3405
3476
  var eventQueue = _eventQueue;
3406
3477
  _eventQueue = [];
3407
3478
  arrForEach(eventQueue, function (event) {
3408
- _createTelCtx().processNext(event);
3479
+ _createTelCtx()[_DYN_PROCESS_NEXT ](event);
3409
3480
  });
3410
3481
  }
3411
3482
  };
3412
3483
  _self.pollInternalLogs = function (eventName) {
3413
3484
  _internalLogsEventName = eventName || null;
3414
- var interval = _self.config.diagnosticLogInterval;
3485
+ var interval = getCfgValue(_config.diagnosticLogInterval);
3415
3486
  if (!interval || !(interval > 0)) {
3416
3487
  interval = 10000;
3417
3488
  }
@@ -3423,7 +3494,7 @@
3423
3494
  }, interval);
3424
3495
  return _internalLogPoller;
3425
3496
  };
3426
- _self.stopPollingInternalLogs = function () {
3497
+ _self[_DYN_STOP_POLLING_INTERNA3 ] = function () {
3427
3498
  if (_internalLogPoller) {
3428
3499
  clearInterval(_internalLogPoller);
3429
3500
  _internalLogPoller = 0;
@@ -3432,6 +3503,7 @@
3432
3503
  };
3433
3504
  proxyFunctions(_self, function () { return _telemetryInitializerPlugin; }, ["addTelemetryInitializer"]);
3434
3505
  _self.unload = function (isAsync, unloadComplete, cbTimeout) {
3506
+ var _a;
3435
3507
  if (isAsync === void 0) { isAsync = true; }
3436
3508
  if (!_isInitialized) {
3437
3509
  throwError(strSdkNotInitialized);
@@ -3439,13 +3511,14 @@
3439
3511
  if (_isUnloading) {
3440
3512
  throwError(strSdkUnloadingError);
3441
3513
  }
3442
- var unloadState = {
3443
- reason: 50 ,
3444
- isAsync: isAsync,
3445
- flushComplete: false
3446
- };
3514
+ var unloadState = (_a = {
3515
+ reason: 50
3516
+ },
3517
+ _a[_DYN_IS_ASYNC ] = isAsync,
3518
+ _a.flushComplete = false,
3519
+ _a);
3447
3520
  var processUnloadCtx = createProcessTelemetryUnloadContext(_getPluginChain(), _self);
3448
- processUnloadCtx.onComplete(function () {
3521
+ processUnloadCtx[_DYN_ON_COMPLETE ](function () {
3449
3522
  _initDefaults();
3450
3523
  unloadComplete && unloadComplete(unloadState);
3451
3524
  }, _self);
@@ -3453,33 +3526,33 @@
3453
3526
  unloadState.flushComplete = flushComplete;
3454
3527
  _isUnloading = true;
3455
3528
  _unloadHandlers.run(processUnloadCtx, unloadState);
3456
- _self.stopPollingInternalLogs();
3457
- processUnloadCtx.processNext(unloadState);
3529
+ _self[_DYN_STOP_POLLING_INTERNA3 ]();
3530
+ processUnloadCtx[_DYN_PROCESS_NEXT ](unloadState);
3458
3531
  }
3459
3532
  if (!_flushChannels(isAsync, _doUnload, 6 , cbTimeout)) {
3460
3533
  _doUnload(false);
3461
3534
  }
3462
3535
  };
3463
- _self.getPlugin = _getPlugin;
3536
+ _self[_DYN_GET_PLUGIN ] = _getPlugin;
3464
3537
  _self.addPlugin = function (plugin, replaceExisting, isAsync, addCb) {
3465
3538
  if (!plugin) {
3466
3539
  addCb && addCb(false);
3467
3540
  _logOrThrowError(strValidationError);
3468
3541
  return;
3469
3542
  }
3470
- var existingPlugin = _getPlugin(plugin.identifier);
3543
+ var existingPlugin = _getPlugin(plugin[_DYN_IDENTIFIER ]);
3471
3544
  if (existingPlugin && !replaceExisting) {
3472
3545
  addCb && addCb(false);
3473
- _logOrThrowError("Plugin [" + plugin.identifier + "] is already loaded!");
3546
+ _logOrThrowError("Plugin [" + plugin[_DYN_IDENTIFIER ] + "] is already loaded!");
3474
3547
  return;
3475
3548
  }
3476
3549
  var updateState = {
3477
3550
  reason: 16
3478
3551
  };
3479
3552
  function _addPlugin(removed) {
3480
- _configExtensions.push(plugin);
3553
+ _configExtensions[_DYN_PUSH ](plugin);
3481
3554
  updateState.added = [plugin];
3482
- _initPluginChain(_self.config, updateState);
3555
+ _initPluginChain(updateState);
3483
3556
  addCb && addCb(true);
3484
3557
  }
3485
3558
  if (existingPlugin) {
@@ -3506,7 +3579,7 @@
3506
3579
  _self.evtNamespace = function () {
3507
3580
  return _evtNamespace;
3508
3581
  };
3509
- _self.flush = _flushChannels;
3582
+ _self[_DYN_FLUSH ] = _flushChannels;
3510
3583
  _self.getTraceCtx = function (createNew) {
3511
3584
  if (!_traceCtx) {
3512
3585
  _traceCtx = createDistributedTraceContext();
@@ -3519,9 +3592,10 @@
3519
3592
  proxyFunctionAs(_self, "addUnloadCb", function () { return _unloadHandlers; }, "add");
3520
3593
  function _initDefaults() {
3521
3594
  _isInitialized = false;
3522
- _self.config = objExtend(true, {}, defaultInitConfig);
3523
- _self.logger = new DiagnosticLogger(_self.config);
3524
- _self._extensions = [];
3595
+ _config = objExtend(true, {}, defaultInitConfig);
3596
+ _self[_DYN_CONFIG ] = _config;
3597
+ _self[_DYN_LOGGER ] = new DiagnosticLogger(_config);
3598
+ _self[_DYN__EXTENSIONS ] = [];
3525
3599
  _telemetryInitializerPlugin = new TelemetryInitializerPlugin();
3526
3600
  _eventQueue = [];
3527
3601
  _notificationManager = null;
@@ -3541,43 +3615,44 @@
3541
3615
  _traceCtx = null;
3542
3616
  }
3543
3617
  function _createTelCtx() {
3544
- return createProcessTelemetryContext(_getPluginChain(), _self.config, _self);
3618
+ return createProcessTelemetryContext(_getPluginChain(), _config, _self);
3545
3619
  }
3546
- function _initPluginChain(config, updateState) {
3547
- var theExtensions = _validateExtensions(_self.logger, ChannelControllerPriority, _configExtensions);
3548
- _coreExtensions = theExtensions.core;
3620
+ function _initPluginChain(updateState) {
3621
+ var theExtensions = _validateExtensions(_self[_DYN_LOGGER ], ChannelControllerPriority, _configExtensions);
3622
+ _coreExtensions = theExtensions[STR_CORE ];
3549
3623
  _pluginChain = null;
3550
3624
  var allExtensions = theExtensions.all;
3551
- _channelQueue = objFreeze(createChannelQueues(_channelConfig, allExtensions, config, _self));
3625
+ _channelQueue = objFreeze(createChannelQueues(_channelConfig, allExtensions, _self));
3552
3626
  if (_channelControl) {
3553
3627
  var idx = arrIndexOf(allExtensions, _channelControl);
3554
3628
  if (idx !== -1) {
3555
- allExtensions.splice(idx, 1);
3629
+ allExtensions[_DYN_SPLICE ](idx, 1);
3556
3630
  }
3557
3631
  idx = arrIndexOf(_coreExtensions, _channelControl);
3558
3632
  if (idx !== -1) {
3559
- _coreExtensions.splice(idx, 1);
3633
+ _coreExtensions[_DYN_SPLICE ](idx, 1);
3560
3634
  }
3561
3635
  _channelControl._setQueue(_channelQueue);
3562
3636
  }
3563
3637
  else {
3564
3638
  _channelControl = createChannelControllerPlugin(_channelQueue, _self);
3565
3639
  }
3566
- allExtensions.push(_channelControl);
3567
- _coreExtensions.push(_channelControl);
3568
- _self._extensions = sortPlugins(allExtensions);
3569
- _channelControl.initialize(config, _self, allExtensions);
3640
+ allExtensions[_DYN_PUSH ](_channelControl);
3641
+ _coreExtensions[_DYN_PUSH ](_channelControl);
3642
+ _self[_DYN__EXTENSIONS ] = sortPlugins(allExtensions);
3643
+ _channelControl[_DYN_INITIALIZE ](_config, _self, allExtensions);
3570
3644
  initializePlugins(_createTelCtx(), allExtensions);
3571
- _self._extensions = objFreeze(sortPlugins(_coreExtensions || [])).slice();
3645
+ _self[_DYN__EXTENSIONS ] = objFreeze(sortPlugins(_coreExtensions || [])).slice();
3572
3646
  if (updateState) {
3573
3647
  _doUpdate(updateState);
3574
3648
  }
3575
3649
  }
3576
3650
  function _getPlugin(pluginIdentifier) {
3651
+ var _a;
3577
3652
  var theExt = null;
3578
3653
  var thePlugin = null;
3579
- arrForEach(_self._extensions, function (ext) {
3580
- if (ext.identifier === pluginIdentifier && ext !== _channelControl && ext !== _telemetryInitializerPlugin) {
3654
+ arrForEach(_self[_DYN__EXTENSIONS ], function (ext) {
3655
+ if (ext[_DYN_IDENTIFIER ] === pluginIdentifier && ext !== _channelControl && ext !== _telemetryInitializerPlugin) {
3581
3656
  thePlugin = ext;
3582
3657
  return -1;
3583
3658
  }
@@ -3586,33 +3661,36 @@
3586
3661
  thePlugin = _channelControl.getChannel(pluginIdentifier);
3587
3662
  }
3588
3663
  if (thePlugin) {
3589
- theExt = {
3590
- plugin: thePlugin,
3591
- setEnabled: function (enabled) {
3592
- _getPluginState(thePlugin)[strDisabled] = !enabled;
3664
+ theExt = (_a = {
3665
+ plugin: thePlugin
3593
3666
  },
3594
- isEnabled: function () {
3667
+ _a[_DYN_SET_ENABLED ] = function (enabled) {
3668
+ _getPluginState(thePlugin)[STR_DISABLED] = !enabled;
3669
+ },
3670
+ _a.isEnabled = function () {
3595
3671
  var pluginState = _getPluginState(thePlugin);
3596
- return !pluginState[strTeardown] && !pluginState[strDisabled];
3672
+ return !pluginState[_DYN_TEARDOWN ] && !pluginState[STR_DISABLED];
3597
3673
  },
3598
- remove: function (isAsync, removeCb) {
3674
+ _a.remove = function (isAsync, removeCb) {
3675
+ var _a;
3599
3676
  if (isAsync === void 0) { isAsync = true; }
3600
3677
  var pluginsToRemove = [thePlugin];
3601
- var unloadState = {
3602
- reason: 1 ,
3603
- isAsync: isAsync
3604
- };
3678
+ var unloadState = (_a = {
3679
+ reason: 1
3680
+ },
3681
+ _a[_DYN_IS_ASYNC ] = isAsync,
3682
+ _a);
3605
3683
  _removePlugins(pluginsToRemove, unloadState, function (removed) {
3606
3684
  if (removed) {
3607
- _initPluginChain(_self.config, {
3685
+ _initPluginChain({
3608
3686
  reason: 32 ,
3609
3687
  removed: pluginsToRemove
3610
3688
  });
3611
3689
  }
3612
3690
  removeCb && removeCb(removed);
3613
3691
  });
3614
- }
3615
- };
3692
+ },
3693
+ _a);
3616
3694
  }
3617
3695
  return theExt;
3618
3696
  }
@@ -3620,22 +3698,22 @@
3620
3698
  if (!_pluginChain) {
3621
3699
  var extensions = (_coreExtensions || []).slice();
3622
3700
  if (arrIndexOf(extensions, _telemetryInitializerPlugin) === -1) {
3623
- extensions.push(_telemetryInitializerPlugin);
3701
+ extensions[_DYN_PUSH ](_telemetryInitializerPlugin);
3624
3702
  }
3625
- _pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _self.config, _self);
3703
+ _pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _config, _self);
3626
3704
  }
3627
3705
  return _pluginChain;
3628
3706
  }
3629
3707
  function _removePlugins(thePlugins, unloadState, removeComplete) {
3630
- if (thePlugins && thePlugins.length > 0) {
3631
- var unloadChain = createTelemetryProxyChain(thePlugins, _self.config, _self);
3708
+ if (thePlugins && thePlugins[_DYN_LENGTH ] > 0) {
3709
+ var unloadChain = createTelemetryProxyChain(thePlugins, _config, _self);
3632
3710
  var unloadCtx = createProcessTelemetryUnloadContext(unloadChain, _self);
3633
- unloadCtx.onComplete(function () {
3711
+ unloadCtx[_DYN_ON_COMPLETE ](function () {
3634
3712
  var removed = false;
3635
3713
  var newConfigExtensions = [];
3636
3714
  arrForEach(_configExtensions, function (plugin, idx) {
3637
3715
  if (!_isPluginPresent(plugin, thePlugins)) {
3638
- newConfigExtensions.push(plugin);
3716
+ newConfigExtensions[_DYN_PUSH ](plugin);
3639
3717
  }
3640
3718
  else {
3641
3719
  removed = true;
@@ -3648,77 +3726,80 @@
3648
3726
  var newQueue = [];
3649
3727
  arrForEach(queue, function (channel) {
3650
3728
  if (!_isPluginPresent(channel, thePlugins)) {
3651
- newQueue.push(channel);
3729
+ newQueue[_DYN_PUSH ](channel);
3652
3730
  }
3653
3731
  else {
3654
3732
  removed = true;
3655
3733
  }
3656
3734
  });
3657
- newChannelConfig.push(newQueue);
3735
+ newChannelConfig[_DYN_PUSH ](newQueue);
3658
3736
  });
3659
3737
  _channelConfig = newChannelConfig;
3660
3738
  }
3661
3739
  removeComplete && removeComplete(removed);
3662
3740
  });
3663
- unloadCtx.processNext(unloadState);
3741
+ unloadCtx[_DYN_PROCESS_NEXT ](unloadState);
3664
3742
  }
3665
3743
  else {
3666
3744
  removeComplete(false);
3667
3745
  }
3668
3746
  }
3669
3747
  function _flushInternalLogs() {
3670
- var queue = _self.logger ? _self.logger.queue : [];
3748
+ var queue = _self[_DYN_LOGGER ] ? _self[_DYN_LOGGER ].queue : [];
3671
3749
  if (queue) {
3672
3750
  arrForEach(queue, function (logMessage) {
3673
- var item = {
3674
- name: _internalLogsEventName ? _internalLogsEventName : "InternalMessageId: " + logMessage.messageId,
3675
- iKey: _self.config.instrumentationKey,
3676
- time: toISOString(new Date()),
3677
- baseType: _InternalLogMessage.dataType,
3678
- baseData: { message: logMessage.message }
3679
- };
3751
+ var _a;
3752
+ var item = (_a = {},
3753
+ _a[_DYN_NAME ] = _internalLogsEventName ? _internalLogsEventName : "InternalMessageId: " + logMessage[_DYN_MESSAGE_ID ],
3754
+ _a.iKey = getCfgValue(_config[_DYN_INSTRUMENTATION_KEY ]),
3755
+ _a.time = toISOString(new Date()),
3756
+ _a.baseType = _InternalLogMessage.dataType,
3757
+ _a.baseData = { message: logMessage[_DYN_MESSAGE ] },
3758
+ _a);
3680
3759
  _self.track(item);
3681
3760
  });
3682
- queue.length = 0;
3761
+ queue[_DYN_LENGTH ] = 0;
3683
3762
  }
3684
3763
  }
3685
3764
  function _flushChannels(isAsync, callBack, sendReason, cbTimeout) {
3686
3765
  if (_channelControl) {
3687
- return _channelControl.flush(isAsync, callBack, sendReason || 6 , cbTimeout);
3766
+ return _channelControl[_DYN_FLUSH ](isAsync, callBack, sendReason || 6 , cbTimeout);
3688
3767
  }
3689
3768
  callBack && callBack(false);
3690
3769
  return true;
3691
3770
  }
3692
- function _initDebugListener(config) {
3693
- if (config.disableDbgExt === true && _debugListener) {
3694
- _notificationManager[strRemoveNotificationListener](_debugListener);
3771
+ function _initDebugListener() {
3772
+ var disableDbgExt = getCfgValue(_config.disableDbgExt);
3773
+ if (disableDbgExt === true && _debugListener) {
3774
+ _notificationManager[_DYN_REMOVE_NOTIFICATION_2 ](_debugListener);
3695
3775
  _debugListener = null;
3696
3776
  }
3697
- if (_notificationManager && !_debugListener && config.disableDbgExt !== true) {
3698
- _debugListener = getDebugListener(config);
3699
- _notificationManager[strAddNotificationListener](_debugListener);
3777
+ if (_notificationManager && !_debugListener && disableDbgExt !== true) {
3778
+ _debugListener = getDebugListener(_config);
3779
+ _notificationManager[_DYN_ADD_NOTIFICATION_LIS1 ](_debugListener);
3700
3780
  }
3701
3781
  }
3702
- function _initPerfManager(config) {
3703
- if (!config.enablePerfMgr && _cfgPerfManager) {
3782
+ function _initPerfManager() {
3783
+ var enablePerfMgr = getCfgValue(_config.enablePerfMgr);
3784
+ if (!enablePerfMgr && _cfgPerfManager) {
3704
3785
  _cfgPerfManager = null;
3705
3786
  }
3706
- if (config.enablePerfMgr) {
3707
- setValue(_self.config, "createPerfMgr", _createPerfManager);
3787
+ if (enablePerfMgr) {
3788
+ getSetValue(_config, STR_CREATE_PERF_MGR, _createPerfManager);
3708
3789
  }
3709
3790
  }
3710
- function _initExtConfig(config) {
3711
- var extConfig = getSetValue(config, strExtensionConfig);
3791
+ function _initExtConfig() {
3792
+ var extConfig = getSetValue(_config, STR_EXTENSION_CONFIG, {});
3712
3793
  extConfig.NotificationManager = _notificationManager;
3713
3794
  }
3714
3795
  function _doUpdate(updateState) {
3715
3796
  var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self);
3716
3797
  if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {
3717
- updateCtx.processNext(updateState);
3798
+ updateCtx[_DYN_PROCESS_NEXT ](updateState);
3718
3799
  }
3719
3800
  }
3720
3801
  function _logOrThrowError(message) {
3721
- var logger = _self.logger;
3802
+ var logger = _self[_DYN_LOGGER ];
3722
3803
  if (logger) {
3723
3804
  _throwInternal(logger, 2 , 73 , message);
3724
3805
  }
@@ -3728,6 +3809,7 @@
3728
3809
  }
3729
3810
  });
3730
3811
  }
3812
+ BaseCore.__ieDyn=1;
3731
3813
  return BaseCore;
3732
3814
  }());
3733
3815
 
@@ -3752,40 +3834,40 @@
3752
3834
  this.listeners = [];
3753
3835
  var perfEvtsSendAll = !!(config || {}).perfEvtsSendAll;
3754
3836
  dynamicProto(NotificationManager, this, function (_self) {
3755
- _self[strAddNotificationListener] = function (listener) {
3756
- _self.listeners.push(listener);
3837
+ _self[_DYN_ADD_NOTIFICATION_LIS1 ] = function (listener) {
3838
+ _self.listeners[_DYN_PUSH ](listener);
3757
3839
  };
3758
- _self[strRemoveNotificationListener] = function (listener) {
3759
- var index = arrIndexOf(_self.listeners, listener);
3840
+ _self[_DYN_REMOVE_NOTIFICATION_2 ] = function (listener) {
3841
+ var index = arrIndexOf(_self[_DYN_LISTENERS ], listener);
3760
3842
  while (index > -1) {
3761
- _self.listeners.splice(index, 1);
3762
- index = arrIndexOf(_self.listeners, listener);
3843
+ _self.listeners[_DYN_SPLICE ](index, 1);
3844
+ index = arrIndexOf(_self[_DYN_LISTENERS ], listener);
3763
3845
  }
3764
3846
  };
3765
- _self[strEventsSent] = function (events) {
3766
- _runListeners(_self.listeners, strEventsSent, true, function (listener) {
3767
- listener[strEventsSent](events);
3847
+ _self[STR_EVENTS_SENT ] = function (events) {
3848
+ _runListeners(_self[_DYN_LISTENERS ], STR_EVENTS_SENT, true, function (listener) {
3849
+ listener[STR_EVENTS_SENT ](events);
3768
3850
  });
3769
3851
  };
3770
- _self[strEventsDiscarded] = function (events, reason) {
3771
- _runListeners(_self.listeners, strEventsDiscarded, true, function (listener) {
3772
- listener[strEventsDiscarded](events, reason);
3852
+ _self[STR_EVENTS_DISCARDED ] = function (events, reason) {
3853
+ _runListeners(_self[_DYN_LISTENERS ], STR_EVENTS_DISCARDED, true, function (listener) {
3854
+ listener[STR_EVENTS_DISCARDED ](events, reason);
3773
3855
  });
3774
3856
  };
3775
- _self[strEventsSendRequest] = function (sendReason, isAsync) {
3776
- _runListeners(_self.listeners, strEventsSendRequest, isAsync, function (listener) {
3777
- listener[strEventsSendRequest](sendReason, isAsync);
3857
+ _self[STR_EVENTS_SEND_REQUEST ] = function (sendReason, isAsync) {
3858
+ _runListeners(_self[_DYN_LISTENERS ], STR_EVENTS_SEND_REQUEST, isAsync, function (listener) {
3859
+ listener[STR_EVENTS_SEND_REQUEST ](sendReason, isAsync);
3778
3860
  });
3779
3861
  };
3780
- _self[strPerfEvent] = function (perfEvent) {
3862
+ _self[STR_PERF_EVENT ] = function (perfEvent) {
3781
3863
  if (perfEvent) {
3782
- if (perfEvtsSendAll || !perfEvent.isChildEvt()) {
3783
- _runListeners(_self.listeners, strPerfEvent, false, function (listener) {
3784
- if (perfEvent.isAsync) {
3785
- setTimeout(function () { return listener[strPerfEvent](perfEvent); }, 0);
3864
+ if (perfEvtsSendAll || !perfEvent[_DYN_IS_CHILD_EVT ]()) {
3865
+ _runListeners(_self[_DYN_LISTENERS ], STR_PERF_EVENT, false, function (listener) {
3866
+ if (perfEvent[_DYN_IS_ASYNC ]) {
3867
+ setTimeout(function () { return listener[STR_PERF_EVENT ](perfEvent); }, 0);
3786
3868
  }
3787
3869
  else {
3788
- listener[strPerfEvent](perfEvent);
3870
+ listener[STR_PERF_EVENT ](perfEvent);
3789
3871
  }
3790
3872
  });
3791
3873
  }
@@ -3793,6 +3875,7 @@
3793
3875
  };
3794
3876
  });
3795
3877
  }
3878
+ NotificationManager.__ieDyn=1;
3796
3879
  return NotificationManager;
3797
3880
  }());
3798
3881
 
@@ -3801,11 +3884,11 @@
3801
3884
  function AppInsightsCore() {
3802
3885
  var _this = _super.call(this) || this;
3803
3886
  dynamicProto(AppInsightsCore, _this, function (_self, _base) {
3804
- _self.initialize = function (config, extensions, logger, notificationManager) {
3805
- _base.initialize(config, extensions, logger || new DiagnosticLogger(config), notificationManager || new NotificationManager(config));
3887
+ _self[_DYN_INITIALIZE ] = function (config, extensions, logger, notificationManager) {
3888
+ _base[_DYN_INITIALIZE ](config, extensions, logger || new DiagnosticLogger(config), notificationManager || new NotificationManager(config));
3806
3889
  };
3807
3890
  _self.track = function (telemetryItem) {
3808
- doPerf(_self.getPerfMgr(), function () { return "AppInsightsCore:track"; }, function () {
3891
+ doPerf(_self[STR_GET_PERF_MGR ](), function () { return "AppInsightsCore:track"; }, function () {
3809
3892
  if (telemetryItem === null) {
3810
3893
  _notifyInvalidEvent(telemetryItem);
3811
3894
  throwError("Invalid telemetry item");
@@ -3815,112 +3898,129 @@
3815
3898
  }, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));
3816
3899
  };
3817
3900
  function _validateTelemetryItem(telemetryItem) {
3818
- if (isNullOrUndefined(telemetryItem.name)) {
3901
+ if (isNullOrUndefined(telemetryItem[_DYN_NAME ])) {
3819
3902
  _notifyInvalidEvent(telemetryItem);
3820
3903
  throwError("telemetry name required");
3821
3904
  }
3822
3905
  }
3823
3906
  function _notifyInvalidEvent(telemetryItem) {
3824
- var manager = _self.getNotifyMgr();
3907
+ var manager = _self[_DYN_GET_NOTIFY_MGR ]();
3825
3908
  if (manager) {
3826
- manager.eventsDiscarded([telemetryItem], 2 );
3909
+ manager[STR_EVENTS_DISCARDED ]([telemetryItem], 2 );
3827
3910
  }
3828
3911
  }
3829
3912
  });
3830
3913
  return _this;
3831
3914
  }
3915
+ AppInsightsCore.__ieDyn=1;
3832
3916
  return AppInsightsCore;
3833
3917
  }(BaseCore$2));
3834
3918
 
3919
+ var _a$1;
3920
+ var FAILED = "Failed";
3921
+ var FAILED_MONITOR_AJAX = FAILED + "MonitorAjax";
3922
+ var TRACK = "Track";
3923
+ var START = "Start";
3924
+ var STOP = "Stop";
3925
+ var EVENT = "Event";
3926
+ var AUTH_CONTEXT = "AuthContext";
3927
+ var EXCEPTION = "Exception";
3928
+ var LOCAL = "Local";
3929
+ var SESSION = "Session";
3930
+ var STORAGE = "Storage";
3931
+ var BROWSER = "Browser";
3932
+ var CANNOT = "Cannot";
3933
+ var BUFFER = "Buffer";
3934
+ var INSTRUMENTATION_KEY = "InstrumentationKey";
3835
3935
  var LoggingSeverity = createEnumStyle({
3836
3936
  CRITICAL: 1 ,
3837
3937
  WARNING: 2
3838
3938
  });
3839
- var _InternalMessageId = createEnumStyle({
3840
- BrowserDoesNotSupportLocalStorage: 0 ,
3841
- BrowserCannotReadLocalStorage: 1 ,
3842
- BrowserCannotReadSessionStorage: 2 ,
3843
- BrowserCannotWriteLocalStorage: 3 ,
3844
- BrowserCannotWriteSessionStorage: 4 ,
3845
- BrowserFailedRemovalFromLocalStorage: 5 ,
3846
- BrowserFailedRemovalFromSessionStorage: 6 ,
3847
- CannotSendEmptyTelemetry: 7 ,
3848
- ClientPerformanceMathError: 8 ,
3849
- ErrorParsingAISessionCookie: 9 ,
3850
- ErrorPVCalc: 10 ,
3851
- ExceptionWhileLoggingError: 11 ,
3852
- FailedAddingTelemetryToBuffer: 12 ,
3853
- FailedMonitorAjaxAbort: 13 ,
3854
- FailedMonitorAjaxDur: 14 ,
3855
- FailedMonitorAjaxOpen: 15 ,
3856
- FailedMonitorAjaxRSC: 16 ,
3857
- FailedMonitorAjaxSend: 17 ,
3858
- FailedMonitorAjaxGetCorrelationHeader: 18 ,
3859
- FailedToAddHandlerForOnBeforeUnload: 19 ,
3860
- FailedToSendQueuedTelemetry: 20 ,
3861
- FailedToReportDataLoss: 21 ,
3862
- FlushFailed: 22 ,
3863
- MessageLimitPerPVExceeded: 23 ,
3864
- MissingRequiredFieldSpecification: 24 ,
3865
- NavigationTimingNotSupported: 25 ,
3866
- OnError: 26 ,
3867
- SessionRenewalDateIsZero: 27 ,
3868
- SenderNotInitialized: 28 ,
3869
- StartTrackEventFailed: 29 ,
3870
- StopTrackEventFailed: 30 ,
3871
- StartTrackFailed: 31 ,
3872
- StopTrackFailed: 32 ,
3873
- TelemetrySampledAndNotSent: 33 ,
3874
- TrackEventFailed: 34 ,
3875
- TrackExceptionFailed: 35 ,
3876
- TrackMetricFailed: 36 ,
3877
- TrackPVFailed: 37 ,
3878
- TrackPVFailedCalc: 38 ,
3879
- TrackTraceFailed: 39 ,
3880
- TransmissionFailed: 40 ,
3881
- FailedToSetStorageBuffer: 41 ,
3882
- FailedToRestoreStorageBuffer: 42 ,
3883
- InvalidBackendResponse: 43 ,
3884
- FailedToFixDepricatedValues: 44 ,
3885
- InvalidDurationValue: 45 ,
3886
- TelemetryEnvelopeInvalid: 46 ,
3887
- CreateEnvelopeError: 47 ,
3888
- CannotSerializeObject: 48 ,
3889
- CannotSerializeObjectNonSerializable: 49 ,
3890
- CircularReferenceDetected: 50 ,
3891
- ClearAuthContextFailed: 51 ,
3892
- ExceptionTruncated: 52 ,
3893
- IllegalCharsInName: 53 ,
3894
- ItemNotInArray: 54 ,
3895
- MaxAjaxPerPVExceeded: 55 ,
3896
- MessageTruncated: 56 ,
3897
- NameTooLong: 57 ,
3898
- SampleRateOutOfRange: 58 ,
3899
- SetAuthContextFailed: 59 ,
3900
- SetAuthContextFailedAccountName: 60 ,
3901
- StringValueTooLong: 61 ,
3902
- StartCalledMoreThanOnce: 62 ,
3903
- StopCalledWithoutStart: 63 ,
3904
- TelemetryInitializerFailed: 64 ,
3905
- TrackArgumentsNotSpecified: 65 ,
3906
- UrlTooLong: 66 ,
3907
- SessionStorageBufferFull: 67 ,
3908
- CannotAccessCookie: 68 ,
3909
- IdTooLong: 69 ,
3910
- InvalidEvent: 70 ,
3911
- FailedMonitorAjaxSetRequestHeader: 71 ,
3912
- SendBrowserInfoOnUserInit: 72 ,
3913
- PluginException: 73 ,
3914
- NotificationException: 74 ,
3915
- SnippetScriptLoadFailure: 99 ,
3916
- InvalidInstrumentationKey: 100 ,
3917
- CannotParseAiBlobValue: 101 ,
3918
- InvalidContentBlob: 102 ,
3919
- TrackPageActionEventFailed: 103 ,
3920
- FailedAddingCustomDefinedRequestContext: 104 ,
3921
- InMemoryStorageBufferFull: 105 ,
3922
- InstrumentationKeyDeprecation: 106
3923
- });
3939
+ var _InternalMessageId = createEnumStyle((_a$1 = {},
3940
+ _a$1[BROWSER + "DoesNotSupport" + LOCAL + STORAGE] = 0 ,
3941
+ _a$1[BROWSER + CANNOT + "Read" + LOCAL + STORAGE] = 1 ,
3942
+ _a$1[BROWSER + CANNOT + "Read" + SESSION + STORAGE] = 2 ,
3943
+ _a$1[BROWSER + CANNOT + "Write" + LOCAL + STORAGE] = 3 ,
3944
+ _a$1[BROWSER + CANNOT + "Write" + SESSION + STORAGE] = 4 ,
3945
+ _a$1[BROWSER + FAILED + "RemovalFrom" + LOCAL + STORAGE] = 5 ,
3946
+ _a$1[BROWSER + FAILED + "RemovalFrom" + SESSION + STORAGE] = 6 ,
3947
+ _a$1[CANNOT + "SendEmptyTelemetry"] = 7 ,
3948
+ _a$1.ClientPerformanceMathError = 8 ,
3949
+ _a$1["ErrorParsingAI" + SESSION + "Cookie"] = 9 ,
3950
+ _a$1.ErrorPVCalc = 10 ,
3951
+ _a$1[EXCEPTION + "WhileLoggingError"] = 11 ,
3952
+ _a$1[FAILED + "AddingTelemetryTo" + BUFFER] = 12 ,
3953
+ _a$1[FAILED_MONITOR_AJAX + "Abort"] = 13 ,
3954
+ _a$1[FAILED_MONITOR_AJAX + "Dur"] = 14 ,
3955
+ _a$1[FAILED_MONITOR_AJAX + "Open"] = 15 ,
3956
+ _a$1[FAILED_MONITOR_AJAX + "RSC"] = 16 ,
3957
+ _a$1[FAILED_MONITOR_AJAX + "Send"] = 17 ,
3958
+ _a$1[FAILED_MONITOR_AJAX + "GetCorrelationHeader"] = 18 ,
3959
+ _a$1[FAILED + "ToAddHandlerForOnBeforeUnload"] = 19 ,
3960
+ _a$1[FAILED + "ToSendQueuedTelemetry"] = 20 ,
3961
+ _a$1[FAILED + "ToReportDataLoss"] = 21 ,
3962
+ _a$1["Flush" + FAILED] = 22 ,
3963
+ _a$1.MessageLimitPerPVExceeded = 23 ,
3964
+ _a$1.MissingRequiredFieldSpecification = 24 ,
3965
+ _a$1.NavigationTimingNotSupported = 25 ,
3966
+ _a$1.OnError = 26 ,
3967
+ _a$1[SESSION + "RenewalDateIsZero"] = 27 ,
3968
+ _a$1.SenderNotInitialized = 28 ,
3969
+ _a$1[START + TRACK + EVENT + FAILED] = 29 ,
3970
+ _a$1[STOP + TRACK + EVENT + FAILED] = 30 ,
3971
+ _a$1[START + TRACK + FAILED] = 31 ,
3972
+ _a$1[STOP + TRACK + FAILED] = 32 ,
3973
+ _a$1.TelemetrySampledAndNotSent = 33 ,
3974
+ _a$1[TRACK + EVENT + FAILED] = 34 ,
3975
+ _a$1[TRACK + EXCEPTION + FAILED] = 35 ,
3976
+ _a$1[TRACK + "Metric" + FAILED] = 36 ,
3977
+ _a$1[TRACK + "PV" + FAILED] = 37 ,
3978
+ _a$1[TRACK + "PV" + FAILED + "Calc"] = 38 ,
3979
+ _a$1[TRACK + "Trace" + FAILED] = 39 ,
3980
+ _a$1["Transmission" + FAILED] = 40 ,
3981
+ _a$1[FAILED + "ToSet" + STORAGE + BUFFER] = 41 ,
3982
+ _a$1[FAILED + "ToRestore" + STORAGE + BUFFER] = 42 ,
3983
+ _a$1.InvalidBackendResponse = 43 ,
3984
+ _a$1[FAILED + "ToFixDepricatedValues"] = 44 ,
3985
+ _a$1.InvalidDurationValue = 45 ,
3986
+ _a$1.TelemetryEnvelopeInvalid = 46 ,
3987
+ _a$1.CreateEnvelopeError = 47 ,
3988
+ _a$1[CANNOT + "SerializeObject"] = 48 ,
3989
+ _a$1[CANNOT + "SerializeObjectNonSerializable"] = 49 ,
3990
+ _a$1.CircularReferenceDetected = 50 ,
3991
+ _a$1["Clear" + AUTH_CONTEXT + FAILED] = 51 ,
3992
+ _a$1[EXCEPTION + "Truncated"] = 52 ,
3993
+ _a$1.IllegalCharsInName = 53 ,
3994
+ _a$1.ItemNotInArray = 54 ,
3995
+ _a$1.MaxAjaxPerPVExceeded = 55 ,
3996
+ _a$1.MessageTruncated = 56 ,
3997
+ _a$1.NameTooLong = 57 ,
3998
+ _a$1.SampleRateOutOfRange = 58 ,
3999
+ _a$1["Set" + AUTH_CONTEXT + FAILED] = 59 ,
4000
+ _a$1["Set" + AUTH_CONTEXT + FAILED + "AccountName"] = 60 ,
4001
+ _a$1.StringValueTooLong = 61 ,
4002
+ _a$1.StartCalledMoreThanOnce = 62 ,
4003
+ _a$1.StopCalledWithoutStart = 63 ,
4004
+ _a$1["TelemetryInitializer" + FAILED] = 64 ,
4005
+ _a$1.TrackArgumentsNotSpecified = 65 ,
4006
+ _a$1.UrlTooLong = 66 ,
4007
+ _a$1[SESSION + STORAGE + BUFFER + "Full"] = 67 ,
4008
+ _a$1[CANNOT + "AccessCookie"] = 68 ,
4009
+ _a$1.IdTooLong = 69 ,
4010
+ _a$1.InvalidEvent = 70 ,
4011
+ _a$1[FAILED_MONITOR_AJAX + "SetRequestHeader"] = 71 ,
4012
+ _a$1["Send" + BROWSER + "InfoOnUserInit"] = 72 ,
4013
+ _a$1["Plugin" + EXCEPTION] = 73 ,
4014
+ _a$1["Notification" + EXCEPTION] = 74 ,
4015
+ _a$1.SnippetScriptLoadFailure = 99 ,
4016
+ _a$1["Invalid" + INSTRUMENTATION_KEY] = 100 ,
4017
+ _a$1[CANNOT + "ParseAiBlobValue"] = 101 ,
4018
+ _a$1.InvalidContentBlob = 102 ,
4019
+ _a$1[TRACK + "PageAction" + EVENT + FAILED] = 103 ,
4020
+ _a$1[FAILED + "AddingCustomDefinedRequestContext"] = 104 ,
4021
+ _a$1["InMemory" + STORAGE + BUFFER + "Full"] = 105 ,
4022
+ _a$1[INSTRUMENTATION_KEY + "Deprecation"] = 106 ,
4023
+ _a$1));
3924
4024
 
3925
4025
  var ValueKind = createEnumStyle({
3926
4026
  NotSet: 0 ,
@@ -3990,8 +4090,13 @@
3990
4090
  SDKNotInitialized: 520
3991
4091
  })));
3992
4092
 
4093
+ var STR_EMPTY = "";
4094
+ var STR_DEFAULT_ENDPOINT_URL = "https://browser.events.data.microsoft.com/OneCollector/1.0/";
4095
+ var STR_VERSION = "version";
4096
+ var STR_PROPERTIES = "properties";
4097
+
3993
4098
  var _a;
3994
- var Version = '3.2.3';
4099
+ var Version = '3.2.6';
3995
4100
  var FullVersionString = "1DS-Web-JS-" + Version;
3996
4101
  var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
3997
4102
  var strWithCredentials = "withCredentials";
@@ -4009,7 +4114,7 @@
4009
4114
  var isDocumentObjectAvailable = Boolean(getDocument());
4010
4115
  var isWindowObjectAvailable = Boolean(getWindow());
4011
4116
  function isValueAssigned(value) {
4012
- return !(value === "" || isNullOrUndefined(value));
4117
+ return !(value === STR_EMPTY || isNullOrUndefined(value));
4013
4118
  }
4014
4119
  function getTenantId(apiKey) {
4015
4120
  if (apiKey) {
@@ -4018,7 +4123,7 @@
4018
4123
  return apiKey.substring(0, indexTenantId);
4019
4124
  }
4020
4125
  }
4021
- return "";
4126
+ return STR_EMPTY;
4022
4127
  }
4023
4128
  function isUint8ArrayAvailable() {
4024
4129
  if (uInt8ArraySupported === null) {
@@ -4040,11 +4145,11 @@
4040
4145
  if (propType === "string" || propType === "number" || propType === "boolean" || isArray(property)) {
4041
4146
  property = { value: property };
4042
4147
  }
4043
- else if (propType === "object" && !property.hasOwnProperty("value")) {
4148
+ else if (propType === "object" && !ObjHasOwnProperty.call(property, "value")) {
4044
4149
  property = { value: stringifyObjects ? JSON.stringify(property) : property };
4045
4150
  }
4046
4151
  else if (isNullOrUndefined(property.value)
4047
- || property.value === "" || (!isString(property.value)
4152
+ || property.value === STR_EMPTY || (!isString(property.value)
4048
4153
  && !isNumber(property.value) && !isBoolean(property.value)
4049
4154
  && !isArray(property.value))) {
4050
4155
  return null;
@@ -4107,7 +4212,7 @@
4107
4212
  if (areCookiesSupported(null)) {
4108
4213
  return getCookieValue(safeGetCookieMgr(null), name);
4109
4214
  }
4110
- return "";
4215
+ return STR_EMPTY;
4111
4216
  }
4112
4217
  function getCookieValue(cookieMgr, name, decode) {
4113
4218
  if (decode === void 0) { decode = true; }
@@ -4118,7 +4223,7 @@
4118
4223
  cookieValue = decodeURIComponent(cookieValue);
4119
4224
  }
4120
4225
  }
4121
- return cookieValue || "";
4226
+ return cookieValue || STR_EMPTY;
4122
4227
  }
4123
4228
  function createGuid(style) {
4124
4229
  if (style === void 0) { style = "D" ; }
@@ -4130,7 +4235,7 @@
4130
4235
  theGuid = "(" + theGuid + ")";
4131
4236
  }
4132
4237
  else if (style === "N" ) {
4133
- theGuid = theGuid.replace(/-/g, "");
4238
+ theGuid = theGuid.replace(/-/g, STR_EMPTY);
4134
4239
  }
4135
4240
  return theGuid;
4136
4241
  }
@@ -4224,7 +4329,7 @@
4224
4329
  theType |= getFieldValueType(value[0]);
4225
4330
  }
4226
4331
  }
4227
- else if (hasOwnProperty(value, "value")) {
4332
+ else if (ObjHasOwnProperty.call(value, "value")) {
4228
4333
  theType = 8192 | getFieldValueType(value.value);
4229
4334
  }
4230
4335
  }
@@ -4346,27 +4451,25 @@
4346
4451
  return xhr;
4347
4452
  }
4348
4453
 
4349
- var PropVersion = "version";
4350
- var properties = "properties";
4351
4454
  var AppInsightsCore = /** @class */ (function (_super) {
4352
4455
  __extendsFn(AppInsightsCore, _super);
4353
4456
  function AppInsightsCore() {
4354
4457
  var _this = _super.call(this) || this;
4355
4458
  _this.pluginVersionStringArr = [];
4356
- _this.pluginVersionString = "";
4357
4459
  dynamicProto(AppInsightsCore, _this, function (_self, _base) {
4358
4460
  if (!_self.logger || !_self.logger.queue) {
4359
4461
  _self.logger = new DiagnosticLogger({ loggingLevelConsole: 1 });
4360
4462
  }
4361
4463
  _self.initialize = function (config, extensions, logger, notificationManager) {
4362
4464
  doPerf(_self, function () { return "AppInsightsCore.initialize"; }, function () {
4465
+ var _pluginVersionStringArr = _self.pluginVersionStringArr;
4363
4466
  if (config) {
4364
4467
  if (!config.endpointUrl) {
4365
- config.endpointUrl = "https://browser.events.data.microsoft.com/OneCollector/1.0/";
4468
+ config.endpointUrl = STR_DEFAULT_ENDPOINT_URL;
4366
4469
  }
4367
4470
  var propertyStorageOverride = config.propertyStorageOverride;
4368
4471
  if (propertyStorageOverride && (!propertyStorageOverride.getProperty || !propertyStorageOverride.setProperty)) {
4369
- throw new Error("Invalid property storage override passed.");
4472
+ throwError("Invalid property storage override passed.");
4370
4473
  }
4371
4474
  if (config.channels) {
4372
4475
  arrForEach(config.channels, function (channels) {
@@ -4374,7 +4477,7 @@
4374
4477
  arrForEach(channels, function (channel) {
4375
4478
  if (channel.identifier && channel.version) {
4376
4479
  var ver = channel.identifier + "=" + channel.version;
4377
- _self.pluginVersionStringArr.push(ver);
4480
+ _pluginVersionStringArr.push(ver);
4378
4481
  }
4379
4482
  });
4380
4483
  }
@@ -4382,17 +4485,18 @@
4382
4485
  }
4383
4486
  }
4384
4487
  _self.getWParam = function () {
4385
- return typeof document !== "undefined" ? 0 : -1;
4488
+ return (typeof document !== "undefined" || !!config.enableWParam) ? 0 : -1;
4386
4489
  };
4387
4490
  if (extensions) {
4388
4491
  arrForEach(extensions, function (ext) {
4389
4492
  if (ext && ext.identifier && ext.version) {
4390
4493
  var ver = ext.identifier + "=" + ext.version;
4391
- _self.pluginVersionStringArr.push(ver);
4494
+ _pluginVersionStringArr.push(ver);
4392
4495
  }
4393
4496
  });
4394
4497
  }
4395
- _self.pluginVersionString = _self.pluginVersionStringArr.join(";");
4498
+ _self.pluginVersionString = _pluginVersionStringArr.join(";");
4499
+ _self.pluginVersionStringArr = _pluginVersionStringArr;
4396
4500
  try {
4397
4501
  _base.initialize(config, extensions, logger, notificationManager);
4398
4502
  _self.pollInternalLogs("InternalLog");
@@ -4403,7 +4507,7 @@
4403
4507
  if (message.indexOf("channels") !== -1) {
4404
4508
  message += "\n - Channels must be provided through config.channels only!";
4405
4509
  }
4406
- logger_1.throwInternal(1 , 514 , "SDK Initialization Failed - no telemetry will be sent: " + message);
4510
+ _throwInternal(logger_1, 1 , 514 , "SDK Initialization Failed - no telemetry will be sent: " + message);
4407
4511
  }
4408
4512
  }, function () { return ({ config: config, extensions: extensions, logger: logger, notificationManager: notificationManager }); });
4409
4513
  };
@@ -4420,16 +4524,9 @@
4420
4524
  itemExt.sdk = itemExt.sdk || {};
4421
4525
  itemExt.sdk.ver = FullVersionString;
4422
4526
  var baseData = telemetryItem.baseData = telemetryItem.baseData || {};
4423
- if (!baseData[properties]) {
4424
- baseData[properties] = {};
4425
- }
4426
- var itemProperties = baseData[properties];
4427
- if (!itemProperties[PropVersion]) {
4428
- itemProperties[PropVersion] = "";
4429
- }
4430
- if (_self.pluginVersionString !== "") {
4431
- itemProperties[PropVersion] = _self.pluginVersionString;
4432
- }
4527
+ baseData[STR_PROPERTIES] = baseData[STR_PROPERTIES] || {};
4528
+ var itemProperties = baseData[STR_PROPERTIES];
4529
+ itemProperties[STR_VERSION] = itemProperties[STR_VERSION] || _self.pluginVersionString || STR_EMPTY;
4433
4530
  }
4434
4531
  _base.track(telemetryItem);
4435
4532
  }, function () { return ({ item: item }); }, !(item.sync));
@@ -4437,6 +4534,7 @@
4437
4534
  });
4438
4535
  return _this;
4439
4536
  }
4537
+ AppInsightsCore.__ieDyn=1;
4440
4538
  return AppInsightsCore;
4441
4539
  }(AppInsightsCore$2));
4442
4540
  var AppInsightsCore$1 = AppInsightsCore;
@@ -4448,10 +4546,10 @@
4448
4546
  dynamicProto(BaseCore, _this, function (_self, _base) {
4449
4547
  _self.initialize = function (config, extensions, logger, notificationManager) {
4450
4548
  if (config && !config.endpointUrl) {
4451
- config.endpointUrl = "https://browser.events.data.microsoft.com/OneCollector/1.0/";
4549
+ config.endpointUrl = STR_DEFAULT_ENDPOINT_URL;
4452
4550
  }
4453
4551
  _self.getWParam = function () {
4454
- return isDocumentObjectAvailable ? 0 : -1;
4552
+ return (isDocumentObjectAvailable || !!config.enableWParam) ? 0 : -1;
4455
4553
  };
4456
4554
  try {
4457
4555
  _base.initialize(config, extensions, logger, notificationManager);
@@ -4472,6 +4570,7 @@
4472
4570
  });
4473
4571
  return _this;
4474
4572
  }
4573
+ BaseCore.__ieDyn=1;
4475
4574
  return BaseCore;
4476
4575
  }(BaseCore$2));
4477
4576
  var BaseCore$1 = BaseCore;
@@ -4853,7 +4952,7 @@
4853
4952
  }
4854
4953
  }
4855
4954
  function _warnLog(message) {
4856
- diagLog && diagLog.warnToConsole("ESPromiseScheduler[" + _scheduledName + "] " + message);
4955
+ _warnToConsole(diagLog, "ESPromiseScheduler[" + _scheduledName + "] " + message);
4857
4956
  }
4858
4957
  }
4859
4958
  ESPromiseScheduler.incomplete = function () {
@@ -4945,7 +5044,7 @@
4945
5044
  if (mapValue.handler) {
4946
5045
  return mapValue.handler.value(path, name, value, stringifyObjects);
4947
5046
  }
4948
- if (!isString(name) || isNullOrUndefined(value) || value === "") {
5047
+ if (!isString(name) || isNullOrUndefined(value) || value === STR_EMPTY) {
4949
5048
  return null;
4950
5049
  }
4951
5050
  var property = null;
@@ -5077,7 +5176,9 @@
5077
5176
  exports._InternalLogMessage = _InternalLogMessage;
5078
5177
  exports._InternalMessageId = _InternalMessageId;
5079
5178
  exports.__getRegisteredEvents = __getRegisteredEvents;
5179
+ exports._logInternalMessage = _logInternalMessage;
5080
5180
  exports._throwInternal = _throwInternal;
5181
+ exports._warnToConsole = _warnToConsole;
5081
5182
  exports.addEventHandler = addEventHandler;
5082
5183
  exports.addEventListeners = addEventListeners;
5083
5184
  exports.addPageHideEventListener = addPageHideEventListener;
@@ -5214,4 +5315,4 @@
5214
5315
  (function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
5215
5316
 
5216
5317
  }));
5217
- //# sourceMappingURL=ms.core-3.2.3.js.map
5318
+ //# sourceMappingURL=ms.core-3.2.6.js.map