@elenjical-ai/browser 0.0.0-stage → 10.76.2

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 (695) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -2
  3. package/build/npm/cjs/dev/client.js +77 -0
  4. package/build/npm/cjs/dev/client.js.map +1 -0
  5. package/build/npm/cjs/dev/debug-build.js +6 -0
  6. package/build/npm/cjs/dev/debug-build.js.map +1 -0
  7. package/build/npm/cjs/dev/diagnose-sdk.js +34 -0
  8. package/build/npm/cjs/dev/diagnose-sdk.js.map +1 -0
  9. package/build/npm/cjs/dev/eventbuilder.js +231 -0
  10. package/build/npm/cjs/dev/eventbuilder.js.map +1 -0
  11. package/build/npm/cjs/dev/feedbackAsync.js +11 -0
  12. package/build/npm/cjs/dev/feedbackAsync.js.map +1 -0
  13. package/build/npm/cjs/dev/feedbackSync.js +11 -0
  14. package/build/npm/cjs/dev/feedbackSync.js.map +1 -0
  15. package/build/npm/cjs/dev/helpers.js +108 -0
  16. package/build/npm/cjs/dev/helpers.js.map +1 -0
  17. package/build/npm/cjs/dev/index.js +208 -0
  18. package/build/npm/cjs/dev/index.js.map +1 -0
  19. package/build/npm/cjs/dev/integrations/breadcrumbs.js +249 -0
  20. package/build/npm/cjs/dev/integrations/breadcrumbs.js.map +1 -0
  21. package/build/npm/cjs/dev/integrations/browserapierrors.js +167 -0
  22. package/build/npm/cjs/dev/integrations/browserapierrors.js.map +1 -0
  23. package/build/npm/cjs/dev/integrations/browsersession.js +50 -0
  24. package/build/npm/cjs/dev/integrations/browsersession.js.map +1 -0
  25. package/build/npm/cjs/dev/integrations/contextlines.js +53 -0
  26. package/build/npm/cjs/dev/integrations/contextlines.js.map +1 -0
  27. package/build/npm/cjs/dev/integrations/culturecontext.js +50 -0
  28. package/build/npm/cjs/dev/integrations/culturecontext.js.map +1 -0
  29. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js +8 -0
  30. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js.map +1 -0
  31. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js +30 -0
  32. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  33. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js +32 -0
  34. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js.map +1 -0
  35. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js +23 -0
  36. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js.map +1 -0
  37. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js +37 -0
  38. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js.map +1 -0
  39. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js +60 -0
  40. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js.map +1 -0
  41. package/build/npm/cjs/dev/integrations/globalhandlers.js +143 -0
  42. package/build/npm/cjs/dev/integrations/globalhandlers.js.map +1 -0
  43. package/build/npm/cjs/dev/integrations/graphqlClient.js +148 -0
  44. package/build/npm/cjs/dev/integrations/graphqlClient.js.map +1 -0
  45. package/build/npm/cjs/dev/integrations/httpclient.js +250 -0
  46. package/build/npm/cjs/dev/integrations/httpclient.js.map +1 -0
  47. package/build/npm/cjs/dev/integrations/httpcontext.js +47 -0
  48. package/build/npm/cjs/dev/integrations/httpcontext.js.map +1 -0
  49. package/build/npm/cjs/dev/integrations/linkederrors.js +31 -0
  50. package/build/npm/cjs/dev/integrations/linkederrors.js.map +1 -0
  51. package/build/npm/cjs/dev/integrations/reportingobserver.js +60 -0
  52. package/build/npm/cjs/dev/integrations/reportingobserver.js.map +1 -0
  53. package/build/npm/cjs/dev/integrations/spanstreaming.js +49 -0
  54. package/build/npm/cjs/dev/integrations/spanstreaming.js.map +1 -0
  55. package/build/npm/cjs/dev/integrations/spotlight.js +61 -0
  56. package/build/npm/cjs/dev/integrations/spotlight.js.map +1 -0
  57. package/build/npm/cjs/dev/integrations/view-hierarchy.js +74 -0
  58. package/build/npm/cjs/dev/integrations/view-hierarchy.js.map +1 -0
  59. package/build/npm/cjs/dev/integrations/webVitals.js +62 -0
  60. package/build/npm/cjs/dev/integrations/webVitals.js.map +1 -0
  61. package/build/npm/cjs/dev/integrations/webWorker.js +133 -0
  62. package/build/npm/cjs/dev/integrations/webWorker.js.map +1 -0
  63. package/build/npm/cjs/dev/normalizeStringifyValue.js +27 -0
  64. package/build/npm/cjs/dev/normalizeStringifyValue.js.map +1 -0
  65. package/build/npm/cjs/dev/profiling/UIProfiler.js +306 -0
  66. package/build/npm/cjs/dev/profiling/UIProfiler.js.map +1 -0
  67. package/build/npm/cjs/dev/profiling/index.js +38 -0
  68. package/build/npm/cjs/dev/profiling/index.js.map +1 -0
  69. package/build/npm/cjs/dev/profiling/integration.js +120 -0
  70. package/build/npm/cjs/dev/profiling/integration.js.map +1 -0
  71. package/build/npm/cjs/dev/profiling/startProfileForSpan.js +91 -0
  72. package/build/npm/cjs/dev/profiling/startProfileForSpan.js.map +1 -0
  73. package/build/npm/cjs/dev/profiling/utils.js +498 -0
  74. package/build/npm/cjs/dev/profiling/utils.js.map +1 -0
  75. package/build/npm/cjs/dev/report-dialog.js +53 -0
  76. package/build/npm/cjs/dev/report-dialog.js.map +1 -0
  77. package/build/npm/cjs/dev/sdk.js +70 -0
  78. package/build/npm/cjs/dev/sdk.js.map +1 -0
  79. package/build/npm/cjs/dev/stack-parsers.js +118 -0
  80. package/build/npm/cjs/dev/stack-parsers.js.map +1 -0
  81. package/build/npm/cjs/dev/tracing/backgroundtab.js +34 -0
  82. package/build/npm/cjs/dev/tracing/backgroundtab.js.map +1 -0
  83. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js +437 -0
  84. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js.map +1 -0
  85. package/build/npm/cjs/dev/tracing/linkedTraces.js +140 -0
  86. package/build/npm/cjs/dev/tracing/linkedTraces.js.map +1 -0
  87. package/build/npm/cjs/dev/tracing/reportPageLoaded.js +10 -0
  88. package/build/npm/cjs/dev/tracing/reportPageLoaded.js.map +1 -0
  89. package/build/npm/cjs/dev/tracing/request.js +236 -0
  90. package/build/npm/cjs/dev/tracing/request.js.map +1 -0
  91. package/build/npm/cjs/dev/tracing/setActiveSpan.js +21 -0
  92. package/build/npm/cjs/dev/tracing/setActiveSpan.js.map +1 -0
  93. package/build/npm/cjs/dev/tracing/utils.js +31 -0
  94. package/build/npm/cjs/dev/tracing/utils.js.map +1 -0
  95. package/build/npm/cjs/dev/transports/fetch.js +58 -0
  96. package/build/npm/cjs/dev/transports/fetch.js.map +1 -0
  97. package/build/npm/cjs/dev/transports/offline.js +111 -0
  98. package/build/npm/cjs/dev/transports/offline.js.map +1 -0
  99. package/build/npm/cjs/dev/userfeedback.js +32 -0
  100. package/build/npm/cjs/dev/userfeedback.js.map +1 -0
  101. package/build/npm/cjs/dev/utils/detectBrowserExtension.js +38 -0
  102. package/build/npm/cjs/dev/utils/detectBrowserExtension.js.map +1 -0
  103. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js +92 -0
  104. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js.map +1 -0
  105. package/build/npm/cjs/prod/client.js +77 -0
  106. package/build/npm/cjs/prod/client.js.map +1 -0
  107. package/build/npm/cjs/prod/debug-build.js +6 -0
  108. package/build/npm/cjs/prod/debug-build.js.map +1 -0
  109. package/build/npm/cjs/prod/diagnose-sdk.js +34 -0
  110. package/build/npm/cjs/prod/diagnose-sdk.js.map +1 -0
  111. package/build/npm/cjs/prod/eventbuilder.js +231 -0
  112. package/build/npm/cjs/prod/eventbuilder.js.map +1 -0
  113. package/build/npm/cjs/prod/feedbackAsync.js +11 -0
  114. package/build/npm/cjs/prod/feedbackAsync.js.map +1 -0
  115. package/build/npm/cjs/prod/feedbackSync.js +11 -0
  116. package/build/npm/cjs/prod/feedbackSync.js.map +1 -0
  117. package/build/npm/cjs/prod/helpers.js +108 -0
  118. package/build/npm/cjs/prod/helpers.js.map +1 -0
  119. package/build/npm/cjs/prod/index.js +208 -0
  120. package/build/npm/cjs/prod/index.js.map +1 -0
  121. package/build/npm/cjs/prod/integrations/breadcrumbs.js +249 -0
  122. package/build/npm/cjs/prod/integrations/breadcrumbs.js.map +1 -0
  123. package/build/npm/cjs/prod/integrations/browserapierrors.js +167 -0
  124. package/build/npm/cjs/prod/integrations/browserapierrors.js.map +1 -0
  125. package/build/npm/cjs/prod/integrations/browsersession.js +50 -0
  126. package/build/npm/cjs/prod/integrations/browsersession.js.map +1 -0
  127. package/build/npm/cjs/prod/integrations/contextlines.js +53 -0
  128. package/build/npm/cjs/prod/integrations/contextlines.js.map +1 -0
  129. package/build/npm/cjs/prod/integrations/culturecontext.js +50 -0
  130. package/build/npm/cjs/prod/integrations/culturecontext.js.map +1 -0
  131. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js +8 -0
  132. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js.map +1 -0
  133. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js +30 -0
  134. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  135. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js +32 -0
  136. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js.map +1 -0
  137. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js +23 -0
  138. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js.map +1 -0
  139. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js +37 -0
  140. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js.map +1 -0
  141. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js +60 -0
  142. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js.map +1 -0
  143. package/build/npm/cjs/prod/integrations/globalhandlers.js +143 -0
  144. package/build/npm/cjs/prod/integrations/globalhandlers.js.map +1 -0
  145. package/build/npm/cjs/prod/integrations/graphqlClient.js +148 -0
  146. package/build/npm/cjs/prod/integrations/graphqlClient.js.map +1 -0
  147. package/build/npm/cjs/prod/integrations/httpclient.js +250 -0
  148. package/build/npm/cjs/prod/integrations/httpclient.js.map +1 -0
  149. package/build/npm/cjs/prod/integrations/httpcontext.js +47 -0
  150. package/build/npm/cjs/prod/integrations/httpcontext.js.map +1 -0
  151. package/build/npm/cjs/prod/integrations/linkederrors.js +31 -0
  152. package/build/npm/cjs/prod/integrations/linkederrors.js.map +1 -0
  153. package/build/npm/cjs/prod/integrations/reportingobserver.js +60 -0
  154. package/build/npm/cjs/prod/integrations/reportingobserver.js.map +1 -0
  155. package/build/npm/cjs/prod/integrations/spanstreaming.js +49 -0
  156. package/build/npm/cjs/prod/integrations/spanstreaming.js.map +1 -0
  157. package/build/npm/cjs/prod/integrations/spotlight.js +61 -0
  158. package/build/npm/cjs/prod/integrations/spotlight.js.map +1 -0
  159. package/build/npm/cjs/prod/integrations/view-hierarchy.js +74 -0
  160. package/build/npm/cjs/prod/integrations/view-hierarchy.js.map +1 -0
  161. package/build/npm/cjs/prod/integrations/webVitals.js +62 -0
  162. package/build/npm/cjs/prod/integrations/webVitals.js.map +1 -0
  163. package/build/npm/cjs/prod/integrations/webWorker.js +133 -0
  164. package/build/npm/cjs/prod/integrations/webWorker.js.map +1 -0
  165. package/build/npm/cjs/prod/normalizeStringifyValue.js +27 -0
  166. package/build/npm/cjs/prod/normalizeStringifyValue.js.map +1 -0
  167. package/build/npm/cjs/prod/profiling/UIProfiler.js +306 -0
  168. package/build/npm/cjs/prod/profiling/UIProfiler.js.map +1 -0
  169. package/build/npm/cjs/prod/profiling/index.js +38 -0
  170. package/build/npm/cjs/prod/profiling/index.js.map +1 -0
  171. package/build/npm/cjs/prod/profiling/integration.js +120 -0
  172. package/build/npm/cjs/prod/profiling/integration.js.map +1 -0
  173. package/build/npm/cjs/prod/profiling/startProfileForSpan.js +91 -0
  174. package/build/npm/cjs/prod/profiling/startProfileForSpan.js.map +1 -0
  175. package/build/npm/cjs/prod/profiling/utils.js +498 -0
  176. package/build/npm/cjs/prod/profiling/utils.js.map +1 -0
  177. package/build/npm/cjs/prod/report-dialog.js +53 -0
  178. package/build/npm/cjs/prod/report-dialog.js.map +1 -0
  179. package/build/npm/cjs/prod/sdk.js +60 -0
  180. package/build/npm/cjs/prod/sdk.js.map +1 -0
  181. package/build/npm/cjs/prod/stack-parsers.js +118 -0
  182. package/build/npm/cjs/prod/stack-parsers.js.map +1 -0
  183. package/build/npm/cjs/prod/tracing/backgroundtab.js +34 -0
  184. package/build/npm/cjs/prod/tracing/backgroundtab.js.map +1 -0
  185. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js +437 -0
  186. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js.map +1 -0
  187. package/build/npm/cjs/prod/tracing/linkedTraces.js +139 -0
  188. package/build/npm/cjs/prod/tracing/linkedTraces.js.map +1 -0
  189. package/build/npm/cjs/prod/tracing/reportPageLoaded.js +10 -0
  190. package/build/npm/cjs/prod/tracing/reportPageLoaded.js.map +1 -0
  191. package/build/npm/cjs/prod/tracing/request.js +236 -0
  192. package/build/npm/cjs/prod/tracing/request.js.map +1 -0
  193. package/build/npm/cjs/prod/tracing/setActiveSpan.js +21 -0
  194. package/build/npm/cjs/prod/tracing/setActiveSpan.js.map +1 -0
  195. package/build/npm/cjs/prod/tracing/utils.js +31 -0
  196. package/build/npm/cjs/prod/tracing/utils.js.map +1 -0
  197. package/build/npm/cjs/prod/transports/fetch.js +58 -0
  198. package/build/npm/cjs/prod/transports/fetch.js.map +1 -0
  199. package/build/npm/cjs/prod/transports/offline.js +111 -0
  200. package/build/npm/cjs/prod/transports/offline.js.map +1 -0
  201. package/build/npm/cjs/prod/userfeedback.js +32 -0
  202. package/build/npm/cjs/prod/userfeedback.js.map +1 -0
  203. package/build/npm/cjs/prod/utils/detectBrowserExtension.js +38 -0
  204. package/build/npm/cjs/prod/utils/detectBrowserExtension.js.map +1 -0
  205. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js +92 -0
  206. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js.map +1 -0
  207. package/build/npm/esm/dev/client.js +74 -0
  208. package/build/npm/esm/dev/client.js.map +1 -0
  209. package/build/npm/esm/dev/debug-build.js +4 -0
  210. package/build/npm/esm/dev/debug-build.js.map +1 -0
  211. package/build/npm/esm/dev/diagnose-sdk.js +32 -0
  212. package/build/npm/esm/dev/diagnose-sdk.js.map +1 -0
  213. package/build/npm/esm/dev/eventbuilder.js +224 -0
  214. package/build/npm/esm/dev/eventbuilder.js.map +1 -0
  215. package/build/npm/esm/dev/feedbackAsync.js +9 -0
  216. package/build/npm/esm/dev/feedbackAsync.js.map +1 -0
  217. package/build/npm/esm/dev/feedbackSync.js +9 -0
  218. package/build/npm/esm/dev/feedbackSync.js.map +1 -0
  219. package/build/npm/esm/dev/helpers.js +102 -0
  220. package/build/npm/esm/dev/helpers.js.map +1 -0
  221. package/build/npm/esm/dev/index.js +48 -0
  222. package/build/npm/esm/dev/index.js.map +1 -0
  223. package/build/npm/esm/dev/integrations/breadcrumbs.js +247 -0
  224. package/build/npm/esm/dev/integrations/breadcrumbs.js.map +1 -0
  225. package/build/npm/esm/dev/integrations/browserapierrors.js +165 -0
  226. package/build/npm/esm/dev/integrations/browserapierrors.js.map +1 -0
  227. package/build/npm/esm/dev/integrations/browsersession.js +48 -0
  228. package/build/npm/esm/dev/integrations/browsersession.js.map +1 -0
  229. package/build/npm/esm/dev/integrations/contextlines.js +50 -0
  230. package/build/npm/esm/dev/integrations/contextlines.js.map +1 -0
  231. package/build/npm/esm/dev/integrations/culturecontext.js +48 -0
  232. package/build/npm/esm/dev/integrations/culturecontext.js.map +1 -0
  233. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js +6 -0
  234. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js.map +1 -0
  235. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js +27 -0
  236. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  237. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js +29 -0
  238. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js.map +1 -0
  239. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js +21 -0
  240. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js.map +1 -0
  241. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js +35 -0
  242. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js.map +1 -0
  243. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js +58 -0
  244. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js.map +1 -0
  245. package/build/npm/esm/dev/integrations/globalhandlers.js +139 -0
  246. package/build/npm/esm/dev/integrations/globalhandlers.js.map +1 -0
  247. package/build/npm/esm/dev/integrations/graphqlClient.js +142 -0
  248. package/build/npm/esm/dev/integrations/graphqlClient.js.map +1 -0
  249. package/build/npm/esm/dev/integrations/httpclient.js +248 -0
  250. package/build/npm/esm/dev/integrations/httpclient.js.map +1 -0
  251. package/build/npm/esm/dev/integrations/httpcontext.js +45 -0
  252. package/build/npm/esm/dev/integrations/httpcontext.js.map +1 -0
  253. package/build/npm/esm/dev/integrations/linkederrors.js +29 -0
  254. package/build/npm/esm/dev/integrations/linkederrors.js.map +1 -0
  255. package/build/npm/esm/dev/integrations/reportingobserver.js +58 -0
  256. package/build/npm/esm/dev/integrations/reportingobserver.js.map +1 -0
  257. package/build/npm/esm/dev/integrations/spanstreaming.js +47 -0
  258. package/build/npm/esm/dev/integrations/spanstreaming.js.map +1 -0
  259. package/build/npm/esm/dev/integrations/spotlight.js +57 -0
  260. package/build/npm/esm/dev/integrations/spotlight.js.map +1 -0
  261. package/build/npm/esm/dev/integrations/view-hierarchy.js +72 -0
  262. package/build/npm/esm/dev/integrations/view-hierarchy.js.map +1 -0
  263. package/build/npm/esm/dev/integrations/webVitals.js +59 -0
  264. package/build/npm/esm/dev/integrations/webVitals.js.map +1 -0
  265. package/build/npm/esm/dev/integrations/webWorker.js +129 -0
  266. package/build/npm/esm/dev/integrations/webWorker.js.map +1 -0
  267. package/build/npm/esm/dev/normalizeStringifyValue.js +25 -0
  268. package/build/npm/esm/dev/normalizeStringifyValue.js.map +1 -0
  269. package/build/npm/esm/dev/package.json +1 -0
  270. package/build/npm/esm/dev/profiling/UIProfiler.js +304 -0
  271. package/build/npm/esm/dev/profiling/UIProfiler.js.map +1 -0
  272. package/build/npm/esm/dev/profiling/index.js +36 -0
  273. package/build/npm/esm/dev/profiling/index.js.map +1 -0
  274. package/build/npm/esm/dev/profiling/integration.js +118 -0
  275. package/build/npm/esm/dev/profiling/integration.js.map +1 -0
  276. package/build/npm/esm/dev/profiling/startProfileForSpan.js +89 -0
  277. package/build/npm/esm/dev/profiling/startProfileForSpan.js.map +1 -0
  278. package/build/npm/esm/dev/profiling/utils.js +474 -0
  279. package/build/npm/esm/dev/profiling/utils.js.map +1 -0
  280. package/build/npm/esm/dev/report-dialog.js +51 -0
  281. package/build/npm/esm/dev/report-dialog.js.map +1 -0
  282. package/build/npm/esm/dev/sdk.js +65 -0
  283. package/build/npm/esm/dev/sdk.js.map +1 -0
  284. package/build/npm/esm/dev/stack-parsers.js +110 -0
  285. package/build/npm/esm/dev/stack-parsers.js.map +1 -0
  286. package/build/npm/esm/dev/tracing/backgroundtab.js +32 -0
  287. package/build/npm/esm/dev/tracing/backgroundtab.js.map +1 -0
  288. package/build/npm/esm/dev/tracing/browserTracingIntegration.js +429 -0
  289. package/build/npm/esm/dev/tracing/browserTracingIntegration.js.map +1 -0
  290. package/build/npm/esm/dev/tracing/linkedTraces.js +131 -0
  291. package/build/npm/esm/dev/tracing/linkedTraces.js.map +1 -0
  292. package/build/npm/esm/dev/tracing/reportPageLoaded.js +8 -0
  293. package/build/npm/esm/dev/tracing/reportPageLoaded.js.map +1 -0
  294. package/build/npm/esm/dev/tracing/request.js +232 -0
  295. package/build/npm/esm/dev/tracing/request.js.map +1 -0
  296. package/build/npm/esm/dev/tracing/setActiveSpan.js +19 -0
  297. package/build/npm/esm/dev/tracing/setActiveSpan.js.map +1 -0
  298. package/build/npm/esm/dev/tracing/utils.js +26 -0
  299. package/build/npm/esm/dev/tracing/utils.js.map +1 -0
  300. package/build/npm/esm/dev/transports/fetch.js +56 -0
  301. package/build/npm/esm/dev/transports/fetch.js.map +1 -0
  302. package/build/npm/esm/dev/transports/offline.js +105 -0
  303. package/build/npm/esm/dev/transports/offline.js.map +1 -0
  304. package/build/npm/esm/dev/userfeedback.js +30 -0
  305. package/build/npm/esm/dev/userfeedback.js.map +1 -0
  306. package/build/npm/esm/dev/utils/detectBrowserExtension.js +36 -0
  307. package/build/npm/esm/dev/utils/detectBrowserExtension.js.map +1 -0
  308. package/build/npm/esm/dev/utils/lazyLoadIntegration.js +89 -0
  309. package/build/npm/esm/dev/utils/lazyLoadIntegration.js.map +1 -0
  310. package/build/npm/esm/prod/client.js +74 -0
  311. package/build/npm/esm/prod/client.js.map +1 -0
  312. package/build/npm/esm/prod/debug-build.js +4 -0
  313. package/build/npm/esm/prod/debug-build.js.map +1 -0
  314. package/build/npm/esm/prod/diagnose-sdk.js +32 -0
  315. package/build/npm/esm/prod/diagnose-sdk.js.map +1 -0
  316. package/build/npm/esm/prod/eventbuilder.js +224 -0
  317. package/build/npm/esm/prod/eventbuilder.js.map +1 -0
  318. package/build/npm/esm/prod/feedbackAsync.js +9 -0
  319. package/build/npm/esm/prod/feedbackAsync.js.map +1 -0
  320. package/build/npm/esm/prod/feedbackSync.js +9 -0
  321. package/build/npm/esm/prod/feedbackSync.js.map +1 -0
  322. package/build/npm/esm/prod/helpers.js +102 -0
  323. package/build/npm/esm/prod/helpers.js.map +1 -0
  324. package/build/npm/esm/prod/index.js +48 -0
  325. package/build/npm/esm/prod/index.js.map +1 -0
  326. package/build/npm/esm/prod/integrations/breadcrumbs.js +247 -0
  327. package/build/npm/esm/prod/integrations/breadcrumbs.js.map +1 -0
  328. package/build/npm/esm/prod/integrations/browserapierrors.js +165 -0
  329. package/build/npm/esm/prod/integrations/browserapierrors.js.map +1 -0
  330. package/build/npm/esm/prod/integrations/browsersession.js +48 -0
  331. package/build/npm/esm/prod/integrations/browsersession.js.map +1 -0
  332. package/build/npm/esm/prod/integrations/contextlines.js +50 -0
  333. package/build/npm/esm/prod/integrations/contextlines.js.map +1 -0
  334. package/build/npm/esm/prod/integrations/culturecontext.js +48 -0
  335. package/build/npm/esm/prod/integrations/culturecontext.js.map +1 -0
  336. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js +6 -0
  337. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js.map +1 -0
  338. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js +27 -0
  339. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  340. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js +29 -0
  341. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js.map +1 -0
  342. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js +21 -0
  343. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js.map +1 -0
  344. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js +35 -0
  345. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js.map +1 -0
  346. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js +58 -0
  347. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js.map +1 -0
  348. package/build/npm/esm/prod/integrations/globalhandlers.js +139 -0
  349. package/build/npm/esm/prod/integrations/globalhandlers.js.map +1 -0
  350. package/build/npm/esm/prod/integrations/graphqlClient.js +142 -0
  351. package/build/npm/esm/prod/integrations/graphqlClient.js.map +1 -0
  352. package/build/npm/esm/prod/integrations/httpclient.js +248 -0
  353. package/build/npm/esm/prod/integrations/httpclient.js.map +1 -0
  354. package/build/npm/esm/prod/integrations/httpcontext.js +45 -0
  355. package/build/npm/esm/prod/integrations/httpcontext.js.map +1 -0
  356. package/build/npm/esm/prod/integrations/linkederrors.js +29 -0
  357. package/build/npm/esm/prod/integrations/linkederrors.js.map +1 -0
  358. package/build/npm/esm/prod/integrations/reportingobserver.js +58 -0
  359. package/build/npm/esm/prod/integrations/reportingobserver.js.map +1 -0
  360. package/build/npm/esm/prod/integrations/spanstreaming.js +47 -0
  361. package/build/npm/esm/prod/integrations/spanstreaming.js.map +1 -0
  362. package/build/npm/esm/prod/integrations/spotlight.js +57 -0
  363. package/build/npm/esm/prod/integrations/spotlight.js.map +1 -0
  364. package/build/npm/esm/prod/integrations/view-hierarchy.js +72 -0
  365. package/build/npm/esm/prod/integrations/view-hierarchy.js.map +1 -0
  366. package/build/npm/esm/prod/integrations/webVitals.js +59 -0
  367. package/build/npm/esm/prod/integrations/webVitals.js.map +1 -0
  368. package/build/npm/esm/prod/integrations/webWorker.js +129 -0
  369. package/build/npm/esm/prod/integrations/webWorker.js.map +1 -0
  370. package/build/npm/esm/prod/normalizeStringifyValue.js +25 -0
  371. package/build/npm/esm/prod/normalizeStringifyValue.js.map +1 -0
  372. package/build/npm/esm/prod/package.json +1 -0
  373. package/build/npm/esm/prod/profiling/UIProfiler.js +304 -0
  374. package/build/npm/esm/prod/profiling/UIProfiler.js.map +1 -0
  375. package/build/npm/esm/prod/profiling/index.js +36 -0
  376. package/build/npm/esm/prod/profiling/index.js.map +1 -0
  377. package/build/npm/esm/prod/profiling/integration.js +118 -0
  378. package/build/npm/esm/prod/profiling/integration.js.map +1 -0
  379. package/build/npm/esm/prod/profiling/startProfileForSpan.js +89 -0
  380. package/build/npm/esm/prod/profiling/startProfileForSpan.js.map +1 -0
  381. package/build/npm/esm/prod/profiling/utils.js +474 -0
  382. package/build/npm/esm/prod/profiling/utils.js.map +1 -0
  383. package/build/npm/esm/prod/report-dialog.js +51 -0
  384. package/build/npm/esm/prod/report-dialog.js.map +1 -0
  385. package/build/npm/esm/prod/sdk.js +55 -0
  386. package/build/npm/esm/prod/sdk.js.map +1 -0
  387. package/build/npm/esm/prod/stack-parsers.js +110 -0
  388. package/build/npm/esm/prod/stack-parsers.js.map +1 -0
  389. package/build/npm/esm/prod/tracing/backgroundtab.js +32 -0
  390. package/build/npm/esm/prod/tracing/backgroundtab.js.map +1 -0
  391. package/build/npm/esm/prod/tracing/browserTracingIntegration.js +429 -0
  392. package/build/npm/esm/prod/tracing/browserTracingIntegration.js.map +1 -0
  393. package/build/npm/esm/prod/tracing/linkedTraces.js +130 -0
  394. package/build/npm/esm/prod/tracing/linkedTraces.js.map +1 -0
  395. package/build/npm/esm/prod/tracing/reportPageLoaded.js +8 -0
  396. package/build/npm/esm/prod/tracing/reportPageLoaded.js.map +1 -0
  397. package/build/npm/esm/prod/tracing/request.js +232 -0
  398. package/build/npm/esm/prod/tracing/request.js.map +1 -0
  399. package/build/npm/esm/prod/tracing/setActiveSpan.js +19 -0
  400. package/build/npm/esm/prod/tracing/setActiveSpan.js.map +1 -0
  401. package/build/npm/esm/prod/tracing/utils.js +26 -0
  402. package/build/npm/esm/prod/tracing/utils.js.map +1 -0
  403. package/build/npm/esm/prod/transports/fetch.js +56 -0
  404. package/build/npm/esm/prod/transports/fetch.js.map +1 -0
  405. package/build/npm/esm/prod/transports/offline.js +105 -0
  406. package/build/npm/esm/prod/transports/offline.js.map +1 -0
  407. package/build/npm/esm/prod/userfeedback.js +30 -0
  408. package/build/npm/esm/prod/userfeedback.js.map +1 -0
  409. package/build/npm/esm/prod/utils/detectBrowserExtension.js +36 -0
  410. package/build/npm/esm/prod/utils/detectBrowserExtension.js.map +1 -0
  411. package/build/npm/esm/prod/utils/lazyLoadIntegration.js +89 -0
  412. package/build/npm/esm/prod/utils/lazyLoadIntegration.js.map +1 -0
  413. package/build/npm/types/client.d.ts +79 -0
  414. package/build/npm/types/client.d.ts.map +1 -0
  415. package/build/npm/types/debug-build.d.ts +7 -0
  416. package/build/npm/types/debug-build.d.ts.map +1 -0
  417. package/build/npm/types/diagnose-sdk.d.ts +11 -0
  418. package/build/npm/types/diagnose-sdk.d.ts.map +1 -0
  419. package/build/npm/types/eventbuilder.d.ts +40 -0
  420. package/build/npm/types/eventbuilder.d.ts.map +1 -0
  421. package/build/npm/types/exports.d.ts +21 -0
  422. package/build/npm/types/exports.d.ts.map +1 -0
  423. package/build/npm/types/feedbackAsync.d.ts +7 -0
  424. package/build/npm/types/feedbackAsync.d.ts.map +1 -0
  425. package/build/npm/types/feedbackSync.d.ts +4 -0
  426. package/build/npm/types/feedbackSync.d.ts.map +1 -0
  427. package/build/npm/types/helpers.d.ts +27 -0
  428. package/build/npm/types/helpers.d.ts.map +1 -0
  429. package/build/npm/types/index.bundle.base.d.ts +2 -0
  430. package/build/npm/types/index.bundle.base.d.ts.map +1 -0
  431. package/build/npm/types/index.bundle.d.ts +5 -0
  432. package/build/npm/types/index.bundle.d.ts.map +1 -0
  433. package/build/npm/types/index.bundle.feedback.d.ts +7 -0
  434. package/build/npm/types/index.bundle.feedback.d.ts.map +1 -0
  435. package/build/npm/types/index.bundle.logs.metrics.d.ts +6 -0
  436. package/build/npm/types/index.bundle.logs.metrics.d.ts.map +1 -0
  437. package/build/npm/types/index.bundle.replay.d.ts +6 -0
  438. package/build/npm/types/index.bundle.replay.d.ts.map +1 -0
  439. package/build/npm/types/index.bundle.replay.feedback.d.ts +8 -0
  440. package/build/npm/types/index.bundle.replay.feedback.d.ts.map +1 -0
  441. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts +7 -0
  442. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts.map +1 -0
  443. package/build/npm/types/index.bundle.tracing.d.ts +13 -0
  444. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -0
  445. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts +13 -0
  446. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts.map +1 -0
  447. package/build/npm/types/index.bundle.tracing.replay.d.ts +14 -0
  448. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -0
  449. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +16 -0
  450. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -0
  451. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +14 -0
  452. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map +1 -0
  453. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts +14 -0
  454. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts.map +1 -0
  455. package/build/npm/types/index.d.ts +38 -0
  456. package/build/npm/types/index.d.ts.map +1 -0
  457. package/build/npm/types/integrations/breadcrumbs.d.ts +16 -0
  458. package/build/npm/types/integrations/breadcrumbs.d.ts.map +1 -0
  459. package/build/npm/types/integrations/browserapierrors.d.ts +23 -0
  460. package/build/npm/types/integrations/browserapierrors.d.ts.map +1 -0
  461. package/build/npm/types/integrations/browserprofiling.d.ts +2 -0
  462. package/build/npm/types/integrations/browserprofiling.d.ts.map +1 -0
  463. package/build/npm/types/integrations/browsersession.d.ts +25 -0
  464. package/build/npm/types/integrations/browsersession.d.ts.map +1 -0
  465. package/build/npm/types/integrations/contextlines.d.ts +32 -0
  466. package/build/npm/types/integrations/contextlines.d.ts.map +1 -0
  467. package/build/npm/types/integrations/culturecontext.d.ts +18 -0
  468. package/build/npm/types/integrations/culturecontext.d.ts.map +1 -0
  469. package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts +2 -0
  470. package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts.map +1 -0
  471. package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts +25 -0
  472. package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts.map +1 -0
  473. package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts +6 -0
  474. package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts.map +1 -0
  475. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  476. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts.map +1 -0
  477. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts +27 -0
  478. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts.map +1 -0
  479. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  480. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts.map +1 -0
  481. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts +2 -0
  482. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts.map +1 -0
  483. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts +18 -0
  484. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts.map +1 -0
  485. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts +78 -0
  486. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts.map +1 -0
  487. package/build/npm/types/integrations/featureFlags/statsig/index.d.ts +2 -0
  488. package/build/npm/types/integrations/featureFlags/statsig/index.d.ts.map +1 -0
  489. package/build/npm/types/integrations/featureFlags/statsig/integration.d.ts +30 -0
  490. package/build/npm/types/integrations/featureFlags/statsig/integration.d.ts.map +1 -0
  491. package/build/npm/types/integrations/featureFlags/statsig/types.d.ts +14 -0
  492. package/build/npm/types/integrations/featureFlags/statsig/types.d.ts.map +1 -0
  493. package/build/npm/types/integrations/featureFlags/unleash/index.d.ts +2 -0
  494. package/build/npm/types/integrations/featureFlags/unleash/index.d.ts.map +1 -0
  495. package/build/npm/types/integrations/featureFlags/unleash/integration.d.ts +31 -0
  496. package/build/npm/types/integrations/featureFlags/unleash/integration.d.ts.map +1 -0
  497. package/build/npm/types/integrations/featureFlags/unleash/types.d.ts +21 -0
  498. package/build/npm/types/integrations/featureFlags/unleash/types.d.ts.map +1 -0
  499. package/build/npm/types/integrations/fetchStreamPerformance.d.ts +16 -0
  500. package/build/npm/types/integrations/fetchStreamPerformance.d.ts.map +1 -0
  501. package/build/npm/types/integrations/globalhandlers.d.ts +19 -0
  502. package/build/npm/types/integrations/globalhandlers.d.ts.map +1 -0
  503. package/build/npm/types/integrations/graphqlClient.d.ts +60 -0
  504. package/build/npm/types/integrations/graphqlClient.d.ts.map +1 -0
  505. package/build/npm/types/integrations/httpclient.d.ts +29 -0
  506. package/build/npm/types/integrations/httpclient.d.ts.map +1 -0
  507. package/build/npm/types/integrations/httpcontext.d.ts +8 -0
  508. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -0
  509. package/build/npm/types/integrations/linkederrors.d.ts +12 -0
  510. package/build/npm/types/integrations/linkederrors.d.ts.map +1 -0
  511. package/build/npm/types/integrations/reportingobserver.d.ts +12 -0
  512. package/build/npm/types/integrations/reportingobserver.d.ts.map +1 -0
  513. package/build/npm/types/integrations/spanstreaming.d.ts +4 -0
  514. package/build/npm/types/integrations/spanstreaming.d.ts.map +1 -0
  515. package/build/npm/types/integrations/spotlight.d.ts +21 -0
  516. package/build/npm/types/integrations/spotlight.d.ts.map +1 -0
  517. package/build/npm/types/integrations/view-hierarchy.d.ts +51 -0
  518. package/build/npm/types/integrations/view-hierarchy.d.ts.map +1 -0
  519. package/build/npm/types/integrations/webVitals.d.ts +26 -0
  520. package/build/npm/types/integrations/webVitals.d.ts.map +1 -0
  521. package/build/npm/types/integrations/webWorker.d.ts +129 -0
  522. package/build/npm/types/integrations/webWorker.d.ts.map +1 -0
  523. package/build/npm/types/integrations-bundle/index.captureconsole.d.ts +2 -0
  524. package/build/npm/types/integrations-bundle/index.captureconsole.d.ts.map +1 -0
  525. package/build/npm/types/integrations-bundle/index.createlangchaincallbackhandler.d.ts +2 -0
  526. package/build/npm/types/integrations-bundle/index.createlangchaincallbackhandler.d.ts.map +1 -0
  527. package/build/npm/types/integrations-bundle/index.dedupe.d.ts +2 -0
  528. package/build/npm/types/integrations-bundle/index.dedupe.d.ts.map +1 -0
  529. package/build/npm/types/integrations-bundle/index.extraerrordata.d.ts +2 -0
  530. package/build/npm/types/integrations-bundle/index.extraerrordata.d.ts.map +1 -0
  531. package/build/npm/types/integrations-bundle/index.feedback.d.ts +5 -0
  532. package/build/npm/types/integrations-bundle/index.feedback.d.ts.map +1 -0
  533. package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts +2 -0
  534. package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts.map +1 -0
  535. package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
  536. package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts.map +1 -0
  537. package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
  538. package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts.map +1 -0
  539. package/build/npm/types/integrations-bundle/index.instrumentlangchainembeddings.d.ts +2 -0
  540. package/build/npm/types/integrations-bundle/index.instrumentlangchainembeddings.d.ts.map +1 -0
  541. package/build/npm/types/integrations-bundle/index.instrumentlanggraph.d.ts +2 -0
  542. package/build/npm/types/integrations-bundle/index.instrumentlanggraph.d.ts.map +1 -0
  543. package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
  544. package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts.map +1 -0
  545. package/build/npm/types/integrations-bundle/index.instrumentstategraph.d.ts +2 -0
  546. package/build/npm/types/integrations-bundle/index.instrumentstategraph.d.ts.map +1 -0
  547. package/build/npm/types/integrations-bundle/index.modulemetadata.d.ts +2 -0
  548. package/build/npm/types/integrations-bundle/index.modulemetadata.d.ts.map +1 -0
  549. package/build/npm/types/integrations-bundle/index.rewriteframes.d.ts +2 -0
  550. package/build/npm/types/integrations-bundle/index.rewriteframes.d.ts.map +1 -0
  551. package/build/npm/types/integrations-bundle/index.spotlight.d.ts +2 -0
  552. package/build/npm/types/integrations-bundle/index.spotlight.d.ts.map +1 -0
  553. package/build/npm/types/normalizeStringifyValue.d.ts +15 -0
  554. package/build/npm/types/normalizeStringifyValue.d.ts.map +1 -0
  555. package/build/npm/types/pluggable-exports-bundle/index.multiplexedtransport.d.ts +2 -0
  556. package/build/npm/types/pluggable-exports-bundle/index.multiplexedtransport.d.ts.map +1 -0
  557. package/build/npm/types/profiling/UIProfiler.d.ts +75 -0
  558. package/build/npm/types/profiling/UIProfiler.d.ts.map +1 -0
  559. package/build/npm/types/profiling/index.d.ts +8 -0
  560. package/build/npm/types/profiling/index.d.ts.map +1 -0
  561. package/build/npm/types/profiling/integration.d.ts +4 -0
  562. package/build/npm/types/profiling/integration.d.ts.map +1 -0
  563. package/build/npm/types/profiling/jsSelfProfiling.d.ts +41 -0
  564. package/build/npm/types/profiling/jsSelfProfiling.d.ts.map +1 -0
  565. package/build/npm/types/profiling/startProfileForSpan.d.ts +8 -0
  566. package/build/npm/types/profiling/startProfileForSpan.d.ts.map +1 -0
  567. package/build/npm/types/profiling/utils.d.ts +112 -0
  568. package/build/npm/types/profiling/utils.d.ts.map +1 -0
  569. package/build/npm/types/report-dialog.d.ts +8 -0
  570. package/build/npm/types/report-dialog.d.ts.map +1 -0
  571. package/build/npm/types/sdk.d.ts +62 -0
  572. package/build/npm/types/sdk.d.ts.map +1 -0
  573. package/build/npm/types/stack-parsers.d.ts +9 -0
  574. package/build/npm/types/stack-parsers.d.ts.map +1 -0
  575. package/build/npm/types/tracing/backgroundtab.d.ts +6 -0
  576. package/build/npm/types/tracing/backgroundtab.d.ts.map +1 -0
  577. package/build/npm/types/tracing/browserTracingIntegration.d.ts +271 -0
  578. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -0
  579. package/build/npm/types/tracing/linkedTraces.d.ts +52 -0
  580. package/build/npm/types/tracing/linkedTraces.d.ts.map +1 -0
  581. package/build/npm/types/tracing/reportPageLoaded.d.ts +11 -0
  582. package/build/npm/types/tracing/reportPageLoaded.d.ts.map +1 -0
  583. package/build/npm/types/tracing/request.d.ts +87 -0
  584. package/build/npm/types/tracing/request.d.ts.map +1 -0
  585. package/build/npm/types/tracing/setActiveSpan.d.ts +39 -0
  586. package/build/npm/types/tracing/setActiveSpan.d.ts.map +1 -0
  587. package/build/npm/types/tracing/utils.d.ts +17 -0
  588. package/build/npm/types/tracing/utils.d.ts.map +1 -0
  589. package/build/npm/types/transports/fetch.d.ts +8 -0
  590. package/build/npm/types/transports/fetch.d.ts.map +1 -0
  591. package/build/npm/types/transports/offline.d.ts +33 -0
  592. package/build/npm/types/transports/offline.d.ts.map +1 -0
  593. package/build/npm/types/transports/types.d.ts +6 -0
  594. package/build/npm/types/transports/types.d.ts.map +1 -0
  595. package/build/npm/types/userfeedback.d.ts +10 -0
  596. package/build/npm/types/userfeedback.d.ts.map +1 -0
  597. package/build/npm/types/utils/detectBrowserExtension.d.ts +6 -0
  598. package/build/npm/types/utils/detectBrowserExtension.d.ts.map +1 -0
  599. package/build/npm/types/utils/lazyLoadIntegration.d.ts +13 -0
  600. package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -0
  601. package/build/npm/types-ts3.8/client.d.ts +79 -0
  602. package/build/npm/types-ts3.8/debug-build.d.ts +7 -0
  603. package/build/npm/types-ts3.8/diagnose-sdk.d.ts +11 -0
  604. package/build/npm/types-ts3.8/eventbuilder.d.ts +40 -0
  605. package/build/npm/types-ts3.8/exports.d.ts +21 -0
  606. package/build/npm/types-ts3.8/feedbackAsync.d.ts +7 -0
  607. package/build/npm/types-ts3.8/feedbackSync.d.ts +4 -0
  608. package/build/npm/types-ts3.8/helpers.d.ts +27 -0
  609. package/build/npm/types-ts3.8/index.bundle.base.d.ts +2 -0
  610. package/build/npm/types-ts3.8/index.bundle.d.ts +5 -0
  611. package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +7 -0
  612. package/build/npm/types-ts3.8/index.bundle.logs.metrics.d.ts +6 -0
  613. package/build/npm/types-ts3.8/index.bundle.replay.d.ts +6 -0
  614. package/build/npm/types-ts3.8/index.bundle.replay.feedback.d.ts +8 -0
  615. package/build/npm/types-ts3.8/index.bundle.replay.logs.metrics.d.ts +7 -0
  616. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +13 -0
  617. package/build/npm/types-ts3.8/index.bundle.tracing.logs.metrics.d.ts +13 -0
  618. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +14 -0
  619. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +16 -0
  620. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +14 -0
  621. package/build/npm/types-ts3.8/index.bundle.tracing.replay.logs.metrics.d.ts +14 -0
  622. package/build/npm/types-ts3.8/index.d.ts +38 -0
  623. package/build/npm/types-ts3.8/integrations/breadcrumbs.d.ts +16 -0
  624. package/build/npm/types-ts3.8/integrations/browserapierrors.d.ts +23 -0
  625. package/build/npm/types-ts3.8/integrations/browserprofiling.d.ts +2 -0
  626. package/build/npm/types-ts3.8/integrations/browsersession.d.ts +25 -0
  627. package/build/npm/types-ts3.8/integrations/contextlines.d.ts +32 -0
  628. package/build/npm/types-ts3.8/integrations/culturecontext.d.ts +18 -0
  629. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/index.d.ts +2 -0
  630. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/integration.d.ts +25 -0
  631. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/types.d.ts +6 -0
  632. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  633. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/integration.d.ts +27 -0
  634. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  635. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/index.d.ts +2 -0
  636. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/integration.d.ts +18 -0
  637. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/types.d.ts +78 -0
  638. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/index.d.ts +2 -0
  639. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/integration.d.ts +30 -0
  640. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/types.d.ts +14 -0
  641. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/index.d.ts +2 -0
  642. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/integration.d.ts +31 -0
  643. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/types.d.ts +21 -0
  644. package/build/npm/types-ts3.8/integrations/fetchStreamPerformance.d.ts +16 -0
  645. package/build/npm/types-ts3.8/integrations/globalhandlers.d.ts +19 -0
  646. package/build/npm/types-ts3.8/integrations/graphqlClient.d.ts +60 -0
  647. package/build/npm/types-ts3.8/integrations/httpclient.d.ts +32 -0
  648. package/build/npm/types-ts3.8/integrations/httpcontext.d.ts +8 -0
  649. package/build/npm/types-ts3.8/integrations/linkederrors.d.ts +12 -0
  650. package/build/npm/types-ts3.8/integrations/reportingobserver.d.ts +12 -0
  651. package/build/npm/types-ts3.8/integrations/spanstreaming.d.ts +4 -0
  652. package/build/npm/types-ts3.8/integrations/spotlight.d.ts +21 -0
  653. package/build/npm/types-ts3.8/integrations/view-hierarchy.d.ts +51 -0
  654. package/build/npm/types-ts3.8/integrations/webVitals.d.ts +26 -0
  655. package/build/npm/types-ts3.8/integrations/webWorker.d.ts +129 -0
  656. package/build/npm/types-ts3.8/integrations-bundle/index.captureconsole.d.ts +2 -0
  657. package/build/npm/types-ts3.8/integrations-bundle/index.createlangchaincallbackhandler.d.ts +2 -0
  658. package/build/npm/types-ts3.8/integrations-bundle/index.dedupe.d.ts +2 -0
  659. package/build/npm/types-ts3.8/integrations-bundle/index.extraerrordata.d.ts +2 -0
  660. package/build/npm/types-ts3.8/integrations-bundle/index.feedback.d.ts +5 -0
  661. package/build/npm/types-ts3.8/integrations-bundle/index.graphqlclient.d.ts +2 -0
  662. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
  663. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
  664. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentlangchainembeddings.d.ts +2 -0
  665. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentlanggraph.d.ts +2 -0
  666. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
  667. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentstategraph.d.ts +2 -0
  668. package/build/npm/types-ts3.8/integrations-bundle/index.modulemetadata.d.ts +2 -0
  669. package/build/npm/types-ts3.8/integrations-bundle/index.rewriteframes.d.ts +2 -0
  670. package/build/npm/types-ts3.8/integrations-bundle/index.spotlight.d.ts +2 -0
  671. package/build/npm/types-ts3.8/normalizeStringifyValue.d.ts +15 -0
  672. package/build/npm/types-ts3.8/pluggable-exports-bundle/index.multiplexedtransport.d.ts +2 -0
  673. package/build/npm/types-ts3.8/profiling/UIProfiler.d.ts +75 -0
  674. package/build/npm/types-ts3.8/profiling/index.d.ts +8 -0
  675. package/build/npm/types-ts3.8/profiling/integration.d.ts +4 -0
  676. package/build/npm/types-ts3.8/profiling/jsSelfProfiling.d.ts +41 -0
  677. package/build/npm/types-ts3.8/profiling/startProfileForSpan.d.ts +8 -0
  678. package/build/npm/types-ts3.8/profiling/utils.d.ts +112 -0
  679. package/build/npm/types-ts3.8/report-dialog.d.ts +8 -0
  680. package/build/npm/types-ts3.8/sdk.d.ts +62 -0
  681. package/build/npm/types-ts3.8/stack-parsers.d.ts +9 -0
  682. package/build/npm/types-ts3.8/tracing/backgroundtab.d.ts +6 -0
  683. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +271 -0
  684. package/build/npm/types-ts3.8/tracing/linkedTraces.d.ts +52 -0
  685. package/build/npm/types-ts3.8/tracing/reportPageLoaded.d.ts +11 -0
  686. package/build/npm/types-ts3.8/tracing/request.d.ts +87 -0
  687. package/build/npm/types-ts3.8/tracing/setActiveSpan.d.ts +39 -0
  688. package/build/npm/types-ts3.8/tracing/utils.d.ts +17 -0
  689. package/build/npm/types-ts3.8/transports/fetch.d.ts +8 -0
  690. package/build/npm/types-ts3.8/transports/offline.d.ts +33 -0
  691. package/build/npm/types-ts3.8/transports/types.d.ts +6 -0
  692. package/build/npm/types-ts3.8/userfeedback.d.ts +10 -0
  693. package/build/npm/types-ts3.8/utils/detectBrowserExtension.d.ts +6 -0
  694. package/build/npm/types-ts3.8/utils/lazyLoadIntegration.d.ts +37 -0
  695. package/package.json +85 -4
@@ -0,0 +1,74 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+ const helpers = require('../helpers.js');
5
+
6
+ const viewHierarchyIntegration = browser.defineIntegration((options = {}) => {
7
+ const skipHtmlTags = ["script"];
8
+ function walk(element, windows, depth = 0) {
9
+ if (!element) {
10
+ return;
11
+ }
12
+ const children = "shadowRoot" in element && element.shadowRoot ? element.shadowRoot.children : element.children;
13
+ for (const child of children) {
14
+ if (!(child instanceof HTMLElement)) {
15
+ continue;
16
+ }
17
+ const componentName = browser.getComponentName(child, 1) || void 0;
18
+ const tagName = child.tagName.toLowerCase();
19
+ if (skipHtmlTags.includes(tagName)) {
20
+ continue;
21
+ }
22
+ const result = options.onElement?.({ element: child, componentName, tagName, depth }) || {};
23
+ if (result === "skip") {
24
+ continue;
25
+ }
26
+ if (result === "children") {
27
+ walk(child, windows, depth + 1);
28
+ continue;
29
+ }
30
+ const { x, y, width, height } = child.getBoundingClientRect();
31
+ const window = {
32
+ identifier: child.id || void 0,
33
+ type: componentName || tagName,
34
+ visible: true,
35
+ alpha: 1,
36
+ height,
37
+ width,
38
+ x,
39
+ y,
40
+ ...result
41
+ };
42
+ const children2 = [];
43
+ window.children = children2;
44
+ walk(child, window.children, depth + 1);
45
+ windows.push(window);
46
+ }
47
+ }
48
+ return {
49
+ name: "ViewHierarchy",
50
+ processEvent: (event, hint) => {
51
+ if (event.type !== void 0 || options.shouldAttach?.(event, hint) === false) {
52
+ return event;
53
+ }
54
+ const root = {
55
+ rendering_system: "DOM",
56
+ positioning: "absolute",
57
+ windows: []
58
+ };
59
+ walk(options.rootElement?.() || helpers.WINDOW.document.body, root.windows);
60
+ const attachment = {
61
+ filename: "view-hierarchy.json",
62
+ attachmentType: "event.view_hierarchy",
63
+ contentType: "application/json",
64
+ data: JSON.stringify(root)
65
+ };
66
+ hint.attachments = hint.attachments || [];
67
+ hint.attachments.push(attachment);
68
+ return event;
69
+ }
70
+ };
71
+ });
72
+
73
+ exports.viewHierarchyIntegration = viewHierarchyIntegration;
74
+ //# sourceMappingURL=view-hierarchy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-hierarchy.js","sources":["../../../../../src/integrations/view-hierarchy.ts"],"sourcesContent":["import type { Attachment, Event, EventHint, ViewHierarchyData, ViewHierarchyWindow } from '@elenjical/core/browser';\nimport { defineIntegration, getComponentName } from '@elenjical/core/browser';\nimport { WINDOW } from '../helpers';\n\ninterface OnElementArgs {\n /**\n * The element being processed.\n */\n element: HTMLElement;\n /**\n * Lowercase tag name of the element.\n */\n tagName: string;\n /**\n * The component name of the element.\n */\n componentName?: string;\n\n /**\n * The current depth of the element in the view hierarchy. The root element will have a depth of 0.\n *\n * This allows you to limit the traversal depth for large DOM trees.\n */\n depth?: number;\n}\n\ninterface Options {\n /**\n * Whether to attach the view hierarchy to the event.\n *\n * Default: Always attach.\n */\n shouldAttach?: (event: Event, hint: EventHint) => boolean;\n\n /**\n * A function that returns the root element to start walking the DOM from.\n *\n * Default: `window.document.body`\n */\n rootElement?: () => HTMLElement | undefined;\n\n /**\n * Called for each HTMLElement as we walk the DOM.\n *\n * Return an object to include the element with any additional properties.\n * Return `skip` to exclude the element and its children.\n * Return `children` to skip the element but include its children.\n */\n onElement?: (prop: OnElementArgs) => Record<string, string | number | boolean> | 'skip' | 'children';\n}\n\n/**\n * An integration to include a view hierarchy attachment which contains the DOM.\n */\nexport const viewHierarchyIntegration = defineIntegration((options: Options = {}) => {\n const skipHtmlTags = ['script'];\n\n /** Walk an element */\n function walk(element: HTMLElement, windows: ViewHierarchyWindow[], depth = 0): void {\n if (!element) {\n return;\n }\n\n // With Web Components, we need to walk into shadow DOMs\n const children = 'shadowRoot' in element && element.shadowRoot ? element.shadowRoot.children : element.children;\n\n for (const child of children) {\n if (!(child instanceof HTMLElement)) {\n continue;\n }\n\n const componentName = getComponentName(child, 1) || undefined;\n const tagName = child.tagName.toLowerCase();\n\n if (skipHtmlTags.includes(tagName)) {\n continue;\n }\n\n const result = options.onElement?.({ element: child, componentName, tagName, depth }) || {};\n\n if (result === 'skip') {\n continue;\n }\n\n // Skip this element but include its children\n if (result === 'children') {\n walk(child, windows, depth + 1);\n continue;\n }\n\n const { x, y, width, height } = child.getBoundingClientRect();\n\n const window: ViewHierarchyWindow = {\n identifier: (child.id || undefined) as string,\n type: componentName || tagName,\n visible: true,\n alpha: 1,\n height,\n width,\n x,\n y,\n ...result,\n };\n\n const children: ViewHierarchyWindow[] = [];\n window.children = children;\n\n // Recursively walk the children\n walk(child, window.children, depth + 1);\n\n windows.push(window);\n }\n }\n\n return {\n name: 'ViewHierarchy' as const,\n processEvent: (event, hint) => {\n // only capture for error events\n if (event.type !== undefined || options.shouldAttach?.(event, hint) === false) {\n return event;\n }\n\n const root: ViewHierarchyData = {\n rendering_system: 'DOM',\n positioning: 'absolute',\n windows: [],\n };\n\n walk(options.rootElement?.() || WINDOW.document.body, root.windows);\n\n const attachment: Attachment = {\n filename: 'view-hierarchy.json',\n attachmentType: 'event.view_hierarchy',\n contentType: 'application/json',\n data: JSON.stringify(root),\n };\n\n hint.attachments = hint.attachments || [];\n hint.attachments.push(attachment);\n\n return event;\n },\n };\n});\n"],"names":["defineIntegration","getComponentName","children","WINDOW"],"mappings":";;;;;AAsDO,MAAM,wBAAA,GAA2BA,yBAAA,CAAkB,CAAC,OAAA,GAAmB,EAAC,KAAM;AACnF,EAAA,MAAM,YAAA,GAAe,CAAC,QAAQ,CAAA;AAG9B,EAAA,SAAS,IAAA,CAAK,OAAA,EAAsB,OAAA,EAAgC,KAAA,GAAQ,CAAA,EAAS;AACnF,IAAA,IAA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C,YAAkC,EAAC;AACzC,MAAA,MAAA,CAAO,QAAA,GAAWA,SAAAA;AAGlB,MAAA,IAAA,CAAK,KAAA,EAAO,MAAA,CAAO,QAAA,EAAU,KAAA,GAAQ,CAAC,CAAA;AAEtC,MAAA,OAAA,CAAQ,KAAK,MAAM,CAAA;AAAA,IACrB;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,eAAA;AAAA,IACN,YAAA,EAAc,CAAC,KAAA,EAAO,IAAA,KAAS;AAE7B,MAAA,IAAI,KAAA,CAAM,SAAS,MAAA,IAAa,OAAA,CAAQ,eAAe,KAAA,EAAO,IAAI,MAAM,KAAA,EAAO;AAC7E,QAAA,OAAO,KAAA;AAAA,MACT;AAEA,MAAA,MAAM,IAAA,GAA0B;AAAA,QAC9B,gBAAA,EAAkB,KAAA;AAAA,QAClB,WAAA,EAAa,UAAA;AAAA,QACb,SAAS;AAAC,OACZ;AAEA,MAAA,IAAA,CAAK,QAAQ,WAAA,IAAc,IAAKC,eAAO,QAAA,CAAS,IAAA,EAAM,KAAK,OAAO,CAAA;AAElE,MAAA,MAAM,UAAA,GAAyB;AAAA,QAC7B,QAAA,EAAU,qBAAA;AAAA,QACV,cAAA,EAAgB,sBAAA;AAAA,QAChB,WAAA,EAAa,kBAAA;AAAA,QACb,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,IAAI;AAAA,OAC3B;AAEA,MAAA,IAAA,CAAK,WAAA,GAAc,IAAA,CAAK,WAAA,IAAe,EAAC;AACxC,MAAA,IAAA,CAAK,WAAA,CAAY,KAAK,UAAU,CAAA;AAEhC,MAAA,OAAO,KAAA;AAAA,IACT;AAAA,GACF;AACF,CAAC;;;;"}
@@ -0,0 +1,62 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+ const browserUtils = require('@elenjical/browser-utils');
5
+
6
+ const WEB_VITALS_INTEGRATION_NAME = "WebVitals";
7
+ const webVitalsIntegration = browser.defineIntegration((options = {}) => {
8
+ const ignored = new Set(options.ignore ?? []);
9
+ return {
10
+ name: WEB_VITALS_INTEGRATION_NAME,
11
+ setup(client) {
12
+ const spanStreamingEnabled = browser.hasSpanStreamingEnabled(client);
13
+ const { enableStandaloneClsSpans, enableStandaloneLcpSpans } = options._experiments ?? {};
14
+ const recordClsStandaloneSpans = spanStreamingEnabled || ignored.has("cls") ? void 0 : enableStandaloneClsSpans || false;
15
+ const recordLcpStandaloneSpans = spanStreamingEnabled || ignored.has("lcp") ? void 0 : enableStandaloneLcpSpans || false;
16
+ const finalizeWebVitals = browserUtils.startTrackingWebVitals({
17
+ recordClsStandaloneSpans,
18
+ recordLcpStandaloneSpans,
19
+ client
20
+ });
21
+ const pageloadSpans = /* @__PURE__ */ new WeakSet();
22
+ client.on("afterStartPageLoadSpan", (span) => {
23
+ pageloadSpans.add(span);
24
+ });
25
+ client.on("spanEnd", (span) => {
26
+ if (!pageloadSpans.delete(span)) {
27
+ return;
28
+ }
29
+ finalizeWebVitals();
30
+ browserUtils.addWebVitalsToSpan(span, {
31
+ // CLS/LCP are recorded as pageload span measurements only when they're neither
32
+ // tracked as standalone spans nor handled by span streaming (and not ignored).
33
+ recordClsOnPageloadSpan: recordClsStandaloneSpans === false,
34
+ recordLcpOnPageloadSpan: recordLcpStandaloneSpans === false,
35
+ spanStreamingEnabled
36
+ });
37
+ });
38
+ if (spanStreamingEnabled) {
39
+ if (!ignored.has("lcp")) {
40
+ browserUtils.trackLcpAsSpan(client);
41
+ }
42
+ if (!ignored.has("cls")) {
43
+ browserUtils.trackClsAsSpan(client);
44
+ }
45
+ if (!ignored.has("inp")) {
46
+ browserUtils.trackInpAsSpan();
47
+ }
48
+ } else if (!ignored.has("inp")) {
49
+ browserUtils.startTrackingINP();
50
+ }
51
+ },
52
+ afterAllSetup() {
53
+ if (!ignored.has("inp")) {
54
+ browserUtils.registerInpInteractionListener();
55
+ }
56
+ }
57
+ };
58
+ });
59
+
60
+ exports.WEB_VITALS_INTEGRATION_NAME = WEB_VITALS_INTEGRATION_NAME;
61
+ exports.webVitalsIntegration = webVitalsIntegration;
62
+ //# sourceMappingURL=webVitals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webVitals.js","sources":["../../../../../src/integrations/webVitals.ts"],"sourcesContent":["import type { IntegrationFn, Span } from '@elenjical/core/browser';\nimport { defineIntegration, hasSpanStreamingEnabled } from '@elenjical/core/browser';\nimport {\n addWebVitalsToSpan,\n registerInpInteractionListener,\n startTrackingINP,\n startTrackingWebVitals,\n trackClsAsSpan,\n trackInpAsSpan,\n trackLcpAsSpan,\n} from '@elenjical/browser-utils';\n\nexport const WEB_VITALS_INTEGRATION_NAME = 'WebVitals' as const;\n\nexport type WebVitalName = 'cls' | 'inp' | 'lcp';\n\nexport interface WebVitalsOptions {\n /**\n * Web vitals to skip.\n */\n ignore?: WebVitalName[];\n\n /**\n * @experimental\n */\n _experiments?: Partial<{\n enableStandaloneClsSpans: boolean;\n enableStandaloneLcpSpans: boolean;\n }>;\n}\n\n/**\n * Captures Core Web Vitals (LCP, CLS, INP) and related pageload vitals.\n *\n * `browserTracingIntegration` auto-registers this integration if no\n * `webVitalsIntegration` is already present, so explicit registration is only\n * needed to customize options or to use it without `browserTracingIntegration`.\n */\nexport const webVitalsIntegration = defineIntegration((options: WebVitalsOptions = {}) => {\n const ignored = new Set(options.ignore ?? []);\n\n return {\n name: WEB_VITALS_INTEGRATION_NAME,\n setup(client) {\n const spanStreamingEnabled = hasSpanStreamingEnabled(client);\n const { enableStandaloneClsSpans, enableStandaloneLcpSpans } = options._experiments ?? {};\n\n const recordClsStandaloneSpans =\n spanStreamingEnabled || ignored.has('cls') ? undefined : enableStandaloneClsSpans || false;\n const recordLcpStandaloneSpans =\n spanStreamingEnabled || ignored.has('lcp') ? undefined : enableStandaloneLcpSpans || false;\n\n // eslint-disable-next-line typescript/no-deprecated\n const finalizeWebVitals = startTrackingWebVitals({\n recordClsStandaloneSpans,\n recordLcpStandaloneSpans,\n client,\n });\n\n const pageloadSpans = new WeakSet<Span>();\n\n client.on('afterStartPageLoadSpan', span => {\n pageloadSpans.add(span);\n });\n\n client.on('spanEnd', span => {\n if (!pageloadSpans.delete(span)) {\n return;\n }\n\n finalizeWebVitals();\n addWebVitalsToSpan(span, {\n // CLS/LCP are recorded as pageload span measurements only when they're neither\n // tracked as standalone spans nor handled by span streaming (and not ignored).\n recordClsOnPageloadSpan: recordClsStandaloneSpans === false,\n recordLcpOnPageloadSpan: recordLcpStandaloneSpans === false,\n spanStreamingEnabled,\n });\n });\n\n if (spanStreamingEnabled) {\n if (!ignored.has('lcp')) {\n trackLcpAsSpan(client);\n }\n if (!ignored.has('cls')) {\n trackClsAsSpan(client);\n }\n if (!ignored.has('inp')) {\n trackInpAsSpan();\n }\n } else if (!ignored.has('inp')) {\n startTrackingINP();\n }\n },\n afterAllSetup() {\n if (!ignored.has('inp')) {\n registerInpInteractionListener();\n }\n },\n };\n}) satisfies IntegrationFn;\n"],"names":["defineIntegration","hasSpanStreamingEnabled","startTrackingWebVitals","addWebVitalsToSpan","trackLcpAsSpan","trackClsAsSpan","trackInpAsSpan","startTrackingINP","registerInpInteractionListener"],"mappings":";;;;;AAYO,MAAM,2BAAA,GAA8B;AA0BpC,MAAM,oBAAA,GAAuBA,yBAAA,CAAkB,CAAC,OAAA,GAA4B,EAAC,KAAM;AACxF,EAAA,MAAM,UAAU,IAAI,GAAA,CAAI,OAAA,CAAQ,MAAA,IAAU,EAAE,CAAA;AAE5C,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,2BAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,MAAM,oBAAA,GAAuBC,gCAAwB,MAAM,CAAA;AAC3D,MAAA,MAAM,EAAE,wBAAA,EAA0B,wBAAA,EAAyB,GAAI,OAAA,CAAQ,gBAAgB,EAAC;AAExF,MAAA,MAAM,2BACJ,oBAAA,IAAwB,OAAA,CAAQ,IAAI,KAAK,CAAA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G;AAC9B,QAAAC,6BAAA,EAAiB;AAAA,MACnB;AAAA,IACF,CAAA;AAAA,IACA,aAAA,GAAgB;AACd,MAAA,IAAI,CAAC,OAAA,CAAQ,GAAA,CAAI,KAAK,CAAA,EAAG;AACvB,QAAAC,2CAAA,EAA+B;AAAA,MACjC;AAAA,IACF;AAAA,GACF;AACF,CAAC;;;;;"}
@@ -0,0 +1,133 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+ const debugBuild = require('../debug-build.js');
5
+ const eventbuilder = require('../eventbuilder.js');
6
+ const helpers = require('../helpers.js');
7
+ const globalhandlers = require('./globalhandlers.js');
8
+
9
+ const INTEGRATION_NAME = "WebWorker";
10
+ const webWorkerIntegration = browser.defineIntegration(({ worker }) => ({
11
+ name: INTEGRATION_NAME,
12
+ setupOnce: () => {
13
+ (Array.isArray(worker) ? worker : [worker]).forEach((w) => listenForElenjicalMessages(w));
14
+ },
15
+ addWorker: (worker2) => listenForElenjicalMessages(worker2)
16
+ }));
17
+ function listenForElenjicalMessages(worker) {
18
+ worker.addEventListener("message", (event) => {
19
+ if (isElenjicalMessage(event.data)) {
20
+ event.stopImmediatePropagation();
21
+ if (event.data._sentryDebugIds) {
22
+ debugBuild.DEBUG_BUILD && browser.debug.log("Elenjical debugId web worker message received", event.data);
23
+ helpers.WINDOW._sentryDebugIds = {
24
+ ...event.data._sentryDebugIds,
25
+ // debugIds of the main thread have precedence over the worker's in case of a collision.
26
+ ...helpers.WINDOW._sentryDebugIds
27
+ };
28
+ }
29
+ if (event.data._sentryModuleMetadata) {
30
+ debugBuild.DEBUG_BUILD && browser.debug.log("Elenjical module metadata web worker message received", event.data);
31
+ helpers.WINDOW._sentryModuleMetadata = {
32
+ ...event.data._sentryModuleMetadata,
33
+ // Module metadata of the main thread have precedence over the worker's in case of a collision.
34
+ ...helpers.WINDOW._sentryModuleMetadata
35
+ };
36
+ }
37
+ if (event.data._elenjicalWasmImages) {
38
+ debugBuild.DEBUG_BUILD && browser.debug.log("Elenjical WASM images web worker message received", event.data);
39
+ const existingImages = helpers.WINDOW._elenjicalWasmImages || [];
40
+ const newImages = event.data._elenjicalWasmImages.filter(
41
+ (newImg) => browser.isPlainObject(newImg) && typeof newImg.code_file === "string" && !existingImages.some((existing) => existing.code_file === newImg.code_file)
42
+ );
43
+ helpers.WINDOW._elenjicalWasmImages = [
44
+ ...existingImages,
45
+ ...newImages
46
+ ];
47
+ }
48
+ if (event.data._elenjicalWorkerError) {
49
+ debugBuild.DEBUG_BUILD && browser.debug.log("Elenjical worker rejection message received", event.data._elenjicalWorkerError);
50
+ handleForwardedWorkerRejection(event.data._elenjicalWorkerError);
51
+ }
52
+ }
53
+ });
54
+ }
55
+ function handleForwardedWorkerRejection(workerError) {
56
+ const client = browser.getClient();
57
+ if (!client) {
58
+ return;
59
+ }
60
+ const stackParser = client.getOptions().stackParser;
61
+ const attachStacktrace = client.getOptions().attachStacktrace;
62
+ const error = workerError.reason;
63
+ const event = browser.isPrimitive(error) ? globalhandlers._eventFromRejectionWithPrimitive(error) : eventbuilder.eventFromUnknownInput(stackParser, error, void 0, attachStacktrace, true);
64
+ event.level = "error";
65
+ if (workerError.filename) {
66
+ event.contexts = {
67
+ ...event.contexts,
68
+ worker: {
69
+ filename: workerError.filename
70
+ }
71
+ };
72
+ }
73
+ browser.captureEvent(event, {
74
+ originalException: error,
75
+ mechanism: {
76
+ handled: false,
77
+ type: "auto.browser.web_worker.onunhandledrejection"
78
+ }
79
+ });
80
+ debugBuild.DEBUG_BUILD && browser.debug.log("Captured worker unhandled rejection", error);
81
+ }
82
+ function registerWebWorker({ self }) {
83
+ self.postMessage({
84
+ _elenjicalMessage: true,
85
+ _sentryDebugIds: self._sentryDebugIds ?? void 0,
86
+ _sentryModuleMetadata: self._sentryModuleMetadata ?? void 0
87
+ });
88
+ self.addEventListener("unhandledrejection", (event) => {
89
+ const reason = globalhandlers._getUnhandledRejectionError(event);
90
+ const serializedError = {
91
+ reason,
92
+ filename: self.location?.href
93
+ };
94
+ self.postMessage({
95
+ _elenjicalMessage: true,
96
+ _elenjicalWorkerError: serializedError
97
+ });
98
+ debugBuild.DEBUG_BUILD && browser.debug.log("[Elenjical Worker] Forwarding unhandled rejection to parent", serializedError);
99
+ });
100
+ debugBuild.DEBUG_BUILD && browser.debug.log("[Elenjical Worker] Registered worker with unhandled rejection handling");
101
+ }
102
+ function isElenjicalMessage(eventData) {
103
+ if (!browser.isPlainObject(eventData) || eventData._elenjicalMessage !== true) {
104
+ return false;
105
+ }
106
+ const hasDebugIds = "_sentryDebugIds" in eventData;
107
+ const hasModuleMetadata = "_sentryModuleMetadata" in eventData;
108
+ const hasWorkerError = "_elenjicalWorkerError" in eventData;
109
+ const hasWasmImages = "_elenjicalWasmImages" in eventData;
110
+ if (!hasDebugIds && !hasModuleMetadata && !hasWorkerError && !hasWasmImages) {
111
+ return false;
112
+ }
113
+ if (hasDebugIds && !(browser.isPlainObject(eventData._sentryDebugIds) || eventData._sentryDebugIds === void 0)) {
114
+ return false;
115
+ }
116
+ if (hasModuleMetadata && !(browser.isPlainObject(eventData._sentryModuleMetadata) || eventData._sentryModuleMetadata === void 0)) {
117
+ return false;
118
+ }
119
+ if (hasWorkerError && !browser.isPlainObject(eventData._elenjicalWorkerError)) {
120
+ return false;
121
+ }
122
+ if (hasWasmImages && (!Array.isArray(eventData._elenjicalWasmImages) || !eventData._elenjicalWasmImages.every(
123
+ (img) => browser.isPlainObject(img) && typeof img.code_file === "string"
124
+ ))) {
125
+ return false;
126
+ }
127
+ return true;
128
+ }
129
+
130
+ exports.INTEGRATION_NAME = INTEGRATION_NAME;
131
+ exports.registerWebWorker = registerWebWorker;
132
+ exports.webWorkerIntegration = webWorkerIntegration;
133
+ //# sourceMappingURL=webWorker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webWorker.js","sources":["../../../../../src/integrations/webWorker.ts"],"sourcesContent":["import type { DebugImage, Integration, IntegrationFn } from '@elenjical/core/browser';\nimport { captureEvent, debug, defineIntegration, getClient, isPlainObject, isPrimitive } from '@elenjical/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { WINDOW } from '../helpers';\nimport { _eventFromRejectionWithPrimitive, _getUnhandledRejectionError } from './globalhandlers';\n\nexport const INTEGRATION_NAME = 'WebWorker' as const;\n\ninterface WebWorkerMessage {\n _elenjicalMessage: boolean;\n _sentryDebugIds?: Record<string, string>;\n _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n _elenjicalWorkerError?: SerializedWorkerError;\n _elenjicalWasmImages?: Array<DebugImage>;\n}\n\ninterface SerializedWorkerError {\n reason: unknown;\n filename?: string;\n}\n\ninterface WebWorkerIntegrationOptions {\n worker: Worker | Array<Worker>;\n}\n\ninterface WebWorkerIntegration extends Integration {\n addWorker: (worker: Worker) => void;\n}\n\n/**\n * Use this integration to set up Elenjical with web workers.\n *\n * IMPORTANT: This integration must be added **before** you start listening to\n * any messages from the worker. Otherwise, your message handlers will receive\n * messages from the Elenjical SDK which you need to ignore.\n *\n * This integration only has an effect, if you call `Elenjical.registerWebWorker(self)`\n * from within the worker(s) you're adding to the integration.\n *\n * Given that you want to initialize the SDK as early as possible, you most likely\n * want to add this integration **after** initializing the SDK:\n *\n * @example:\n * ```ts filename={main.js}\n * import * as Elenjical from '@elenjical/<your-sdk>';\n *\n * // some time earlier:\n * Elenjical.init(...)\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Add the integration\n * const webWorkerIntegration = Elenjical.webWorkerIntegration({ worker });\n * Elenjical.addIntegration(webWorkerIntegration);\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n * // ...\n * });\n * ```\n *\n * If you initialize multiple workers at the same time, you can also pass an array of workers\n * to the integration:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Elenjical.webWorkerIntegration({ worker: [worker1, worker2] });\n * Elenjical.addIntegration(webWorkerIntegration);\n * ```\n *\n * If you have any additional workers that you initialize at a later point,\n * you can add them to the integration as follows:\n *\n * ```ts filename={main.js}\n * const webWorkerIntegration = Elenjical.webWorkerIntegration({ worker: worker1 });\n * Elenjical.addIntegration(webWorkerIntegration);\n *\n * // sometime later:\n * webWorkerIntegration.addWorker(worker2);\n * ```\n *\n * Of course, you can also directly add the integration in Elenjical.init:\n * ```ts filename={main.js}\n * import * as Elenjical from '@elenjical/<your-sdk>';\n *\n * // 1. Initialize the worker\n * const worker = new Worker(new URL('./worker.ts', import.meta.url));\n *\n * // 2. Initialize the SDK\n * Elenjical.init({\n * integrations: [Elenjical.webWorkerIntegration({ worker })]\n * });\n *\n * // 3. Register message listeners on the worker\n * worker.addEventListener('message', event => {\n * // ...\n * });\n * ```\n *\n * @param options {WebWorkerIntegrationOptions} Integration options:\n * - `worker`: The worker instance.\n */\nexport const webWorkerIntegration = defineIntegration(({ worker }: WebWorkerIntegrationOptions) => ({\n name: INTEGRATION_NAME,\n setupOnce: () => {\n (Array.isArray(worker) ? worker : [worker]).forEach(w => listenForElenjicalMessages(w));\n },\n addWorker: (worker: Worker) => listenForElenjicalMessages(worker),\n})) as IntegrationFn<WebWorkerIntegration>;\n\nfunction listenForElenjicalMessages(worker: Worker): void {\n worker.addEventListener('message', event => {\n if (isElenjicalMessage(event.data)) {\n event.stopImmediatePropagation(); // other listeners should not receive this message\n\n // Handle debug IDs\n if (event.data._sentryDebugIds) {\n DEBUG_BUILD && debug.log('Elenjical debugId web worker message received', event.data);\n WINDOW._sentryDebugIds = {\n ...event.data._sentryDebugIds,\n // debugIds of the main thread have precedence over the worker's in case of a collision.\n ...WINDOW._sentryDebugIds,\n };\n }\n\n // Handle module metadata\n if (event.data._sentryModuleMetadata) {\n DEBUG_BUILD && debug.log('Elenjical module metadata web worker message received', event.data);\n // Merge worker's raw metadata into the global object\n // It will be parsed lazily when needed by getMetadataForUrl\n WINDOW._sentryModuleMetadata = {\n ...event.data._sentryModuleMetadata,\n // Module metadata of the main thread have precedence over the worker's in case of a collision.\n ...WINDOW._sentryModuleMetadata,\n };\n }\n\n // Handle WASM images from worker\n if (event.data._elenjicalWasmImages) {\n DEBUG_BUILD && debug.log('Elenjical WASM images web worker message received', event.data);\n const existingImages =\n (WINDOW as typeof WINDOW & { _elenjicalWasmImages?: Array<DebugImage> })._elenjicalWasmImages || [];\n const newImages = event.data._elenjicalWasmImages.filter(\n (newImg: unknown) =>\n isPlainObject(newImg) &&\n typeof newImg.code_file === 'string' &&\n !existingImages.some(existing => existing.code_file === newImg.code_file),\n );\n (WINDOW as typeof WINDOW & { _elenjicalWasmImages?: Array<DebugImage> })._elenjicalWasmImages = [\n ...existingImages,\n ...newImages,\n ];\n }\n\n // Handle unhandled rejections forwarded from worker\n if (event.data._elenjicalWorkerError) {\n DEBUG_BUILD && debug.log('Elenjical worker rejection message received', event.data._elenjicalWorkerError);\n handleForwardedWorkerRejection(event.data._elenjicalWorkerError);\n }\n }\n });\n}\n\nfunction handleForwardedWorkerRejection(workerError: SerializedWorkerError): void {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const stackParser = client.getOptions().stackParser;\n const attachStacktrace = client.getOptions().attachStacktrace;\n\n const error = workerError.reason;\n\n // Follow same pattern as globalHandlers for unhandledrejection\n // Handle both primitives and errors the same way\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n // Add worker-specific context\n if (workerError.filename) {\n event.contexts = {\n ...event.contexts,\n worker: {\n filename: workerError.filename,\n },\n };\n }\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'auto.browser.web_worker.onunhandledrejection',\n },\n });\n\n DEBUG_BUILD && debug.log('Captured worker unhandled rejection', error);\n}\n\n/**\n * Minimal interface for DedicatedWorkerGlobalScope, only requiring the postMessage method.\n * (which is the only thing we need from the worker's global object)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope\n *\n * We can't use the actual type because it breaks everyone who doesn't have {\"lib\": [\"WebWorker\"]}\n * but uses {\"skipLibCheck\": true} in their tsconfig.json.\n */\ninterface MinimalDedicatedWorkerGlobalScope {\n postMessage: (message: unknown) => void;\n addEventListener: (type: string, listener: (event: unknown) => void) => void;\n location?: { href?: string };\n}\n\ninterface RegisterWebWorkerOptions {\n self: MinimalDedicatedWorkerGlobalScope & {\n _sentryDebugIds?: Record<string, string>;\n _sentryModuleMetadata?: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n };\n}\n\n/**\n * Use this function to register the worker with the Elenjical SDK.\n *\n * This function will:\n * - Send debug IDs to the parent thread\n * - Send module metadata to the parent thread (for thirdPartyErrorFilterIntegration)\n * - Set up a handler for unhandled rejections in the worker\n * - Forward unhandled rejections to the parent thread for capture\n *\n * Note: Synchronous errors in workers are already captured by globalHandlers.\n * This only handles unhandled promise rejections which don't bubble to the parent.\n *\n * @example\n * ```ts filename={worker.js}\n * import * as Elenjical from '@elenjical/<your-sdk>';\n *\n * // Do this as early as possible in your worker.\n * Elenjical.registerWebWorker({ self });\n *\n * // continue setting up your worker\n * self.postMessage(...)\n * ```\n * @param options {RegisterWebWorkerOptions} Integration options:\n * - `self`: The worker instance you're calling this function from (self).\n */\nexport function registerWebWorker({ self }: RegisterWebWorkerOptions): void {\n // Send debug IDs and raw module metadata to parent thread\n // The metadata will be parsed lazily on the main thread when needed\n self.postMessage({\n _elenjicalMessage: true,\n _sentryDebugIds: self._sentryDebugIds ?? undefined,\n _sentryModuleMetadata: self._sentryModuleMetadata ?? undefined,\n });\n\n // Set up unhandledrejection handler inside the worker\n // Following the same pattern as globalHandlers\n // unhandled rejections don't bubble to the parent thread, so we need to handle them here\n self.addEventListener('unhandledrejection', (event: unknown) => {\n const reason = _getUnhandledRejectionError(event);\n\n // Forward the raw reason to parent thread\n // The parent will handle primitives vs errors the same way globalHandlers does\n const serializedError: SerializedWorkerError = {\n reason: reason,\n filename: self.location?.href,\n };\n\n // Forward to parent thread\n self.postMessage({\n _elenjicalMessage: true,\n _elenjicalWorkerError: serializedError,\n });\n\n DEBUG_BUILD && debug.log('[Elenjical Worker] Forwarding unhandled rejection to parent', serializedError);\n });\n\n DEBUG_BUILD && debug.log('[Elenjical Worker] Registered worker with unhandled rejection handling');\n}\n\nfunction isElenjicalMessage(eventData: unknown): eventData is WebWorkerMessage {\n if (!isPlainObject(eventData) || eventData._elenjicalMessage !== true) {\n return false;\n }\n\n // Must have at least one of: debug IDs, module metadata, worker error, or WASM images\n const hasDebugIds = '_sentryDebugIds' in eventData;\n const hasModuleMetadata = '_sentryModuleMetadata' in eventData;\n const hasWorkerError = '_elenjicalWorkerError' in eventData;\n const hasWasmImages = '_elenjicalWasmImages' in eventData;\n\n if (!hasDebugIds && !hasModuleMetadata && !hasWorkerError && !hasWasmImages) {\n return false;\n }\n\n // Validate debug IDs if present\n if (hasDebugIds && !(isPlainObject(eventData._sentryDebugIds) || eventData._sentryDebugIds === undefined)) {\n return false;\n }\n\n // Validate module metadata if present\n if (\n hasModuleMetadata &&\n !(isPlainObject(eventData._sentryModuleMetadata) || eventData._sentryModuleMetadata === undefined)\n ) {\n return false;\n }\n\n // Validate worker error if present\n if (hasWorkerError && !isPlainObject(eventData._elenjicalWorkerError)) {\n return false;\n }\n\n // Validate WASM images if present\n if (\n hasWasmImages &&\n (!Array.isArray(eventData._elenjicalWasmImages) ||\n !eventData._elenjicalWasmImages.every(\n (img: unknown) => isPlainObject(img) && typeof (img as { code_file?: unknown }).code_file === 'string',\n ))\n ) {\n return false;\n }\n\n return true;\n}\n"],"names":["defineIntegration","worker","DEBUG_BUILD","debug","WINDOW","isPlainObject","getClient","isPrimitive","_eventFromRejectionWithPrimitive","eventFromUnknownInput","captureEvent","_getUnhandledRejectionError"],"mappings":";;;;;;;;AAOO,MAAM,gBAAA,GAAmB;AAgGzB,MAAM,oB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symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browserUtils = require('@elenjical/browser-utils');
4
+
5
+ const HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX = /^HTML(\w*)Element$/;
6
+ function normalizeStringifyValue(value) {
7
+ if (typeof window !== "undefined" && value === window) {
8
+ return "[Window]";
9
+ }
10
+ if (typeof document !== "undefined" && value === document) {
11
+ return "[Document]";
12
+ }
13
+ if (browserUtils.isElement(value)) {
14
+ const objName = getConstructorName(value);
15
+ if (HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX.test(objName)) {
16
+ return `[HTMLElement: ${browserUtils.htmlTreeAsString(value)}]`;
17
+ }
18
+ }
19
+ return void 0;
20
+ }
21
+ function getConstructorName(value) {
22
+ const prototype = Object.getPrototypeOf(value);
23
+ return prototype?.constructor ? prototype.constructor.name : "null prototype";
24
+ }
25
+
26
+ exports.normalizeStringifyValue = normalizeStringifyValue;
27
+ //# sourceMappingURL=normalizeStringifyValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeStringifyValue.js","sources":["../../../../src/normalizeStringifyValue.ts"],"sourcesContent":["import { htmlTreeAsString, isElement } from '@elenjical/browser-utils';\n\ntype Prototype = { constructor?: (...args: unknown[]) => unknown };\n\nconst HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX = /^HTML(\\w*)Element$/;\n\n/**\n * Browser-specific contributions to `normalize()`'s `stringifyValue`. Plug into\n * `setNormalizeStringifier` from the browser SDK so DOM values get a useful string\n * representation without forcing core to carry the DOM-specific code.\n *\n * Handles:\n * - `window` → `[Window]`\n * - `document` → `[Document]`\n * - `HTMLElement` subclasses → `[HTMLElement: <css-selector-path>]` (via `htmlTreeAsString`)\n *\n * Vue ViewModels and React SyntheticEvents are not handled here — the Vue and React\n * SDKs wrap this function in their `init` and add their own checks on top.\n */\nexport function normalizeStringifyValue(value: Exclude<unknown, string | number | boolean | null>): string | undefined {\n // oxlint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n // oxlint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isElement(value)) {\n const objName = getConstructorName(value);\n if (HTML_ELEMENT_CONSTRUCTOR_NAME_REGEX.test(objName)) {\n return `[HTMLElement: ${htmlTreeAsString(value)}]`;\n }\n }\n\n return undefined;\n}\n\nfunction getConstructorName(value: unknown): string {\n const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n return prototype?.constructor ? prototype.constructor.name : 'null prototype';\n}\n"],"names":["isElement","htmlTreeAsString"],"mappings":";;;;AAIA,MAAM,mCAAA,GAAsC,oBAAA;AAerC,SAAS,wBAAwB,KAAA,EAA+E;AAErH,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,IAAe,KAAA,KAAU,MAAA,EAAQ;AACrD,IAAA,OAAO,UAAA;AAAA,EACT;AAEA,EAAA,IAAI,OAAO,QAAA,KAAa,WAAA,IAAe,KAAA,KAAU,QAAA,EAAU;AACzD,IAAA,OAAO,YAAA;AAAA,EACT;AAEA,EAAA,IAAIA,sBAAA,CAAU,KAAK,CAAA,EAAG;AACpB,IAAA,MAAM,OAAA,GAAU,mBAAmB,KAAK,CAAA;AACxC,IAAA,IAAI,mCAAA,CAAoC,IAAA,CAAK,OAAO,CAAA,EAAG;AACrD,MAAA,OAAO,CAAA,cAAA,EAAiBC,6BAAA,CAAiB,KAAK,CAAC,CAAA,CAAA,CAAA;AAAA,IACjD;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,mBAAmB,KAAA,EAAwB;AAClD,EAAA,MAAM,SAAA,GAA8B,MAAA,CAAO,cAAA,CAAe,KAAK,CAAA;AAE/D,EAAA,OAAO,SAAA,EAAW,WAAA,GAAc,SAAA,CAAU,WAAA,CAAY,IAAA,GAAO,gBAAA;AAC/D;;;;"}