@safaricom-mxl/web-sdk 0.1.3 → 0.1.5

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 (606) hide show
  1. package/README.md +18 -14
  2. package/UPGRADING.md +23 -1
  3. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.cjs +12 -1
  4. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.cjs.map +1 -1
  5. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.cts +2 -0
  6. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.cts.map +1 -1
  7. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.ts +2 -0
  8. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.d.ts.map +1 -1
  9. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.js +12 -1
  10. package/dist/api-page/manager/ProxyPageManager/ProxyPageManager.js.map +1 -1
  11. package/dist/api-page/manager/types.d.cts +2 -1
  12. package/dist/api-page/manager/types.d.cts.map +1 -1
  13. package/dist/api-page/manager/types.d.ts +2 -1
  14. package/dist/api-page/manager/types.d.ts.map +1 -1
  15. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs +1 -1
  16. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs.map +1 -1
  17. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts +1 -1
  18. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts.map +1 -1
  19. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts +1 -1
  20. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts.map +1 -1
  21. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js +1 -1
  22. package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js.map +1 -1
  23. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs +2 -2
  24. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs.map +1 -1
  25. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts +1 -1
  26. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts.map +1 -1
  27. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts +1 -1
  28. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts.map +1 -1
  29. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js +2 -2
  30. package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js.map +1 -1
  31. package/dist/constants/attributes.cjs +12 -0
  32. package/dist/constants/attributes.cjs.map +1 -1
  33. package/dist/constants/attributes.d.cts +7 -1
  34. package/dist/constants/attributes.d.cts.map +1 -1
  35. package/dist/constants/attributes.d.ts +7 -1
  36. package/dist/constants/attributes.d.ts.map +1 -1
  37. package/dist/constants/attributes.js +7 -1
  38. package/dist/constants/attributes.js.map +1 -1
  39. package/dist/exporters/BaseFetchExporter/BaseFetchExporter.d.ts +1 -1
  40. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.cjs +1 -2
  41. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.cjs.map +1 -1
  42. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.cts +3 -4
  43. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.cts.map +1 -1
  44. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.ts +1 -2
  45. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.d.ts.map +1 -1
  46. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.js +1 -2
  47. package/dist/instrumentations/InstrumentationAbstract/InstrumentationAbstract.js.map +1 -1
  48. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs +12 -2
  49. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.cjs.map +1 -1
  50. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.cts +5 -2
  51. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.cts.map +1 -1
  52. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.ts +5 -2
  53. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.d.ts.map +1 -1
  54. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js +12 -2
  55. package/dist/instrumentations/MXLInstrumentationBase/MXLInstrumentationBase.js.map +1 -1
  56. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.cjs +1 -2
  57. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.cjs.map +1 -1
  58. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.cts.map +1 -1
  59. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.d.ts.map +1 -1
  60. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.js +1 -2
  61. package/dist/instrumentations/clicks/ClicksInstrumentation/ClicksInstrumentation.js.map +1 -1
  62. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs +29 -33
  63. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs.map +1 -1
  64. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.cts +4 -2
  65. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.cts.map +1 -1
  66. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.ts +4 -2
  67. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.d.ts.map +1 -1
  68. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js +29 -33
  69. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js.map +1 -1
  70. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs +14 -12
  71. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs.map +1 -1
  72. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts +3 -2
  73. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts.map +1 -1
  74. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts +3 -2
  75. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts.map +1 -1
  76. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js +14 -12
  77. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js.map +1 -1
  78. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.cts +1 -2
  79. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.cts.map +1 -1
  80. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.ts +1 -2
  81. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/types.d.ts.map +1 -1
  82. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs +1 -1
  83. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs.map +1 -1
  84. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js +1 -1
  85. package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js.map +1 -1
  86. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs +3 -5
  87. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.cjs.map +1 -1
  88. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.cts.map +1 -1
  89. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.d.ts.map +1 -1
  90. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js +3 -5
  91. package/dist/instrumentations/element-timing/ElementTimingInstrumentation/ElementTimingInstrumentation.js.map +1 -1
  92. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.cjs +7 -3
  93. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.cjs.map +1 -1
  94. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.cts +1 -0
  95. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.cts.map +1 -1
  96. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.ts +1 -0
  97. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.d.ts.map +1 -1
  98. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.js +7 -3
  99. package/dist/instrumentations/empty-root/EmptyRootInstrumentation/EmptyRootInstrumentation.js.map +1 -1
  100. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.cjs +2 -3
  101. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.cjs.map +1 -1
  102. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.d.cts.map +1 -1
  103. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.d.ts.map +1 -1
  104. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.js +2 -3
  105. package/dist/instrumentations/exceptions/GlobalExceptionInstrumentation/GlobalExceptionInstrumentation.js.map +1 -1
  106. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.cjs +4 -5
  107. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.cjs.map +1 -1
  108. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.d.cts.map +1 -1
  109. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.d.ts.map +1 -1
  110. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.js +3 -4
  111. package/dist/instrumentations/first-interaction/FirstInteractionInstrumentation/FirstInteractionInstrumentation.js.map +1 -1
  112. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.cjs +172 -0
  113. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.cjs.map +1 -0
  114. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.cts +38 -0
  115. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.cts.map +1 -0
  116. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.ts +38 -0
  117. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.d.ts.map +1 -0
  118. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.js +170 -0
  119. package/dist/instrumentations/js-profiler/JsProfilerInstrumentation.js.map +1 -0
  120. package/dist/instrumentations/js-profiler/constants.cjs +21 -0
  121. package/dist/instrumentations/js-profiler/constants.cjs.map +1 -0
  122. package/dist/instrumentations/js-profiler/constants.d.cts +13 -0
  123. package/dist/instrumentations/js-profiler/constants.d.cts.map +1 -0
  124. package/dist/instrumentations/js-profiler/constants.d.ts +13 -0
  125. package/dist/instrumentations/js-profiler/constants.d.ts.map +1 -0
  126. package/dist/instrumentations/js-profiler/constants.js +13 -0
  127. package/dist/instrumentations/js-profiler/constants.js.map +1 -0
  128. package/dist/instrumentations/js-profiler/fixture.cjs +54 -0
  129. package/dist/instrumentations/js-profiler/fixture.cjs.map +1 -0
  130. package/dist/instrumentations/js-profiler/fixture.d.cts +7 -0
  131. package/dist/instrumentations/js-profiler/fixture.d.cts.map +1 -0
  132. package/dist/instrumentations/js-profiler/fixture.d.ts +7 -0
  133. package/dist/instrumentations/js-profiler/fixture.d.ts.map +1 -0
  134. package/dist/instrumentations/js-profiler/fixture.js +53 -0
  135. package/dist/instrumentations/js-profiler/fixture.js.map +1 -0
  136. package/dist/instrumentations/js-profiler/reduceProfilerTrace.cjs +63 -0
  137. package/dist/instrumentations/js-profiler/reduceProfilerTrace.cjs.map +1 -0
  138. package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.cts +7 -0
  139. package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.cts.map +1 -0
  140. package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.ts +7 -0
  141. package/dist/instrumentations/js-profiler/reduceProfilerTrace.d.ts.map +1 -0
  142. package/dist/instrumentations/js-profiler/reduceProfilerTrace.js +62 -0
  143. package/dist/instrumentations/js-profiler/reduceProfilerTrace.js.map +1 -0
  144. package/dist/instrumentations/js-profiler/types.cjs +0 -0
  145. package/dist/instrumentations/js-profiler/types.d.cts +51 -0
  146. package/dist/instrumentations/js-profiler/types.d.cts.map +1 -0
  147. package/dist/instrumentations/js-profiler/types.d.ts +51 -0
  148. package/dist/instrumentations/js-profiler/types.d.ts.map +1 -0
  149. package/dist/instrumentations/js-profiler/types.js +0 -0
  150. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs +3 -5
  151. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.cjs.map +1 -1
  152. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.cts.map +1 -1
  153. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.d.ts.map +1 -1
  154. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js +1 -3
  155. package/dist/instrumentations/loaf/LoafInstrumentation/LoafInstrumentation.js.map +1 -1
  156. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.cjs +2 -3
  157. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.cjs.map +1 -1
  158. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.d.cts.map +1 -1
  159. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.d.ts.map +1 -1
  160. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.js +1 -2
  161. package/dist/instrumentations/max-scroll-depth/MaxScrollDepthInstrumentation/MaxScrollDepthInstrumentation.js.map +1 -1
  162. package/dist/instrumentations/memory/MemoryInstrumentation.cjs +216 -0
  163. package/dist/instrumentations/memory/MemoryInstrumentation.cjs.map +1 -0
  164. package/dist/instrumentations/memory/MemoryInstrumentation.d.cts +55 -0
  165. package/dist/instrumentations/memory/MemoryInstrumentation.d.cts.map +1 -0
  166. package/dist/instrumentations/memory/MemoryInstrumentation.d.ts +55 -0
  167. package/dist/instrumentations/memory/MemoryInstrumentation.d.ts.map +1 -0
  168. package/dist/instrumentations/memory/MemoryInstrumentation.js +215 -0
  169. package/dist/instrumentations/memory/MemoryInstrumentation.js.map +1 -0
  170. package/dist/instrumentations/memory/browserFamily.cjs +13 -0
  171. package/dist/instrumentations/memory/browserFamily.cjs.map +1 -0
  172. package/dist/instrumentations/memory/browserFamily.d.cts +5 -0
  173. package/dist/instrumentations/memory/browserFamily.d.cts.map +1 -0
  174. package/dist/instrumentations/memory/browserFamily.d.ts +5 -0
  175. package/dist/instrumentations/memory/browserFamily.d.ts.map +1 -0
  176. package/dist/instrumentations/memory/browserFamily.js +12 -0
  177. package/dist/instrumentations/memory/browserFamily.js.map +1 -0
  178. package/dist/instrumentations/memory/constants.cjs +25 -0
  179. package/dist/instrumentations/memory/constants.cjs.map +1 -0
  180. package/dist/instrumentations/memory/constants.d.cts +13 -0
  181. package/dist/instrumentations/memory/constants.d.cts.map +1 -0
  182. package/dist/instrumentations/memory/constants.d.ts +13 -0
  183. package/dist/instrumentations/memory/constants.d.ts.map +1 -0
  184. package/dist/instrumentations/memory/constants.js +22 -0
  185. package/dist/instrumentations/memory/constants.js.map +1 -0
  186. package/dist/instrumentations/memory/resource.cjs +30 -0
  187. package/dist/instrumentations/memory/resource.cjs.map +1 -0
  188. package/dist/instrumentations/memory/resource.d.cts +16 -0
  189. package/dist/instrumentations/memory/resource.d.cts.map +1 -0
  190. package/dist/instrumentations/memory/resource.d.ts +16 -0
  191. package/dist/instrumentations/memory/resource.d.ts.map +1 -0
  192. package/dist/instrumentations/memory/resource.js +27 -0
  193. package/dist/instrumentations/memory/resource.js.map +1 -0
  194. package/dist/instrumentations/memory/startMemoryMeterProvider.cjs +27 -0
  195. package/dist/instrumentations/memory/startMemoryMeterProvider.cjs.map +1 -0
  196. package/dist/instrumentations/memory/startMemoryMeterProvider.d.cts +7 -0
  197. package/dist/instrumentations/memory/startMemoryMeterProvider.d.cts.map +1 -0
  198. package/dist/instrumentations/memory/startMemoryMeterProvider.d.ts +7 -0
  199. package/dist/instrumentations/memory/startMemoryMeterProvider.d.ts.map +1 -0
  200. package/dist/instrumentations/memory/startMemoryMeterProvider.js +25 -0
  201. package/dist/instrumentations/memory/startMemoryMeterProvider.js.map +1 -0
  202. package/dist/instrumentations/memory/types.cjs +0 -0
  203. package/dist/instrumentations/memory/types.d.cts +47 -0
  204. package/dist/instrumentations/memory/types.d.cts.map +1 -0
  205. package/dist/instrumentations/memory/types.d.ts +47 -0
  206. package/dist/instrumentations/memory/types.d.ts.map +1 -0
  207. package/dist/instrumentations/memory/types.js +0 -0
  208. package/dist/instrumentations/memory/visibility.cjs +25 -0
  209. package/dist/instrumentations/memory/visibility.cjs.map +1 -0
  210. package/dist/instrumentations/memory/visibility.d.cts +14 -0
  211. package/dist/instrumentations/memory/visibility.d.cts.map +1 -0
  212. package/dist/instrumentations/memory/visibility.d.ts +14 -0
  213. package/dist/instrumentations/memory/visibility.d.ts.map +1 -0
  214. package/dist/instrumentations/memory/visibility.js +24 -0
  215. package/dist/instrumentations/memory/visibility.js.map +1 -0
  216. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs +62 -55
  217. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.cjs.map +1 -1
  218. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.cts +16 -5
  219. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.cts.map +1 -1
  220. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.ts +16 -5
  221. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.d.ts.map +1 -1
  222. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js +62 -55
  223. package/dist/instrumentations/navigation/NavigationInstrumentation/NavigationInstrumentation.js.map +1 -1
  224. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs +3 -3
  225. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.cjs.map +1 -1
  226. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.d.cts.map +1 -1
  227. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.d.ts.map +1 -1
  228. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js +3 -3
  229. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV5/withMXLRoutingLegacy.js.map +1 -1
  230. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.cjs +10 -13
  231. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.cjs.map +1 -1
  232. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.d.cts.map +1 -1
  233. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.d.ts.map +1 -1
  234. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.js +10 -13
  235. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.js.map +1 -1
  236. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs +8 -4
  237. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.cjs.map +1 -1
  238. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.d.cts.map +1 -1
  239. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.d.ts.map +1 -1
  240. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js +8 -4
  241. package/dist/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.js.map +1 -1
  242. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts +2 -0
  243. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.cts.map +1 -1
  244. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts +2 -0
  245. package/dist/instrumentations/navigation/NavigationInstrumentation/types.d.ts.map +1 -1
  246. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs +14 -13
  247. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.cjs.map +1 -1
  248. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts +1 -0
  249. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.cts.map +1 -1
  250. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts +1 -0
  251. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts.map +1 -1
  252. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js +13 -12
  253. package/dist/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.js.map +1 -1
  254. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs +0 -2
  255. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs.map +1 -1
  256. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.cts.map +1 -1
  257. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.d.ts.map +1 -1
  258. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js +0 -2
  259. package/dist/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js.map +1 -1
  260. package/dist/instrumentations/replay/ReplayInstrumentation/types.d.cts +1 -1
  261. package/dist/instrumentations/replay/ReplayInstrumentation/types.d.ts +1 -1
  262. package/dist/instrumentations/replay/events/capture/network.cjs +31 -22
  263. package/dist/instrumentations/replay/events/capture/network.cjs.map +1 -1
  264. package/dist/instrumentations/replay/events/capture/network.js +31 -22
  265. package/dist/instrumentations/replay/events/capture/network.js.map +1 -1
  266. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs +2 -2
  267. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs.map +1 -1
  268. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.cts.map +1 -1
  269. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.d.ts.map +1 -1
  270. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js +2 -2
  271. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js.map +1 -1
  272. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs +1 -1
  273. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.cjs.map +1 -1
  274. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js +1 -1
  275. package/dist/instrumentations/replay/rrwebLoader/loadRrwebModule.iife.js.map +1 -1
  276. package/dist/instrumentations/replay/rrwebLoader/types.d.cts +4 -2
  277. package/dist/instrumentations/replay/rrwebLoader/types.d.cts.map +1 -1
  278. package/dist/instrumentations/replay/rrwebLoader/types.d.ts +4 -2
  279. package/dist/instrumentations/replay/rrwebLoader/types.d.ts.map +1 -1
  280. package/dist/instrumentations/replay/transport/idleFlushTimer.cjs.map +1 -1
  281. package/dist/instrumentations/replay/transport/idleFlushTimer.d.cts.map +1 -1
  282. package/dist/instrumentations/replay/transport/idleFlushTimer.d.ts.map +1 -1
  283. package/dist/instrumentations/replay/transport/idleFlushTimer.js.map +1 -1
  284. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.cjs +4 -18
  285. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.cjs.map +1 -1
  286. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.cts +0 -2
  287. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.cts.map +1 -1
  288. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.ts +0 -2
  289. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.d.ts.map +1 -1
  290. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.js +3 -17
  291. package/dist/instrumentations/server-timing/ServerTimingInstrumentation/ServerTimingInstrumentation.js.map +1 -1
  292. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.cjs +8 -11
  293. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.cjs.map +1 -1
  294. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.d.cts.map +1 -1
  295. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.d.ts.map +1 -1
  296. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.js +8 -11
  297. package/dist/instrumentations/soft-navigation-performance/SoftNavigationPerformanceInstrumentation/SoftNavigationPerformanceInstrumentation.js.map +1 -1
  298. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs +7 -10
  299. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.cjs.map +1 -1
  300. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.cts.map +1 -1
  301. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.d.ts.map +1 -1
  302. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js +6 -9
  303. package/dist/instrumentations/user-timing/UserTimingInstrumentation/UserTimingInstrumentation.js.map +1 -1
  304. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs +24 -16
  305. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.cjs.map +1 -1
  306. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.cts +3 -2
  307. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.cts.map +1 -1
  308. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.ts +3 -2
  309. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.d.ts.map +1 -1
  310. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js +24 -16
  311. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/WebVitalsInstrumentation.js.map +1 -1
  312. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.cjs +11 -63
  313. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.cjs.map +1 -1
  314. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.cts +4 -56
  315. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.cts.map +1 -1
  316. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.ts +4 -56
  317. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.d.ts.map +1 -1
  318. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.js +11 -62
  319. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/constants.js.map +1 -1
  320. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.cts +1 -2
  321. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.cts.map +1 -1
  322. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.ts +1 -2
  323. package/dist/instrumentations/web-vitals/WebVitalsInstrumentation/types.d.ts.map +1 -1
  324. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.cjs +5 -5
  325. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.cjs.map +1 -1
  326. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.d.cts.map +1 -1
  327. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.d.ts.map +1 -1
  328. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.js +4 -4
  329. package/dist/managers/MXLAnalyticsManager/MXLAnalyticsManager.js.map +1 -1
  330. package/dist/managers/MXLAnalyticsManager/types.d.cts +1 -2
  331. package/dist/managers/MXLAnalyticsManager/types.d.cts.map +1 -1
  332. package/dist/managers/MXLAnalyticsManager/types.d.ts +1 -2
  333. package/dist/managers/MXLAnalyticsManager/types.d.ts.map +1 -1
  334. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.cjs +14 -0
  335. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.cjs.map +1 -1
  336. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.cts +4 -1
  337. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.cts.map +1 -1
  338. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.ts +4 -1
  339. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.d.ts.map +1 -1
  340. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.js +14 -0
  341. package/dist/managers/MXLConfigManager/MXLDynamicConfigManager.js.map +1 -1
  342. package/dist/managers/MXLConfigManager/performanceDefaults.cjs +21 -0
  343. package/dist/managers/MXLConfigManager/performanceDefaults.cjs.map +1 -0
  344. package/dist/managers/MXLConfigManager/performanceDefaults.d.cts +12 -0
  345. package/dist/managers/MXLConfigManager/performanceDefaults.d.cts.map +1 -0
  346. package/dist/managers/MXLConfigManager/performanceDefaults.d.ts +12 -0
  347. package/dist/managers/MXLConfigManager/performanceDefaults.d.ts.map +1 -0
  348. package/dist/managers/MXLConfigManager/performanceDefaults.js +13 -0
  349. package/dist/managers/MXLConfigManager/performanceDefaults.js.map +1 -0
  350. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.cjs +29 -0
  351. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.cjs.map +1 -0
  352. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.cts +40 -0
  353. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.cts.map +1 -0
  354. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.ts +40 -0
  355. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.d.ts.map +1 -0
  356. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.js +27 -0
  357. package/dist/managers/MXLConfigManager/resolveEffectivePerformance.js.map +1 -0
  358. package/dist/managers/MXLConfigManager/types.d.cts +18 -1
  359. package/dist/managers/MXLConfigManager/types.d.cts.map +1 -1
  360. package/dist/managers/MXLConfigManager/types.d.ts +18 -1
  361. package/dist/managers/MXLConfigManager/types.d.ts.map +1 -1
  362. package/dist/managers/MXLConfigManager/utils.cjs +37 -0
  363. package/dist/managers/MXLConfigManager/utils.cjs.map +1 -1
  364. package/dist/managers/MXLConfigManager/utils.d.cts.map +1 -1
  365. package/dist/managers/MXLConfigManager/utils.d.ts.map +1 -1
  366. package/dist/managers/MXLConfigManager/utils.js +37 -0
  367. package/dist/managers/MXLConfigManager/utils.js.map +1 -1
  368. package/dist/managers/MXLLogManager/MXLLogManager.cjs +7 -8
  369. package/dist/managers/MXLLogManager/MXLLogManager.cjs.map +1 -1
  370. package/dist/managers/MXLLogManager/MXLLogManager.js +3 -4
  371. package/dist/managers/MXLLogManager/MXLLogManager.js.map +1 -1
  372. package/dist/managers/MXLLogManager/MXLLoggerProvider.cjs +46 -0
  373. package/dist/managers/MXLLogManager/MXLLoggerProvider.cjs.map +1 -0
  374. package/dist/managers/MXLLogManager/MXLLoggerProvider.d.cts +22 -0
  375. package/dist/managers/MXLLogManager/MXLLoggerProvider.d.cts.map +1 -0
  376. package/dist/managers/MXLLogManager/MXLLoggerProvider.d.ts +22 -0
  377. package/dist/managers/MXLLogManager/MXLLoggerProvider.d.ts.map +1 -0
  378. package/dist/managers/MXLLogManager/MXLLoggerProvider.js +44 -0
  379. package/dist/managers/MXLLogManager/MXLLoggerProvider.js.map +1 -0
  380. package/dist/managers/MXLLogManager/types.d.cts +9 -3
  381. package/dist/managers/MXLLogManager/types.d.cts.map +1 -1
  382. package/dist/managers/MXLLogManager/types.d.ts +9 -3
  383. package/dist/managers/MXLLogManager/types.d.ts.map +1 -1
  384. package/dist/managers/MXLPageManager/MXLPageManager.cjs +6 -5
  385. package/dist/managers/MXLPageManager/MXLPageManager.cjs.map +1 -1
  386. package/dist/managers/MXLPageManager/MXLPageManager.d.cts.map +1 -1
  387. package/dist/managers/MXLPageManager/MXLPageManager.d.ts.map +1 -1
  388. package/dist/managers/MXLPageManager/MXLPageManager.js +7 -6
  389. package/dist/managers/MXLPageManager/MXLPageManager.js.map +1 -1
  390. package/dist/managers/MXLTraceManager/MXLExtendedSpan.cjs +56 -9
  391. package/dist/managers/MXLTraceManager/MXLExtendedSpan.cjs.map +1 -1
  392. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.cts +21 -5
  393. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.cts.map +1 -1
  394. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.ts +21 -5
  395. package/dist/managers/MXLTraceManager/MXLExtendedSpan.d.ts.map +1 -1
  396. package/dist/managers/MXLTraceManager/MXLExtendedSpan.js +56 -10
  397. package/dist/managers/MXLTraceManager/MXLExtendedSpan.js.map +1 -1
  398. package/dist/managers/MXLTraceManager/MXLTraceManager.cjs +2 -2
  399. package/dist/managers/MXLTraceManager/MXLTraceManager.cjs.map +1 -1
  400. package/dist/managers/MXLTraceManager/MXLTraceManager.js +2 -2
  401. package/dist/managers/MXLTraceManager/MXLTraceManager.js.map +1 -1
  402. package/dist/managers/MXLTraceManager/MXLTracerProvider.cjs +42 -0
  403. package/dist/managers/MXLTraceManager/MXLTracerProvider.cjs.map +1 -0
  404. package/dist/managers/MXLTraceManager/MXLTracerProvider.d.cts +22 -0
  405. package/dist/managers/MXLTraceManager/MXLTracerProvider.d.cts.map +1 -0
  406. package/dist/managers/MXLTraceManager/MXLTracerProvider.d.ts +22 -0
  407. package/dist/managers/MXLTraceManager/MXLTracerProvider.d.ts.map +1 -0
  408. package/dist/managers/MXLTraceManager/MXLTracerProvider.js +40 -0
  409. package/dist/managers/MXLTraceManager/MXLTracerProvider.js.map +1 -0
  410. package/dist/managers/MXLTraceManager/types.cjs +0 -0
  411. package/dist/managers/MXLTraceManager/types.d.cts +10 -0
  412. package/dist/managers/MXLTraceManager/types.d.cts.map +1 -0
  413. package/dist/managers/MXLTraceManager/types.d.ts +10 -0
  414. package/dist/managers/MXLTraceManager/types.d.ts.map +1 -0
  415. package/dist/managers/MXLTraceManager/types.js +0 -0
  416. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs +30 -20
  417. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs.map +1 -1
  418. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts +3 -3
  419. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts.map +1 -1
  420. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts +3 -3
  421. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts.map +1 -1
  422. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js +31 -21
  423. package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js.map +1 -1
  424. package/dist/managers/MXLUserSessionManager/types.d.cts +10 -2
  425. package/dist/managers/MXLUserSessionManager/types.d.cts.map +1 -1
  426. package/dist/managers/MXLUserSessionManager/types.d.ts +10 -2
  427. package/dist/managers/MXLUserSessionManager/types.d.ts.map +1 -1
  428. package/dist/mxl-web-sdk.js +12 -2
  429. package/dist/mxl-web-sdk.js.map +1 -1
  430. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.cjs.map +1 -1
  431. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.cts +2 -2
  432. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.cts.map +1 -1
  433. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.ts +2 -2
  434. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.d.ts.map +1 -1
  435. package/dist/processors/BrowserLogRecordProcessor/BrowserLogRecordProcessor.js.map +1 -1
  436. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.cjs.map +1 -1
  437. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.cts +2 -2
  438. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.cts.map +1 -1
  439. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.ts +2 -2
  440. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.d.ts.map +1 -1
  441. package/dist/processors/LogRecordScrubProcessor/LogRecordScrubProcessor.js.map +1 -1
  442. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.cjs.map +1 -1
  443. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.cts +2 -2
  444. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.cts.map +1 -1
  445. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.ts +2 -2
  446. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.d.ts.map +1 -1
  447. package/dist/processors/MXLLogRecordProcessor/MXLLogRecordProcessor.js.map +1 -1
  448. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.cjs +1 -1
  449. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.cjs.map +1 -1
  450. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.cts +2 -2
  451. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.cts.map +1 -1
  452. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.ts +2 -2
  453. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.d.ts.map +1 -1
  454. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.js +1 -1
  455. package/dist/processors/PageLogRecordProcessor/PageLogRecordProcessor.js.map +1 -1
  456. package/dist/processors/PageSpanProcessor/PageSpanProcessor.cjs +1 -1
  457. package/dist/processors/PageSpanProcessor/PageSpanProcessor.cjs.map +1 -1
  458. package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.cts.map +1 -1
  459. package/dist/processors/PageSpanProcessor/PageSpanProcessor.d.ts.map +1 -1
  460. package/dist/processors/PageSpanProcessor/PageSpanProcessor.js +1 -1
  461. package/dist/processors/PageSpanProcessor/PageSpanProcessor.js.map +1 -1
  462. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.cjs +26 -0
  463. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.cjs.map +1 -0
  464. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.cts +20 -0
  465. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.cts.map +1 -0
  466. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.ts +20 -0
  467. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.d.ts.map +1 -0
  468. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.js +25 -0
  469. package/dist/processors/PerfClockLagLogRecordProcessor/PerfClockLagLogRecordProcessor.js.map +1 -0
  470. package/dist/processors/PerfClockLagLogRecordProcessor/types.cjs +0 -0
  471. package/dist/processors/PerfClockLagLogRecordProcessor/types.d.cts +9 -0
  472. package/dist/processors/PerfClockLagLogRecordProcessor/types.d.cts.map +1 -0
  473. package/dist/processors/PerfClockLagLogRecordProcessor/types.d.ts +9 -0
  474. package/dist/processors/PerfClockLagLogRecordProcessor/types.d.ts.map +1 -0
  475. package/dist/processors/PerfClockLagLogRecordProcessor/types.js +0 -0
  476. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.cjs +27 -0
  477. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.cjs.map +1 -0
  478. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.cts +21 -0
  479. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.cts.map +1 -0
  480. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.ts +21 -0
  481. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.d.ts.map +1 -0
  482. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.js +26 -0
  483. package/dist/processors/PerfClockLagSpanProcessor/PerfClockLagSpanProcessor.js.map +1 -0
  484. package/dist/processors/PerfClockLagSpanProcessor/types.cjs +0 -0
  485. package/dist/processors/PerfClockLagSpanProcessor/types.d.cts +9 -0
  486. package/dist/processors/PerfClockLagSpanProcessor/types.d.cts.map +1 -0
  487. package/dist/processors/PerfClockLagSpanProcessor/types.d.ts +9 -0
  488. package/dist/processors/PerfClockLagSpanProcessor/types.d.ts.map +1 -0
  489. package/dist/processors/PerfClockLagSpanProcessor/types.js +0 -0
  490. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.cjs +1 -1
  491. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.cjs.map +1 -1
  492. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.cts +2 -2
  493. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.cts.map +1 -1
  494. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.ts +2 -2
  495. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.d.ts.map +1 -1
  496. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.js +1 -1
  497. package/dist/processors/SignalCorrelationLogRecordProcessor/SignalCorrelationLogRecordProcessor.js.map +1 -1
  498. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.cjs.map +1 -1
  499. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.cts +2 -2
  500. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.cts.map +1 -1
  501. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.ts +2 -2
  502. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.d.ts.map +1 -1
  503. package/dist/processors/UserLogRecordProcessor/UserLogRecordProcessor.js.map +1 -1
  504. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.cjs.map +1 -1
  505. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.cts +2 -2
  506. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.cts.map +1 -1
  507. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.ts +2 -2
  508. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.d.ts.map +1 -1
  509. package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.js.map +1 -1
  510. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs +30 -0
  511. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs.map +1 -0
  512. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts +22 -0
  513. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts.map +1 -0
  514. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts +22 -0
  515. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts.map +1 -0
  516. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js +29 -0
  517. package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js.map +1 -0
  518. package/dist/processors/UserSessionSpanProcessor/types.cjs +0 -0
  519. package/dist/processors/UserSessionSpanProcessor/types.d.cts +9 -0
  520. package/dist/processors/UserSessionSpanProcessor/types.d.cts.map +1 -0
  521. package/dist/processors/UserSessionSpanProcessor/types.d.ts +9 -0
  522. package/dist/processors/UserSessionSpanProcessor/types.d.ts.map +1 -0
  523. package/dist/processors/UserSessionSpanProcessor/types.js +0 -0
  524. package/dist/resources/sdkConstants.cjs +1 -1
  525. package/dist/resources/sdkConstants.cjs.map +1 -1
  526. package/dist/resources/sdkConstants.d.cts +1 -1
  527. package/dist/resources/sdkConstants.d.ts +1 -1
  528. package/dist/resources/sdkConstants.js +1 -1
  529. package/dist/resources/sdkConstants.js.map +1 -1
  530. package/dist/sdk/endpoints.cjs +2 -2
  531. package/dist/sdk/endpoints.cjs.map +1 -1
  532. package/dist/sdk/endpoints.d.cts +1 -1
  533. package/dist/sdk/endpoints.d.ts +1 -1
  534. package/dist/sdk/endpoints.js +2 -2
  535. package/dist/sdk/endpoints.js.map +1 -1
  536. package/dist/sdk/initSDK.cjs +43 -12
  537. package/dist/sdk/initSDK.cjs.map +1 -1
  538. package/dist/sdk/initSDK.js +46 -15
  539. package/dist/sdk/initSDK.js.map +1 -1
  540. package/dist/sdk/networkInstrumentations.cjs +1 -1
  541. package/dist/sdk/networkInstrumentations.cjs.map +1 -1
  542. package/dist/sdk/networkInstrumentations.d.cts.map +1 -1
  543. package/dist/sdk/networkInstrumentations.d.ts.map +1 -1
  544. package/dist/sdk/networkInstrumentations.js +1 -1
  545. package/dist/sdk/networkInstrumentations.js.map +1 -1
  546. package/dist/sdk/resolveInitConfig.cjs +2 -1
  547. package/dist/sdk/resolveInitConfig.cjs.map +1 -1
  548. package/dist/sdk/resolveInitConfig.d.cts +4 -0
  549. package/dist/sdk/resolveInitConfig.d.cts.map +1 -1
  550. package/dist/sdk/resolveInitConfig.d.ts +4 -0
  551. package/dist/sdk/resolveInitConfig.d.ts.map +1 -1
  552. package/dist/sdk/resolveInitConfig.js +2 -1
  553. package/dist/sdk/resolveInitConfig.js.map +1 -1
  554. package/dist/sdk/setupDefaultInstrumentations.cjs +17 -1
  555. package/dist/sdk/setupDefaultInstrumentations.cjs.map +1 -1
  556. package/dist/sdk/setupDefaultInstrumentations.d.cts +2 -1
  557. package/dist/sdk/setupDefaultInstrumentations.d.cts.map +1 -1
  558. package/dist/sdk/setupDefaultInstrumentations.d.ts +2 -1
  559. package/dist/sdk/setupDefaultInstrumentations.d.ts.map +1 -1
  560. package/dist/sdk/setupDefaultInstrumentations.js +17 -1
  561. package/dist/sdk/setupDefaultInstrumentations.js.map +1 -1
  562. package/dist/sdk/types.d.cts +43 -2
  563. package/dist/sdk/types.d.cts.map +1 -1
  564. package/dist/sdk/types.d.ts +43 -2
  565. package/dist/sdk/types.d.ts.map +1 -1
  566. package/dist/transport/RetryingTransport/RetryingTransport.cjs +2 -2
  567. package/dist/transport/RetryingTransport/RetryingTransport.cjs.map +1 -1
  568. package/dist/transport/RetryingTransport/RetryingTransport.js +2 -2
  569. package/dist/transport/RetryingTransport/RetryingTransport.js.map +1 -1
  570. package/dist/utils/InMemoryStorage/InMemoryStorage.cjs +27 -0
  571. package/dist/utils/InMemoryStorage/InMemoryStorage.cjs.map +1 -0
  572. package/dist/utils/InMemoryStorage/InMemoryStorage.d.cts +13 -0
  573. package/dist/utils/InMemoryStorage/InMemoryStorage.d.cts.map +1 -0
  574. package/dist/utils/InMemoryStorage/InMemoryStorage.d.ts +13 -0
  575. package/dist/utils/InMemoryStorage/InMemoryStorage.d.ts.map +1 -0
  576. package/dist/utils/InMemoryStorage/InMemoryStorage.js +26 -0
  577. package/dist/utils/InMemoryStorage/InMemoryStorage.js.map +1 -0
  578. package/dist/utils/PerformanceManager/OTelPerformanceManager.cjs +71 -24
  579. package/dist/utils/PerformanceManager/OTelPerformanceManager.cjs.map +1 -1
  580. package/dist/utils/PerformanceManager/OTelPerformanceManager.d.cts +18 -19
  581. package/dist/utils/PerformanceManager/OTelPerformanceManager.d.cts.map +1 -1
  582. package/dist/utils/PerformanceManager/OTelPerformanceManager.d.ts +18 -19
  583. package/dist/utils/PerformanceManager/OTelPerformanceManager.d.ts.map +1 -1
  584. package/dist/utils/PerformanceManager/OTelPerformanceManager.js +70 -22
  585. package/dist/utils/PerformanceManager/OTelPerformanceManager.js.map +1 -1
  586. package/dist/utils/PerformanceManager/types.d.cts +28 -12
  587. package/dist/utils/PerformanceManager/types.d.cts.map +1 -1
  588. package/dist/utils/PerformanceManager/types.d.ts +28 -12
  589. package/dist/utils/PerformanceManager/types.d.ts.map +1 -1
  590. package/dist/utils/getWindowStorageOrInMemory.cjs +24 -0
  591. package/dist/utils/getWindowStorageOrInMemory.cjs.map +1 -0
  592. package/dist/utils/getWindowStorageOrInMemory.d.cts +13 -0
  593. package/dist/utils/getWindowStorageOrInMemory.d.cts.map +1 -0
  594. package/dist/utils/getWindowStorageOrInMemory.d.ts +13 -0
  595. package/dist/utils/getWindowStorageOrInMemory.d.ts.map +1 -0
  596. package/dist/utils/getWindowStorageOrInMemory.js +23 -0
  597. package/dist/utils/getWindowStorageOrInMemory.js.map +1 -0
  598. package/dist/utils/sdkLoadOriginOffset.cjs +12 -0
  599. package/dist/utils/sdkLoadOriginOffset.cjs.map +1 -0
  600. package/dist/utils/sdkLoadOriginOffset.d.cts +10 -0
  601. package/dist/utils/sdkLoadOriginOffset.d.cts.map +1 -0
  602. package/dist/utils/sdkLoadOriginOffset.d.ts +10 -0
  603. package/dist/utils/sdkLoadOriginOffset.d.ts.map +1 -0
  604. package/dist/utils/sdkLoadOriginOffset.js +11 -0
  605. package/dist/utils/sdkLoadOriginOffset.js.map +1 -0
  606. package/package.json +20 -22
@@ -1,35 +1,32 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_api_page_pageAPI = require("../../../../../api-page/pageAPI.cjs");
2
3
  require("../../../../../constants/attributes.cjs");
3
4
  const require_instrumentations_navigation_NavigationInstrumentation_instance = require("../../instance.cjs");
4
5
  //#region src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts
5
6
  /**
6
- * GetRouteFromMatches goes through all the matches routes to build the full path
7
- * nested routes contain only the partial match, so we need to go through all of them
8
- * in order to build the full path.
9
- *
10
- * Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.
7
+ * matchRoutes already scopes `matches` to the given pathname, ordered from
8
+ * the root route to the deepest one, so the full pattern is built by
9
+ * reducing over all of them. Pathless layout and index routes contribute no
10
+ * `route.path` of their own, so they're skipped.
11
11
  */
12
12
  const getRouteFromMatches = (matches, currentPathname) => {
13
- const currentMatchIndex = matches.findIndex((match) => match.pathname === currentPathname);
14
- if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) return null;
15
- return matches.slice(0, currentMatchIndex + 1).reduce((acc, match) => {
13
+ return matches.reduce((acc, match) => {
16
14
  const routePath = match.route.path;
17
15
  if (!routePath) return acc;
18
16
  return {
19
17
  path: routePath.startsWith("/") ? routePath : `${acc?.path ?? ""}/${routePath}`,
20
- url: matches[currentMatchIndex].pathname
18
+ url: currentPathname
21
19
  };
22
20
  }, null);
23
21
  };
24
22
  const listenToRouterChanges = ({ router, routesMatcher, config: { pathnameDocument = window.location } = {} }) => {
25
- const navigationInstrumentation = require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation();
26
- navigationInstrumentation.setInstrumentationType("react_router_data");
23
+ require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation().setInstrumentationType("react_router_data");
27
24
  const initialMatches = routesMatcher(router.routes, { pathname: pathnameDocument.pathname });
28
25
  const initialRoute = initialMatches ? getRouteFromMatches(initialMatches, pathnameDocument.pathname) : null;
29
- if (initialRoute) navigationInstrumentation.setCurrentRoute(initialRoute);
26
+ if (initialRoute) require_api_page_pageAPI.page.setCurrentRoute(initialRoute);
30
27
  return router.subscribe((state) => {
31
28
  const currentRoute = getRouteFromMatches(state.matches, state.location.pathname);
32
- if (currentRoute) navigationInstrumentation.setCurrentRoute(currentRoute);
29
+ if (currentRoute) require_api_page_pageAPI.page.setCurrentRoute(currentRoute);
33
30
  });
34
31
  };
35
32
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"listenToRouterChanges.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * GetRouteFromMatches goes through all the matches routes to build the full path\n * nested routes contain only the partial match, so we need to go through all of them\n * in order to build the full path.\n *\n * Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n const currentMatchIndex = matches.findIndex(\n (match) => match.pathname === currentPathname,\n );\n\n if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) {\n return null;\n }\n\n // Build full absolute path by reducing all matches up to the current one.\n // Absolute child paths reset the accumulation; relative paths are appended.\n return matches\n .slice(0, currentMatchIndex + 1)\n .reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: matches[currentMatchIndex].pathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n navigationInstrumentation.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n navigationInstrumentation.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;CACjB,MAAM,oBAAoB,QAAQ,WAC/B,UAAU,MAAM,aAAa,gBAC/B;AAED,KAAI,sBAAsB,MAAM,CAAC,QAAQ,mBAAmB,MAAM,KAChE,QAAO;AAKT,QAAO,QACJ,MAAM,GAAG,oBAAoB,EAAE,CAC/B,QAAsB,KAAK,UAAU;EACpC,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK,QAAQ,mBAAmB;GAAU;IACxD,KAAK;;AAGZ,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;CAC/B,MAAM,4BAA4BA,uEAAAA,8BAA8B;AAChE,2BAA0B,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,2BAA0B,gBAAgB,aAAa;AAGzD,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,2BAA0B,gBAAgB,aAAa;GAEzD"}
1
+ {"version":3,"file":"listenToRouterChanges.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * matchRoutes already scopes `matches` to the given pathname, ordered from\n * the root route to the deepest one, so the full pattern is built by\n * reducing over all of them. Pathless layout and index routes contribute no\n * `route.path` of their own, so they're skipped.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n return matches.reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: currentPathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n page.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n page.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;AACjB,QAAO,QAAQ,QAAsB,KAAK,UAAU;EAClD,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK;GAAiB;IACpC,KAAK;;AAGV,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;AACGA,wEAAAA,8BACT,CAAC,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,0BAAA,KAAK,gBAAgB,aAAa;AAGpC,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,0BAAA,KAAK,gBAAgB,aAAa;GAEpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"listenToRouterChanges.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cA6Ca,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
1
+ {"version":3,"file":"listenToRouterChanges.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cAiCa,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"listenToRouterChanges.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cA6Ca,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
1
+ {"version":3,"file":"listenToRouterChanges.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"mappings":";;;cAiCa,qBAAA;EAAyB,MAAA;EAAA,aAAA;EAAA,MAAA;IAAA;EAAA;AAAA,GAInC,yBAAA"}
@@ -1,34 +1,31 @@
1
+ import { page } from "../../../../../api-page/pageAPI.js";
1
2
  import "../../../../../constants/attributes.js";
2
3
  import { getNavigationInstrumentation } from "../../instance.js";
3
4
  //#region src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts
4
5
  /**
5
- * GetRouteFromMatches goes through all the matches routes to build the full path
6
- * nested routes contain only the partial match, so we need to go through all of them
7
- * in order to build the full path.
8
- *
9
- * Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.
6
+ * matchRoutes already scopes `matches` to the given pathname, ordered from
7
+ * the root route to the deepest one, so the full pattern is built by
8
+ * reducing over all of them. Pathless layout and index routes contribute no
9
+ * `route.path` of their own, so they're skipped.
10
10
  */
11
11
  const getRouteFromMatches = (matches, currentPathname) => {
12
- const currentMatchIndex = matches.findIndex((match) => match.pathname === currentPathname);
13
- if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) return null;
14
- return matches.slice(0, currentMatchIndex + 1).reduce((acc, match) => {
12
+ return matches.reduce((acc, match) => {
15
13
  const routePath = match.route.path;
16
14
  if (!routePath) return acc;
17
15
  return {
18
16
  path: routePath.startsWith("/") ? routePath : `${acc?.path ?? ""}/${routePath}`,
19
- url: matches[currentMatchIndex].pathname
17
+ url: currentPathname
20
18
  };
21
19
  }, null);
22
20
  };
23
21
  const listenToRouterChanges = ({ router, routesMatcher, config: { pathnameDocument = window.location } = {} }) => {
24
- const navigationInstrumentation = getNavigationInstrumentation();
25
- navigationInstrumentation.setInstrumentationType("react_router_data");
22
+ getNavigationInstrumentation().setInstrumentationType("react_router_data");
26
23
  const initialMatches = routesMatcher(router.routes, { pathname: pathnameDocument.pathname });
27
24
  const initialRoute = initialMatches ? getRouteFromMatches(initialMatches, pathnameDocument.pathname) : null;
28
- if (initialRoute) navigationInstrumentation.setCurrentRoute(initialRoute);
25
+ if (initialRoute) page.setCurrentRoute(initialRoute);
29
26
  return router.subscribe((state) => {
30
27
  const currentRoute = getRouteFromMatches(state.matches, state.location.pathname);
31
- if (currentRoute) navigationInstrumentation.setCurrentRoute(currentRoute);
28
+ if (currentRoute) page.setCurrentRoute(currentRoute);
32
29
  });
33
30
  };
34
31
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"listenToRouterChanges.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * GetRouteFromMatches goes through all the matches routes to build the full path\n * nested routes contain only the partial match, so we need to go through all of them\n * in order to build the full path.\n *\n * Filtering by currentPathname ensures that we only consider routes that are relevant to the current URL.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n const currentMatchIndex = matches.findIndex(\n (match) => match.pathname === currentPathname,\n );\n\n if (currentMatchIndex === -1 || !matches[currentMatchIndex].route.path) {\n return null;\n }\n\n // Build full absolute path by reducing all matches up to the current one.\n // Absolute child paths reset the accumulation; relative paths are appended.\n return matches\n .slice(0, currentMatchIndex + 1)\n .reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: matches[currentMatchIndex].pathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n navigationInstrumentation.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n navigationInstrumentation.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;CACjB,MAAM,oBAAoB,QAAQ,WAC/B,UAAU,MAAM,aAAa,gBAC/B;AAED,KAAI,sBAAsB,MAAM,CAAC,QAAQ,mBAAmB,MAAM,KAChE,QAAO;AAKT,QAAO,QACJ,MAAM,GAAG,oBAAoB,EAAE,CAC/B,QAAsB,KAAK,UAAU;EACpC,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK,QAAQ,mBAAmB;GAAU;IACxD,KAAK;;AAGZ,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;CAC/B,MAAM,4BAA4B,8BAA8B;AAChE,2BAA0B,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,2BAA0B,gBAAgB,aAAa;AAGzD,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,2BAA0B,gBAAgB,aAAa;GAEzD"}
1
+ {"version":3,"file":"listenToRouterChanges.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Data/listenToRouterChanges.ts"],"sourcesContent":["import type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { ListenToRouterChangesArgs, Match } from './types';\n\n/**\n * matchRoutes already scopes `matches` to the given pathname, ordered from\n * the root route to the deepest one, so the full pattern is built by\n * reducing over all of them. Pathless layout and index routes contribute no\n * `route.path` of their own, so they're skipped.\n */\nconst getRouteFromMatches = (\n matches: Match[],\n currentPathname: string,\n): Route | null => {\n return matches.reduce<Route | null>((acc, match) => {\n const routePath = match.route.path;\n\n if (!routePath) {\n return acc;\n }\n\n // If the route path starts with '/', it's an absolute path and should reset the accumulated path.\n // Otherwise, it's a relative path and should be appended to the accumulated path.\n const path = routePath.startsWith('/')\n ? routePath\n : `${acc?.path ?? ''}/${routePath}`;\n\n return { path, url: currentPathname };\n }, null);\n};\n\nexport const listenToRouterChanges = ({\n router,\n routesMatcher,\n config: { pathnameDocument = window.location } = {},\n}: ListenToRouterChangesArgs) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Data,\n );\n\n const initialMatches = routesMatcher(router.routes, {\n pathname: pathnameDocument.pathname,\n });\n\n const initialRoute = initialMatches\n ? getRouteFromMatches(initialMatches, pathnameDocument.pathname)\n : null;\n\n if (initialRoute) {\n page.setCurrentRoute(initialRoute);\n }\n\n return router.subscribe((state) => {\n // State has a list of already matched routes\n // https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/router/router.ts#L954\n const currentRoute = getRouteFromMatches(\n state.matches,\n state.location.pathname,\n );\n\n if (currentRoute) {\n page.setCurrentRoute(currentRoute);\n }\n });\n};\n"],"mappings":";;;;;;;;;;AAYA,MAAM,uBACJ,SACA,oBACiB;AACjB,QAAO,QAAQ,QAAsB,KAAK,UAAU;EAClD,MAAM,YAAY,MAAM,MAAM;AAE9B,MAAI,CAAC,UACH,QAAO;AAST,SAAO;GAAE,MAJI,UAAU,WAAW,IAAI,GAClC,YACA,GAAG,KAAK,QAAQ,GAAG,GAAG;GAEX,KAAK;GAAiB;IACpC,KAAK;;AAGV,MAAa,yBAAyB,EACpC,QACA,eACA,QAAQ,EAAE,mBAAmB,OAAO,aAAa,EAAE,OACpB;AACG,+BACT,CAAC,uBAAA,oBAEzB;CAED,MAAM,iBAAiB,cAAc,OAAO,QAAQ,EAClD,UAAU,iBAAiB,UAC5B,CAAC;CAEF,MAAM,eAAe,iBACjB,oBAAoB,gBAAgB,iBAAiB,SAAS,GAC9D;AAEJ,KAAI,aACF,MAAK,gBAAgB,aAAa;AAGpC,QAAO,OAAO,WAAW,UAAU;EAGjC,MAAM,eAAe,oBACnB,MAAM,SACN,MAAM,SAAS,SAChB;AAED,MAAI,aACF,MAAK,gBAAgB,aAAa;GAEpC"}
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
3
+ const require_api_page_pageAPI = require("../../../../../api-page/pageAPI.cjs");
3
4
  require("../../../../../constants/attributes.cjs");
4
5
  const require_instrumentations_navigation_NavigationInstrumentation_instance = require("../../instance.cjs");
5
6
  const require_hoist_non_react_statics_cjs$1 = require("../../../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.cjs");
@@ -9,7 +10,11 @@ var import_hoist_non_react_statics_cjs = /* @__PURE__ */ require_runtime.__toESM
9
10
  const getLastRoute = (matchedComponent, lastRoute) => {
10
11
  if (!matchedComponent.props.match?.route) return null;
11
12
  const childPath = matchedComponent.props.match.route.path;
12
- const path = lastRoute && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
13
+ if (!childPath) {
14
+ if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, lastRoute);
15
+ return lastRoute;
16
+ }
17
+ const path = lastRoute?.path && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
13
18
  if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, {
14
19
  path,
15
20
  url: matchedComponent.props.match.pathname
@@ -20,8 +25,7 @@ const getLastRoute = (matchedComponent, lastRoute) => {
20
25
  };
21
26
  };
22
27
  const withMXLRouting = (WrappedComponent) => {
23
- const navigationInstrumentation = require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation();
24
- navigationInstrumentation.setInstrumentationType("react_router_declarative");
28
+ require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation().setInstrumentationType("react_router_declarative");
25
29
  const RoutesWithMXLRouting = (props) => {
26
30
  /**
27
31
  * React-router v6+ implementation is very different from v5
@@ -37,7 +41,7 @@ const withMXLRouting = (WrappedComponent) => {
37
41
  const matchedComponent = WrappedComponent(props);
38
42
  if (matchedComponent.props.match?.route) {
39
43
  const lastRoute = getLastRoute(matchedComponent, null);
40
- if (lastRoute) navigationInstrumentation.setCurrentRoute(lastRoute);
44
+ if (lastRoute) require_api_page_pageAPI.page.setCurrentRoute(lastRoute);
41
45
  }
42
46
  return (0, react.createElement)(WrappedComponent, props);
43
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"withMXLRouting.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n const path =\n lastRoute && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n navigationInstrumentation.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;;AASA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;CACrD,MAAM,OACJ,aAAa,CAAC,UAAU,WAAW,IAAI,GACnC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;CACH,MAAM,4BAA4BA,uEAAAA,8BAA8B;AAChE,2BAA0B,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,2BAA0B,gBAAgB,UAAU;;AAIxD,UAAA,GAAA,MAAA,eAAwB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
1
+ {"version":3,"file":"withMXLRouting.cjs","names":["getNavigationInstrumentation"],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n if (!childPath) {\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(\n matchedComponent.props.routeContext.outlet,\n lastRoute,\n );\n }\n return lastRoute;\n }\n\n const path =\n lastRoute?.path && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n page.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;;;AAUA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;AACrD,KAAI,CAAC,WAAW;AACd,MAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aACL,iBAAiB,MAAM,aAAa,QACpC,UACD;AAEH,SAAO;;CAGT,MAAM,OACJ,WAAW,QAAQ,CAAC,UAAU,WAAW,IAAI,GACzC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;AAC+BA,wEAAAA,8BACT,CAAC,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,0BAAA,KAAK,gBAAgB,UAAU;;AAInC,UAAA,GAAA,MAAA,eAAwB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"withMXLRouting.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cAoCa,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"withMXLRouting.d.cts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cA+Ca,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"withMXLRouting.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cAoCa,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"withMXLRouting.d.ts","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"mappings":";;;cA+Ca,cAAA,qBACX,gBAAA,EAAkB,KAAA,CAAM,iBAAA,CAAkB,CAAA,MAAE,KAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
2
+ import { page } from "../../../../../api-page/pageAPI.js";
2
3
  import "../../../../../constants/attributes.js";
3
4
  import { getNavigationInstrumentation } from "../../instance.js";
4
5
  import { require_hoist_non_react_statics_cjs } from "../../../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
@@ -8,7 +9,11 @@ var import_hoist_non_react_statics_cjs = /* @__PURE__ */ __toESM(require_hoist_n
8
9
  const getLastRoute = (matchedComponent, lastRoute) => {
9
10
  if (!matchedComponent.props.match?.route) return null;
10
11
  const childPath = matchedComponent.props.match.route.path;
11
- const path = lastRoute && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
12
+ if (!childPath) {
13
+ if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, lastRoute);
14
+ return lastRoute;
15
+ }
16
+ const path = lastRoute?.path && !childPath.startsWith("/") ? `${lastRoute.path}/${childPath}` : childPath;
12
17
  if (matchedComponent.props.routeContext?.outlet) return getLastRoute(matchedComponent.props.routeContext.outlet, {
13
18
  path,
14
19
  url: matchedComponent.props.match.pathname
@@ -19,8 +24,7 @@ const getLastRoute = (matchedComponent, lastRoute) => {
19
24
  };
20
25
  };
21
26
  const withMXLRouting = (WrappedComponent) => {
22
- const navigationInstrumentation = getNavigationInstrumentation();
23
- navigationInstrumentation.setInstrumentationType("react_router_declarative");
27
+ getNavigationInstrumentation().setInstrumentationType("react_router_declarative");
24
28
  const RoutesWithMXLRouting = (props) => {
25
29
  /**
26
30
  * React-router v6+ implementation is very different from v5
@@ -36,7 +40,7 @@ const withMXLRouting = (WrappedComponent) => {
36
40
  const matchedComponent = WrappedComponent(props);
37
41
  if (matchedComponent.props.match?.route) {
38
42
  const lastRoute = getLastRoute(matchedComponent, null);
39
- if (lastRoute) navigationInstrumentation.setCurrentRoute(lastRoute);
43
+ if (lastRoute) page.setCurrentRoute(lastRoute);
40
44
  }
41
45
  return createElement(WrappedComponent, props);
42
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"withMXLRouting.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n const path =\n lastRoute && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n navigationInstrumentation.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;AASA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;CACrD,MAAM,OACJ,aAAa,CAAC,UAAU,WAAW,IAAI,GACnC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;CACH,MAAM,4BAA4B,8BAA8B;AAChE,2BAA0B,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,2BAA0B,gBAAgB,UAAU;;AAIxD,SAAO,cAAiB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
1
+ {"version":3,"file":"withMXLRouting.js","names":[],"sources":["../../../../../../src/instrumentations/navigation/NavigationInstrumentation/react/reactRouterV6Declarative/withMXLRouting.ts"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport type React from 'react';\nimport { createElement } from 'react';\nimport type { Route } from '../../../../../api-page/manager/types';\nimport { page } from '../../../../../api-page/pageAPI';\nimport { MXL_NAVIGATION_INSTRUMENTATIONS } from '../../../../../constants/attributes';\nimport { getNavigationInstrumentation } from '../../instance';\nimport type { RoutesFunctionalComponentReturn } from './types';\n\n// Routes can be nested, we need to traverse the routeContext to find the last route\nconst getLastRoute = (\n matchedComponent: RoutesFunctionalComponentReturn,\n lastRoute: Route | null,\n): Route | null => {\n if (!matchedComponent.props.match?.route) {\n return null;\n }\n\n const childPath = matchedComponent.props.match.route.path;\n if (!childPath) {\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(\n matchedComponent.props.routeContext.outlet,\n lastRoute,\n );\n }\n return lastRoute;\n }\n\n const path =\n lastRoute?.path && !childPath.startsWith('/')\n ? `${lastRoute.path}/${childPath}`\n : childPath;\n\n if (matchedComponent.props.routeContext?.outlet) {\n return getLastRoute(matchedComponent.props.routeContext.outlet, {\n path,\n url: matchedComponent.props.match.pathname,\n });\n }\n\n return {\n path,\n url: matchedComponent.props.match.pathname,\n };\n};\n\nexport const withMXLRouting = <P extends object>(\n WrappedComponent: React.FunctionComponent<P>,\n) => {\n const navigationInstrumentation = getNavigationInstrumentation();\n navigationInstrumentation.setInstrumentationType(\n MXL_NAVIGATION_INSTRUMENTATIONS.Declarative,\n );\n\n const RoutesWithMXLRouting: React.FC<P> = (props: P) => {\n /**\n * React-router v6+ implementation is very different from v5\n * It doesn't have a <Switch> component that injects props into <Route>\n * Instead, it has <Routes> which internally calculates the matched route\n * and returns it as a children, <Route> cannot be wrapped since it requires all children to be a <Route> component\n * here we rely on that matching to get the current route.\n * It's not ideal to rely on internal implementation details, but it's the easier way of getting the current route\n * without having to manually match it or using hooks on each children component\n *\n * See: https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/hooks.tsx#L553\n */\n const matchedComponent = WrappedComponent(\n props,\n ) as unknown as RoutesFunctionalComponentReturn;\n\n if (matchedComponent.props.match?.route) {\n const lastRoute = getLastRoute(matchedComponent, null);\n if (lastRoute) {\n page.setCurrentRoute(lastRoute);\n }\n }\n\n return createElement<P>(WrappedComponent, props);\n };\n\n // Keep wrapped component metadata\n RoutesWithMXLRouting.displayName = `withMXLRouting(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;\n hoistNonReactStatics(RoutesWithMXLRouting, WrappedComponent);\n\n return RoutesWithMXLRouting;\n};\n"],"mappings":";;;;;;;;AAUA,MAAM,gBACJ,kBACA,cACiB;AACjB,KAAI,CAAC,iBAAiB,MAAM,OAAO,MACjC,QAAO;CAGT,MAAM,YAAY,iBAAiB,MAAM,MAAM,MAAM;AACrD,KAAI,CAAC,WAAW;AACd,MAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aACL,iBAAiB,MAAM,aAAa,QACpC,UACD;AAEH,SAAO;;CAGT,MAAM,OACJ,WAAW,QAAQ,CAAC,UAAU,WAAW,IAAI,GACzC,GAAG,UAAU,KAAK,GAAG,cACrB;AAEN,KAAI,iBAAiB,MAAM,cAAc,OACvC,QAAO,aAAa,iBAAiB,MAAM,aAAa,QAAQ;EAC9D;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC,CAAC;AAGJ,QAAO;EACL;EACA,KAAK,iBAAiB,MAAM,MAAM;EACnC;;AAGH,MAAa,kBACX,qBACG;AAC+B,+BACT,CAAC,uBAAA,2BAEzB;CAED,MAAM,wBAAqC,UAAa;;;;;;;;;;;;EAYtD,MAAM,mBAAmB,iBACvB,MACD;AAED,MAAI,iBAAiB,MAAM,OAAO,OAAO;GACvC,MAAM,YAAY,aAAa,kBAAkB,KAAK;AACtD,OAAI,UACF,MAAK,gBAAgB,UAAU;;AAInC,SAAO,cAAiB,kBAAkB,MAAM;;AAIlD,sBAAqB,cAAc,kBAAkB,iBAAiB,eAAe,iBAAiB,QAAQ,YAAY;AAC1H,EAAA,GAAA,mCAAA,SAAqB,sBAAsB,iBAAiB;AAE5D,QAAO"}
@@ -1,3 +1,4 @@
1
+ import { PageManager } from "../../../api-page/manager/types.cjs";
1
2
  import { MXLInstrumentationBaseArgs } from "../../MXLInstrumentationBase/types.cjs";
2
3
 
3
4
  //#region src/instrumentations/navigation/NavigationInstrumentation/types.d.ts
@@ -9,6 +10,7 @@ type NavigationInstrumentationArgs = Pick<MXLInstrumentationBaseArgs, 'diag'> &
9
10
  * *default*: true
10
11
  */
11
12
  shouldCleanupPathOptionsFromRouteName?: boolean;
13
+ pageManager?: PageManager;
12
14
  };
13
15
  //#endregion
14
16
  export { NavigationInstrumentationArgs };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;KACY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;AAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;;KAEY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;EACA,WAAA,GAAc,WAAA;AAAA"}
@@ -1,3 +1,4 @@
1
+ import { PageManager } from "../../../api-page/manager/types.js";
1
2
  import { MXLInstrumentationBaseArgs } from "../../MXLInstrumentationBase/types.js";
2
3
 
3
4
  //#region src/instrumentations/navigation/NavigationInstrumentation/types.d.ts
@@ -9,6 +10,7 @@ type NavigationInstrumentationArgs = Pick<MXLInstrumentationBaseArgs, 'diag'> &
9
10
  * *default*: true
10
11
  */
11
12
  shouldCleanupPathOptionsFromRouteName?: boolean;
13
+ pageManager?: PageManager;
12
14
  };
13
15
  //#endregion
14
16
  export { NavigationInstrumentationArgs };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;KACY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/instrumentations/navigation/NavigationInstrumentation/types.ts"],"mappings":";;;;KAEY,6BAAA,GAAgC,IAAA,CAC1C,0BAAA;;AADF;;;;;EAUE,qCAAA;EACA,WAAA,GAAc,WAAA;AAAA"}
@@ -4,10 +4,17 @@ const require_constants_attributes = require("../../../constants/attributes.cjs"
4
4
  const require_instrumentations_MXLInstrumentationBase_MXLInstrumentationBase = require("../../MXLInstrumentationBase/MXLInstrumentationBase.cjs");
5
5
  const require_utils_getSelector = require("../../../utils/getSelector.cjs");
6
6
  const require_instrumentations_rage_click_RageClickInstrumentation_constants = require("./constants.cjs");
7
- let _opentelemetry_api_logs = require("@opentelemetry/api-logs");
7
+ let _opentelemetry_api = require("@opentelemetry/api");
8
8
  //#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts
9
9
  var RageClickInstrumentation = class extends require_instrumentations_MXLInstrumentationBase_MXLInstrumentationBase.MXLInstrumentationBase {
10
10
  _onClickHandler;
11
+ _flushHandler = () => {
12
+ try {
13
+ this._flush();
14
+ } catch (error) {
15
+ this._diag.error("failed to emit rage-click log", error);
16
+ }
17
+ };
11
18
  _eventWindow = null;
12
19
  constructor({ diag, perf } = {}) {
13
20
  super({
@@ -24,14 +31,14 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
24
31
  this._diag.error("failed to process rage-click candidate", error);
25
32
  }
26
33
  };
27
- if (this._config.enabled) this.enable();
28
34
  }
29
35
  onDisable() {
30
36
  document.removeEventListener("click", this._onClickHandler);
31
- this._flush();
37
+ this._flushHandler();
32
38
  }
33
39
  onEnable() {
34
40
  document.addEventListener("click", this._onClickHandler);
41
+ this.setSessionPartListeners({ end: this._flushHandler });
35
42
  }
36
43
  _handleClick(event) {
37
44
  if (!(event.target instanceof Element)) return;
@@ -45,13 +52,7 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
45
52
  count: 1,
46
53
  interactionType,
47
54
  timestamp: event.timeStamp,
48
- timeoutId: window.setTimeout(() => {
49
- try {
50
- this._flush();
51
- } catch (error) {
52
- this._diag.error("failed to emit rage-click log", error);
53
- }
54
- }, 500)
55
+ timeoutId: setTimeout(this._flushHandler, 500)
55
56
  };
56
57
  return;
57
58
  }
@@ -63,13 +64,13 @@ var RageClickInstrumentation = class extends require_instrumentations_MXLInstrum
63
64
  _flush() {
64
65
  if (this._eventWindow === null) return;
65
66
  const eventWindow = this._eventWindow;
66
- window.clearTimeout(eventWindow.timeoutId);
67
+ clearTimeout(eventWindow.timeoutId);
67
68
  this._eventWindow = null;
68
69
  if (eventWindow.count < 3) return;
69
70
  this.logger.emit({
70
- timestamp: this.perf.epochMillisFromOriginOffset(eventWindow.timestamp),
71
+ timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),
71
72
  eventName: require_instrumentations_rage_click_RageClickInstrumentation_constants.RAGE_CLICK_EVENT_NAME,
72
- severityNumber: _opentelemetry_api_logs.SeverityNumber.INFO,
73
+ severityNumber: _opentelemetry_api.SeverityNumber.INFO,
73
74
  attributes: {
74
75
  [require_constants_attributes.KEY_MXL_TYPE]: "mxl.otel_log",
75
76
  [require_instrumentations_rage_click_RageClickInstrumentation_constants.ATTR_RAGE_CLICK_ELEMENT_TYPE]: eventWindow.target.tagName.toLowerCase(),
@@ -1 +1 @@
1
- {"version":3,"file":"RageClickInstrumentation.cjs","names":["MXLInstrumentationBase","RAGE_CLICK_EVENT_NAME","SeverityNumber","KEY_MXL_TYPE","ATTR_RAGE_CLICK_ELEMENT_TYPE","ATTR_RAGE_CLICK_ELEMENT_SELECTOR","getSelector","ATTR_RAGE_CLICK_X","ATTR_RAGE_CLICK_Y","ATTR_RAGE_CLICK_COUNT","ATTR_RAGE_CLICK_INTERACTION_TYPE"],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api-logs';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: number;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flush();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: window.setTimeout(() => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n }, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n window.clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.epochMillisFromOriginOffset(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;;;AA6BA,IAAa,2BAAb,cAA8CA,uEAAAA,uBAAuB;CACnE;CACA,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;AAIrE,MAAI,KAAK,QAAQ,QACf,MAAK,QAAQ;;CAIjB,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,QAAQ;;CAGf,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;;CAG1D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,OAAO,iBAAiB;AACjC,SAAI;AACF,WAAK,QAAQ;cACN,OAAO;AACd,WAAK,MAAM,MAAM,iCAAiC,MAAM;;WAElC;IAC3B;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,SAAO,aAAa,YAAY,UAAU;AAC1C,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,4BAA4B,YAAY,UAAU;GACvE,WAAWC,uEAAAA;GACX,gBAAgBC,wBAAAA,eAAe;GAC/B,YAAY;KACTC,6BAAAA,eAAAA;KACAC,uEAAAA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzCC,uEAAAA,mCAAmCC,0BAAAA,YAAY,YAAY,OAAO;KAClEC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,wBAAwB,YAAY;KACpCC,uEAAAA,mCAAmC,YAAY;IACjD;GACF,CAAC"}
1
+ {"version":3,"file":"RageClickInstrumentation.cjs","names":["MXLInstrumentationBase","RAGE_CLICK_EVENT_NAME","SeverityNumber","KEY_MXL_TYPE","ATTR_RAGE_CLICK_ELEMENT_TYPE","ATTR_RAGE_CLICK_ELEMENT_SELECTOR","getSelector","ATTR_RAGE_CLICK_X","ATTR_RAGE_CLICK_Y","ATTR_RAGE_CLICK_COUNT","ATTR_RAGE_CLICK_INTERACTION_TYPE"],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport type { TimeoutRef } from '../../../utils/timeout/types';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: TimeoutRef;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private readonly _flushHandler = (): void => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n };\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flushHandler();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n this.setSessionPartListeners({ end: this._flushHandler });\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: setTimeout(this._flushHandler, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;;;AA8BA,IAAa,2BAAb,cAA8CA,uEAAAA,uBAAuB;CACnE;CACA,sBAA6C;AAC3C,MAAI;AACF,QAAK,QAAQ;WACN,OAAO;AACd,QAAK,MAAM,MAAM,iCAAiC,MAAM;;;CAG5D,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;;CAKvE,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,eAAe;;CAGtB,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;AACxD,OAAK,wBAAwB,EAAE,KAAK,KAAK,eAAe,CAAC;;CAG3D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,WAAW,KAAK,eAAA,IAAsC;IAClE;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,eAAa,YAAY,UAAU;AACnC,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,qBAAqB,YAAY,UAAU;GAChE,WAAWC,uEAAAA;GACX,gBAAgBC,mBAAAA,eAAe;GAC/B,YAAY;KACTC,6BAAAA,eAAAA;KACAC,uEAAAA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzCC,uEAAAA,mCAAmCC,0BAAAA,YAAY,YAAY,OAAO;KAClEC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,oBAAoB,YAAY;KAChCC,uEAAAA,wBAAwB,YAAY;KACpCC,uEAAAA,mCAAmC,YAAY;IACjD;GACF,CAAC"}
@@ -4,6 +4,7 @@ import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrume
4
4
  //#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts
5
5
  declare class RageClickInstrumentation extends MXLInstrumentationBase {
6
6
  private readonly _onClickHandler;
7
+ private readonly _flushHandler;
7
8
  private _eventWindow;
8
9
  constructor({
9
10
  diag,
@@ -1 +1 @@
1
- {"version":3,"file":"RageClickInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA6Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,QACT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAsBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAIX,YAAA;EAAA,QAyCA,MAAA;AAAA"}
1
+ {"version":3,"file":"RageClickInstrumentation.d.cts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA8Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,iBACA,aAAA;EAAA,QAOT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAkBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAKX,YAAA;EAAA,QAmCA,MAAA;AAAA"}
@@ -4,6 +4,7 @@ import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrume
4
4
  //#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.d.ts
5
5
  declare class RageClickInstrumentation extends MXLInstrumentationBase {
6
6
  private readonly _onClickHandler;
7
+ private readonly _flushHandler;
7
8
  private _eventWindow;
8
9
  constructor({
9
10
  diag,
@@ -1 +1 @@
1
- {"version":3,"file":"RageClickInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA6Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,QACT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAsBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAIX,YAAA;EAAA,QAyCA,MAAA;AAAA"}
1
+ {"version":3,"file":"RageClickInstrumentation.d.ts","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"mappings":";;;;cA8Ba,wBAAA,SAAiC,sBAAA;EAAA,iBAC3B,eAAA;EAAA,iBACA,aAAA;EAAA,QAOT,YAAA;;IAEa,IAAA;IAAM;EAAA,IAAQ,4BAAA;EAAA,UAkBhB,SAAA,CAAA;EAAA,UAKA,QAAA,CAAA;EAAA,QAKX,YAAA;EAAA,QAmCA,MAAA;AAAA"}
@@ -2,10 +2,17 @@ import { KEY_MXL_TYPE } from "../../../constants/attributes.js";
2
2
  import { MXLInstrumentationBase } from "../../MXLInstrumentationBase/MXLInstrumentationBase.js";
3
3
  import { getSelector } from "../../../utils/getSelector.js";
4
4
  import { ATTR_RAGE_CLICK_COUNT, ATTR_RAGE_CLICK_ELEMENT_SELECTOR, ATTR_RAGE_CLICK_ELEMENT_TYPE, ATTR_RAGE_CLICK_INTERACTION_TYPE, ATTR_RAGE_CLICK_X, ATTR_RAGE_CLICK_Y, RAGE_CLICK_EVENT_NAME } from "./constants.js";
5
- import { SeverityNumber } from "@opentelemetry/api-logs";
5
+ import { SeverityNumber } from "@opentelemetry/api";
6
6
  //#region src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts
7
7
  var RageClickInstrumentation = class extends MXLInstrumentationBase {
8
8
  _onClickHandler;
9
+ _flushHandler = () => {
10
+ try {
11
+ this._flush();
12
+ } catch (error) {
13
+ this._diag.error("failed to emit rage-click log", error);
14
+ }
15
+ };
9
16
  _eventWindow = null;
10
17
  constructor({ diag, perf } = {}) {
11
18
  super({
@@ -22,14 +29,14 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
22
29
  this._diag.error("failed to process rage-click candidate", error);
23
30
  }
24
31
  };
25
- if (this._config.enabled) this.enable();
26
32
  }
27
33
  onDisable() {
28
34
  document.removeEventListener("click", this._onClickHandler);
29
- this._flush();
35
+ this._flushHandler();
30
36
  }
31
37
  onEnable() {
32
38
  document.addEventListener("click", this._onClickHandler);
39
+ this.setSessionPartListeners({ end: this._flushHandler });
33
40
  }
34
41
  _handleClick(event) {
35
42
  if (!(event.target instanceof Element)) return;
@@ -43,13 +50,7 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
43
50
  count: 1,
44
51
  interactionType,
45
52
  timestamp: event.timeStamp,
46
- timeoutId: window.setTimeout(() => {
47
- try {
48
- this._flush();
49
- } catch (error) {
50
- this._diag.error("failed to emit rage-click log", error);
51
- }
52
- }, 500)
53
+ timeoutId: setTimeout(this._flushHandler, 500)
53
54
  };
54
55
  return;
55
56
  }
@@ -61,11 +62,11 @@ var RageClickInstrumentation = class extends MXLInstrumentationBase {
61
62
  _flush() {
62
63
  if (this._eventWindow === null) return;
63
64
  const eventWindow = this._eventWindow;
64
- window.clearTimeout(eventWindow.timeoutId);
65
+ clearTimeout(eventWindow.timeoutId);
65
66
  this._eventWindow = null;
66
67
  if (eventWindow.count < 3) return;
67
68
  this.logger.emit({
68
- timestamp: this.perf.epochMillisFromOriginOffset(eventWindow.timestamp),
69
+ timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),
69
70
  eventName: RAGE_CLICK_EVENT_NAME,
70
71
  severityNumber: SeverityNumber.INFO,
71
72
  attributes: {
@@ -1 +1 @@
1
- {"version":3,"file":"RageClickInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api-logs';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: number;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n\n if (this._config.enabled) {\n this.enable();\n }\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flush();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: window.setTimeout(() => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n }, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n window.clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.epochMillisFromOriginOffset(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;AA6BA,IAAa,2BAAb,cAA8C,uBAAuB;CACnE;CACA,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;AAIrE,MAAI,KAAK,QAAQ,QACf,MAAK,QAAQ;;CAIjB,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,QAAQ;;CAGf,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;;CAG1D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,OAAO,iBAAiB;AACjC,SAAI;AACF,WAAK,QAAQ;cACN,OAAO;AACd,WAAK,MAAM,MAAM,iCAAiC,MAAM;;WAElC;IAC3B;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,SAAO,aAAa,YAAY,UAAU;AAC1C,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,4BAA4B,YAAY,UAAU;GACvE,WAAW;GACX,gBAAgB,eAAe;GAC/B,YAAY;KACT,eAAA;KACA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzC,mCAAmC,YAAY,YAAY,OAAO;KAClE,oBAAoB,YAAY;KAChC,oBAAoB,YAAY;KAChC,wBAAwB,YAAY;KACpC,mCAAmC,YAAY;IACjD;GACF,CAAC"}
1
+ {"version":3,"file":"RageClickInstrumentation.js","names":[],"sources":["../../../../src/instrumentations/rage-click/RageClickInstrumentation/RageClickInstrumentation.ts"],"sourcesContent":["import { SeverityNumber } from '@opentelemetry/api';\nimport { KEY_MXL_TYPE, MXL_TYPES } from '../../../constants/attributes';\nimport { getSelector } from '../../../utils/getSelector';\nimport type { TimeoutRef } from '../../../utils/timeout/types';\nimport { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport type { InteractionType } from './constants';\nimport {\n ATTR_RAGE_CLICK_COUNT,\n ATTR_RAGE_CLICK_ELEMENT_SELECTOR,\n ATTR_RAGE_CLICK_ELEMENT_TYPE,\n ATTR_RAGE_CLICK_INTERACTION_TYPE,\n ATTR_RAGE_CLICK_X,\n ATTR_RAGE_CLICK_Y,\n RAGE_CLICK_EVENT_NAME,\n RAGE_CLICK_RADIUS,\n RAGE_CLICK_THRESHOLD,\n RAGE_CLICK_WINDOW_TIME,\n} from './constants';\nimport type { RageClickInstrumentationArgs } from './types';\n\ninterface RageClickWindow {\n target: Element;\n x: number;\n y: number;\n count: number;\n interactionType: InteractionType;\n timestamp: number;\n timeoutId: TimeoutRef;\n}\n\nexport class RageClickInstrumentation extends MXLInstrumentationBase {\n private readonly _onClickHandler: (event: MouseEvent) => void;\n private readonly _flushHandler = (): void => {\n try {\n this._flush();\n } catch (error) {\n this._diag.error('failed to emit rage-click log', error);\n }\n };\n private _eventWindow: RageClickWindow | null = null;\n\n public constructor({ diag, perf }: RageClickInstrumentationArgs = {}) {\n super({\n config: {},\n diag,\n instrumentationName: 'RageClickInstrumentation',\n instrumentationVersion: '1.0.0',\n perf,\n });\n\n this._onClickHandler = (event: MouseEvent): void => {\n try {\n this._handleClick(event);\n } catch (error) {\n this._diag.error('failed to process rage-click candidate', error);\n }\n };\n }\n\n protected override onDisable(): void {\n document.removeEventListener('click', this._onClickHandler);\n this._flushHandler();\n }\n\n protected override onEnable(): void {\n document.addEventListener('click', this._onClickHandler);\n this.setSessionPartListeners({ end: this._flushHandler });\n }\n\n private _handleClick(event: MouseEvent): void {\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const target = event.target;\n const interactionType: InteractionType =\n event instanceof PointerEvent && event.pointerType === 'touch'\n ? 'tap'\n : 'click';\n\n if (this._eventWindow === null) {\n this._eventWindow = {\n target,\n x: event.clientX,\n y: event.clientY,\n count: 1,\n interactionType,\n timestamp: event.timeStamp,\n timeoutId: setTimeout(this._flushHandler, RAGE_CLICK_WINDOW_TIME),\n };\n\n return;\n }\n\n const sameTarget = target === this._eventWindow.target;\n const dx = Math.abs(event.clientX - this._eventWindow.x);\n const dy = Math.abs(event.clientY - this._eventWindow.y);\n const withinRadius = dx <= RAGE_CLICK_RADIUS && dy <= RAGE_CLICK_RADIUS;\n\n if (sameTarget || withinRadius) {\n this._eventWindow.count += 1;\n }\n }\n\n private _flush(): void {\n if (this._eventWindow === null) {\n return;\n }\n\n const eventWindow = this._eventWindow;\n\n clearTimeout(eventWindow.timeoutId);\n this._eventWindow = null;\n\n if (eventWindow.count < RAGE_CLICK_THRESHOLD) {\n return;\n }\n\n this.logger.emit({\n timestamp: this.perf.offsetToAbsoluteTime(eventWindow.timestamp),\n eventName: RAGE_CLICK_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [KEY_MXL_TYPE]: MXL_TYPES.OTelLog,\n [ATTR_RAGE_CLICK_ELEMENT_TYPE]:\n eventWindow.target.tagName.toLowerCase(),\n [ATTR_RAGE_CLICK_ELEMENT_SELECTOR]: getSelector(eventWindow.target),\n [ATTR_RAGE_CLICK_X]: eventWindow.x,\n [ATTR_RAGE_CLICK_Y]: eventWindow.y,\n [ATTR_RAGE_CLICK_COUNT]: eventWindow.count,\n [ATTR_RAGE_CLICK_INTERACTION_TYPE]: eventWindow.interactionType,\n },\n });\n }\n}\n"],"mappings":";;;;;;AA8BA,IAAa,2BAAb,cAA8C,uBAAuB;CACnE;CACA,sBAA6C;AAC3C,MAAI;AACF,QAAK,QAAQ;WACN,OAAO;AACd,QAAK,MAAM,MAAM,iCAAiC,MAAM;;;CAG5D,eAA+C;CAE/C,YAAmB,EAAE,MAAM,SAAuC,EAAE,EAAE;AACpE,QAAM;GACJ,QAAQ,EAAE;GACV;GACA,qBAAqB;GACrB,wBAAwB;GACxB;GACD,CAAC;AAEF,OAAK,mBAAmB,UAA4B;AAClD,OAAI;AACF,SAAK,aAAa,MAAM;YACjB,OAAO;AACd,SAAK,MAAM,MAAM,0CAA0C,MAAM;;;;CAKvE,YAAqC;AACnC,WAAS,oBAAoB,SAAS,KAAK,gBAAgB;AAC3D,OAAK,eAAe;;CAGtB,WAAoC;AAClC,WAAS,iBAAiB,SAAS,KAAK,gBAAgB;AACxD,OAAK,wBAAwB,EAAE,KAAK,KAAK,eAAe,CAAC;;CAG3D,aAAqB,OAAyB;AAC5C,MAAI,EAAE,MAAM,kBAAkB,SAC5B;EAGF,MAAM,SAAS,MAAM;EACrB,MAAM,kBACJ,iBAAiB,gBAAgB,MAAM,gBAAgB,UACnD,QACA;AAEN,MAAI,KAAK,iBAAiB,MAAM;AAC9B,QAAK,eAAe;IAClB;IACA,GAAG,MAAM;IACT,GAAG,MAAM;IACT,OAAO;IACP;IACA,WAAW,MAAM;IACjB,WAAW,WAAW,KAAK,eAAA,IAAsC;IAClE;AAED;;EAGF,MAAM,aAAa,WAAW,KAAK,aAAa;EAChD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;EACxD,MAAM,KAAK,KAAK,IAAI,MAAM,UAAU,KAAK,aAAa,EAAE;AAGxD,MAAI,cAFiB,MAAA,MAA2B,MAAA,GAG9C,MAAK,aAAa,SAAS;;CAI/B,SAAuB;AACrB,MAAI,KAAK,iBAAiB,KACxB;EAGF,MAAM,cAAc,KAAK;AAEzB,eAAa,YAAY,UAAU;AACnC,OAAK,eAAe;AAEpB,MAAI,YAAY,QAAA,EACd;AAGF,OAAK,OAAO,KAAK;GACf,WAAW,KAAK,KAAK,qBAAqB,YAAY,UAAU;GAChE,WAAW;GACX,gBAAgB,eAAe;GAC/B,YAAY;KACT,eAAA;KACA,+BACC,YAAY,OAAO,QAAQ,aAAa;KACzC,mCAAmC,YAAY,YAAY,OAAO;KAClE,oBAAoB,YAAY;KAChC,oBAAoB,YAAY;KAChC,wBAAwB,YAAY;KACpC,mCAAmC,YAAY;IACjD;GACF,CAAC"}
@@ -17,12 +17,10 @@ var ReplayInstrumentation = class extends require_instrumentations_MXLInstrument
17
17
  });
18
18
  this._args = args;
19
19
  if (!args.replayContext || !args.sessionStorage) this._diag.warn("replayContext and sessionStorage are required for session recording");
20
- if (!this._config.enabled) this._diag.debug("disabled, not starting");
21
20
  }
22
21
  setUserSessionManager(userSessionManager) {
23
22
  super.setUserSessionManager(userSessionManager);
24
23
  this._ensureSessionRecording();
25
- if (this._config.enabled && this._args.autoStart !== false && this._args.replayContext && this._args.sessionStorage) this.enable();
26
24
  }
27
25
  _ensureSessionRecording() {
28
26
  if (this._sessionRecording) return this._sessionRecording;
@@ -1 +1 @@
1
- {"version":3,"file":"ReplayInstrumentation.cjs","names":["MXLInstrumentationBase","SessionRecording"],"sources":["../../../../src/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.ts"],"sourcesContent":["import { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport { SessionRecording } from '../session-recording/SessionRecording';\nimport type { ReplayInstrumentationArgs } from './types';\n\nexport class ReplayInstrumentation extends MXLInstrumentationBase {\n private readonly _args: ReplayInstrumentationArgs;\n private _sessionRecording: SessionRecording | undefined;\n private _wasPaused = false;\n private _stopPromise: Promise<void> | undefined;\n\n public constructor(args: ReplayInstrumentationArgs = {}) {\n super({\n config: {},\n diag: args.diag,\n instrumentationName: 'ReplayInstrumentation',\n instrumentationVersion: '2.0.0',\n perf: args.perf,\n });\n\n this._args = args;\n\n if (!args.replayContext || !args.sessionStorage) {\n this._diag.warn(\n 'replayContext and sessionStorage are required for session recording',\n );\n }\n\n if (!this._config.enabled) {\n this._diag.debug('disabled, not starting');\n }\n }\n\n public override setUserSessionManager(\n userSessionManager: Parameters<\n MXLInstrumentationBase['setUserSessionManager']\n >[0],\n ): void {\n super.setUserSessionManager(userSessionManager);\n this._ensureSessionRecording();\n\n if (\n this._config.enabled &&\n this._args.autoStart !== false &&\n this._args.replayContext &&\n this._args.sessionStorage\n ) {\n this.enable();\n }\n }\n\n private _ensureSessionRecording(): SessionRecording | undefined {\n if (this._sessionRecording) {\n return this._sessionRecording;\n }\n\n const {\n replayContext,\n sessionStorage,\n autoStart,\n rrwebOptions,\n visibilityDoc,\n } = this._args;\n\n if (!replayContext || !sessionStorage) {\n return undefined;\n }\n\n this._sessionRecording = new SessionRecording({\n context: replayContext,\n diag: this._diag,\n autoStart,\n rrwebOptions,\n sessionStorage,\n userSessionManager: this.userSessionManager,\n visibilityDoc,\n });\n\n return this._sessionRecording;\n }\n\n public isRecording(): boolean {\n return this._sessionRecording?.isRecording() ?? false;\n }\n\n // Repeat calls are meaningful here (`force` restarts a stopped recording),\n // so replay bypasses the base class's idempotency gate.\n public override enable(options?: { force?: boolean }): void {\n this._isEnabled = true;\n this._startRecording(options);\n }\n\n protected override onEnable(): void {\n this._startRecording();\n }\n\n private _startRecording(options?: { force?: boolean }): void {\n this._wasPaused = false;\n this._afterPendingStop(() => {\n this._ensureSessionRecording()?.enable(options);\n });\n }\n\n public pause(): void {\n this._wasPaused = true;\n this._sessionRecording?.pause();\n }\n\n public resume(): void {\n if (!this._wasPaused) {\n this.enable({ force: true });\n return;\n }\n this._afterPendingStop(() => {\n this._sessionRecording?.resume();\n this._wasPaused = false;\n });\n }\n\n private _afterPendingStop(action: () => void): void {\n if (this._stopPromise) {\n void this._stopPromise.then(action);\n return;\n }\n action();\n }\n\n protected override onDisable(): void {\n const recording = this._sessionRecording;\n if (!recording) {\n return;\n }\n\n this._stopPromise = recording.stop().finally(() => {\n if (this._sessionRecording === recording) {\n this._sessionRecording = undefined;\n }\n this._stopPromise = undefined;\n });\n }\n\n /** Await in-flight disable teardown (tests / advanced callers). */\n public async waitForDisable(): Promise<void> {\n await this._stopPromise;\n }\n}\n"],"mappings":";;;;AAIA,IAAa,wBAAb,cAA2CA,uEAAAA,uBAAuB;CAChE;CACA;CACA,aAAqB;CACrB;CAEA,YAAmB,OAAkC,EAAE,EAAE;AACvD,QAAM;GACJ,QAAQ,EAAE;GACV,MAAM,KAAK;GACX,qBAAqB;GACrB,wBAAwB;GACxB,MAAM,KAAK;GACZ,CAAC;AAEF,OAAK,QAAQ;AAEb,MAAI,CAAC,KAAK,iBAAiB,CAAC,KAAK,eAC/B,MAAK,MAAM,KACT,sEACD;AAGH,MAAI,CAAC,KAAK,QAAQ,QAChB,MAAK,MAAM,MAAM,yBAAyB;;CAI9C,sBACE,oBAGM;AACN,QAAM,sBAAsB,mBAAmB;AAC/C,OAAK,yBAAyB;AAE9B,MACE,KAAK,QAAQ,WACb,KAAK,MAAM,cAAc,SACzB,KAAK,MAAM,iBACX,KAAK,MAAM,eAEX,MAAK,QAAQ;;CAIjB,0BAAgE;AAC9D,MAAI,KAAK,kBACP,QAAO,KAAK;EAGd,MAAM,EACJ,eACA,gBACA,WACA,cACA,kBACE,KAAK;AAET,MAAI,CAAC,iBAAiB,CAAC,eACrB;AAGF,OAAK,oBAAoB,IAAIC,mEAAAA,iBAAiB;GAC5C,SAAS;GACT,MAAM,KAAK;GACX;GACA;GACA;GACA,oBAAoB,KAAK;GACzB;GACD,CAAC;AAEF,SAAO,KAAK;;CAGd,cAA8B;AAC5B,SAAO,KAAK,mBAAmB,aAAa,IAAI;;CAKlD,OAAuB,SAAqC;AAC1D,OAAK,aAAa;AAClB,OAAK,gBAAgB,QAAQ;;CAG/B,WAAoC;AAClC,OAAK,iBAAiB;;CAGxB,gBAAwB,SAAqC;AAC3D,OAAK,aAAa;AAClB,OAAK,wBAAwB;AAC3B,QAAK,yBAAyB,EAAE,OAAO,QAAQ;IAC/C;;CAGJ,QAAqB;AACnB,OAAK,aAAa;AAClB,OAAK,mBAAmB,OAAO;;CAGjC,SAAsB;AACpB,MAAI,CAAC,KAAK,YAAY;AACpB,QAAK,OAAO,EAAE,OAAO,MAAM,CAAC;AAC5B;;AAEF,OAAK,wBAAwB;AAC3B,QAAK,mBAAmB,QAAQ;AAChC,QAAK,aAAa;IAClB;;CAGJ,kBAA0B,QAA0B;AAClD,MAAI,KAAK,cAAc;AAChB,QAAK,aAAa,KAAK,OAAO;AACnC;;AAEF,UAAQ;;CAGV,YAAqC;EACnC,MAAM,YAAY,KAAK;AACvB,MAAI,CAAC,UACH;AAGF,OAAK,eAAe,UAAU,MAAM,CAAC,cAAc;AACjD,OAAI,KAAK,sBAAsB,UAC7B,MAAK,oBAAoB,KAAA;AAE3B,QAAK,eAAe,KAAA;IACpB;;;CAIJ,MAAa,iBAAgC;AAC3C,QAAM,KAAK"}
1
+ {"version":3,"file":"ReplayInstrumentation.cjs","names":["MXLInstrumentationBase","SessionRecording"],"sources":["../../../../src/instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.ts"],"sourcesContent":["import { MXLInstrumentationBase } from '../../MXLInstrumentationBase/MXLInstrumentationBase';\nimport { SessionRecording } from '../session-recording/SessionRecording';\nimport type { ReplayInstrumentationArgs } from './types';\n\nexport class ReplayInstrumentation extends MXLInstrumentationBase {\n private readonly _args: ReplayInstrumentationArgs;\n private _sessionRecording: SessionRecording | undefined;\n private _wasPaused = false;\n private _stopPromise: Promise<void> | undefined;\n\n public constructor(args: ReplayInstrumentationArgs = {}) {\n super({\n config: {},\n diag: args.diag,\n instrumentationName: 'ReplayInstrumentation',\n instrumentationVersion: '2.0.0',\n perf: args.perf,\n });\n\n this._args = args;\n\n if (!args.replayContext || !args.sessionStorage) {\n this._diag.warn(\n 'replayContext and sessionStorage are required for session recording',\n );\n }\n }\n\n public override setUserSessionManager(\n userSessionManager: Parameters<\n MXLInstrumentationBase['setUserSessionManager']\n >[0],\n ): void {\n super.setUserSessionManager(userSessionManager);\n this._ensureSessionRecording();\n }\n\n private _ensureSessionRecording(): SessionRecording | undefined {\n if (this._sessionRecording) {\n return this._sessionRecording;\n }\n\n const {\n replayContext,\n sessionStorage,\n autoStart,\n rrwebOptions,\n visibilityDoc,\n } = this._args;\n\n if (!replayContext || !sessionStorage) {\n return undefined;\n }\n\n this._sessionRecording = new SessionRecording({\n context: replayContext,\n diag: this._diag,\n autoStart,\n rrwebOptions,\n sessionStorage,\n userSessionManager: this.userSessionManager,\n visibilityDoc,\n });\n\n return this._sessionRecording;\n }\n\n public isRecording(): boolean {\n return this._sessionRecording?.isRecording() ?? false;\n }\n\n // Repeat calls are meaningful here (`force` restarts a stopped recording),\n // so replay bypasses the base class's idempotency gate.\n public override enable(options?: { force?: boolean }): void {\n this._isEnabled = true;\n this._startRecording(options);\n }\n\n protected override onEnable(): void {\n this._startRecording();\n }\n\n private _startRecording(options?: { force?: boolean }): void {\n this._wasPaused = false;\n this._afterPendingStop(() => {\n this._ensureSessionRecording()?.enable(options);\n });\n }\n\n public pause(): void {\n this._wasPaused = true;\n this._sessionRecording?.pause();\n }\n\n public resume(): void {\n if (!this._wasPaused) {\n this.enable({ force: true });\n return;\n }\n this._afterPendingStop(() => {\n this._sessionRecording?.resume();\n this._wasPaused = false;\n });\n }\n\n private _afterPendingStop(action: () => void): void {\n if (this._stopPromise) {\n void this._stopPromise.then(action);\n return;\n }\n action();\n }\n\n protected override onDisable(): void {\n const recording = this._sessionRecording;\n if (!recording) {\n return;\n }\n\n this._stopPromise = recording.stop().finally(() => {\n if (this._sessionRecording === recording) {\n this._sessionRecording = undefined;\n }\n this._stopPromise = undefined;\n });\n }\n\n /** Await in-flight disable teardown (tests / advanced callers). */\n public async waitForDisable(): Promise<void> {\n await this._stopPromise;\n }\n}\n"],"mappings":";;;;AAIA,IAAa,wBAAb,cAA2CA,uEAAAA,uBAAuB;CAChE;CACA;CACA,aAAqB;CACrB;CAEA,YAAmB,OAAkC,EAAE,EAAE;AACvD,QAAM;GACJ,QAAQ,EAAE;GACV,MAAM,KAAK;GACX,qBAAqB;GACrB,wBAAwB;GACxB,MAAM,KAAK;GACZ,CAAC;AAEF,OAAK,QAAQ;AAEb,MAAI,CAAC,KAAK,iBAAiB,CAAC,KAAK,eAC/B,MAAK,MAAM,KACT,sEACD;;CAIL,sBACE,oBAGM;AACN,QAAM,sBAAsB,mBAAmB;AAC/C,OAAK,yBAAyB;;CAGhC,0BAAgE;AAC9D,MAAI,KAAK,kBACP,QAAO,KAAK;EAGd,MAAM,EACJ,eACA,gBACA,WACA,cACA,kBACE,KAAK;AAET,MAAI,CAAC,iBAAiB,CAAC,eACrB;AAGF,OAAK,oBAAoB,IAAIC,mEAAAA,iBAAiB;GAC5C,SAAS;GACT,MAAM,KAAK;GACX;GACA;GACA;GACA,oBAAoB,KAAK;GACzB;GACD,CAAC;AAEF,SAAO,KAAK;;CAGd,cAA8B;AAC5B,SAAO,KAAK,mBAAmB,aAAa,IAAI;;CAKlD,OAAuB,SAAqC;AAC1D,OAAK,aAAa;AAClB,OAAK,gBAAgB,QAAQ;;CAG/B,WAAoC;AAClC,OAAK,iBAAiB;;CAGxB,gBAAwB,SAAqC;AAC3D,OAAK,aAAa;AAClB,OAAK,wBAAwB;AAC3B,QAAK,yBAAyB,EAAE,OAAO,QAAQ;IAC/C;;CAGJ,QAAqB;AACnB,OAAK,aAAa;AAClB,OAAK,mBAAmB,OAAO;;CAGjC,SAAsB;AACpB,MAAI,CAAC,KAAK,YAAY;AACpB,QAAK,OAAO,EAAE,OAAO,MAAM,CAAC;AAC5B;;AAEF,OAAK,wBAAwB;AAC3B,QAAK,mBAAmB,QAAQ;AAChC,QAAK,aAAa;IAClB;;CAGJ,kBAA0B,QAA0B;AAClD,MAAI,KAAK,cAAc;AAChB,QAAK,aAAa,KAAK,OAAO;AACnC;;AAEF,UAAQ;;CAGV,YAAqC;EACnC,MAAM,YAAY,KAAK;AACvB,MAAI,CAAC,UACH;AAGF,OAAK,eAAe,UAAU,MAAM,CAAC,cAAc;AACjD,OAAI,KAAK,sBAAsB,UAC7B,MAAK,oBAAoB,KAAA;AAE3B,QAAK,eAAe,KAAA;IACpB;;;CAIJ,MAAa,iBAAgC;AAC3C,QAAM,KAAK"}