@microsoft/applicationinsights-core-js 3.4.0-nightlybeta3.2602-27 → 3.4.1

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 (258) hide show
  1. package/browser/es5/applicationinsights-core-js.cjs.js +997 -114
  2. package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-core-js.gbl.js +999 -116
  6. package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-core-js.js +999 -116
  11. package/browser/es5/applicationinsights-core-js.js.map +1 -1
  12. package/browser/es5/applicationinsights-core-js.min.js +2 -2
  13. package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/es5/index.js +997 -114
  15. package/dist/es5/index.js.map +1 -1
  16. package/dist/es5/index.min.js +2 -2
  17. package/dist/es5/index.min.js.map +1 -1
  18. package/dist-es5/__DynamicConstants.js +44 -27
  19. package/dist-es5/__DynamicConstants.js.map +1 -1
  20. package/dist-es5/config/ConfigDefaultHelpers.js +1 -1
  21. package/dist-es5/config/ConfigDefaults.js +1 -1
  22. package/dist-es5/config/DynamicConfig.js +1 -1
  23. package/dist-es5/config/DynamicProperty.js +1 -1
  24. package/dist-es5/config/DynamicState.js +1 -1
  25. package/dist-es5/config/DynamicSupport.js +1 -1
  26. package/dist-es5/constants/Constants.js +1 -1
  27. package/dist-es5/constants/InternalConstants.js +4 -1
  28. package/dist-es5/constants/InternalConstants.js.map +1 -1
  29. package/dist-es5/core/AggregationError.js +1 -1
  30. package/dist-es5/core/AppInsightsCore.js +13 -13
  31. package/dist-es5/core/AppInsightsCore.js.map +1 -1
  32. package/dist-es5/core/AsyncUtils.js +1 -1
  33. package/dist-es5/core/BaseTelemetryPlugin.js +1 -1
  34. package/dist-es5/core/CookieMgr.js +1 -1
  35. package/dist-es5/core/DbgExtensionUtils.js +1 -1
  36. package/dist-es5/core/InstrumentHooks.js +1 -1
  37. package/dist-es5/core/NotificationManager.js +1 -1
  38. package/dist-es5/core/PerfManager.js +1 -1
  39. package/dist-es5/core/ProcessTelemetryContext.js +3 -3
  40. package/dist-es5/core/ProcessTelemetryContext.js.map +1 -1
  41. package/dist-es5/core/ResponseHelpers.js +1 -1
  42. package/dist-es5/core/SenderPostManager.js +1 -1
  43. package/dist-es5/core/StatsBeat.js +9 -9
  44. package/dist-es5/core/StatsBeat.js.map +1 -1
  45. package/dist-es5/core/TelemetryHelpers.js +3 -3
  46. package/dist-es5/core/TelemetryHelpers.js.map +1 -1
  47. package/dist-es5/core/TelemetryInitializerPlugin.js +1 -1
  48. package/dist-es5/core/UnloadHandlerContainer.js +1 -1
  49. package/dist-es5/core/UnloadHookContainer.js +3 -3
  50. package/dist-es5/core/UnloadHookContainer.js.map +1 -1
  51. package/dist-es5/diagnostics/DiagnosticLogger.js +3 -3
  52. package/dist-es5/diagnostics/DiagnosticLogger.js.map +1 -1
  53. package/dist-es5/diagnostics/ThrottleMgr.js +1 -1
  54. package/dist-es5/enums/EnumHelperFuncs.js +1 -1
  55. package/dist-es5/enums/W3CTraceFlags.js +1 -1
  56. package/dist-es5/enums/ai/DependencyTypes.js +1 -1
  57. package/dist-es5/enums/ai/Enums.js +1 -1
  58. package/dist-es5/enums/ai/EventsDiscardedReason.js +1 -1
  59. package/dist-es5/enums/ai/FeatureOptInEnums.js +1 -1
  60. package/dist-es5/enums/ai/InitActiveStatusEnum.js +1 -1
  61. package/dist-es5/enums/ai/LoggingEnums.js +1 -1
  62. package/dist-es5/enums/ai/SendRequestReason.js +1 -1
  63. package/dist-es5/enums/ai/StatsType.js +1 -1
  64. package/dist-es5/enums/ai/TelemetryUnloadReason.js +1 -1
  65. package/dist-es5/enums/ai/TelemetryUpdateReason.js +1 -1
  66. package/dist-es5/enums/ai/TraceHeadersMode.js +1 -1
  67. package/dist-es5/enums/ai/UrlRedactionOptions.js +36 -0
  68. package/dist-es5/enums/ai/UrlRedactionOptions.js.map +1 -0
  69. package/dist-es5/enums/ext/Enums.js +78 -0
  70. package/dist-es5/enums/ext/Enums.js.map +1 -0
  71. package/dist-es5/enums/otel/OTelSamplingDecision.js +1 -1
  72. package/dist-es5/enums/otel/OTelSpanKind.js +1 -1
  73. package/dist-es5/enums/otel/OTelSpanStatus.js +1 -1
  74. package/dist-es5/enums/otel/eAttributeChangeOp.js +1 -1
  75. package/dist-es5/ext/AppInsightsExtCore.js +98 -0
  76. package/dist-es5/ext/AppInsightsExtCore.js.map +1 -0
  77. package/dist-es5/ext/ValueSanitizer.js +260 -0
  78. package/dist-es5/ext/ValueSanitizer.js.map +1 -0
  79. package/dist-es5/ext/extSpanUtils.js +312 -0
  80. package/dist-es5/ext/extSpanUtils.js.map +1 -0
  81. package/dist-es5/ext/extUtils.js +412 -0
  82. package/dist-es5/ext/extUtils.js.map +1 -0
  83. package/dist-es5/index.js +14 -1
  84. package/dist-es5/index.js.map +1 -1
  85. package/dist-es5/interfaces/IException.js +1 -1
  86. package/dist-es5/interfaces/IOTelHrTime.js +1 -1
  87. package/dist-es5/interfaces/ai/ConnectionString.js +1 -1
  88. package/dist-es5/interfaces/ai/IAppInsights.js +1 -1
  89. package/dist-es5/interfaces/ai/IAppInsightsCore.js +1 -1
  90. package/dist-es5/interfaces/ai/IChannelControls.js +1 -1
  91. package/dist-es5/interfaces/ai/IChannelControlsHost.js +1 -1
  92. package/dist-es5/interfaces/ai/IConfig.js +1 -1
  93. package/dist-es5/interfaces/ai/IConfiguration.js +1 -1
  94. package/dist-es5/interfaces/ai/ICookieMgr.js +1 -1
  95. package/dist-es5/interfaces/ai/ICorrelationConfig.js +1 -1
  96. package/dist-es5/interfaces/ai/IDbgExtension.js +1 -1
  97. package/dist-es5/interfaces/ai/IDependencyTelemetry.js +1 -1
  98. package/dist-es5/interfaces/ai/IDiagnosticLogger.js +1 -1
  99. package/dist-es5/interfaces/ai/IDistributedTraceContext.js +1 -1
  100. package/dist-es5/interfaces/ai/IEventTelemetry.js +1 -1
  101. package/dist-es5/interfaces/ai/IExceptionConfig.js +1 -1
  102. package/dist-es5/interfaces/ai/IExceptionTelemetry.js +1 -1
  103. package/dist-es5/interfaces/ai/IFeatureOptIn.js +1 -1
  104. package/dist-es5/interfaces/ai/IInstrumentHooks.js +1 -1
  105. package/dist-es5/interfaces/ai/IMetricTelemetry.js +1 -1
  106. package/dist-es5/interfaces/ai/INetworkStatsbeat.js +1 -1
  107. package/dist-es5/interfaces/ai/INotificationListener.js +1 -1
  108. package/dist-es5/interfaces/ai/INotificationManager.js +1 -1
  109. package/dist-es5/interfaces/ai/IPageViewPerformanceTelemetry.js +1 -1
  110. package/dist-es5/interfaces/ai/IPageViewTelemetry.js +1 -1
  111. package/dist-es5/interfaces/ai/IPartC.js +1 -1
  112. package/dist-es5/interfaces/ai/IPerfEvent.js +1 -1
  113. package/dist-es5/interfaces/ai/IPerfManager.js +1 -1
  114. package/dist-es5/interfaces/ai/IProcessTelemetryContext.js +1 -1
  115. package/dist-es5/interfaces/ai/IPropertiesPlugin.js +1 -1
  116. package/dist-es5/interfaces/ai/IRequestContext.js +1 -1
  117. package/dist-es5/interfaces/ai/IRequestTelemetry.js +1 -1
  118. package/dist-es5/interfaces/ai/ISenderPostManager.js +1 -1
  119. package/dist-es5/interfaces/ai/IStatsBeat.js +1 -1
  120. package/dist-es5/interfaces/ai/IStatsEventData.js +1 -1
  121. package/dist-es5/interfaces/ai/IStatsMgr.js +1 -1
  122. package/dist-es5/interfaces/ai/IStorageBuffer.js +1 -1
  123. package/dist-es5/interfaces/ai/ITelemetryContext.js +1 -1
  124. package/dist-es5/interfaces/ai/ITelemetryInitializers.js +1 -1
  125. package/dist-es5/interfaces/ai/ITelemetryItem.js +1 -1
  126. package/dist-es5/interfaces/ai/ITelemetryPlugin.js +1 -1
  127. package/dist-es5/interfaces/ai/ITelemetryPluginChain.js +1 -1
  128. package/dist-es5/interfaces/ai/ITelemetryUnloadState.js +1 -1
  129. package/dist-es5/interfaces/ai/ITelemetryUpdateState.js +1 -1
  130. package/dist-es5/interfaces/ai/IThrottleMgr.js +1 -1
  131. package/dist-es5/interfaces/ai/ITraceParent.js +1 -1
  132. package/dist-es5/interfaces/ai/ITraceProvider.js +1 -1
  133. package/dist-es5/interfaces/ai/ITraceTelemetry.js +1 -1
  134. package/dist-es5/interfaces/ai/IUnloadHook.js +1 -1
  135. package/dist-es5/interfaces/ai/IUnloadableComponent.js +1 -1
  136. package/dist-es5/interfaces/ai/IW3cTraceState.js +1 -1
  137. package/dist-es5/interfaces/ai/IXDomainRequest.js +1 -1
  138. package/dist-es5/interfaces/ai/IXHROverride.js +1 -1
  139. package/dist-es5/interfaces/ai/PartAExtensions.js +1 -1
  140. package/dist-es5/interfaces/ai/context/IApplication.js +1 -1
  141. package/dist-es5/interfaces/ai/context/IDevice.js +1 -1
  142. package/dist-es5/interfaces/ai/context/IInternal.js +1 -1
  143. package/dist-es5/interfaces/ai/context/ILocation.js +1 -1
  144. package/dist-es5/interfaces/ai/context/IOperatingSystem.js +1 -1
  145. package/dist-es5/interfaces/ai/context/ISample.js +1 -1
  146. package/dist-es5/interfaces/ai/context/ISession.js +1 -1
  147. package/dist-es5/interfaces/ai/context/ISessionManager.js +1 -1
  148. package/dist-es5/interfaces/ai/context/ITelemetryTrace.js +1 -1
  149. package/dist-es5/interfaces/ai/context/IUser.js +1 -1
  150. package/dist-es5/interfaces/ai/context/IWeb.js +1 -1
  151. package/dist-es5/interfaces/ai/contracts/AvailabilityData.js +1 -1
  152. package/dist-es5/interfaces/ai/contracts/ContextTagKeys.js +1 -1
  153. package/dist-es5/interfaces/ai/contracts/DataPointType.js +1 -1
  154. package/dist-es5/interfaces/ai/contracts/DependencyKind.js +1 -1
  155. package/dist-es5/interfaces/ai/contracts/DependencySourceType.js +1 -1
  156. package/dist-es5/interfaces/ai/contracts/IBase.js +1 -1
  157. package/dist-es5/interfaces/ai/contracts/IData.js +1 -1
  158. package/dist-es5/interfaces/ai/contracts/IDataPoint.js +1 -1
  159. package/dist-es5/interfaces/ai/contracts/IDomain.js +1 -1
  160. package/dist-es5/interfaces/ai/contracts/IEventData.js +1 -1
  161. package/dist-es5/interfaces/ai/contracts/IExceptionData.js +1 -1
  162. package/dist-es5/interfaces/ai/contracts/IExceptionDetails.js +1 -1
  163. package/dist-es5/interfaces/ai/contracts/IMessageData.js +1 -1
  164. package/dist-es5/interfaces/ai/contracts/IMetricData.js +1 -1
  165. package/dist-es5/interfaces/ai/contracts/IPageViewData.js +1 -1
  166. package/dist-es5/interfaces/ai/contracts/IPageViewPerfData.js +1 -1
  167. package/dist-es5/interfaces/ai/contracts/IRemoteDependencyData.js +1 -1
  168. package/dist-es5/interfaces/ai/contracts/IStackFrame.js +1 -1
  169. package/dist-es5/interfaces/ai/contracts/SeverityLevel.js +1 -1
  170. package/dist-es5/interfaces/ai/telemetry/IEnvelope.js +1 -1
  171. package/dist-es5/interfaces/ai/telemetry/ISerializable.js +1 -1
  172. package/dist-es5/interfaces/config/IConfigDefaults.js +1 -1
  173. package/dist-es5/interfaces/config/IDynamicConfigHandler.js +1 -1
  174. package/dist-es5/interfaces/config/IDynamicPropertyHandler.js +1 -1
  175. package/dist-es5/interfaces/config/IDynamicWatcher.js +1 -1
  176. package/dist-es5/interfaces/config/_IDynamicConfigHandlerState.js +1 -1
  177. package/dist-es5/interfaces/ext/DataModels.js +6 -0
  178. package/dist-es5/interfaces/ext/DataModels.js.map +1 -0
  179. package/dist-es5/interfaces/otel/IOTelApi.js +1 -1
  180. package/dist-es5/interfaces/otel/IOTelApiCtx.js +1 -1
  181. package/dist-es5/interfaces/otel/IOTelAttributes.js +1 -1
  182. package/dist-es5/interfaces/otel/attribute/IAttributeContainer.js +1 -1
  183. package/dist-es5/interfaces/otel/config/IOTelAttributeLimits.js +1 -1
  184. package/dist-es5/interfaces/otel/config/IOTelConfig.js +1 -1
  185. package/dist-es5/interfaces/otel/config/IOTelErrorHandlers.js +1 -1
  186. package/dist-es5/interfaces/otel/config/IOTelSpanLimits.js +1 -1
  187. package/dist-es5/interfaces/otel/config/IOTelTraceCfg.js +1 -1
  188. package/dist-es5/interfaces/otel/trace/IOTelSpan.js +1 -1
  189. package/dist-es5/interfaces/otel/trace/IOTelSpanContext.js +1 -1
  190. package/dist-es5/interfaces/otel/trace/IOTelSpanCtx.js +1 -1
  191. package/dist-es5/interfaces/otel/trace/IOTelSpanOptions.js +1 -1
  192. package/dist-es5/interfaces/otel/trace/IOTelSpanStatus.js +1 -1
  193. package/dist-es5/interfaces/otel/trace/IOTelTraceApi.js +1 -1
  194. package/dist-es5/interfaces/otel/trace/IOTelTraceState.js +1 -1
  195. package/dist-es5/interfaces/otel/trace/IOTelTracer.js +1 -1
  196. package/dist-es5/interfaces/otel/trace/IOTelTracerOptions.js +1 -1
  197. package/dist-es5/interfaces/otel/trace/IOTelTracerProvider.js +1 -1
  198. package/dist-es5/interfaces/otel/trace/IReadableSpan.js +1 -1
  199. package/dist-es5/internal/EventHelpers.js +5 -5
  200. package/dist-es5/internal/EventHelpers.js.map +1 -1
  201. package/dist-es5/internal/attributeHelpers.js +1 -1
  202. package/dist-es5/internal/commonUtils.js +1 -1
  203. package/dist-es5/internal/handleErrors.js +1 -1
  204. package/dist-es5/internal/noopHelpers.js +1 -1
  205. package/dist-es5/internal/timeHelpers.js +1 -1
  206. package/dist-es5/otel/api/OTelApi.js +1 -1
  207. package/dist-es5/otel/api/errors/OTelError.js +1 -1
  208. package/dist-es5/otel/api/errors/OTelInvalidAttributeError.js +1 -1
  209. package/dist-es5/otel/api/errors/OTelSpanError.js +1 -1
  210. package/dist-es5/otel/api/trace/span.js +4 -4
  211. package/dist-es5/otel/api/trace/span.js.map +1 -1
  212. package/dist-es5/otel/api/trace/spanContext.js +1 -1
  213. package/dist-es5/otel/api/trace/traceApi.js +1 -1
  214. package/dist-es5/otel/api/trace/traceProvider.js +3 -3
  215. package/dist-es5/otel/api/trace/traceProvider.js.map +1 -1
  216. package/dist-es5/otel/api/trace/traceState.js +1 -1
  217. package/dist-es5/otel/api/trace/tracer.js +1 -1
  218. package/dist-es5/otel/api/trace/tracerProvider.js +1 -1
  219. package/dist-es5/otel/api/trace/utils.js +1 -1
  220. package/dist-es5/otel/attribute/SemanticConventions.js +1 -1
  221. package/dist-es5/otel/attribute/attributeContainer.js +1 -1
  222. package/dist-es5/telemetry/ConnectionStringParser.js +1 -1
  223. package/dist-es5/telemetry/RequestResponseHeaders.js +1 -1
  224. package/dist-es5/telemetry/TelemetryItemCreator.js +1 -1
  225. package/dist-es5/telemetry/W3cTraceState.js +1 -1
  226. package/dist-es5/telemetry/ai/Common/Data.js +3 -2
  227. package/dist-es5/telemetry/ai/Common/Data.js.map +1 -1
  228. package/dist-es5/telemetry/ai/Common/DataPoint.js +1 -1
  229. package/dist-es5/telemetry/ai/Common/DataSanitizer.js +1 -1
  230. package/dist-es5/telemetry/ai/Common/Envelope.js +1 -1
  231. package/dist-es5/telemetry/ai/DataTypes.js +1 -1
  232. package/dist-es5/telemetry/ai/EnvelopeTypes.js +1 -1
  233. package/dist-es5/telemetry/ai/Event.js +1 -1
  234. package/dist-es5/telemetry/ai/Exception.js +1 -1
  235. package/dist-es5/telemetry/ai/Metric.js +1 -1
  236. package/dist-es5/telemetry/ai/PageView.js +1 -1
  237. package/dist-es5/telemetry/ai/PageViewPerformance.js +1 -1
  238. package/dist-es5/telemetry/ai/RemoteDependencyData.js +1 -1
  239. package/dist-es5/telemetry/ai/Trace.js +1 -1
  240. package/dist-es5/utils/CoreUtils.js +1 -1
  241. package/dist-es5/utils/DataCacheHelper.js +2 -2
  242. package/dist-es5/utils/DataCacheHelper.js.map +1 -1
  243. package/dist-es5/utils/DomHelperFuncs.js +1 -1
  244. package/dist-es5/utils/EnvUtils.js +16 -5
  245. package/dist-es5/utils/EnvUtils.js.map +1 -1
  246. package/dist-es5/utils/HelperFuncs.js +4 -4
  247. package/dist-es5/utils/HelperFuncs.js.map +1 -1
  248. package/dist-es5/utils/Offline.js +1 -1
  249. package/dist-es5/utils/RandomHelper.js +1 -1
  250. package/dist-es5/utils/StorageHelperFuncs.js +1 -1
  251. package/dist-es5/utils/TraceParent.js +5 -5
  252. package/dist-es5/utils/TraceParent.js.map +1 -1
  253. package/dist-es5/utils/UrlHelperFuncs.js +1 -1
  254. package/dist-es5/utils/Util.js +4 -4
  255. package/dist-es5/utils/Util.js.map +1 -1
  256. package/package.json +75 -78
  257. package/types/applicationinsights-core-js.d.ts +830 -11
  258. package/types/applicationinsights-core-js.namespaced.d.ts +829 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extSpanUtils.js.map","sources":["extSpanUtils.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\r\n// Licensed under the MIT License.\r\nimport { arrIncludes, asString, getLazy, getNavigator, isBoolean, isNullOrUndefined, isNumber, isString, strLower, strStartsWith, throwError } from \"@nevware21/ts-utils\";\r\nimport { _DYN_ATTRIBUTES, _DYN_BASE_DATA, _DYN_CONFIG, _DYN_DATA, _DYN_DURATION, _DYN_I_KEY, _DYN_KIND, _DYN_NAME, _DYN_PARENT_SPAN_CONTEXT, _DYN_SPAN_CONTEXT, _DYN_SPAN_ID, _DYN_START_TIME, _DYN_STATUS, _DYN_TRACE_FLAGS, _DYN_TRACE_ID, _DYN_TRACE_STATE, _DYN_USER_AGENT } from \"../__DynamicConstants\";\r\nimport { STR_NOT_SPECIFIED } from \"../constants/InternalConstants\";\r\nimport { getHttpClientIp, getHttpHost, getHttpMethod, getHttpScheme, getHttpStatusCode, getHttpUrl, getSyntheticType, getUserAgent } from \"../internal/commonUtils\";\r\nimport { hrTimeToMilliseconds } from \"../internal/timeHelpers\";\r\nimport { ATTR_CLIENT_ADDRESS, ATTR_CLIENT_PORT, ATTR_ENDUSER_ID, ATTR_ENDUSER_PSEUDO_ID, ATTR_ERROR_TYPE, ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, ATTR_EXCEPTION_TYPE, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_NETWORK_TRANSPORT, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_QUERY, ATTR_URL_SCHEME, ATTR_USER_AGENT_ORIGINAL, EXP_ATTR_ENDUSER_ID, EXP_ATTR_ENDUSER_PSEUDO_ID, EXP_ATTR_SYNTHETIC_TYPE, SEMATTRS_DB_NAME, SEMATTRS_DB_OPERATION, SEMATTRS_DB_STATEMENT, SEMATTRS_DB_SYSTEM, SEMATTRS_ENDUSER_ID, SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_EXCEPTION_TYPE, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_HTTP_FLAVOR, SEMATTRS_HTTP_HOST, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_TARGET, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_NET_HOST_IP, SEMATTRS_NET_HOST_NAME, SEMATTRS_NET_HOST_PORT, SEMATTRS_NET_PEER_IP, SEMATTRS_NET_PEER_NAME, SEMATTRS_NET_PEER_PORT, SEMATTRS_NET_TRANSPORT, SEMATTRS_PEER_SERVICE, SEMATTRS_RPC_GRPC_STATUS_CODE, SEMATTRS_RPC_SYSTEM } from \"../otel/attribute/SemanticConventions\";\r\nimport { createAttributeContainer } from \"../otel/attribute/attributeContainer\";\r\nimport { fieldRedaction } from \"../utils/EnvUtils\";\r\nimport { toISOString } from \"../utils/HelperFuncs\";\r\n/**\r\n * Azure SDK namespace.\r\n * @internal\r\n */\r\nvar AzNamespace = \"az.namespace\";\r\nvar AzResourceNamespace = \"azure.resource_provider.namespace\";\r\nvar PORT_REGEX = ( /*#__PURE__*/getLazy(function () { return new RegExp(/(https?)(:\\/\\/.*)(:\\d+)(\\S*)/); }));\r\nvar HTTP_DOT = \"http.\";\r\nvar _MS_PROCESSED_BY_METRICS_EXTRACTORS = \"_MS.ProcessedByMetricExtractors\";\r\n/**\r\n * Legacy HTTP semantic convention values\r\n * @internal\r\n */\r\nvar _ignoreSemanticValues = ( /* #__PURE__*/getLazy(_initIgnoreSemanticValues));\r\n/* #__NO_SIDE_EFFECTS__ */\r\nfunction _initIgnoreSemanticValues() {\r\n return [\r\n // Internal Microsoft attributes\r\n _MS_PROCESSED_BY_METRICS_EXTRACTORS,\r\n // Legacy HTTP semantic values\r\n SEMATTRS_NET_PEER_IP,\r\n SEMATTRS_NET_PEER_NAME,\r\n SEMATTRS_NET_HOST_IP,\r\n SEMATTRS_PEER_SERVICE,\r\n SEMATTRS_HTTP_USER_AGENT,\r\n SEMATTRS_HTTP_METHOD,\r\n SEMATTRS_HTTP_URL,\r\n SEMATTRS_HTTP_STATUS_CODE,\r\n SEMATTRS_HTTP_ROUTE,\r\n SEMATTRS_HTTP_HOST,\r\n SEMATTRS_DB_SYSTEM,\r\n SEMATTRS_DB_STATEMENT,\r\n SEMATTRS_DB_OPERATION,\r\n SEMATTRS_DB_NAME,\r\n SEMATTRS_RPC_SYSTEM,\r\n SEMATTRS_RPC_GRPC_STATUS_CODE,\r\n SEMATTRS_EXCEPTION_TYPE,\r\n SEMATTRS_EXCEPTION_MESSAGE,\r\n SEMATTRS_EXCEPTION_STACKTRACE,\r\n SEMATTRS_HTTP_SCHEME,\r\n SEMATTRS_HTTP_TARGET,\r\n SEMATTRS_HTTP_FLAVOR,\r\n SEMATTRS_NET_TRANSPORT,\r\n SEMATTRS_NET_HOST_NAME,\r\n SEMATTRS_NET_HOST_PORT,\r\n SEMATTRS_NET_PEER_PORT,\r\n SEMATTRS_HTTP_CLIENT_IP,\r\n SEMATTRS_ENDUSER_ID,\r\n HTTP_DOT + \"status_text\",\r\n // http Semabtic conventions\r\n ATTR_CLIENT_ADDRESS,\r\n ATTR_CLIENT_PORT,\r\n ATTR_SERVER_ADDRESS,\r\n ATTR_SERVER_PORT,\r\n ATTR_URL_FULL,\r\n ATTR_URL_PATH,\r\n ATTR_URL_QUERY,\r\n ATTR_URL_SCHEME,\r\n ATTR_ERROR_TYPE,\r\n ATTR_NETWORK_LOCAL_ADDRESS,\r\n ATTR_NETWORK_LOCAL_PORT,\r\n ATTR_NETWORK_PROTOCOL_NAME,\r\n ATTR_NETWORK_PEER_ADDRESS,\r\n ATTR_NETWORK_PEER_PORT,\r\n ATTR_NETWORK_PROTOCOL_VERSION,\r\n ATTR_NETWORK_TRANSPORT,\r\n ATTR_USER_AGENT_ORIGINAL,\r\n ATTR_HTTP_REQUEST_METHOD,\r\n ATTR_HTTP_RESPONSE_STATUS_CODE,\r\n ATTR_EXCEPTION_TYPE,\r\n ATTR_EXCEPTION_MESSAGE,\r\n ATTR_EXCEPTION_STACKTRACE,\r\n EXP_ATTR_ENDUSER_ID,\r\n EXP_ATTR_ENDUSER_PSEUDO_ID,\r\n EXP_ATTR_SYNTHETIC_TYPE,\r\n // Azure SDK attributes are not included as they are not part of the span attributes\r\n AzNamespace,\r\n AzResourceNamespace,\r\n \"az.client_request_id\",\r\n \"azure.client.id\",\r\n \"az.service_request_id\",\r\n \"azure.service.request.id\"\r\n ];\r\n}\r\nfunction _applyExtValue(ext, extName, name, value, overwriteExt) {\r\n if (isString(value) || isNumber(value) || isBoolean(value)) {\r\n var target = ext[extName] = ext[extName] || {};\r\n _applyValue(target, name, value, overwriteExt);\r\n }\r\n}\r\nfunction _applyValue(target, name, value, overwriteTarget) {\r\n if (target) {\r\n if (isString(value) || isNumber(value) || isBoolean(value)) {\r\n var targetValue = target[name];\r\n if (!overwriteTarget && (targetValue || isString(targetValue) || isNumber(targetValue) || isBoolean(targetValue))) {\r\n value = targetValue;\r\n }\r\n target[name] = value;\r\n }\r\n }\r\n return target;\r\n}\r\nfunction _populateExtensionsFromSpan(telemetryItem, span, container) {\r\n var ext = telemetryItem.ext = telemetryItem.ext || {};\r\n // Map OpenTelemetry enduser attributes to Application Insights user attributes\r\n var endUserId = container.get(ATTR_ENDUSER_ID);\r\n if (endUserId) {\r\n _applyExtValue(ext, \"user\", \"authId\", asString(endUserId), false);\r\n }\r\n var endUserPseudoId = container.get(ATTR_ENDUSER_PSEUDO_ID);\r\n if (endUserPseudoId) {\r\n _applyExtValue(ext, \"user\", \"id\", asString(endUserPseudoId), false);\r\n }\r\n}\r\n/**\r\n * Check to see if the key is in the list of known properties to ignore (exclude)\r\n * from part C properties population.\r\n * @param key - the property key to check\r\n * @param contextKeys - The current context keys\r\n * @returns true if the key should be ignored, false otherwise\r\n */\r\nfunction _isIgnorePartCKey(key) {\r\n var result = false;\r\n if (arrIncludes(_ignoreSemanticValues.v, key)) {\r\n // The key is in set of known keys to ignore\r\n result = true;\r\n }\r\n else if (strStartsWith(key, \"microsoft.\")) {\r\n // Ignoring all ALL keys starting with \"microsoft.\"\r\n result = true;\r\n }\r\n return result;\r\n}\r\nfunction _populatePartC(item, container) {\r\n if (container) {\r\n var partC_1 = item[_DYN_DATA /* @min:%2edata */] = (item[_DYN_DATA /* @min:%2edata */] || {});\r\n _applyValue(partC_1, \"httpHost\", getHttpHost(container), false);\r\n _applyValue(partC_1, \"httpScheme\", getHttpScheme(container), false);\r\n _applyValue(partC_1, \"httpClientIp\", getHttpClientIp(container), false);\r\n _applyValue(partC_1, \"httpUserAgent\", getUserAgent(container), false);\r\n _applyValue(partC_1, \"httpRoute\", container.get(SEMATTRS_HTTP_ROUTE), false);\r\n _applyValue(partC_1, \"netPeerName\", container.get(SEMATTRS_NET_PEER_NAME), false);\r\n _applyValue(partC_1, \"netPeerPort\", container.get(SEMATTRS_NET_PEER_PORT), false);\r\n _applyValue(partC_1, \"netPeerIp\", container.get(SEMATTRS_NET_PEER_IP), false);\r\n _applyValue(partC_1, \"peerService\", container.get(\"service.name\") || container.get(SEMATTRS_PEER_SERVICE), false);\r\n var syntheticSource = getSyntheticType(container);\r\n if (!!syntheticSource) {\r\n _applyValue(partC_1, \"userAgentSyntheticType\", syntheticSource, false);\r\n }\r\n var nav = getNavigator();\r\n if (nav && nav[_DYN_USER_AGENT /* @min:%2euserAgent */]) {\r\n _applyValue(partC_1, \"userAgentOriginal\", nav[_DYN_USER_AGENT /* @min:%2euserAgent */], false);\r\n }\r\n // Azure SDK fields\r\n _applyValue(partC_1, \"azureClientRequestId\", container.get(\"azure.client.id\") || container.get(\"az.client_request_id\"), false);\r\n _applyValue(partC_1, \"azureServiceRequestId\", container.get(\"azure.service.request.id\") || container.get(\"az.service_request_id\"), false);\r\n var sampleRate = container.get(\"microsoft.sample_rate\");\r\n if (!isNullOrUndefined(sampleRate)) {\r\n _applyValue(partC_1, \"sampleRate\", sampleRate, false);\r\n }\r\n container.forEach(function (key, value) {\r\n // Avoid duplication ignoring fields already mapped.\r\n if (!_isIgnorePartCKey(key)) {\r\n partC_1[key] = value;\r\n }\r\n });\r\n }\r\n}\r\nfunction _populateHttpProperties(otelSpanTelemetry, container, httpMethod, config) {\r\n if (httpMethod) {\r\n // Step the HTTP method\r\n _applyValue(otelSpanTelemetry, \"httpMethod\", httpMethod, false);\r\n // HTTP Dependency\r\n var httpUrl = getHttpUrl(container);\r\n if (httpUrl) {\r\n try {\r\n // Remove default port\r\n var res = PORT_REGEX.v.exec(asString(httpUrl));\r\n if (res !== null) {\r\n var protocol = res[1];\r\n var port = res[3];\r\n if ((protocol === \"https\" && port === \":443\") ||\r\n (protocol === \"http\" && port === \":80\")) {\r\n // Drop port\r\n httpUrl = res[1] + res[2] + res[4];\r\n }\r\n }\r\n }\r\n catch (_a) {\r\n /* no-op */\r\n }\r\n _applyValue(otelSpanTelemetry, \"httpUrl\", fieldRedaction(asString(httpUrl), config), false);\r\n }\r\n var httpStatusCode = getHttpStatusCode(container);\r\n if (httpStatusCode) {\r\n _applyValue(otelSpanTelemetry, \"httpStatusCode\", httpStatusCode, false);\r\n }\r\n }\r\n}\r\nfunction _populateDbProperties(otelSpanTelemetry, container, dbSystem) {\r\n if (dbSystem) {\r\n _applyValue(otelSpanTelemetry, \"dbSystem\", dbSystem, false);\r\n // Set the statement\r\n _applyValue(otelSpanTelemetry, \"dbStatement\", container.get(SEMATTRS_DB_STATEMENT) || container.get(SEMATTRS_DB_OPERATION), false);\r\n _applyValue(otelSpanTelemetry, \"dbName\", container.get(SEMATTRS_DB_NAME) || dbSystem || \"<undefined>\", false);\r\n }\r\n}\r\nfunction _populateRpcDependencyProperties(otelSpanTelemetry, container, rpcSystem) {\r\n if (rpcSystem) {\r\n _applyValue(otelSpanTelemetry, \"rpcSystem\", strLower(rpcSystem), false);\r\n _applyValue(otelSpanTelemetry, \"rpcGrpcStatusCode\", container.get(SEMATTRS_RPC_GRPC_STATUS_CODE), false);\r\n }\r\n}\r\nfunction _createOTelSpanTelemetryItem(core, span) {\r\n var container = span.attribContainer || createAttributeContainer(span[_DYN_ATTRIBUTES /* @min:%2eattributes */]);\r\n var spanCtx = span[_DYN_SPAN_CONTEXT /* @min:%2espanContext */]();\r\n var statusCode = span[_DYN_STATUS /* @min:%2estatus */] ? span[_DYN_STATUS /* @min:%2estatus */].code : 0 /* eOTelSpanStatusCode.UNSET */;\r\n var spanTelemetry = {\r\n name: span[_DYN_NAME /* @min:%2ename */],\r\n kind: span[_DYN_KIND /* @min:%2ekind */],\r\n startTime: toISOString(new Date(hrTimeToMilliseconds(span[_DYN_START_TIME /* @min:%2estartTime */]))),\r\n success: statusCode !== 0 /* eOTelSpanStatusCode.UNSET */ ? statusCode !== 2 /* eOTelSpanStatusCode.ERROR */ : (Number(getHttpStatusCode(container)) || 0) < 400,\r\n duration: hrTimeToMilliseconds(span[_DYN_DURATION /* @min:%2eduration */])\r\n //azureResourceProvider: undefined, // Not currently supported\r\n //links: UNDEFINED_VALUE, // Not currently supported\r\n };\r\n // Set the parentId if available\r\n var parentCtx = span[_DYN_PARENT_SPAN_CONTEXT /* @min:%2eparentSpanContext */] || (spanCtx ? spanCtx.parentCtx : null);\r\n _applyValue(spanTelemetry, \"parentId\", span.parentSpanId || (parentCtx ? parentCtx[_DYN_SPAN_ID /* @min:%2espanId */] : null), false);\r\n if (spanCtx) {\r\n var traceState = spanCtx[_DYN_TRACE_STATE /* @min:%2etraceState */];\r\n if (traceState && !traceState.isEmpty) {\r\n _applyValue(spanTelemetry, \"traceState\", traceState.hdrs(1)[0], false);\r\n }\r\n }\r\n _populateHttpProperties(spanTelemetry, container, getHttpMethod(container), core[_DYN_CONFIG /* @min:%2econfig */]);\r\n _populateDbProperties(spanTelemetry, container, container.get(SEMATTRS_DB_SYSTEM));\r\n _populateRpcDependencyProperties(spanTelemetry, container, container.get(SEMATTRS_RPC_SYSTEM));\r\n _applyValue(spanTelemetry, \"azureResourceProvider\", container.get(AzResourceNamespace) || container.get(AzNamespace), false);\r\n return _createTelemetryItem(spanTelemetry, span, \"OTelSpan\", \"Ms.Web.Span\");\r\n}\r\nfunction _createTelemetryItem(item, span, baseType, eventName) {\r\n eventName = eventName || STR_NOT_SPECIFIED;\r\n if (isNullOrUndefined(item) ||\r\n isNullOrUndefined(baseType) ||\r\n isNullOrUndefined(eventName)) {\r\n throwError(\"Input doesn't contain all required fields\");\r\n }\r\n var iKey = \"\";\r\n if (item[_DYN_I_KEY /* @min:%2eiKey */]) {\r\n iKey = item[_DYN_I_KEY /* @min:%2eiKey */];\r\n delete item[_DYN_I_KEY /* @min:%2eiKey */];\r\n }\r\n var telemetryItem = {\r\n name: eventName,\r\n time: toISOString(span.endTime ? new Date(hrTimeToMilliseconds(span.endTime)) : new Date()),\r\n iKey: iKey,\r\n ext: {},\r\n baseType: baseType,\r\n baseData: item,\r\n data: {} // part C\r\n };\r\n return telemetryItem;\r\n}\r\n/**\r\n * Create an extended common schema telemetry item from the provided span\r\n * @param core - The app insights core instance\r\n * @param span - The span to create the telemetry item from\r\n * @returns A new extended telemetry item or null if the span kind is not supported\r\n */\r\nexport function createExtendedTelemetryItemFromSpan(core, span) {\r\n var telemetryItem = _createOTelSpanTelemetryItem(core, span);\r\n var container = span.attribContainer || createAttributeContainer(span[_DYN_ATTRIBUTES /* @min:%2eattributes */]);\r\n if (telemetryItem) {\r\n // Set the Span common schema fields\r\n // Set start time for the telemetry item from the event, not the time it is being processed (the default)\r\n // The channel envelope creator uses this value when creating the envelope only when defined, otherwise it\r\n // uses the time when the item is being processed\r\n var partB = telemetryItem[_DYN_BASE_DATA /* @min:%2ebaseData */] = telemetryItem[_DYN_BASE_DATA /* @min:%2ebaseData */] || {};\r\n partB[_DYN_START_TIME /* @min:%2estartTime */] = new Date(hrTimeToMilliseconds(span[_DYN_START_TIME /* @min:%2estartTime */]));\r\n var spanContext = span[_DYN_SPAN_CONTEXT /* @min:%2espanContext */]();\r\n if (spanContext) {\r\n // Add dt extension to the telemetry item\r\n var ext = telemetryItem.ext = telemetryItem.ext || {};\r\n var dt = ext[\"dt\"] = ext[\"dt\"] || {};\r\n // Don't overwrite any existing values\r\n _applyValue(dt, \"spanId\", spanContext[_DYN_SPAN_ID /* @min:%2espanId */], false);\r\n _applyValue(dt, \"traceId\", spanContext[_DYN_TRACE_ID /* @min:%2etraceId */], false);\r\n _applyValue(dt, \"traceFlags\", spanContext[_DYN_TRACE_FLAGS /* @min:%2etraceFlags */], false);\r\n }\r\n _populateExtensionsFromSpan(telemetryItem, span, container);\r\n _populatePartC(telemetryItem, container);\r\n // Azure SDK\r\n }\r\n return telemetryItem;\r\n}\r\n//# sourceMappingURL=extSpanUtils.js.map"],"names":[],"mappings":";;;;AAAA;AACkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -0,0 +1,412 @@
1
+ /*
2
+ * Application Insights JavaScript SDK - Core, 3.4.1
3
+ * Copyright (c) Microsoft and contributors. All rights reserved.
4
+ */
5
+ var _a;
6
+ /**
7
+ * Utils.ts
8
+ * @author Abhilash Panwar (abpanwar) Hector Hernandez (hectorh)
9
+ * @copyright Microsoft 2018
10
+ * File containing utility functions.
11
+ */
12
+ import { arrForEach, getInst as getGlobalInst, getNavigator, hasDocument, hasWindow, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isString, isUndefined, objForEachKey, perfNow, strIndexOf, strLeft } from "@nevware21/ts-utils";
13
+ import { _DYN_CALL, _DYN_HAS_OWN_PROPERTY, _DYN_INDEX_OF, _DYN_KIND, _DYN_LENGTH, _DYN_PROCESS_TELEMETRY_ST6, _DYN_REPLACE, _DYN_STRINGIFY, _DYN_TIMINGS, _DYN_TO_LOWER_CASE, _DYN_TO_STRING, _DYN_USER_AGENT, _DYN_VALUE } from "../__DynamicConstants";
14
+ import { STR_EMPTY } from "../constants/InternalConstants";
15
+ import { newGuid } from "../utils/CoreUtils";
16
+ import { isReactNative } from "../utils/EnvUtils";
17
+ /**
18
+ * Identifies the version for the extended SDK
19
+ */
20
+ export var ExtVersion = '4.4.1';
21
+ /**
22
+ * Identifies the full version for the extended SDK
23
+ */
24
+ export var ExtFullVersionString = "1DS-Web-JS-" + ExtVersion;
25
+ /**
26
+ * Identifies the version for the extended SDK (legacy constant)
27
+ * @deprecated Use {@link ExtVersion} instead
28
+ */
29
+ export var Version = ExtVersion;
30
+ /**
31
+ * Identifies the full version for the extended SDK (legacy constant)
32
+ * @deprecated Use {@link ExtFullVersionString} instead
33
+ */
34
+ export var FullVersionString = ExtFullVersionString;
35
+ var ObjHasOwnProperty = Object.prototype[_DYN_HAS_OWN_PROPERTY /* @min:%2ehasOwnProperty */];
36
+ // Defining here so we don't need to take (import) the ApplicationInsights Common module
37
+ var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
38
+ var strWithCredentials = "withCredentials";
39
+ var strTimeout = "timeout";
40
+ // If value is array just get the type for the first element
41
+ var _fieldTypeEventPropMap = (_a = {},
42
+ _a[0 /* FieldValueSanitizerType.NotSet */] = 0 /* eEventPropertyType.Unspecified */,
43
+ _a[2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,
44
+ _a[1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,
45
+ _a[3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,
46
+ _a[4096 /* FieldValueSanitizerType.Array */ | 2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,
47
+ _a[4096 /* FieldValueSanitizerType.Array */ | 1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,
48
+ _a[4096 /* FieldValueSanitizerType.Array */ | 3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,
49
+ _a);
50
+ /**
51
+ * @ignore
52
+ */
53
+ // let _uaDisallowsSameSiteNone = null;
54
+ var uInt8ArraySupported = ( /* #__PURE__*/null);
55
+ // var _areCookiesAvailable: boolean | undefined;
56
+ /**
57
+ * Checks if document object is available
58
+ */
59
+ export var isDocumentObjectAvailable = ( /* #__PURE__*/hasDocument());
60
+ /**
61
+ * Checks if window object is available
62
+ */
63
+ export var isWindowObjectAvailable = ( /* #__PURE__*/hasWindow());
64
+ /**
65
+ * Checks if value is assigned to the given param.
66
+ * @param value - The token from which the tenant id is to be extracted.
67
+ * @returns True/false denoting if value is assigned to the param.
68
+ */
69
+ export function isValueAssigned(value) {
70
+ /// <summary> takes a value and checks for undefined, null and empty string </summary>
71
+ /// <param type="any"> value to be tested </param>
72
+ /// <returns> true if value is null undefined or emptyString </returns>
73
+ return !(value === STR_EMPTY || isNullOrUndefined(value));
74
+ }
75
+ /**
76
+ * Gets the tenant id from the tenant token.
77
+ * @param apiKey - The token from which the tenant id is to be extracted.
78
+ * @returns The tenant id.
79
+ */
80
+ export function getTenantId(apiKey) {
81
+ if (apiKey) {
82
+ var indexTenantId = strIndexOf(apiKey, "-");
83
+ if (indexTenantId > -1) {
84
+ return strLeft(apiKey, indexTenantId);
85
+ }
86
+ }
87
+ return STR_EMPTY;
88
+ }
89
+ /**
90
+ * Checks if Uint8Array are available in the current environment. Safari and Firefox along with
91
+ * ReactNative are known to not support Uint8Array properly.
92
+ * @returns True if available, false otherwise.
93
+ */
94
+ export function isUint8ArrayAvailable() {
95
+ if (uInt8ArraySupported === null) {
96
+ uInt8ArraySupported = !isUndefined(Uint8Array) && !isSafariOrFirefox() && !isReactNative();
97
+ }
98
+ return uInt8ArraySupported;
99
+ }
100
+ /**
101
+ * Checks if the value is a valid EventLatency.
102
+ * @param value - The value that needs to be checked.
103
+ * @returns True if the value is in AWTEventLatency, false otherwise.
104
+ */
105
+ export function isLatency(value) {
106
+ if (value && isNumber(value) && value >= 1 /* EventLatencyValue.Normal */ && value <= 4 /* EventLatencyValue.Immediate */) {
107
+ return true;
108
+ }
109
+ return false;
110
+ }
111
+ /**
112
+ * Sanitizes the Property. It checks the that the property name and value are valid. It also
113
+ * checks/populates the correct type and pii of the property value.
114
+ * @param name - property name - The property name.
115
+ * @param property - The property value or an IEventProperty containing value,
116
+ * type ,pii and customer content.
117
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
118
+ */
119
+ export function sanitizeProperty(name, property, stringifyObjects) {
120
+ // Check that property is valid
121
+ if ((!property && !isValueAssigned(property)) || typeof name !== "string") {
122
+ return null;
123
+ }
124
+ // Perf optimization -- only need to get the type once not multiple times
125
+ var propType = typeof property;
126
+ // If the property isn't IEventProperty (and is either string, number, boolean or array), convert it into one.
127
+ if (propType === "string" || propType === "number" || propType === "boolean" || isArray(property)) {
128
+ property = { value: property };
129
+ }
130
+ else if (propType === "object" && !ObjHasOwnProperty[_DYN_CALL /* @min:%2ecall */](property, "value")) {
131
+ property = { value: stringifyObjects ? JSON[_DYN_STRINGIFY /* @min:%2estringify */](property) : property };
132
+ }
133
+ else if (isNullOrUndefined(property[_DYN_VALUE /* @min:%2evalue */])
134
+ || property[_DYN_VALUE /* @min:%2evalue */] === STR_EMPTY || (!isString(property[_DYN_VALUE /* @min:%2evalue */])
135
+ && !isNumber(property[_DYN_VALUE /* @min:%2evalue */]) && !isBoolean(property[_DYN_VALUE /* @min:%2evalue */])
136
+ && !isArray(property[_DYN_VALUE /* @min:%2evalue */]))) {
137
+ // Since property is IEventProperty, we need to validate its value
138
+ return null;
139
+ }
140
+ // We need to check that if the property value is an array, it is valid
141
+ if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) &&
142
+ !isArrayValid(property[_DYN_VALUE /* @min:%2evalue */])) {
143
+ return null;
144
+ }
145
+ // If either pii or cc is set convert value to string (since only string pii/cc is allowed).
146
+ // If the value is a complex type like an array that can't be converted to string we will drop
147
+ // the property.
148
+ if (!isNullOrUndefined(property[_DYN_KIND /* @min:%2ekind */])) {
149
+ if (isArray(property[_DYN_VALUE /* @min:%2evalue */]) || !isValueKind(property[_DYN_KIND /* @min:%2ekind */])) {
150
+ return null;
151
+ }
152
+ property[_DYN_VALUE /* @min:%2evalue */] = property[_DYN_VALUE /* @min:%2evalue */][_DYN_TO_STRING /* @min:%2etoString */]();
153
+ }
154
+ return property;
155
+ }
156
+ export function getCommonSchemaMetaData(value, kind, type) {
157
+ var encodedTypeValue = -1;
158
+ if (!isUndefined(value)) {
159
+ if (kind > 0) {
160
+ if (kind === 32 /* eValueKind.CustomerContent_GenericContent */) {
161
+ // encode customer content. Value can only be string. bit 13-16 are for cc
162
+ encodedTypeValue = (1 << 13);
163
+ }
164
+ else if (kind <= 13) {
165
+ // encode PII. Value can only be string. bits 5-12 are for Pii
166
+ encodedTypeValue = (kind << 5);
167
+ }
168
+ }
169
+ // isDataType checks that the "type" is a number so we don't need to check for undefined
170
+ if (isDataType(type)) {
171
+ // Data Type is provided and valid, so use that
172
+ if (encodedTypeValue === -1) {
173
+ // Don't return -1
174
+ encodedTypeValue = 0;
175
+ }
176
+ encodedTypeValue |= type;
177
+ }
178
+ else {
179
+ var propType = _fieldTypeEventPropMap[getFieldValueType(value)] || -1;
180
+ if (encodedTypeValue !== -1 && propType !== -1) {
181
+ // pii exists so we must return correct type
182
+ encodedTypeValue |= propType;
183
+ }
184
+ else if (propType === 6 /* eEventPropertyType.Double */) {
185
+ encodedTypeValue = propType;
186
+ }
187
+ }
188
+ }
189
+ return encodedTypeValue;
190
+ }
191
+ /**
192
+ * Helper to get and decode the cookie value using decodeURIComponent, this is for historical
193
+ * backward compatibility where the document.cookie value was decoded before parsing.
194
+ * @param cookieMgr - The cookie manager to use
195
+ * @param name - The name of the cookie to get
196
+ * @param decode - A flag to indicate whether the cookie value should be decoded
197
+ * @returns The decoded cookie value (if available) otherwise an empty string.
198
+ */
199
+ export function getCookieValue(cookieMgr, name, decode) {
200
+ if (decode === void 0) { decode = true; }
201
+ var cookieValue;
202
+ if (cookieMgr) {
203
+ cookieValue = cookieMgr.get(name);
204
+ if (decode && cookieValue && decodeURIComponent) {
205
+ cookieValue = decodeURIComponent(cookieValue);
206
+ }
207
+ }
208
+ return cookieValue || STR_EMPTY;
209
+ }
210
+ /**
211
+ * Create a new guid.
212
+ * @param style - The style of guid to generated, defaults to Digits
213
+ * Digits (Default) : 32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000
214
+ * Braces - 32 digits separated by hyphens, enclosed in braces: \{00000000-0000-0000-0000-000000000000\}
215
+ * Parentheses - 32 digits separated by hyphens, enclosed in parentheses: (00000000-0000-0000-0000-000000000000)
216
+ * Numeric - 32 digits: 00000000000000000000000000000000
217
+ */
218
+ export function createGuid(style) {
219
+ if (style === void 0) { style = "D" /* GuidStyle.Digits */; }
220
+ var theGuid = newGuid();
221
+ if (style === "B" /* GuidStyle.Braces */) {
222
+ theGuid = "{" + theGuid + "}";
223
+ }
224
+ else if (style === "P" /* GuidStyle.Parentheses */) {
225
+ theGuid = "(" + theGuid + ")";
226
+ }
227
+ else if (style === "N" /* GuidStyle.Numeric */) {
228
+ theGuid = theGuid[_DYN_REPLACE /* @min:%2ereplace */](/-/g, STR_EMPTY);
229
+ }
230
+ return theGuid;
231
+ }
232
+ /**
233
+ * Pass in the objects to merge as arguments.
234
+ * @param obj1 - object to merge. Set this argument to 'true' for a deep extend.
235
+ * @param obj2 - object to merge.
236
+ * @param obj3 - object to merge.
237
+ * @param obj4 - object to merge.
238
+ * @param obj5 - object to merge.
239
+ * @returns The extended object.
240
+ */
241
+ export function extend(obj, obj2, obj3, obj4, obj5) {
242
+ // Variables
243
+ var extended = {};
244
+ var deep = false;
245
+ var i = 0;
246
+ var length = arguments[_DYN_LENGTH /* @min:%2elength */];
247
+ var theArgs = arguments;
248
+ // Check if a deep merge
249
+ if (isBoolean(theArgs[0])) {
250
+ deep = theArgs[0];
251
+ i++;
252
+ }
253
+ // Loop through each object and conduct a merge
254
+ for (; i < length; i++) {
255
+ var obj = theArgs[i];
256
+ objForEachKey(obj, function (prop, value) {
257
+ // If deep merge and property is an object, merge properties
258
+ if (deep && value && isObject(value)) {
259
+ if (isArray(value)) {
260
+ extended[prop] = extended[prop] || [];
261
+ arrForEach(value, function (arrayValue, arrayIndex) {
262
+ if (arrayValue && isObject(arrayValue)) {
263
+ extended[prop][arrayIndex] = extend(true, extended[prop][arrayIndex], arrayValue);
264
+ }
265
+ else {
266
+ extended[prop][arrayIndex] = arrayValue;
267
+ }
268
+ });
269
+ }
270
+ else {
271
+ extended[prop] = extend(true, extended[prop], value);
272
+ }
273
+ }
274
+ else {
275
+ extended[prop] = value;
276
+ }
277
+ });
278
+ }
279
+ return extended;
280
+ }
281
+ export var getTime = perfNow;
282
+ export function isValueKind(value) {
283
+ // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization
284
+ if (value === 0 /* eValueKind.NotSet */ || ((value > 0 /* eValueKind.NotSet */ && value <= 13 /* eValueKind.Pii_IPV4AddressLegacy */) || value === 32 /* eValueKind.CustomerContent_GenericContent */)) {
285
+ return true;
286
+ }
287
+ return false;
288
+ }
289
+ function isDataType(value) {
290
+ // Remark: 0 returns false, but it doesn't affect encoding anyways
291
+ // Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization
292
+ if (value >= 0 && value <= 9) {
293
+ return true;
294
+ }
295
+ return false;
296
+ }
297
+ function isSafariOrFirefox() {
298
+ var nav = getNavigator();
299
+ // If non-browser navigator will be undefined
300
+ if (!isUndefined(nav) && nav[_DYN_USER_AGENT /* @min:%2euserAgent */]) {
301
+ var ua = nav.userAgent[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();
302
+ 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) {
303
+ return true;
304
+ }
305
+ }
306
+ return false;
307
+ }
308
+ export function isArrayValid(value) {
309
+ return value[_DYN_LENGTH /* @min:%2elength */] > 0;
310
+ }
311
+ export function setProcessTelemetryTimings(event, identifier) {
312
+ var evt = event;
313
+ evt[_DYN_TIMINGS /* @min:%2etimings */] = evt[_DYN_TIMINGS /* @min:%2etimings */] || {};
314
+ evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST6 /* @min:%2eprocessTelemetryStart */] = evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST6 /* @min:%2eprocessTelemetryStart */] || {};
315
+ evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST6 /* @min:%2eprocessTelemetryStart */][identifier] = getTime();
316
+ }
317
+ /**
318
+ * Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value
319
+ * @param value - The value to determine the type
320
+ */
321
+ export function getFieldValueType(value) {
322
+ var theType = 0 /* FieldValueSanitizerType.NotSet */;
323
+ if (value !== null && value !== undefined) {
324
+ var objType = typeof value;
325
+ if (objType === "string") {
326
+ theType = 1 /* FieldValueSanitizerType.String */;
327
+ }
328
+ else if (objType === "number") {
329
+ theType = 2 /* FieldValueSanitizerType.Number */;
330
+ }
331
+ else if (objType === "boolean") {
332
+ theType = 3 /* FieldValueSanitizerType.Boolean */;
333
+ }
334
+ else if (objType === "object") {
335
+ theType = 4 /* FieldValueSanitizerType.Object */;
336
+ if (isArray(value)) {
337
+ theType = 4096 /* FieldValueSanitizerType.Array */;
338
+ if (value[_DYN_LENGTH /* @min:%2elength */] > 0) {
339
+ // Empty arrays are not supported and are considered to be the same as null
340
+ theType |= getFieldValueType(value[0]);
341
+ }
342
+ }
343
+ else if (ObjHasOwnProperty[_DYN_CALL /* @min:%2ecall */](value, "value")) {
344
+ // Looks like an IEventProperty
345
+ theType = 8192 /* FieldValueSanitizerType.EventProperty */ | getFieldValueType(value[_DYN_VALUE /* @min:%2evalue */]);
346
+ }
347
+ }
348
+ }
349
+ return theType;
350
+ }
351
+ /**
352
+ * Helper to identify whether we are running in a chromium based browser environment
353
+ */
354
+ export function isChromium() {
355
+ return !!getGlobalInst("chrome");
356
+ }
357
+ /**
358
+ * Create and open an XMLHttpRequest object
359
+ * @param method - The request method
360
+ * @param urlString - The url
361
+ * @param withCredentials - Option flag indicating that credentials should be sent
362
+ * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)
363
+ * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)
364
+ * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request
365
+ * @returns A new opened XHR request
366
+ */
367
+ export function openXhr(method, urlString, withCredentials, disabled, isSync, timeout) {
368
+ if (disabled === void 0) { disabled = false; }
369
+ if (isSync === void 0) { isSync = false; }
370
+ function _wrapSetXhrProp(xhr, prop, value) {
371
+ try {
372
+ xhr[prop] = value;
373
+ }
374
+ catch (e) {
375
+ // - Wrapping as depending on the environment setting the property may fail (non-terminally)
376
+ }
377
+ }
378
+ var xhr = new XMLHttpRequest();
379
+ if (disabled) {
380
+ // Tag the instance so it's not tracked (trackDependency)
381
+ // If the environment has locked down the XMLHttpRequest (preventExtensions and/or freeze), this would
382
+ // cause the request to fail and we no telemetry would be sent
383
+ _wrapSetXhrProp(xhr, strDisabledPropertyName, disabled);
384
+ }
385
+ if (withCredentials) {
386
+ // Some libraries require that the withCredentials flag is set "before" open and
387
+ // - Wrapping as IE 10 has started throwing when setting before open
388
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
389
+ }
390
+ xhr.open(method, urlString, !isSync);
391
+ if (withCredentials) {
392
+ // withCredentials should be set AFTER open (https://xhr.spec.whatwg.org/#the-withcredentials-attribute)
393
+ // And older firefox instances from 11+ will throw for sync events (current versions don't) which happens during unload processing
394
+ _wrapSetXhrProp(xhr, strWithCredentials, withCredentials);
395
+ }
396
+ // Only set the timeout for asynchronous requests as
397
+ // "Timeout shouldn't be used for synchronous XMLHttpRequests requests used in a document environment or it will throw an InvalidAccessError exception.""
398
+ // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout
399
+ if (!isSync && timeout) {
400
+ _wrapSetXhrProp(xhr, strTimeout, timeout);
401
+ }
402
+ return xhr;
403
+ }
404
+ /**
405
+ * Check to see if the value is \> 0
406
+ * @param value - The value to check
407
+ * @returns true if \> 0 otherwise false
408
+ */
409
+ export function isGreaterThanZero(value) {
410
+ return value > 0;
411
+ }
412
+ //# sourceMappingURL=extUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extUtils.js.map","sources":["extUtils.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, getInst as getGlobalInst, getNavigator, hasDocument, hasWindow, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isString, isUndefined, objForEachKey, perfNow, strIndexOf, strLeft } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CALL, _DYN_HAS_OWN_PROPERTY, _DYN_INDEX_OF, _DYN_KIND, _DYN_LENGTH, _DYN_PROCESS_TELEMETRY_ST6, _DYN_REPLACE, _DYN_STRINGIFY, _DYN_TIMINGS, _DYN_TO_LOWER_CASE, _DYN_TO_STRING, _DYN_USER_AGENT, _DYN_VALUE } from \"../__DynamicConstants\";\r\nimport { STR_EMPTY } from \"../constants/InternalConstants\";\r\nimport { newGuid } from \"../utils/CoreUtils\";\r\nimport { isReactNative } from \"../utils/EnvUtils\";\r\n/**\r\n * Identifies the version for the extended SDK\r\n */\r\nexport var ExtVersion = '4.4.1';\r\n/**\r\n * Identifies the full version for the extended SDK\r\n */\r\nexport var ExtFullVersionString = \"1DS-Web-JS-\" + ExtVersion;\r\n/**\r\n * Identifies the version for the extended SDK (legacy constant)\r\n * @deprecated Use {@link ExtVersion} instead\r\n */\r\nexport var Version = ExtVersion;\r\n/**\r\n * Identifies the full version for the extended SDK (legacy constant)\r\n * @deprecated Use {@link ExtFullVersionString} instead\r\n */\r\nexport var FullVersionString = ExtFullVersionString;\r\nvar ObjHasOwnProperty = Object.prototype[_DYN_HAS_OWN_PROPERTY /* @min:%2ehasOwnProperty */];\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 = ( /* #__PURE__*/null);\r\n// var _areCookiesAvailable: boolean | undefined;\r\n/**\r\n * Checks if document object is available\r\n */\r\nexport var isDocumentObjectAvailable = ( /* #__PURE__*/hasDocument());\r\n/**\r\n * Checks if window object is available\r\n */\r\nexport var isWindowObjectAvailable = ( /* #__PURE__*/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[_DYN_CALL /* @min:%2ecall */](property, \"value\")) {\r\n property = { value: stringifyObjects ? JSON[_DYN_STRINGIFY /* @min:%2estringify */](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 */][_DYN_TO_STRING /* @min:%2etoString */]();\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 */\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[_DYN_REPLACE /* @min:%2ereplace */](/-/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[_DYN_USER_AGENT /* @min:%2euserAgent */]) {\r\n var ua = nav.userAgent[_DYN_TO_LOWER_CASE /* @min:%2etoLowerCase */]();\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_ST6 /* @min:%2eprocessTelemetryStart */] = evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST6 /* @min:%2eprocessTelemetryStart */] || {};\r\n evt[_DYN_TIMINGS /* @min:%2etimings */][_DYN_PROCESS_TELEMETRY_ST6 /* @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 === \"object\") {\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[_DYN_CALL /* @min:%2ecall */](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=extUtils.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
package/dist-es5/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.4.0-nightlybeta3.2602-27
2
+ * Application Insights JavaScript SDK - Core, 3.4.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -7,6 +7,7 @@
7
7
  export { MinChannelPriorty } from "./interfaces/ai/IChannelControls";
8
8
  export { EventsDiscardedReason, BatchDiscardedReason } from "./enums/ai/EventsDiscardedReason";
9
9
  export { DependencyTypes } from "./enums/ai/DependencyTypes";
10
+ export { UrlRedactionOptions } from "./enums/ai/UrlRedactionOptions";
10
11
  export { ActiveStatus } from "./enums/ai/InitActiveStatusEnum";
11
12
  export { throwAggregationError } from "./core/AggregationError";
12
13
  export { AppInsightsCore } from "./core/AppInsightsCore";
@@ -115,4 +116,16 @@ export { createOfflineListener } from "./utils/Offline";
115
116
  export var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
116
117
  export var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
117
118
  export var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
119
+ // ==========================================================================
120
+ // 1DS (OneCollector) exports - merged from @microsoft/1ds-core-js
121
+ // ==========================================================================
122
+ // 1DS Enums
123
+ export { ValueKind, EventLatency, EventPropertyType, TraceLevel } from "./enums/ext/Enums";
124
+ // 1DS Classes
125
+ export { AppInsightsExtCore } from "./ext/AppInsightsExtCore";
126
+ export { ValueSanitizer } from "./ext/ValueSanitizer";
127
+ // 1DS Utils
128
+ export { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, ExtVersion, Version, ExtFullVersionString, FullVersionString, getCommonSchemaMetaData, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, isChromium, isGreaterThanZero } from "./ext/extUtils";
129
+ // 1DS Span Utils
130
+ export { createExtendedTelemetryItemFromSpan } from "./ext/extSpanUtils";
118
131
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport { MinChannelPriorty } from \"./interfaces/ai/IChannelControls\";\r\nexport { EventsDiscardedReason, BatchDiscardedReason } from \"./enums/ai/EventsDiscardedReason\";\r\nexport { DependencyTypes } from \"./enums/ai/DependencyTypes\";\r\nexport { ActiveStatus } from \"./enums/ai/InitActiveStatusEnum\";\r\nexport { throwAggregationError } from \"./core/AggregationError\";\r\nexport { AppInsightsCore } from \"./core/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./core/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./utils/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./utils/CoreUtils\";\r\nexport { runTargetUnload, doUnloadAll } from \"./core/AsyncUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend, isFeatureEnabled, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, openXhr, _appendHeader, _getAllResponseHeaders, setObjStringTag, setProtoTypeName, isTimeSpan } from \"./utils/HelperFuncs\";\r\nexport { parseResponse } from \"./core/ResponseHelpers\";\r\nexport { SenderPostManager } from \"./core/SenderPostManager\";\r\n//export { IStatsBeat, IStatsBeatConfig, IStatsBeatKeyMap as IStatsBeatEndpoints, IStatsBeatState} from \"./interfaces/ai/IStatsBeat\";\r\n//export { IStatsEventData } from \"./interfaces/ai/IStatsEventData\";\r\n//export { IStatsMgr, IStatsMgrConfig } from \"./interfaces/ai/IStatsMgr\";\r\n//export { createStatsMgr } from \"./core/StatsBeat\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, isStrictUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objCreate, objDefine, objDefineProp, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./internal/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming, sendCustomEvent, dispatchEvent, createCustomDomEvent, fieldRedaction } from \"./utils/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./core/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./core/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./diagnostics/DiagnosticLogger\";\r\nexport { createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./core/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents, createDistributedTraceContext, isDistributedTraceContext } from \"./core/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./enums/ai/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./core/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./core/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./core/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./utils/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./core/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer, _testHookMaxUnloadHooksCb } from \"./core/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, findAllScripts, INVALID_TRACE_ID, INVALID_SPAN_ID } from \"./utils/TraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet, cfgDfBlockPropValue } from \"./config/ConfigDefaultHelpers\";\r\nexport { createW3cTraceState, findW3cTraceState, isW3cTraceState, snapshotW3cTraceState } from \"./telemetry/W3cTraceState\";\r\nexport { createOTelTraceState, isOTelTraceState } from \"./otel/api/trace/traceState\";\r\nexport { createSpan } from \"./otel/api/trace/span\";\r\nexport { createTraceProvider } from \"./otel/api/trace/traceProvider\";\r\nexport { createNonRecordingSpan, isSpanContextValid, wrapSpanContext, isReadableSpan, isTracingSuppressed, suppressTracing, unsuppressTracing, useSpan, withSpan, startActiveSpan } from \"./otel/api/trace/utils\";\r\nexport { AzureMonitorSampleRate, ApplicationInsightsCustomEventName, MicrosoftClientIp, ApplicationInsightsMessageName, ApplicationInsightsExceptionName, ApplicationInsightsPageViewName, ApplicationInsightsAvailabilityName, ApplicationInsightsEventName, ApplicationInsightsBaseType, ApplicationInsightsMessageBaseType, ApplicationInsightsExceptionBaseType, ApplicationInsightsPageViewBaseType, ApplicationInsightsAvailabilityBaseType, ApplicationInsightsEventBaseType, ATTR_ENDUSER_ID, ATTR_ENDUSER_PSEUDO_ID, ATTR_HTTP_ROUTE, SEMATTRS_NET_PEER_IP, SEMATTRS_NET_PEER_NAME, SEMATTRS_NET_HOST_IP, SEMATTRS_PEER_SERVICE, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_HOST, SEMATTRS_DB_SYSTEM, SEMATTRS_DB_STATEMENT, SEMATTRS_DB_OPERATION, SEMATTRS_DB_NAME, SEMATTRS_RPC_SYSTEM, SEMATTRS_RPC_GRPC_STATUS_CODE, SEMATTRS_EXCEPTION_TYPE, SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_TARGET, SEMATTRS_HTTP_FLAVOR, SEMATTRS_NET_TRANSPORT, SEMATTRS_NET_HOST_NAME, SEMATTRS_NET_HOST_PORT, SEMATTRS_NET_PEER_PORT, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_ENDUSER_ID, ATTR_CLIENT_ADDRESS, ATTR_CLIENT_PORT, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_QUERY, ATTR_URL_SCHEME, ATTR_ERROR_TYPE, ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_NETWORK_TRANSPORT, ATTR_USER_AGENT_ORIGINAL, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_EXCEPTION_TYPE, ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, EXP_ATTR_ENDUSER_ID, EXP_ATTR_ENDUSER_PSEUDO_ID, EXP_ATTR_SYNTHETIC_TYPE, DBSYSTEMVALUES_MONGODB, DBSYSTEMVALUES_COSMOSDB, DBSYSTEMVALUES_MYSQL, DBSYSTEMVALUES_POSTGRESQL, DBSYSTEMVALUES_REDIS, DBSYSTEMVALUES_DB2, DBSYSTEMVALUES_DERBY, DBSYSTEMVALUES_MARIADB, DBSYSTEMVALUES_MSSQL, DBSYSTEMVALUES_ORACLE, DBSYSTEMVALUES_SQLITE, DBSYSTEMVALUES_OTHER_SQL, DBSYSTEMVALUES_HSQLDB, DBSYSTEMVALUES_H2 } from \"./otel/attribute/SemanticConventions\";\r\nexport { createOTelApi } from \"./otel/api/OTelApi\";\r\nexport { AttributeChangeOp } from \"./enums/otel/eAttributeChangeOp\";\r\nexport { createAttributeContainer, addAttributes, isAttributeContainer, createAttributeSnapshot } from \"./otel/attribute/attributeContainer\";\r\n// OpenTelemetry Enums\r\nexport { OTelSpanKind } from \"./enums/otel/OTelSpanKind\";\r\nexport { OTelSpanStatusCode } from \"./enums/otel/OTelSpanStatus\";\r\n// OpenTelemetry Helper Utilities\r\nexport { hrTime, hrTimeToTimeStamp, hrTimeDuration, hrTimeToMilliseconds, timeInputToHrTime, millisToHrTime, hrTimeToNanoseconds, addHrTimes, hrTimeToMicroseconds, zeroHrTime, nanosToHrTime, isTimeInput, isTimeInputHrTime } from \"./internal/timeHelpers\";\r\nexport { isAttributeValue, isAttributeKey, sanitizeAttributes } from \"./internal/attributeHelpers\";\r\nexport { getSyntheticType, isSyntheticSource, serializeAttribute, getUrl, getPeerIp, getHttpMethod, getHttpUrl, getHttpHost, getHttpScheme, getHttpTarget, getNetPeerName, getNetPeerPort, getUserAgent, getLocationIp, getHttpStatusCode, getHttpClientIp, getDependencyTarget, isSqlDB } from \"./internal/commonUtils\";\r\n// OpenTelemetry Error Handlers\r\nexport { handleAttribError, handleSpanError, handleDebug, handleWarn, handleError, handleNotImplemented } from \"./internal/handleErrors\";\r\n// OpenTelemetry Error Classes\r\nexport { getOpenTelemetryError, throwOTelError } from \"./otel/api/errors/OTelError\";\r\nexport { throwOTelInvalidAttributeError } from \"./otel/api/errors/OTelInvalidAttributeError\";\r\nexport { throwOTelSpanError } from \"./otel/api/errors/OTelSpanError\";\r\n// ========================================\r\n// Application Insights Common Exports\r\n// ========================================\r\n// Utility functions\r\nexport { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from \"./utils/Util\";\r\nexport { ThrottleMgr } from \"./diagnostics/ThrottleMgr\";\r\nexport { parseConnectionString, ConnectionStringParser } from \"./telemetry/ConnectionStringParser\";\r\nexport { RequestHeaders } from \"./telemetry/RequestResponseHeaders\";\r\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified, ChannelControllerPriority } from \"./constants/Constants\";\r\n// Telemetry classes\r\nexport { Envelope } from \"./telemetry/ai/Common/Envelope\";\r\nexport { Event } from \"./telemetry/ai/Event\";\r\nexport { Exception } from \"./telemetry/ai/Exception\";\r\nexport { Metric } from \"./telemetry/ai/Metric\";\r\nexport { PageView } from \"./telemetry/ai/PageView\";\r\nexport { RemoteDependencyData } from \"./telemetry/ai/RemoteDependencyData\";\r\nexport { Trace } from \"./telemetry/ai/Trace\";\r\nexport { PageViewPerformance } from \"./telemetry/ai/PageViewPerformance\";\r\nexport { Data } from \"./telemetry/ai/Common/Data\";\r\nexport { DataPoint } from \"./telemetry/ai/Common/DataPoint\";\r\n// Severity level\r\nexport { SeverityLevel } from \"./interfaces/ai/contracts/SeverityLevel\";\r\n// Configuration\r\nexport { ConfigurationManager } from \"./interfaces/ai/IConfig\";\r\n// Context tags and keys\r\nexport { ContextTagKeys } from \"./interfaces/ai/contracts/ContextTagKeys\";\r\nexport { CtxTagKeys, Extensions } from \"./interfaces/ai/PartAExtensions\";\r\n// Data types and envelope types\r\nexport { EventDataType, ExceptionDataType, MetricDataType, PageViewDataType, PageViewPerformanceDataType, RemoteDependencyDataType, RequestDataType, TraceDataType } from \"./telemetry/ai/DataTypes\";\r\nexport { EventEnvelopeType, ExceptionEnvelopeType, MetricEnvelopeType, PageViewEnvelopeType, PageViewPerformanceEnvelopeType, RemoteDependencyEnvelopeType, RequestEnvelopeType, TraceEnvelopeType } from \"./telemetry/ai/EnvelopeTypes\";\r\n// Data sanitization\r\nexport { dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from \"./telemetry/ai/Common/DataSanitizer\";\r\n// Telemetry item creator\r\nexport { TelemetryItemCreator, createTelemetryItem } from \"./telemetry/TelemetryItemCreator\";\r\n// Enums\r\nexport { DistributedTracingModes, EventPersistence } from \"./enums/ai/Enums\";\r\n// Helper functions\r\nexport { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from \"./utils/HelperFuncs\";\r\nexport { createDomEvent } from \"./utils/DomHelperFuncs\";\r\n// Storage helpers\r\nexport { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage, utlSetStoragePrefix } from \"./utils/StorageHelperFuncs\";\r\n// URL helpers\r\nexport { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from \"./utils/UrlHelperFuncs\";\r\n// Offline support\r\nexport { createOfflineListener } from \"./utils/Offline\";\r\n// Plugin identifiers\r\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\r\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\r\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";\r\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport { MinChannelPriorty } from \"./interfaces/ai/IChannelControls\";\r\nexport { EventsDiscardedReason, BatchDiscardedReason } from \"./enums/ai/EventsDiscardedReason\";\r\nexport { DependencyTypes } from \"./enums/ai/DependencyTypes\";\r\nexport { UrlRedactionOptions } from \"./enums/ai/UrlRedactionOptions\";\r\nexport { ActiveStatus } from \"./enums/ai/InitActiveStatusEnum\";\r\nexport { throwAggregationError } from \"./core/AggregationError\";\r\nexport { AppInsightsCore } from \"./core/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./core/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./utils/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./utils/CoreUtils\";\r\nexport { runTargetUnload, doUnloadAll } from \"./core/AsyncUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend, isFeatureEnabled, getResponseText, formatErrorMessageXdr, formatErrorMessageXhr, prependTransports, openXhr, _appendHeader, _getAllResponseHeaders, setObjStringTag, setProtoTypeName, isTimeSpan } from \"./utils/HelperFuncs\";\r\nexport { parseResponse } from \"./core/ResponseHelpers\";\r\nexport { SenderPostManager } from \"./core/SenderPostManager\";\r\n//export { IStatsBeat, IStatsBeatConfig, IStatsBeatKeyMap as IStatsBeatEndpoints, IStatsBeatState} from \"./interfaces/ai/IStatsBeat\";\r\n//export { IStatsEventData } from \"./interfaces/ai/IStatsEventData\";\r\n//export { IStatsMgr, IStatsMgrConfig } from \"./interfaces/ai/IStatsMgr\";\r\n//export { createStatsMgr } from \"./core/StatsBeat\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, isStrictUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objCreate, objDefine, objDefineProp, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./internal/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming, sendCustomEvent, dispatchEvent, createCustomDomEvent, fieldRedaction } from \"./utils/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./core/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./core/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./diagnostics/DiagnosticLogger\";\r\nexport { createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./core/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents, createDistributedTraceContext, isDistributedTraceContext } from \"./core/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./enums/ai/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./core/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./core/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./core/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./utils/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./core/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer, _testHookMaxUnloadHooksCb } from \"./core/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent, findAllScripts, INVALID_TRACE_ID, INVALID_SPAN_ID } from \"./utils/TraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet, cfgDfBlockPropValue } from \"./config/ConfigDefaultHelpers\";\r\nexport { createW3cTraceState, findW3cTraceState, isW3cTraceState, snapshotW3cTraceState } from \"./telemetry/W3cTraceState\";\r\nexport { createOTelTraceState, isOTelTraceState } from \"./otel/api/trace/traceState\";\r\nexport { createSpan } from \"./otel/api/trace/span\";\r\nexport { createTraceProvider } from \"./otel/api/trace/traceProvider\";\r\nexport { createNonRecordingSpan, isSpanContextValid, wrapSpanContext, isReadableSpan, isTracingSuppressed, suppressTracing, unsuppressTracing, useSpan, withSpan, startActiveSpan } from \"./otel/api/trace/utils\";\r\nexport { AzureMonitorSampleRate, ApplicationInsightsCustomEventName, MicrosoftClientIp, ApplicationInsightsMessageName, ApplicationInsightsExceptionName, ApplicationInsightsPageViewName, ApplicationInsightsAvailabilityName, ApplicationInsightsEventName, ApplicationInsightsBaseType, ApplicationInsightsMessageBaseType, ApplicationInsightsExceptionBaseType, ApplicationInsightsPageViewBaseType, ApplicationInsightsAvailabilityBaseType, ApplicationInsightsEventBaseType, ATTR_ENDUSER_ID, ATTR_ENDUSER_PSEUDO_ID, ATTR_HTTP_ROUTE, SEMATTRS_NET_PEER_IP, SEMATTRS_NET_PEER_NAME, SEMATTRS_NET_HOST_IP, SEMATTRS_PEER_SERVICE, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_HOST, SEMATTRS_DB_SYSTEM, SEMATTRS_DB_STATEMENT, SEMATTRS_DB_OPERATION, SEMATTRS_DB_NAME, SEMATTRS_RPC_SYSTEM, SEMATTRS_RPC_GRPC_STATUS_CODE, SEMATTRS_EXCEPTION_TYPE, SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_TARGET, SEMATTRS_HTTP_FLAVOR, SEMATTRS_NET_TRANSPORT, SEMATTRS_NET_HOST_NAME, SEMATTRS_NET_HOST_PORT, SEMATTRS_NET_PEER_PORT, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_ENDUSER_ID, ATTR_CLIENT_ADDRESS, ATTR_CLIENT_PORT, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_QUERY, ATTR_URL_SCHEME, ATTR_ERROR_TYPE, ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_NETWORK_TRANSPORT, ATTR_USER_AGENT_ORIGINAL, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_EXCEPTION_TYPE, ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, EXP_ATTR_ENDUSER_ID, EXP_ATTR_ENDUSER_PSEUDO_ID, EXP_ATTR_SYNTHETIC_TYPE, DBSYSTEMVALUES_MONGODB, DBSYSTEMVALUES_COSMOSDB, DBSYSTEMVALUES_MYSQL, DBSYSTEMVALUES_POSTGRESQL, DBSYSTEMVALUES_REDIS, DBSYSTEMVALUES_DB2, DBSYSTEMVALUES_DERBY, DBSYSTEMVALUES_MARIADB, DBSYSTEMVALUES_MSSQL, DBSYSTEMVALUES_ORACLE, DBSYSTEMVALUES_SQLITE, DBSYSTEMVALUES_OTHER_SQL, DBSYSTEMVALUES_HSQLDB, DBSYSTEMVALUES_H2 } from \"./otel/attribute/SemanticConventions\";\r\nexport { createOTelApi } from \"./otel/api/OTelApi\";\r\nexport { AttributeChangeOp } from \"./enums/otel/eAttributeChangeOp\";\r\nexport { createAttributeContainer, addAttributes, isAttributeContainer, createAttributeSnapshot } from \"./otel/attribute/attributeContainer\";\r\n// OpenTelemetry Enums\r\nexport { OTelSpanKind } from \"./enums/otel/OTelSpanKind\";\r\nexport { OTelSpanStatusCode } from \"./enums/otel/OTelSpanStatus\";\r\n// OpenTelemetry Helper Utilities\r\nexport { hrTime, hrTimeToTimeStamp, hrTimeDuration, hrTimeToMilliseconds, timeInputToHrTime, millisToHrTime, hrTimeToNanoseconds, addHrTimes, hrTimeToMicroseconds, zeroHrTime, nanosToHrTime, isTimeInput, isTimeInputHrTime } from \"./internal/timeHelpers\";\r\nexport { isAttributeValue, isAttributeKey, sanitizeAttributes } from \"./internal/attributeHelpers\";\r\nexport { getSyntheticType, isSyntheticSource, serializeAttribute, getUrl, getPeerIp, getHttpMethod, getHttpUrl, getHttpHost, getHttpScheme, getHttpTarget, getNetPeerName, getNetPeerPort, getUserAgent, getLocationIp, getHttpStatusCode, getHttpClientIp, getDependencyTarget, isSqlDB } from \"./internal/commonUtils\";\r\n// OpenTelemetry Error Handlers\r\nexport { handleAttribError, handleSpanError, handleDebug, handleWarn, handleError, handleNotImplemented } from \"./internal/handleErrors\";\r\n// OpenTelemetry Error Classes\r\nexport { getOpenTelemetryError, throwOTelError } from \"./otel/api/errors/OTelError\";\r\nexport { throwOTelInvalidAttributeError } from \"./otel/api/errors/OTelInvalidAttributeError\";\r\nexport { throwOTelSpanError } from \"./otel/api/errors/OTelSpanError\";\r\n// ========================================\r\n// Application Insights Common Exports\r\n// ========================================\r\n// Utility functions\r\nexport { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from \"./utils/Util\";\r\nexport { ThrottleMgr } from \"./diagnostics/ThrottleMgr\";\r\nexport { parseConnectionString, ConnectionStringParser } from \"./telemetry/ConnectionStringParser\";\r\nexport { RequestHeaders } from \"./telemetry/RequestResponseHeaders\";\r\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified, ChannelControllerPriority } from \"./constants/Constants\";\r\n// Telemetry classes\r\nexport { Envelope } from \"./telemetry/ai/Common/Envelope\";\r\nexport { Event } from \"./telemetry/ai/Event\";\r\nexport { Exception } from \"./telemetry/ai/Exception\";\r\nexport { Metric } from \"./telemetry/ai/Metric\";\r\nexport { PageView } from \"./telemetry/ai/PageView\";\r\nexport { RemoteDependencyData } from \"./telemetry/ai/RemoteDependencyData\";\r\nexport { Trace } from \"./telemetry/ai/Trace\";\r\nexport { PageViewPerformance } from \"./telemetry/ai/PageViewPerformance\";\r\nexport { Data } from \"./telemetry/ai/Common/Data\";\r\nexport { DataPoint } from \"./telemetry/ai/Common/DataPoint\";\r\n// Severity level\r\nexport { SeverityLevel } from \"./interfaces/ai/contracts/SeverityLevel\";\r\n// Configuration\r\nexport { ConfigurationManager } from \"./interfaces/ai/IConfig\";\r\n// Context tags and keys\r\nexport { ContextTagKeys } from \"./interfaces/ai/contracts/ContextTagKeys\";\r\nexport { CtxTagKeys, Extensions } from \"./interfaces/ai/PartAExtensions\";\r\n// Data types and envelope types\r\nexport { EventDataType, ExceptionDataType, MetricDataType, PageViewDataType, PageViewPerformanceDataType, RemoteDependencyDataType, RequestDataType, TraceDataType } from \"./telemetry/ai/DataTypes\";\r\nexport { EventEnvelopeType, ExceptionEnvelopeType, MetricEnvelopeType, PageViewEnvelopeType, PageViewPerformanceEnvelopeType, RemoteDependencyEnvelopeType, RequestEnvelopeType, TraceEnvelopeType } from \"./telemetry/ai/EnvelopeTypes\";\r\n// Data sanitization\r\nexport { dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from \"./telemetry/ai/Common/DataSanitizer\";\r\n// Telemetry item creator\r\nexport { TelemetryItemCreator, createTelemetryItem } from \"./telemetry/TelemetryItemCreator\";\r\n// Enums\r\nexport { DistributedTracingModes, EventPersistence } from \"./enums/ai/Enums\";\r\n// Helper functions\r\nexport { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from \"./utils/HelperFuncs\";\r\nexport { createDomEvent } from \"./utils/DomHelperFuncs\";\r\n// Storage helpers\r\nexport { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage, utlSetStoragePrefix } from \"./utils/StorageHelperFuncs\";\r\n// URL helpers\r\nexport { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from \"./utils/UrlHelperFuncs\";\r\n// Offline support\r\nexport { createOfflineListener } from \"./utils/Offline\";\r\n// Plugin identifiers\r\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\r\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\r\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";\r\n// ==========================================================================\r\n// 1DS (OneCollector) exports - merged from @microsoft/1ds-core-js\r\n// ==========================================================================\r\n// 1DS Enums\r\nexport { ValueKind, EventLatency, EventPropertyType, TraceLevel } from \"./enums/ext/Enums\";\r\n// 1DS Classes\r\nexport { AppInsightsExtCore } from \"./ext/AppInsightsExtCore\";\r\nexport { ValueSanitizer } from \"./ext/ValueSanitizer\";\r\n// 1DS Utils\r\nexport { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, ExtVersion, Version, ExtFullVersionString, FullVersionString, getCommonSchemaMetaData, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, isChromium, isGreaterThanZero } from \"./ext/extUtils\";\r\n// 1DS Span Utils\r\nexport { createExtendedTelemetryItemFromSpan } from \"./ext/extSpanUtils\";\r\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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
- * Application Insights JavaScript SDK - Core, 3.4.0-nightlybeta3.2602-27
2
+ * Application Insights JavaScript SDK - Core, 3.4.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.4.0-nightlybeta3.2602-27
2
+ * Application Insights JavaScript SDK - Core, 3.4.1
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5