@microsoft/1ds-core-js 4.1.1-nightly3.2403-02 → 4.1.1-nightly3.2403-04

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 (43) hide show
  1. package/bundle/es5/{ms.core-4.1.1-nightly3.2403-02.gbl.js → ms.core-4.1.1-nightly3.2403-04.gbl.js} +1600 -1025
  2. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.gbl.js.map +1 -0
  3. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.gbl.min.js +7 -0
  4. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.gbl.min.js.map +1 -0
  5. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.integrity.json +46 -0
  6. package/bundle/es5/{ms.core-4.1.1-nightly3.2403-02.js → ms.core-4.1.1-nightly3.2403-04.js} +1600 -1025
  7. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.js.map +1 -0
  8. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.min.js +7 -0
  9. package/bundle/es5/ms.core-4.1.1-nightly3.2403-04.min.js.map +1 -0
  10. package/bundle/es5/ms.core.gbl.js +1599 -1024
  11. package/bundle/es5/ms.core.gbl.js.map +1 -1
  12. package/bundle/es5/ms.core.gbl.min.js +2 -2
  13. package/bundle/es5/ms.core.gbl.min.js.map +1 -1
  14. package/bundle/es5/ms.core.integrity.json +17 -17
  15. package/bundle/es5/ms.core.js +1599 -1024
  16. package/bundle/es5/ms.core.js.map +1 -1
  17. package/bundle/es5/ms.core.min.js +2 -2
  18. package/bundle/es5/ms.core.min.js.map +1 -1
  19. package/dist/es5/ms.core.js +1597 -1022
  20. package/dist/es5/ms.core.js.map +1 -1
  21. package/dist/es5/ms.core.min.js +2 -2
  22. package/dist/es5/ms.core.min.js.map +1 -1
  23. package/dist-es5/AppInsightsCore.js +1 -1
  24. package/dist-es5/BaseCore.js +1 -1
  25. package/dist-es5/DataModels.js +1 -1
  26. package/dist-es5/Enums.js +1 -1
  27. package/dist-es5/Index.js +2 -2
  28. package/dist-es5/Index.js.map +1 -1
  29. package/dist-es5/InternalConstants.js +1 -1
  30. package/dist-es5/Utils.js +2 -2
  31. package/dist-es5/Utils.js.map +1 -1
  32. package/dist-es5/ValueSanitizer.js +1 -1
  33. package/dist-es5/__DynamicConstants.js +1 -1
  34. package/package.json +2 -2
  35. package/types/1ds-core-js.d.ts +49 -25
  36. package/types/1ds-core-js.namespaced.d.ts +230 -7
  37. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.gbl.js.map +0 -1
  38. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.gbl.min.js +0 -7
  39. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.gbl.min.js.map +0 -1
  40. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.integrity.json +0 -46
  41. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.js.map +0 -1
  42. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.min.js +0 -7
  43. package/bundle/es5/ms.core-4.1.1-nightly3.2403-02.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
package/dist-es5/Enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
package/dist-es5/Index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -21,7 +21,7 @@ getGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCry
21
21
  // Random
22
22
  randomValue, random32, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr,
23
23
  // Aliases
24
- toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, createDynamicConfig, onConfigChange, getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from "@microsoft/applicationinsights-core-js";
24
+ toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, createDynamicConfig, onConfigChange, getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion, SenderPostManager, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, parseResponse, convertAllHeadersToMap, _getAllResponseHeaders, _appendHeader } from "@microsoft/applicationinsights-core-js";
25
25
  export { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, isChromium, // Replace with ai-core version once published in ai-core
26
26
  openXhr, isGreaterThanZero } from "./Utils";
27
27
  //# sourceMappingURL=Index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Index.js.map","sources":["Index.js"],"sourcesContent":["/**\r\n* Index.ts\r\n* @author Abhilash Panwar (abpanwar)\r\n* @copyright Microsoft 2018\r\n* File to export public classes, interfaces and enums.\r\n*/\r\nimport { AppInsightsCore } from \"./AppInsightsCore\";\r\nimport { EventLatency, EventPersistence, EventPropertyType, TraceLevel, ValueKind } from \"./Enums\";\r\nimport { ValueSanitizer } from \"./ValueSanitizer\";\r\nexport { ValueKind, EventLatency, EventPersistence, TraceLevel, AppInsightsCore, EventPropertyType, ValueSanitizer };\r\nexport { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, AppInsightsCore as InternalAppInsightsCore, _InternalLogMessage, createEnumStyle, _throwInternal, _warnToConsole, _logInternalMessage, \r\n// The HelperFuncs functions\r\nisTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal, \r\n// EnvUtils\r\ngetGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, strUndefined, strObject, strPrototype, strFunction, setEnableEnvMocks, strUndefined as Undefined, \r\n// Random\r\nrandomValue, random32, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr, \r\n// Aliases\r\ntoISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, createDynamicConfig, onConfigChange, getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"@microsoft/applicationinsights-core-js\";\r\nexport { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, isChromium, // Replace with ai-core version once published in ai-core\r\nopenXhr, isGreaterThanZero } from \"./Utils\";\r\n//# sourceMappingURL=Index.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"Index.js.map","sources":["Index.js"],"sourcesContent":["/**\r\n* Index.ts\r\n* @author Abhilash Panwar (abpanwar)\r\n* @copyright Microsoft 2018\r\n* File to export public classes, interfaces and enums.\r\n*/\r\nimport { AppInsightsCore } from \"./AppInsightsCore\";\r\nimport { EventLatency, EventPersistence, EventPropertyType, TraceLevel, ValueKind } from \"./Enums\";\r\nimport { ValueSanitizer } from \"./ValueSanitizer\";\r\nexport { ValueKind, EventLatency, EventPersistence, TraceLevel, AppInsightsCore, EventPropertyType, ValueSanitizer };\r\nexport { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, AppInsightsCore as InternalAppInsightsCore, _InternalLogMessage, createEnumStyle, _throwInternal, _warnToConsole, _logInternalMessage, \r\n// The HelperFuncs functions\r\nisTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal, \r\n// EnvUtils\r\ngetGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, strUndefined, strObject, strPrototype, strFunction, setEnableEnvMocks, strUndefined as Undefined, \r\n// Random\r\nrandomValue, random32, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr, \r\n// Aliases\r\ntoISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, createDynamicConfig, onConfigChange, getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion, SenderPostManager, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, parseResponse, convertAllHeadersToMap, _getAllResponseHeaders, _appendHeader } from \"@microsoft/applicationinsights-core-js\";\r\nexport { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, isChromium, // Replace with ai-core version once published in ai-core\r\nopenXhr, isGreaterThanZero } from \"./Utils\";\r\n//# sourceMappingURL=Index.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
package/dist-es5/Utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -15,7 +15,7 @@ import { ObjProto, strShimObject } from "@microsoft/applicationinsights-shims";
15
15
  import { strIndexOf, strLeft } from "@nevware21/ts-utils";
16
16
  import { STR_EMPTY } from "./InternalConstants";
17
17
  import { _DYN_INDEX_OF, _DYN_KIND, _DYN_LENGTH, _DYN_PROCESS_TELEMETRY_ST0, _DYN_TIMINGS, _DYN_VALUE } from "./__DynamicConstants";
18
- export var Version = '4.1.1-nightly3.2403-02';
18
+ export var Version = '4.1.1-nightly3.2403-04';
19
19
  export var FullVersionString = "1DS-Web-JS-" + Version;
20
20
  var ObjHasOwnProperty = ObjProto.hasOwnProperty;
21
21
  // Defining here so we don't need to take (import) the ApplicationInsights Common module
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js.map","sources":["Utils.js"],"sourcesContent":["var _a;\r\n/**\r\n* Utils.ts\r\n* @author Abhilash Panwar (abpanwar) Hector Hernandez (hectorh)\r\n* @copyright Microsoft 2018\r\n* File containing utility functions.\r\n*/\r\nimport { arrForEach, getGlobalInst, getNavigator, hasDocument, hasWindow, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isReactNative, isString, isUndefined, newGuid, objForEachKey, perfNow } from \"@microsoft/applicationinsights-core-js\";\r\nimport { ObjProto, strShimObject } from \"@microsoft/applicationinsights-shims\";\r\nimport { strIndexOf, strLeft } from \"@nevware21/ts-utils\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nimport { _DYN_INDEX_OF, _DYN_KIND, _DYN_LENGTH, _DYN_PROCESS_TELEMETRY_ST0, _DYN_TIMINGS, _DYN_VALUE } from \"./__DynamicConstants\";\r\nexport var Version = '4.1.1-nightly3.2403-02';\r\nexport var FullVersionString = \"1DS-Web-JS-\" + Version;\r\nvar ObjHasOwnProperty = ObjProto.hasOwnProperty;\r\n// Defining here so we don't need to take (import) the ApplicationInsights Common module\r\nvar strDisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nvar strWithCredentials = \"withCredentials\";\r\nvar strTimeout = \"timeout\";\r\n// If value is array just get the type for the first element\r\nvar _fieldTypeEventPropMap = (_a = {},\r\n _a[0 /* FieldValueSanitizerType.NotSet */] = 0 /* eEventPropertyType.Unspecified */,\r\n _a[2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,\r\n _a[1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,\r\n _a[3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,\r\n _a);\r\n/**\r\n * @ignore\r\n */\r\n// let _uaDisallowsSameSiteNone = null;\r\nvar uInt8ArraySupported = null;\r\n// var _areCookiesAvailable: boolean | undefined;\r\n/**\r\n * Checks if document object is available\r\n */\r\nexport var isDocumentObjectAvailable = hasDocument();\r\n/**\r\n * Checks if window object is available\r\n */\r\nexport var isWindowObjectAvailable = hasWindow();\r\n/**\r\n * Checks if value is assigned to the given param.\r\n * @param value - The token from which the tenant id is to be extracted.\r\n * @returns True/false denoting if value is assigned to the param.\r\n */\r\nexport function isValueAssigned(value) {\r\n /// <summary> takes a value and checks for undefined, null and empty string </summary>\r\n /// <param type=\"any\"> value to be tested </param>\r\n /// <returns> true if value is null undefined or emptyString </returns>\r\n return !(value === STR_EMPTY || isNullOrUndefined(value));\r\n}\r\n/**\r\n * Gets the tenant id from the tenant token.\r\n * @param apiKey - The token from which the tenant id is to be extracted.\r\n * @returns The tenant id.\r\n */\r\nexport function getTenantId(apiKey) {\r\n if (apiKey) {\r\n var indexTenantId = strIndexOf(apiKey, \"-\");\r\n if (indexTenantId > -1) {\r\n return strLeft(apiKey, indexTenantId);\r\n }\r\n }\r\n return STR_EMPTY;\r\n}\r\n/**\r\n * Checks if Uint8Array are available in the current environment. Safari and Firefox along with\r\n * ReactNative are known to not support Uint8Array properly.\r\n * @returns True if available, false otherwise.\r\n */\r\nexport function isUint8ArrayAvailable() {\r\n if (uInt8ArraySupported === null) {\r\n uInt8ArraySupported = !isUndefined(Uint8Array) && !isSafariOrFirefox() && !isReactNative();\r\n }\r\n return uInt8ArraySupported;\r\n}\r\n/**\r\n * Checks if the value is a valid EventLatency.\r\n * @param value - The value that needs to be checked.\r\n * @returns True if the value is in AWTEventLatency, false otherwise.\r\n */\r\nexport function isLatency(value) {\r\n if (value && isNumber(value) && value >= 1 /* EventLatencyValue.Normal */ && value <= 4 /* EventLatencyValue.Immediate */) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Sanitizes the Property. It checks the that the property name and value are valid. It also\r\n * checks/populates the correct type and pii of the property value.\r\n * @param name - property name - The property name.\r\n * @param property - The property value or an IEventProperty containing value,\r\n * type ,pii and customer content.\r\n * @returns IEventProperty containing valid name, value, pii and type or null if invalid.\r\n */\r\nexport function sanitizeProperty(name, property, stringifyObjects) {\r\n // Check that property is valid\r\n if ((!property && !isValueAssigned(property)) || typeof name !== \"string\") {\r\n return null;\r\n }\r\n // Perf optimization -- only need to get the type once not multiple times\r\n var propType = typeof property;\r\n // If the property isn't IEventProperty (and is either string, number, boolean or array), convert it into one.\r\n if (propType === \"string\" || propType === \"number\" || propType === \"boolean\" || isArray(property)) {\r\n property = { value: property };\r\n }\r\n else if (propType === \"object\" && !ObjHasOwnProperty.call(property, \"value\")) {\r\n property = { value: stringifyObjects ? JSON.stringify(property) : property };\r\n }\r\n else if (isNullOrUndefined(property[_DYN_VALUE /* @min:%2evalue */])\r\n || property[_DYN_VALUE /* @min:%2evalue */] === STR_EMPTY || (!isString(property[_DYN_VALUE /* @min:%2evalue */])\r\n && !isNumber(property[_DYN_VALUE /* @min:%2evalue */]) && !isBoolean(property[_DYN_VALUE /* @min:%2evalue */])\r\n && !isArray(property[_DYN_VALUE /* @min:%2evalue */]))) {\r\n // Since property is IEventProperty, we need to validate its value\r\n return null;\r\n }\r\n // We need to check that if the property value is an array, it is valid\r\n if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) &&\r\n !isArrayValid(property[_DYN_VALUE /* @min:%2evalue */])) {\r\n return null;\r\n }\r\n // If either pii or cc is set convert value to string (since only string pii/cc is allowed).\r\n // If the value is a complex type like an array that can't be converted to string we will drop\r\n // the property.\r\n if (!isNullOrUndefined(property[_DYN_KIND /* @min:%2ekind */])) {\r\n if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) || !isValueKind(property[_DYN_KIND /* @min:%2ekind */])) {\r\n return null;\r\n }\r\n property[_DYN_VALUE /* @min:%2evalue */] = property[_DYN_VALUE /* @min:%2evalue */].toString();\r\n }\r\n return property;\r\n}\r\nexport function getCommonSchemaMetaData(value, kind, type) {\r\n var encodedTypeValue = -1;\r\n if (!isUndefined(value)) {\r\n if (kind > 0) {\r\n if (kind === 32 /* eValueKind.CustomerContent_GenericContent */) {\r\n // encode customer content. Value can only be string. bit 13-16 are for cc\r\n encodedTypeValue = (1 << 13);\r\n }\r\n else if (kind <= 13) {\r\n // encode PII. Value can only be string. bits 5-12 are for Pii\r\n encodedTypeValue = (kind << 5);\r\n }\r\n }\r\n // isDataType checks that the \"type\" is a number so we don't need to check for undefined\r\n if (isDataType(type)) {\r\n // Data Type is provided and valid, so use that\r\n if (encodedTypeValue === -1) {\r\n // Don't return -1\r\n encodedTypeValue = 0;\r\n }\r\n encodedTypeValue |= type;\r\n }\r\n else {\r\n var propType = _fieldTypeEventPropMap[getFieldValueType(value)] || -1;\r\n if (encodedTypeValue !== -1 && propType !== -1) {\r\n // pii exists so we must return correct type\r\n encodedTypeValue |= propType;\r\n }\r\n else if (propType === 6 /* eEventPropertyType.Double */) {\r\n encodedTypeValue = propType;\r\n }\r\n }\r\n }\r\n return encodedTypeValue;\r\n}\r\n/**\r\n * Helper to get and decode the cookie value using decodeURIComponent, this is for historical\r\n * backward compatibility where the document.cookie value was decoded before parsing.\r\n * @param cookieMgr - The cookie manager to use\r\n * @param name - The name of the cookie to get\r\n * @param decode - A flag to indicate whether the cookie value should be decoded\r\n * @returns The decoded cookie value (if available) otherwise an empty string.\r\n */\r\nexport function getCookieValue(cookieMgr, name, decode) {\r\n if (decode === void 0) { decode = true; }\r\n var cookieValue;\r\n if (cookieMgr) {\r\n cookieValue = cookieMgr.get(name);\r\n if (decode && cookieValue && decodeURIComponent) {\r\n cookieValue = decodeURIComponent(cookieValue);\r\n }\r\n }\r\n return cookieValue || STR_EMPTY;\r\n}\r\n/**\r\n * Create a new guid.\r\n * @param style - The style of guid to generated, defaults to Digits\r\n * Digits (Default) : 32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000\r\n * Braces - 32 digits separated by hyphens, enclosed in braces: {00000000-0000-0000-0000-000000000000}\r\n * Parentheses - 32 digits separated by hyphens, enclosed in parentheses: (00000000-0000-0000-0000-000000000000)\r\n * Numeric - 32 digits: 00000000000000000000000000000000\r\n * @returns The formatted guid.\r\n */\r\nexport function createGuid(style) {\r\n if (style === void 0) { style = \"D\" /* GuidStyle.Digits */; }\r\n var theGuid = newGuid();\r\n if (style === \"B\" /* GuidStyle.Braces */) {\r\n theGuid = \"{\" + theGuid + \"}\";\r\n }\r\n else if (style === \"P\" /* GuidStyle.Parentheses */) {\r\n theGuid = \"(\" + theGuid + \")\";\r\n }\r\n else if (style === \"N\" /* GuidStyle.Numeric */) {\r\n theGuid = theGuid.replace(/-/g, STR_EMPTY);\r\n }\r\n return theGuid;\r\n}\r\n/**\r\n * Pass in the objects to merge as arguments.\r\n * @param obj1 - object to merge. Set this argument to 'true' for a deep extend.\r\n * @param obj2 - object to merge.\r\n * @param obj3 - object to merge.\r\n * @param obj4 - object to merge.\r\n * @param obj5 - object to merge.\r\n * @returns The extended object.\r\n */\r\nexport function extend(obj, obj2, obj3, obj4, obj5) {\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n var length = arguments[_DYN_LENGTH /* @min:%2elength */];\r\n var theArgs = arguments;\r\n // Check if a deep merge\r\n if (isBoolean(theArgs[0])) {\r\n deep = theArgs[0];\r\n i++;\r\n }\r\n // Loop through each object and conduct a merge\r\n for (; i < length; i++) {\r\n var obj = theArgs[i];\r\n objForEachKey(obj, function (prop, value) {\r\n // If deep merge and property is an object, merge properties\r\n if (deep && value && isObject(value)) {\r\n if (isArray(value)) {\r\n extended[prop] = extended[prop] || [];\r\n arrForEach(value, function (arrayValue, arrayIndex) {\r\n if (arrayValue && isObject(arrayValue)) {\r\n extended[prop][arrayIndex] = extend(true, extended[prop][arrayIndex], arrayValue);\r\n }\r\n else {\r\n extended[prop][arrayIndex] = arrayValue;\r\n }\r\n });\r\n }\r\n else {\r\n extended[prop] = extend(true, extended[prop], value);\r\n }\r\n }\r\n else {\r\n extended[prop] = value;\r\n }\r\n });\r\n }\r\n return extended;\r\n}\r\nexport var getTime = perfNow;\r\nexport function isValueKind(value) {\r\n // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization\r\n if (value === 0 /* eValueKind.NotSet */ || ((value > 0 /* eValueKind.NotSet */ && value <= 13 /* eValueKind.Pii_IPV4AddressLegacy */) || value === 32 /* eValueKind.CustomerContent_GenericContent */)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isDataType(value) {\r\n // Remark: 0 returns false, but it doesn't affect encoding anyways\r\n // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization\r\n if (value >= 0 && value <= 9) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isSafariOrFirefox() {\r\n var nav = getNavigator();\r\n // If non-browser navigator will be undefined\r\n if (!isUndefined(nav) && nav.userAgent) {\r\n var ua = nav.userAgent.toLowerCase();\r\n if ((ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"safari\") >= 0 || ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"firefox\") >= 0) && ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"chrome\") < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nexport function isArrayValid(value) {\r\n return value[_DYN_LENGTH /* @min:%2elength */] > 0;\r\n}\r\nexport function setProcessTelemetryTimings(event, identifier) {\r\n var evt = event;\r\n evt[_DYN_TIMINGS /* @min:%2etimings */] = evt[_DYN_TIMINGS /* @min:%2etimings */] || {};\r\n evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */] = evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */] || {};\r\n evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */][identifier] = getTime();\r\n}\r\n/**\r\n * Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value\r\n * @param value The value to determine the type\r\n */\r\nexport function getFieldValueType(value) {\r\n var theType = 0 /* FieldValueSanitizerType.NotSet */;\r\n if (value !== null && value !== undefined) {\r\n var objType = typeof value;\r\n if (objType === \"string\") {\r\n theType = 1 /* FieldValueSanitizerType.String */;\r\n }\r\n else if (objType === \"number\") {\r\n theType = 2 /* FieldValueSanitizerType.Number */;\r\n }\r\n else if (objType === \"boolean\") {\r\n theType = 3 /* FieldValueSanitizerType.Boolean */;\r\n }\r\n else if (objType === strShimObject) {\r\n theType = 4 /* FieldValueSanitizerType.Object */;\r\n if (isArray(value)) {\r\n theType = 4096 /* FieldValueSanitizerType.Array */;\r\n if (value[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // Empty arrays are not supported and are considered to be the same as null\r\n theType |= getFieldValueType(value[0]);\r\n }\r\n }\r\n else if (ObjHasOwnProperty.call(value, \"value\")) {\r\n // Looks like an IEventProperty\r\n theType = 8192 /* FieldValueSanitizerType.EventProperty */ | getFieldValueType(value[_DYN_VALUE /* @min:%2evalue */]);\r\n }\r\n }\r\n }\r\n return theType;\r\n}\r\n/**\r\n * Helper to identify whether we are running in a chromium based browser environment\r\n */\r\nexport function isChromium() {\r\n return !!getGlobalInst(\"chrome\");\r\n}\r\n/**\r\n * Create and open an XMLHttpRequest object\r\n * @param method - The request method\r\n * @param urlString - The url\r\n * @param withCredentials - Option flag indicating that credentials should be sent\r\n * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)\r\n * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)\r\n * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request\r\n * @returns A new opened XHR request\r\n */\r\nexport function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {\r\n if (disabled === void 0) { disabled = false; }\r\n if (isSync === void 0) { isSync = false; }\r\n function _wrapSetXhrProp(xhr, prop, value) {\r\n try {\r\n xhr[prop] = value;\r\n }\r\n catch (e) {\r\n // - Wrapping as depending on the environment setting the property may fail (non-terminally)\r\n }\r\n }\r\n var xhr = new XMLHttpRequest();\r\n if (disabled) {\r\n // Tag the instance so it's not tracked (trackDependency)\r\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\r\n // cause the request to fail and we no telemetry would be sent\r\n _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);\r\n }\r\n if (withCredentials) {\r\n // Some libraries require that the withCredentials flag is set \"before\" open and\r\n // - Wrapping as IE 10 has started throwing when setting before open\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n xhr.open(method, urlString, !isSync);\r\n if (withCredentials) {\r\n // withCredentials should be set AFTER open (https://xhr.spec.whatwg.org/#the-withcredentials-attribute)\r\n // And older firefox instances from 11+ will throw for sync events (current versions don't) which happens during unload processing\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n // Only set the timeout for asynchronous requests as\r\n // \"Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception.\"\"\r\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout\r\n if (!isSync && timeout) {\r\n _wrapSetXhrProp(xhr, strTimeout, timeout);\r\n }\r\n return xhr;\r\n}\r\n/**\r\n * Check to see if the value is > 0\r\n * @param value - The value to check\r\n * @returns true if > 0 otherwise false\r\n */\r\nexport function isGreaterThanZero(value) {\r\n return value > 0;\r\n}\r\n//# sourceMappingURL=Utils.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"Utils.js.map","sources":["Utils.js"],"sourcesContent":["var _a;\r\n/**\r\n* Utils.ts\r\n* @author Abhilash Panwar (abpanwar) Hector Hernandez (hectorh)\r\n* @copyright Microsoft 2018\r\n* File containing utility functions.\r\n*/\r\nimport { arrForEach, getGlobalInst, getNavigator, hasDocument, hasWindow, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isReactNative, isString, isUndefined, newGuid, objForEachKey, perfNow } from \"@microsoft/applicationinsights-core-js\";\r\nimport { ObjProto, strShimObject } from \"@microsoft/applicationinsights-shims\";\r\nimport { strIndexOf, strLeft } from \"@nevware21/ts-utils\";\r\nimport { STR_EMPTY } from \"./InternalConstants\";\r\nimport { _DYN_INDEX_OF, _DYN_KIND, _DYN_LENGTH, _DYN_PROCESS_TELEMETRY_ST0, _DYN_TIMINGS, _DYN_VALUE } from \"./__DynamicConstants\";\r\nexport var Version = '4.1.1-nightly3.2403-04';\r\nexport var FullVersionString = \"1DS-Web-JS-\" + Version;\r\nvar ObjHasOwnProperty = ObjProto.hasOwnProperty;\r\n// Defining here so we don't need to take (import) the ApplicationInsights Common module\r\nvar strDisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\nvar strWithCredentials = \"withCredentials\";\r\nvar strTimeout = \"timeout\";\r\n// If value is array just get the type for the first element\r\nvar _fieldTypeEventPropMap = (_a = {},\r\n _a[0 /* FieldValueSanitizerType.NotSet */] = 0 /* eEventPropertyType.Unspecified */,\r\n _a[2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,\r\n _a[1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,\r\n _a[3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,\r\n _a[4096 /* FieldValueSanitizerType.Array */ | 3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,\r\n _a);\r\n/**\r\n * @ignore\r\n */\r\n// let _uaDisallowsSameSiteNone = null;\r\nvar uInt8ArraySupported = null;\r\n// var _areCookiesAvailable: boolean | undefined;\r\n/**\r\n * Checks if document object is available\r\n */\r\nexport var isDocumentObjectAvailable = hasDocument();\r\n/**\r\n * Checks if window object is available\r\n */\r\nexport var isWindowObjectAvailable = hasWindow();\r\n/**\r\n * Checks if value is assigned to the given param.\r\n * @param value - The token from which the tenant id is to be extracted.\r\n * @returns True/false denoting if value is assigned to the param.\r\n */\r\nexport function isValueAssigned(value) {\r\n /// <summary> takes a value and checks for undefined, null and empty string </summary>\r\n /// <param type=\"any\"> value to be tested </param>\r\n /// <returns> true if value is null undefined or emptyString </returns>\r\n return !(value === STR_EMPTY || isNullOrUndefined(value));\r\n}\r\n/**\r\n * Gets the tenant id from the tenant token.\r\n * @param apiKey - The token from which the tenant id is to be extracted.\r\n * @returns The tenant id.\r\n */\r\nexport function getTenantId(apiKey) {\r\n if (apiKey) {\r\n var indexTenantId = strIndexOf(apiKey, \"-\");\r\n if (indexTenantId > -1) {\r\n return strLeft(apiKey, indexTenantId);\r\n }\r\n }\r\n return STR_EMPTY;\r\n}\r\n/**\r\n * Checks if Uint8Array are available in the current environment. Safari and Firefox along with\r\n * ReactNative are known to not support Uint8Array properly.\r\n * @returns True if available, false otherwise.\r\n */\r\nexport function isUint8ArrayAvailable() {\r\n if (uInt8ArraySupported === null) {\r\n uInt8ArraySupported = !isUndefined(Uint8Array) && !isSafariOrFirefox() && !isReactNative();\r\n }\r\n return uInt8ArraySupported;\r\n}\r\n/**\r\n * Checks if the value is a valid EventLatency.\r\n * @param value - The value that needs to be checked.\r\n * @returns True if the value is in AWTEventLatency, false otherwise.\r\n */\r\nexport function isLatency(value) {\r\n if (value && isNumber(value) && value >= 1 /* EventLatencyValue.Normal */ && value <= 4 /* EventLatencyValue.Immediate */) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n/**\r\n * Sanitizes the Property. It checks the that the property name and value are valid. It also\r\n * checks/populates the correct type and pii of the property value.\r\n * @param name - property name - The property name.\r\n * @param property - The property value or an IEventProperty containing value,\r\n * type ,pii and customer content.\r\n * @returns IEventProperty containing valid name, value, pii and type or null if invalid.\r\n */\r\nexport function sanitizeProperty(name, property, stringifyObjects) {\r\n // Check that property is valid\r\n if ((!property && !isValueAssigned(property)) || typeof name !== \"string\") {\r\n return null;\r\n }\r\n // Perf optimization -- only need to get the type once not multiple times\r\n var propType = typeof property;\r\n // If the property isn't IEventProperty (and is either string, number, boolean or array), convert it into one.\r\n if (propType === \"string\" || propType === \"number\" || propType === \"boolean\" || isArray(property)) {\r\n property = { value: property };\r\n }\r\n else if (propType === \"object\" && !ObjHasOwnProperty.call(property, \"value\")) {\r\n property = { value: stringifyObjects ? JSON.stringify(property) : property };\r\n }\r\n else if (isNullOrUndefined(property[_DYN_VALUE /* @min:%2evalue */])\r\n || property[_DYN_VALUE /* @min:%2evalue */] === STR_EMPTY || (!isString(property[_DYN_VALUE /* @min:%2evalue */])\r\n && !isNumber(property[_DYN_VALUE /* @min:%2evalue */]) && !isBoolean(property[_DYN_VALUE /* @min:%2evalue */])\r\n && !isArray(property[_DYN_VALUE /* @min:%2evalue */]))) {\r\n // Since property is IEventProperty, we need to validate its value\r\n return null;\r\n }\r\n // We need to check that if the property value is an array, it is valid\r\n if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) &&\r\n !isArrayValid(property[_DYN_VALUE /* @min:%2evalue */])) {\r\n return null;\r\n }\r\n // If either pii or cc is set convert value to string (since only string pii/cc is allowed).\r\n // If the value is a complex type like an array that can't be converted to string we will drop\r\n // the property.\r\n if (!isNullOrUndefined(property[_DYN_KIND /* @min:%2ekind */])) {\r\n if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) || !isValueKind(property[_DYN_KIND /* @min:%2ekind */])) {\r\n return null;\r\n }\r\n property[_DYN_VALUE /* @min:%2evalue */] = property[_DYN_VALUE /* @min:%2evalue */].toString();\r\n }\r\n return property;\r\n}\r\nexport function getCommonSchemaMetaData(value, kind, type) {\r\n var encodedTypeValue = -1;\r\n if (!isUndefined(value)) {\r\n if (kind > 0) {\r\n if (kind === 32 /* eValueKind.CustomerContent_GenericContent */) {\r\n // encode customer content. Value can only be string. bit 13-16 are for cc\r\n encodedTypeValue = (1 << 13);\r\n }\r\n else if (kind <= 13) {\r\n // encode PII. Value can only be string. bits 5-12 are for Pii\r\n encodedTypeValue = (kind << 5);\r\n }\r\n }\r\n // isDataType checks that the \"type\" is a number so we don't need to check for undefined\r\n if (isDataType(type)) {\r\n // Data Type is provided and valid, so use that\r\n if (encodedTypeValue === -1) {\r\n // Don't return -1\r\n encodedTypeValue = 0;\r\n }\r\n encodedTypeValue |= type;\r\n }\r\n else {\r\n var propType = _fieldTypeEventPropMap[getFieldValueType(value)] || -1;\r\n if (encodedTypeValue !== -1 && propType !== -1) {\r\n // pii exists so we must return correct type\r\n encodedTypeValue |= propType;\r\n }\r\n else if (propType === 6 /* eEventPropertyType.Double */) {\r\n encodedTypeValue = propType;\r\n }\r\n }\r\n }\r\n return encodedTypeValue;\r\n}\r\n/**\r\n * Helper to get and decode the cookie value using decodeURIComponent, this is for historical\r\n * backward compatibility where the document.cookie value was decoded before parsing.\r\n * @param cookieMgr - The cookie manager to use\r\n * @param name - The name of the cookie to get\r\n * @param decode - A flag to indicate whether the cookie value should be decoded\r\n * @returns The decoded cookie value (if available) otherwise an empty string.\r\n */\r\nexport function getCookieValue(cookieMgr, name, decode) {\r\n if (decode === void 0) { decode = true; }\r\n var cookieValue;\r\n if (cookieMgr) {\r\n cookieValue = cookieMgr.get(name);\r\n if (decode && cookieValue && decodeURIComponent) {\r\n cookieValue = decodeURIComponent(cookieValue);\r\n }\r\n }\r\n return cookieValue || STR_EMPTY;\r\n}\r\n/**\r\n * Create a new guid.\r\n * @param style - The style of guid to generated, defaults to Digits\r\n * Digits (Default) : 32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000\r\n * Braces - 32 digits separated by hyphens, enclosed in braces: {00000000-0000-0000-0000-000000000000}\r\n * Parentheses - 32 digits separated by hyphens, enclosed in parentheses: (00000000-0000-0000-0000-000000000000)\r\n * Numeric - 32 digits: 00000000000000000000000000000000\r\n * @returns The formatted guid.\r\n */\r\nexport function createGuid(style) {\r\n if (style === void 0) { style = \"D\" /* GuidStyle.Digits */; }\r\n var theGuid = newGuid();\r\n if (style === \"B\" /* GuidStyle.Braces */) {\r\n theGuid = \"{\" + theGuid + \"}\";\r\n }\r\n else if (style === \"P\" /* GuidStyle.Parentheses */) {\r\n theGuid = \"(\" + theGuid + \")\";\r\n }\r\n else if (style === \"N\" /* GuidStyle.Numeric */) {\r\n theGuid = theGuid.replace(/-/g, STR_EMPTY);\r\n }\r\n return theGuid;\r\n}\r\n/**\r\n * Pass in the objects to merge as arguments.\r\n * @param obj1 - object to merge. Set this argument to 'true' for a deep extend.\r\n * @param obj2 - object to merge.\r\n * @param obj3 - object to merge.\r\n * @param obj4 - object to merge.\r\n * @param obj5 - object to merge.\r\n * @returns The extended object.\r\n */\r\nexport function extend(obj, obj2, obj3, obj4, obj5) {\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n var length = arguments[_DYN_LENGTH /* @min:%2elength */];\r\n var theArgs = arguments;\r\n // Check if a deep merge\r\n if (isBoolean(theArgs[0])) {\r\n deep = theArgs[0];\r\n i++;\r\n }\r\n // Loop through each object and conduct a merge\r\n for (; i < length; i++) {\r\n var obj = theArgs[i];\r\n objForEachKey(obj, function (prop, value) {\r\n // If deep merge and property is an object, merge properties\r\n if (deep && value && isObject(value)) {\r\n if (isArray(value)) {\r\n extended[prop] = extended[prop] || [];\r\n arrForEach(value, function (arrayValue, arrayIndex) {\r\n if (arrayValue && isObject(arrayValue)) {\r\n extended[prop][arrayIndex] = extend(true, extended[prop][arrayIndex], arrayValue);\r\n }\r\n else {\r\n extended[prop][arrayIndex] = arrayValue;\r\n }\r\n });\r\n }\r\n else {\r\n extended[prop] = extend(true, extended[prop], value);\r\n }\r\n }\r\n else {\r\n extended[prop] = value;\r\n }\r\n });\r\n }\r\n return extended;\r\n}\r\nexport var getTime = perfNow;\r\nexport function isValueKind(value) {\r\n // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization\r\n if (value === 0 /* eValueKind.NotSet */ || ((value > 0 /* eValueKind.NotSet */ && value <= 13 /* eValueKind.Pii_IPV4AddressLegacy */) || value === 32 /* eValueKind.CustomerContent_GenericContent */)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isDataType(value) {\r\n // Remark: 0 returns false, but it doesn't affect encoding anyways\r\n // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization\r\n if (value >= 0 && value <= 9) {\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isSafariOrFirefox() {\r\n var nav = getNavigator();\r\n // If non-browser navigator will be undefined\r\n if (!isUndefined(nav) && nav.userAgent) {\r\n var ua = nav.userAgent.toLowerCase();\r\n if ((ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"safari\") >= 0 || ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"firefox\") >= 0) && ua[_DYN_INDEX_OF /* @min:%2eindexOf */](\"chrome\") < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nexport function isArrayValid(value) {\r\n return value[_DYN_LENGTH /* @min:%2elength */] > 0;\r\n}\r\nexport function setProcessTelemetryTimings(event, identifier) {\r\n var evt = event;\r\n evt[_DYN_TIMINGS /* @min:%2etimings */] = evt[_DYN_TIMINGS /* @min:%2etimings */] || {};\r\n evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */] = evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */] || {};\r\n evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST0 /* @min:%2eprocessTelemetryStart */][identifier] = getTime();\r\n}\r\n/**\r\n * Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value\r\n * @param value The value to determine the type\r\n */\r\nexport function getFieldValueType(value) {\r\n var theType = 0 /* FieldValueSanitizerType.NotSet */;\r\n if (value !== null && value !== undefined) {\r\n var objType = typeof value;\r\n if (objType === \"string\") {\r\n theType = 1 /* FieldValueSanitizerType.String */;\r\n }\r\n else if (objType === \"number\") {\r\n theType = 2 /* FieldValueSanitizerType.Number */;\r\n }\r\n else if (objType === \"boolean\") {\r\n theType = 3 /* FieldValueSanitizerType.Boolean */;\r\n }\r\n else if (objType === strShimObject) {\r\n theType = 4 /* FieldValueSanitizerType.Object */;\r\n if (isArray(value)) {\r\n theType = 4096 /* FieldValueSanitizerType.Array */;\r\n if (value[_DYN_LENGTH /* @min:%2elength */] > 0) {\r\n // Empty arrays are not supported and are considered to be the same as null\r\n theType |= getFieldValueType(value[0]);\r\n }\r\n }\r\n else if (ObjHasOwnProperty.call(value, \"value\")) {\r\n // Looks like an IEventProperty\r\n theType = 8192 /* FieldValueSanitizerType.EventProperty */ | getFieldValueType(value[_DYN_VALUE /* @min:%2evalue */]);\r\n }\r\n }\r\n }\r\n return theType;\r\n}\r\n/**\r\n * Helper to identify whether we are running in a chromium based browser environment\r\n */\r\nexport function isChromium() {\r\n return !!getGlobalInst(\"chrome\");\r\n}\r\n/**\r\n * Create and open an XMLHttpRequest object\r\n * @param method - The request method\r\n * @param urlString - The url\r\n * @param withCredentials - Option flag indicating that credentials should be sent\r\n * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)\r\n * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)\r\n * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request\r\n * @returns A new opened XHR request\r\n */\r\nexport function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {\r\n if (disabled === void 0) { disabled = false; }\r\n if (isSync === void 0) { isSync = false; }\r\n function _wrapSetXhrProp(xhr, prop, value) {\r\n try {\r\n xhr[prop] = value;\r\n }\r\n catch (e) {\r\n // - Wrapping as depending on the environment setting the property may fail (non-terminally)\r\n }\r\n }\r\n var xhr = new XMLHttpRequest();\r\n if (disabled) {\r\n // Tag the instance so it's not tracked (trackDependency)\r\n // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would\r\n // cause the request to fail and we no telemetry would be sent\r\n _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);\r\n }\r\n if (withCredentials) {\r\n // Some libraries require that the withCredentials flag is set \"before\" open and\r\n // - Wrapping as IE 10 has started throwing when setting before open\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n xhr.open(method, urlString, !isSync);\r\n if (withCredentials) {\r\n // withCredentials should be set AFTER open (https://xhr.spec.whatwg.org/#the-withcredentials-attribute)\r\n // And older firefox instances from 11+ will throw for sync events (current versions don't) which happens during unload processing\r\n _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);\r\n }\r\n // Only set the timeout for asynchronous requests as\r\n // \"Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception.\"\"\r\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout\r\n if (!isSync && timeout) {\r\n _wrapSetXhrProp(xhr, strTimeout, timeout);\r\n }\r\n return xhr;\r\n}\r\n/**\r\n * Check to see if the value is > 0\r\n * @param value - The value to check\r\n * @returns true if > 0 otherwise false\r\n */\r\nexport function isGreaterThanZero(value) {\r\n return value > 0;\r\n}\r\n//# sourceMappingURL=Utils.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  * (Microsoft Internal Only)
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/1ds-core-js",
3
- "version": "4.1.1-nightly3.2403-02",
3
+ "version": "4.1.1-nightly3.2403-04",
4
4
  "description": "Microsoft Application Insights JavaScript SDK - 1ds-core-js",
5
5
  "author": "Microsoft Application Insights Team",
6
6
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
@@ -37,7 +37,7 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@microsoft/applicationinsights-shims": "3.0.1",
40
- "@microsoft/applicationinsights-core-js": "3.1.1-nightly3.2403-02",
40
+ "@microsoft/applicationinsights-core-js": "3.1.1-nightly3.2403-04",
41
41
  "@microsoft/dynamicproto-js": "^2.0.3",
42
42
  "@nevware21/ts-utils": ">= 0.10.5 < 2.x",
43
43
  "@nevware21/ts-async": ">= 0.3.0 < 2.x"
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 1DS JS SDK Core, 4.1.1-nightly3.2403-02
2
+ * 1DS JS SDK Core, 4.1.1-nightly3.2403-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -18,6 +18,7 @@ import { addEventListeners } from '@microsoft/applicationinsights-core-js';
18
18
  import { addPageHideEventListener } from '@microsoft/applicationinsights-core-js';
19
19
  import { addPageShowEventListener } from '@microsoft/applicationinsights-core-js';
20
20
  import { addPageUnloadEventListener } from '@microsoft/applicationinsights-core-js';
21
+ import { _appendHeader } from '@microsoft/applicationinsights-core-js';
21
22
  import { areCookiesSupported } from '@microsoft/applicationinsights-core-js';
22
23
  import { arrForEach } from '@microsoft/applicationinsights-core-js';
23
24
  import { arrIndexOf } from '@microsoft/applicationinsights-core-js';
@@ -26,6 +27,7 @@ import { arrReduce } from '@microsoft/applicationinsights-core-js';
26
27
  import { attachEvent } from '@microsoft/applicationinsights-core-js';
27
28
  import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
28
29
  import { blockDynamicConversion } from '@microsoft/applicationinsights-core-js';
30
+ import { convertAllHeadersToMap } from '@microsoft/applicationinsights-core-js';
29
31
  import { createCookieMgr } from '@microsoft/applicationinsights-core-js';
30
32
  import { createDynamicConfig } from '@microsoft/applicationinsights-core-js';
31
33
  import { createEnumStyle } from '@microsoft/applicationinsights-core-js';
@@ -47,8 +49,11 @@ import { eventOn } from '@microsoft/applicationinsights-core-js';
47
49
  import { EventsDiscardedReason } from '@microsoft/applicationinsights-core-js';
48
50
  import { findW3cTraceParent } from '@microsoft/applicationinsights-core-js';
49
51
  import { forceDynamicConversion } from '@microsoft/applicationinsights-core-js';
52
+ import { formatErrorMessageXdr } from '@microsoft/applicationinsights-core-js';
53
+ import { formatErrorMessageXhr } from '@microsoft/applicationinsights-core-js';
50
54
  import { formatTraceParent } from '@microsoft/applicationinsights-core-js';
51
55
  import { generateW3CId } from '@microsoft/applicationinsights-core-js';
56
+ import { _getAllResponseHeaders } from '@microsoft/applicationinsights-core-js';
52
57
  import { getConsole } from '@microsoft/applicationinsights-core-js';
53
58
  import { getCrypto } from '@microsoft/applicationinsights-core-js';
54
59
  import { getDocument } from '@microsoft/applicationinsights-core-js';
@@ -63,6 +68,7 @@ import { getLocation } from '@microsoft/applicationinsights-core-js';
63
68
  import { getMsCrypto } from '@microsoft/applicationinsights-core-js';
64
69
  import { getNavigator } from '@microsoft/applicationinsights-core-js';
65
70
  import { getPerformance } from '@microsoft/applicationinsights-core-js';
71
+ import { getResponseText } from '@microsoft/applicationinsights-core-js';
66
72
  import { getSetValue } from '@microsoft/applicationinsights-core-js';
67
73
  import { getWindow } from '@microsoft/applicationinsights-core-js';
68
74
  import { hasDocument } from '@microsoft/applicationinsights-core-js';
@@ -72,6 +78,7 @@ import { hasNavigator } from '@microsoft/applicationinsights-core-js';
72
78
  import { hasOwnProperty } from '@microsoft/applicationinsights-core-js';
73
79
  import { hasWindow } from '@microsoft/applicationinsights-core-js';
74
80
  import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
81
+ import { IBackendResponse } from '@microsoft/applicationinsights-core-js';
75
82
  import { IChannelControls } from '@microsoft/applicationinsights-core-js';
76
83
  import { IConfigCheckFn } from '@microsoft/applicationinsights-core-js';
77
84
  import { IConfigDefaultCheck } from '@microsoft/applicationinsights-core-js';
@@ -86,6 +93,7 @@ import { IDistributedTraceContext } from '@microsoft/applicationinsights-core-js
86
93
  import { IDynamicConfigHandler } from '@microsoft/applicationinsights-core-js';
87
94
  import { IDynamicPropertyHandler } from '@microsoft/applicationinsights-core-js';
88
95
  import { IInternalOfflineSupport } from '@microsoft/applicationinsights-core-js';
96
+ import { _IInternalXhrOverride } from '@microsoft/applicationinsights-core-js';
89
97
  import { ILegacyUnloadHook } from '@microsoft/applicationinsights-core-js';
90
98
  import { INotificationListener } from '@microsoft/applicationinsights-core-js';
91
99
  import { INotificationManager } from '@microsoft/applicationinsights-core-js';
@@ -104,6 +112,8 @@ import { isArray } from '@microsoft/applicationinsights-core-js';
104
112
  import { isBeaconsSupported } from '@microsoft/applicationinsights-core-js';
105
113
  import { isBoolean } from '@microsoft/applicationinsights-core-js';
106
114
  import { isDate } from '@microsoft/applicationinsights-core-js';
115
+ import { _ISenderOnComplete } from '@microsoft/applicationinsights-core-js';
116
+ import { _ISendPostMgrConfig } from '@microsoft/applicationinsights-core-js';
107
117
  import { isError } from '@microsoft/applicationinsights-core-js';
108
118
  import { isFetchSupported } from '@microsoft/applicationinsights-core-js';
109
119
  import { isFunction } from '@microsoft/applicationinsights-core-js';
@@ -129,6 +139,7 @@ import { ITelemetryPlugin } from '@microsoft/applicationinsights-core-js';
129
139
  import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
130
140
  import { ITelemetryUnloadState } from '@microsoft/applicationinsights-core-js';
131
141
  import { ITelemetryUpdateState } from '@microsoft/applicationinsights-core-js';
142
+ import { _ITimeoutOverrideWrapper } from '@microsoft/applicationinsights-core-js';
132
143
  import { ITimerHandler } from '@nevware21/ts-utils';
133
144
  import { IUnloadableComponent } from '@microsoft/applicationinsights-core-js';
134
145
  import { IUnloadHandlerContainer } from '@microsoft/applicationinsights-core-js';
@@ -136,6 +147,7 @@ import { IUnloadHook } from '@microsoft/applicationinsights-core-js';
136
147
  import { IUnloadHookContainer } from '@microsoft/applicationinsights-core-js';
137
148
  import { IWatchDetails } from '@microsoft/applicationinsights-core-js';
138
149
  import { IWatcherHandler } from '@microsoft/applicationinsights-core-js';
150
+ import { IXDomainRequest } from '@microsoft/applicationinsights-core-js';
139
151
  import { IXHROverride } from '@microsoft/applicationinsights-core-js';
140
152
  import { LoggingSeverity } from '@microsoft/applicationinsights-core-js';
141
153
  import { _logInternalMessage } from '@microsoft/applicationinsights-core-js';
@@ -153,10 +165,12 @@ import { objSeal } from '@microsoft/applicationinsights-core-js';
153
165
  import { OnCompleteCallback } from '@microsoft/applicationinsights-core-js';
154
166
  import { onConfigChange } from '@microsoft/applicationinsights-core-js';
155
167
  import { optimizeObject } from '@microsoft/applicationinsights-core-js';
168
+ import { parseResponse } from '@microsoft/applicationinsights-core-js';
156
169
  import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
157
170
  import { PerfEvent } from '@microsoft/applicationinsights-core-js';
158
171
  import { PerfManager } from '@microsoft/applicationinsights-core-js';
159
172
  import { perfNow } from '@microsoft/applicationinsights-core-js';
173
+ import { prependTransports } from '@microsoft/applicationinsights-core-js';
160
174
  import { ProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
161
175
  import { proxyAssign } from '@microsoft/applicationinsights-core-js';
162
176
  import { proxyFunctionAs } from '@microsoft/applicationinsights-core-js';
@@ -170,6 +184,7 @@ import { removePageShowEventListener } from '@microsoft/applicationinsights-core
170
184
  import { removePageUnloadEventListener } from '@microsoft/applicationinsights-core-js';
171
185
  import { safeGetCookieMgr } from '@microsoft/applicationinsights-core-js';
172
186
  import { safeGetLogger } from '@microsoft/applicationinsights-core-js';
187
+ import { SenderPostManager } from '@microsoft/applicationinsights-core-js';
173
188
  import { SendPOSTFunction } from '@microsoft/applicationinsights-core-js';
174
189
  import { SendRequestReason } from '@microsoft/applicationinsights-core-js';
175
190
  import { setEnableEnvMocks } from '@microsoft/applicationinsights-core-js';
@@ -188,6 +203,7 @@ import { TelemetryUnloadReason } from '@microsoft/applicationinsights-core-js';
188
203
  import { throwError } from '@microsoft/applicationinsights-core-js';
189
204
  import { _throwInternal } from '@microsoft/applicationinsights-core-js';
190
205
  import { toISOString } from '@microsoft/applicationinsights-core-js';
206
+ import { TransportType } from '@microsoft/applicationinsights-core-js';
191
207
  import { UnloadHandler } from '@microsoft/applicationinsights-core-js';
192
208
  import { useXDomainRequest } from '@microsoft/applicationinsights-core-js';
193
209
  import { _warnToConsole } from '@microsoft/applicationinsights-core-js';
@@ -205,6 +221,8 @@ export { addPageShowEventListener }
205
221
 
206
222
  export { addPageUnloadEventListener }
207
223
 
224
+ export { _appendHeader }
225
+
208
226
  /**
209
227
  * @group Classes
210
228
  * @group Entrypoint
@@ -241,6 +259,8 @@ export { BaseTelemetryPlugin }
241
259
 
242
260
  export { blockDynamicConversion }
243
261
 
262
+ export { convertAllHeadersToMap }
263
+
244
264
  export { createCookieMgr }
245
265
 
246
266
  export { createDynamicConfig }
@@ -542,12 +562,18 @@ export { findW3cTraceParent }
542
562
 
543
563
  export { forceDynamicConversion }
544
564
 
565
+ export { formatErrorMessageXdr }
566
+
567
+ export { formatErrorMessageXhr }
568
+
545
569
  export { formatTraceParent }
546
570
 
547
571
  export declare const FullVersionString: string;
548
572
 
549
573
  export { generateW3CId }
550
574
 
575
+ export { _getAllResponseHeaders }
576
+
551
577
  export declare function getCommonSchemaMetaData(value: string | boolean | number | string[] | number[] | boolean[] | undefined, kind: number | undefined, type?: number | undefined): number;
552
578
 
553
579
  export { getConsole }
@@ -594,6 +620,8 @@ export { getNavigator }
594
620
 
595
621
  export { getPerformance }
596
622
 
623
+ export { getResponseText }
624
+
597
625
  export { getSetValue }
598
626
 
599
627
  /**
@@ -628,6 +656,8 @@ export { hasWindow }
628
656
 
629
657
  export { IAppInsightsCore }
630
658
 
659
+ export { IBackendResponse }
660
+
631
661
  export { IChannelControls }
632
662
 
633
663
  export { IConfigCheckFn }
@@ -847,6 +877,8 @@ export declare interface IFieldValueSanitizerProvider {
847
877
 
848
878
  export { IInternalOfflineSupport }
849
879
 
880
+ export { _IInternalXhrOverride }
881
+
850
882
  export { ILegacyUnloadHook }
851
883
 
852
884
  export { INotificationListener }
@@ -915,6 +947,10 @@ export { isDate }
915
947
  */
916
948
  export declare const isDocumentObjectAvailable: boolean;
917
949
 
950
+ export { _ISenderOnComplete }
951
+
952
+ export { _ISendPostMgrConfig }
953
+
918
954
  export { isError }
919
955
 
920
956
  export { isFetchSupported }
@@ -1000,6 +1036,8 @@ export { ITelemetryUnloadState }
1000
1036
 
1001
1037
  export { ITelemetryUpdateState }
1002
1038
 
1039
+ export { _ITimeoutOverrideWrapper }
1040
+
1003
1041
  export { IUnloadableComponent }
1004
1042
 
1005
1043
  export { IUnloadHandlerContainer }
@@ -1062,6 +1100,8 @@ export { IWatchDetails }
1062
1100
 
1063
1101
  export { IWatcherHandler }
1064
1102
 
1103
+ export { IXDomainRequest }
1104
+
1065
1105
  export { IXHROverride }
1066
1106
 
1067
1107
  export { LoggingSeverity }
@@ -1108,6 +1148,8 @@ export declare function openXhr(method: string, urlString: string, withCredentia
1108
1148
 
1109
1149
  export { optimizeObject }
1110
1150
 
1151
+ export { parseResponse }
1152
+
1111
1153
  export { parseTraceParent }
1112
1154
 
1113
1155
  export { PerfEvent }
@@ -1116,6 +1158,8 @@ export { PerfManager }
1116
1158
 
1117
1159
  export { perfNow }
1118
1160
 
1161
+ export { prependTransports }
1162
+
1119
1163
  export { ProcessTelemetryContext }
1120
1164
 
1121
1165
  export { proxyAssign }
@@ -1152,6 +1196,8 @@ export { safeGetLogger }
1152
1196
  */
1153
1197
  export declare function sanitizeProperty(name: string, property: string | number | boolean | string[] | number[] | boolean[] | object | IEventProperty, stringifyObjects?: boolean): IEventProperty | null;
1154
1198
 
1199
+ export { SenderPostManager }
1200
+
1155
1201
  export { SendPOSTFunction }
1156
1202
 
1157
1203
  export { SendRequestReason }
@@ -1196,29 +1242,7 @@ export declare const TraceLevel: EnumValue<typeof eTraceLevel>;
1196
1242
 
1197
1243
  export declare type TraceLevel = number | eTraceLevel;
1198
1244
 
1199
- /**
1200
- * An enumeration that identifies the transport type that are requested to be used, if the requested
1201
- * transport is not available ir supported the SDK may choose the first available transport or it
1202
- * will log a warning to the diagnostic logger.
1203
- */
1204
- export declare const enum TransportType {
1205
- /**
1206
- * Use the default available api
1207
- */
1208
- NotSet = 0,
1209
- /**
1210
- * Use XMLHttpRequest or XMLDomainRequest if available
1211
- */
1212
- Xhr = 1,
1213
- /**
1214
- * Use the Fetch api if available
1215
- */
1216
- Fetch = 2,
1217
- /**
1218
- * Use sendBeacon api if available
1219
- */
1220
- Beacon = 3
1221
- }
1245
+ export { TransportType }
1222
1246
 
1223
1247
  export { UnloadHandler }
1224
1248
 
@@ -1288,7 +1312,7 @@ export declare class ValueSanitizer implements IValueSanitizer {
1288
1312
  constructor(fieldSanitizerProvider?: IFieldValueSanitizerProvider);
1289
1313
  }
1290
1314
 
1291
- export declare const Version = "4.1.1-nightly3.2403-02";
1315
+ export declare const Version = "4.1.1-nightly3.2403-04";
1292
1316
 
1293
1317
  export { _warnToConsole }
1294
1318