@utk09/ui-observability 0.10.0 → 0.12.0

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 (406) hide show
  1. package/CHANGELOG.md +77 -1
  2. package/README.md +323 -113
  3. package/bin/uiobs.mjs +1 -1
  4. package/dist/{batch-BMdT9mKm.js → batch-BjQUwjA6.js} +5 -6
  5. package/dist/batch-BjQUwjA6.js.map +1 -0
  6. package/dist/{batch-BHXypM1j.cjs → batch-D5LlU4Q9.cjs} +2 -2
  7. package/dist/batch-D5LlU4Q9.cjs.map +1 -0
  8. package/dist/bus/bus.d.ts +48 -47
  9. package/dist/bus/links.d.ts +4 -4
  10. package/dist/bus/validation.d.ts +1 -1
  11. package/dist/bus-D_7pd7RN.cjs +2 -0
  12. package/dist/bus-D_7pd7RN.cjs.map +1 -0
  13. package/dist/{bus-DKfBaica.js → bus-ecxUNTja.js} +105 -109
  14. package/dist/bus-ecxUNTja.js.map +1 -0
  15. package/dist/capture/console.d.ts +10 -10
  16. package/dist/capture/errors.d.ts +6 -6
  17. package/dist/capture/interactions.d.ts +14 -14
  18. package/dist/capture/lifecycle.d.ts +3 -3
  19. package/dist/capture/long-frames.d.ts +6 -6
  20. package/dist/capture/network.d.ts +17 -17
  21. package/dist/capture/profiler-frames.d.ts +44 -0
  22. package/dist/capture/replay-buffer.d.ts +46 -0
  23. package/dist/capture/replay-upload.d.ts +74 -0
  24. package/dist/capture/replay.d.ts +114 -0
  25. package/dist/capture/reports.d.ts +2 -2
  26. package/dist/capture/resource-timing.d.ts +1 -1
  27. package/dist/capture/server-timing.d.ts +3 -3
  28. package/dist/capture/storm.d.ts +3 -3
  29. package/dist/capture/types.d.ts +45 -33
  30. package/dist/capture/unclean-exit.d.ts +8 -8
  31. package/dist/capture/user-timing.d.ts +3 -3
  32. package/dist/capture/web-socket.d.ts +11 -11
  33. package/dist/capture/web-vitals.d.ts +20 -7
  34. package/dist/compression-AJJCMBOa.js +11 -0
  35. package/dist/compression-AJJCMBOa.js.map +1 -0
  36. package/dist/compression-lD9abCcO.cjs +2 -0
  37. package/dist/compression-lD9abCcO.cjs.map +1 -0
  38. package/dist/console-CLz_PvFn.cjs +2 -0
  39. package/dist/console-CLz_PvFn.cjs.map +1 -0
  40. package/dist/{console-BX_0UCV7.js → console-cwgHKXvM.js} +14 -15
  41. package/dist/console-cwgHKXvM.js.map +1 -0
  42. package/dist/constants-Bwl_YtQi.js +349 -0
  43. package/dist/constants-Bwl_YtQi.js.map +1 -0
  44. package/dist/constants-DakMxVB2.cjs +2 -0
  45. package/dist/constants-DakMxVB2.cjs.map +1 -0
  46. package/dist/constants.d.ts +150 -103
  47. package/dist/context-storage-BjzeBSxH.cjs.map +1 -1
  48. package/dist/{context-storage-DxZf4Gfh.js → context-storage-BzkoHzkQ.js} +2 -3
  49. package/dist/context-storage-BzkoHzkQ.js.map +1 -0
  50. package/dist/core/breadcrumbs.d.ts +16 -15
  51. package/dist/core/config.d.ts +3 -3
  52. package/dist/core/context.d.ts +7 -7
  53. package/dist/core/debug-buffer.d.ts +10 -10
  54. package/dist/core/debug-bundle.d.ts +3 -3
  55. package/dist/core/deferred.d.ts +2 -2
  56. package/dist/core/diagnostics.d.ts +24 -21
  57. package/dist/core/drops.d.ts +7 -7
  58. package/dist/core/hold-buffer.d.ts +1 -1
  59. package/dist/core/journey.d.ts +22 -23
  60. package/dist/core/logger.d.ts +22 -21
  61. package/dist/core/measure.d.ts +7 -7
  62. package/dist/core/meter.d.ts +25 -21
  63. package/dist/core/pipeline.d.ts +42 -41
  64. package/dist/core/profile-buckets.d.ts +31 -0
  65. package/dist/core/profiler.d.ts +218 -0
  66. package/dist/core/record.d.ts +23 -23
  67. package/dist/core/remote-rules.d.ts +4 -4
  68. package/dist/core/remote-sampling.d.ts +21 -20
  69. package/dist/core/runtime.d.ts +206 -137
  70. package/dist/core/sampling.d.ts +18 -18
  71. package/dist/core/sender.d.ts +22 -20
  72. package/dist/core/spans.d.ts +5 -5
  73. package/dist/{deadline-5_PecIl5.js → deadline-C4ccAuk5.js} +4 -9
  74. package/dist/deadline-C4ccAuk5.js.map +1 -0
  75. package/dist/deadline-CUGbto-y.cjs +2 -0
  76. package/dist/deadline-CUGbto-y.cjs.map +1 -0
  77. package/dist/{debug-bundle-CZZ6SQQh.js → debug-bundle-BOdYmCeV.js} +12 -6
  78. package/dist/debug-bundle-BOdYmCeV.js.map +1 -0
  79. package/dist/debug-bundle-Ex4L_LSP.cjs +2 -0
  80. package/dist/debug-bundle-Ex4L_LSP.cjs.map +1 -0
  81. package/dist/doctor.cjs +1 -1
  82. package/dist/doctor.cjs.map +1 -1
  83. package/dist/doctor.d.ts +16 -6
  84. package/dist/doctor.js +148 -54
  85. package/dist/doctor.js.map +1 -1
  86. package/dist/{emergency-queue-Cs8-i2xw.js → emergency-queue-B9WZxanZ.js} +15 -17
  87. package/dist/emergency-queue-B9WZxanZ.js.map +1 -0
  88. package/dist/{emergency-queue-CQ-9acZf.cjs → emergency-queue-HBpL5r3V.cjs} +2 -2
  89. package/dist/emergency-queue-HBpL5r3V.cjs.map +1 -0
  90. package/dist/{error-like-Ywo5uRHo.js → error-like-B11pB4aL.js} +2 -3
  91. package/dist/error-like-B11pB4aL.js.map +1 -0
  92. package/dist/error-like-gGRx2s36.cjs.map +1 -1
  93. package/dist/{errors-oyxrpHjY.js → errors-D6bwgJtO.js} +5 -6
  94. package/dist/errors-D6bwgJtO.js.map +1 -0
  95. package/dist/{errors-CigX45pL.cjs → errors-DCOCRdSi.cjs} +2 -2
  96. package/dist/errors-DCOCRdSi.cjs.map +1 -0
  97. package/dist/{factory-BkjNzPYL.cjs → factory-DLFDjdLv.cjs} +2 -2
  98. package/dist/factory-DLFDjdLv.cjs.map +1 -0
  99. package/dist/{factory-Bgsky_e0.js → factory-e9Qo3K0z.js} +18 -22
  100. package/dist/factory-e9Qo3K0z.js.map +1 -0
  101. package/dist/fixed-window-CvESpFYV.cjs.map +1 -1
  102. package/dist/{fixed-window-CtaFHanJ.js → fixed-window-Dq3MLUUv.js} +2 -3
  103. package/dist/fixed-window-Dq3MLUUv.js.map +1 -0
  104. package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
  105. package/dist/{global-scope-dp2jADRl.js → global-scope-D9I8s-oN.js} +2 -3
  106. package/dist/global-scope-D9I8s-oN.js.map +1 -0
  107. package/dist/{guards-CpvOpJL6.js → guards-Cidk71ME.js} +2 -3
  108. package/dist/guards-Cidk71ME.js.map +1 -0
  109. package/dist/guards-nJ70syPt.cjs.map +1 -1
  110. package/dist/{identity-BMlKGHUM.cjs → identity-BlvlgjrU.cjs} +2 -2
  111. package/dist/identity-BlvlgjrU.cjs.map +1 -0
  112. package/dist/{identity-DOaHdfhT.js → identity-BrQp_5J5.js} +20 -21
  113. package/dist/identity-BrQp_5J5.js.map +1 -0
  114. package/dist/index.cjs +1 -1
  115. package/dist/index.cjs.map +1 -1
  116. package/dist/index.d.ts +112 -79
  117. package/dist/index.js +797 -659
  118. package/dist/index.js.map +1 -1
  119. package/dist/{indexeddb-storage-CaXGJqDD.cjs → indexeddb-storage-CtLvZH1r.cjs} +2 -2
  120. package/dist/indexeddb-storage-CtLvZH1r.cjs.map +1 -0
  121. package/dist/{indexeddb-storage-D-lUW_5P.js → indexeddb-storage-DLXQzAGh.js} +5 -6
  122. package/dist/indexeddb-storage-DLXQzAGh.js.map +1 -0
  123. package/dist/{interactions-CqDNrtIR.js → interactions-B6z2I4tU.js} +10 -11
  124. package/dist/interactions-B6z2I4tU.js.map +1 -0
  125. package/dist/{interactions-8DgxtmgO.cjs → interactions-P6pz08Jn.cjs} +2 -2
  126. package/dist/interactions-P6pz08Jn.cjs.map +1 -0
  127. package/dist/{journey-DgIjhrIc.js → journey-35yCMNFo.js} +21 -21
  128. package/dist/journey-35yCMNFo.js.map +1 -0
  129. package/dist/journey-DAGh5h9k.cjs +2 -0
  130. package/dist/journey-DAGh5h9k.cjs.map +1 -0
  131. package/dist/keys-BHhw_0Wh.cjs.map +1 -1
  132. package/dist/{keys-D5r_GH9q.js → keys-BU9j5YqW.js} +2 -3
  133. package/dist/keys-BU9j5YqW.js.map +1 -0
  134. package/dist/{library-console-g_VU-wzP.cjs → library-console-BFWEuQsl.cjs} +2 -2
  135. package/dist/library-console-BFWEuQsl.cjs.map +1 -0
  136. package/dist/library-console-Dl_Ly6DQ.js +13 -0
  137. package/dist/library-console-Dl_Ly6DQ.js.map +1 -0
  138. package/dist/{library-request-FQaiWjCP.cjs → library-request-Da-CHKzT.cjs} +2 -2
  139. package/dist/library-request-Da-CHKzT.cjs.map +1 -0
  140. package/dist/{library-request-CyC-9IOk.js → library-request-nI6pvI6I.js} +4 -5
  141. package/dist/library-request-nI6pvI6I.js.map +1 -0
  142. package/dist/{lifecycle-C2z_d8OX.cjs → lifecycle-BGGOcN4N.cjs} +2 -2
  143. package/dist/lifecycle-BGGOcN4N.cjs.map +1 -0
  144. package/dist/{lifecycle-BLC4VU7c.js → lifecycle-CZ6RRXc6.js} +3 -4
  145. package/dist/lifecycle-CZ6RRXc6.js.map +1 -0
  146. package/dist/{log-record-DKvo-B-d.cjs → log-record-D7bA1RPb.cjs} +2 -2
  147. package/dist/log-record-D7bA1RPb.cjs.map +1 -0
  148. package/dist/{log-record-CndanC-p.js → log-record-DIA6McNr.js} +3 -4
  149. package/dist/log-record-DIA6McNr.js.map +1 -0
  150. package/dist/{long-frames-BQef9rXR.js → long-frames-430_85Da.js} +9 -8
  151. package/dist/long-frames-430_85Da.js.map +1 -0
  152. package/dist/long-frames-Dd8tsi2U.cjs +2 -0
  153. package/dist/long-frames-Dd8tsi2U.cjs.map +1 -0
  154. package/dist/models/batch.d.ts +14 -15
  155. package/dist/models/bus.d.ts +24 -24
  156. package/dist/models/config.d.ts +402 -216
  157. package/dist/models/drop.d.ts +13 -11
  158. package/dist/models/health.d.ts +13 -13
  159. package/dist/models/log-record.d.ts +13 -14
  160. package/dist/models/metric.d.ts +82 -17
  161. package/dist/models/plugin.d.ts +13 -13
  162. package/dist/models/replay.d.ts +60 -0
  163. package/dist/models/serializer.d.ts +2 -3
  164. package/dist/models/stats.d.ts +2 -2
  165. package/dist/models/storage.d.ts +12 -11
  166. package/dist/{network-CvkvYzRU.js → network-C7SkLf4v.js} +30 -32
  167. package/dist/network-C7SkLf4v.js.map +1 -0
  168. package/dist/{network-CqnQOqon.cjs → network-pEX3PAJv.cjs} +2 -2
  169. package/dist/network-pEX3PAJv.cjs.map +1 -0
  170. package/dist/openfin-Bxelt0yg.js +7 -0
  171. package/dist/openfin-Bxelt0yg.js.map +1 -0
  172. package/dist/openfin-DtH2f7zX.cjs.map +1 -1
  173. package/dist/otlp-2MCrC3kd.cjs +2 -0
  174. package/dist/otlp-2MCrC3kd.cjs.map +1 -0
  175. package/dist/{otlp-CYIL7MOE.js → otlp-COq033e3.js} +26 -35
  176. package/dist/otlp-COq033e3.js.map +1 -0
  177. package/dist/patch-BX8KrPCT.cjs.map +1 -1
  178. package/dist/{patch-CCWfuEY7.js → patch-UdPz1ea8.js} +2 -3
  179. package/dist/patch-UdPz1ea8.js.map +1 -0
  180. package/dist/{platform-KMWkoI-v.cjs → platform-12uR7kBQ.cjs} +2 -2
  181. package/dist/platform-12uR7kBQ.cjs.map +1 -0
  182. package/dist/{platform-wcAkkv9F.js → platform-CVewe4wQ.js} +9 -10
  183. package/dist/platform-CVewe4wQ.js.map +1 -0
  184. package/dist/profiler-BVWIOgnq.js +310 -0
  185. package/dist/profiler-BVWIOgnq.js.map +1 -0
  186. package/dist/profiler-eVCknCzS.cjs +2 -0
  187. package/dist/profiler-eVCknCzS.cjs.map +1 -0
  188. package/dist/profiler-frames-CLXlT_xL.js +86 -0
  189. package/dist/profiler-frames-CLXlT_xL.js.map +1 -0
  190. package/dist/profiler-frames-Dg2OebB2.cjs +2 -0
  191. package/dist/profiler-frames-Dg2OebB2.cjs.map +1 -0
  192. package/dist/{remote-rules-CH_7PphT.js → remote-rules-BJGDJGwA.js} +29 -30
  193. package/dist/remote-rules-BJGDJGwA.js.map +1 -0
  194. package/dist/{remote-rules-BL8km4xk.cjs → remote-rules-CJD3ToVk.cjs} +2 -2
  195. package/dist/remote-rules-CJD3ToVk.cjs.map +1 -0
  196. package/dist/replay-0zAJv9T3.js +338 -0
  197. package/dist/replay-0zAJv9T3.js.map +1 -0
  198. package/dist/replay-DomJpXqW.cjs +2 -0
  199. package/dist/replay-DomJpXqW.cjs.map +1 -0
  200. package/dist/{reports-Bh_-KpZ2.cjs → reports-BsbqmP8h.cjs} +2 -2
  201. package/dist/reports-BsbqmP8h.cjs.map +1 -0
  202. package/dist/{reports-BOKyY3_A.js → reports-BuXekPOS.js} +4 -5
  203. package/dist/reports-BuXekPOS.js.map +1 -0
  204. package/dist/{resource-timing-BROnEJ0E.js → resource-timing-CXGHwFRD.js} +6 -7
  205. package/dist/resource-timing-CXGHwFRD.js.map +1 -0
  206. package/dist/{resource-timing-CbgwNpog.cjs → resource-timing-DkycFGDa.cjs} +2 -2
  207. package/dist/resource-timing-DkycFGDa.cjs.map +1 -0
  208. package/dist/{sampling-ECGVYiDD.cjs → sampling-Dd0wllyq.cjs} +2 -2
  209. package/dist/sampling-Dd0wllyq.cjs.map +1 -0
  210. package/dist/{sampling-BLO_pcV4.js → sampling-UUDbi3K0.js} +11 -12
  211. package/dist/sampling-UUDbi3K0.js.map +1 -0
  212. package/dist/{sanitize-DS0G4_ea.js → sanitize-CNmsD9r3.js} +4 -5
  213. package/dist/sanitize-CNmsD9r3.js.map +1 -0
  214. package/dist/{sanitize-Bsn8HQWC.cjs → sanitize-ChLn97Ch.cjs} +2 -2
  215. package/dist/sanitize-ChLn97Ch.cjs.map +1 -0
  216. package/dist/{select-DWO0-w8_.cjs → select-CTk-K5mG.cjs} +3 -3
  217. package/dist/select-CTk-K5mG.cjs.map +1 -0
  218. package/dist/{select-wqt9Wxio.js → select-DPv_j6wq.js} +64 -67
  219. package/dist/select-DPv_j6wq.js.map +1 -0
  220. package/dist/{sender-BkAVt-Rq.js → sender-15zEsZpr.js} +98 -101
  221. package/dist/sender-15zEsZpr.js.map +1 -0
  222. package/dist/sender-Bfpv9tad.cjs +2 -0
  223. package/dist/sender-Bfpv9tad.cjs.map +1 -0
  224. package/dist/storage/context-storage.d.ts +34 -33
  225. package/dist/storage/emergency-queue.d.ts +9 -9
  226. package/dist/storage/eviction.d.ts +12 -12
  227. package/dist/storage/factory.d.ts +8 -7
  228. package/dist/storage/gap.d.ts +6 -6
  229. package/dist/storage/idb-driver.d.ts +31 -32
  230. package/dist/storage/indexeddb-storage.d.ts +26 -27
  231. package/dist/storage/keys.d.ts +7 -7
  232. package/dist/storage/local-storage.d.ts +38 -38
  233. package/dist/storage/memory-storage.d.ts +21 -22
  234. package/dist/storage/persistence.d.ts +1 -1
  235. package/dist/storage-BA9RqRO-.cjs.map +1 -1
  236. package/dist/{storage-w7Tslvlq.js → storage-DZwed89z.js} +2 -3
  237. package/dist/storage-DZwed89z.js.map +1 -0
  238. package/dist/{storm-DD4cUkoL.js → storm-BTSNTIWI.js} +4 -5
  239. package/dist/storm-BTSNTIWI.js.map +1 -0
  240. package/dist/{storm-DCEsqViG.cjs → storm-D0_qZOEg.cjs} +2 -2
  241. package/dist/storm-D0_qZOEg.cjs.map +1 -0
  242. package/dist/transport/compression.d.ts +2 -2
  243. package/dist/transport/errors.d.ts +7 -7
  244. package/dist/transport/exit-flush.d.ts +39 -39
  245. package/dist/transport/headers.d.ts +2 -2
  246. package/dist/transport/http-transport.d.ts +28 -27
  247. package/dist/transport/memory-transport.d.ts +6 -6
  248. package/dist/transport/retry-engine.d.ts +35 -34
  249. package/dist/transport/serializers/ecs.d.ts +1 -1
  250. package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
  251. package/dist/transport/serializers/otlp-traces.d.ts +1 -1
  252. package/dist/transport/serializers/otlp.d.ts +16 -16
  253. package/dist/transport/serializers/select.d.ts +7 -7
  254. package/dist/transport/status-transport.d.ts +20 -20
  255. package/dist/transport/worker-protocol.d.ts +3 -3
  256. package/dist/{types-BR9t_w28.js → types-BAerHgCq.js} +2 -3
  257. package/dist/types-BAerHgCq.js.map +1 -0
  258. package/dist/types-C7WNpnG1.cjs.map +1 -1
  259. package/dist/{unclean-exit-CwdpbUDg.cjs → unclean-exit-ClGzrc2A.cjs} +2 -2
  260. package/dist/unclean-exit-ClGzrc2A.cjs.map +1 -0
  261. package/dist/{unclean-exit-BYZ5yaSI.js → unclean-exit-Cob_jyTv.js} +3 -4
  262. package/dist/unclean-exit-Cob_jyTv.js.map +1 -0
  263. package/dist/unref-CU9Nyz_9.cjs +2 -0
  264. package/dist/unref-CU9Nyz_9.cjs.map +1 -0
  265. package/dist/unref-DgHPQeWv.js +7 -0
  266. package/dist/unref-DgHPQeWv.js.map +1 -0
  267. package/dist/user-timing-CdYqx3PF.cjs +2 -0
  268. package/dist/user-timing-CdYqx3PF.cjs.map +1 -0
  269. package/dist/{user-timing-Di2ra5DB.js → user-timing-DgHubxCI.js} +7 -6
  270. package/dist/user-timing-DgHubxCI.js.map +1 -0
  271. package/dist/utils/console.d.ts +2 -2
  272. package/dist/utils/deadline.d.ts +4 -4
  273. package/dist/utils/error-like.d.ts +7 -7
  274. package/dist/utils/fixed-window.d.ts +9 -8
  275. package/dist/utils/global-scope.d.ts +8 -8
  276. package/dist/utils/guards.d.ts +2 -2
  277. package/dist/utils/identity.d.ts +17 -17
  278. package/dist/utils/library-console.d.ts +4 -4
  279. package/dist/utils/library-request.d.ts +10 -10
  280. package/dist/utils/lock.d.ts +10 -9
  281. package/dist/utils/openfin.d.ts +5 -5
  282. package/dist/utils/patch.d.ts +6 -6
  283. package/dist/utils/platform.d.ts +13 -11
  284. package/dist/utils/sanitize.d.ts +4 -4
  285. package/dist/utils/timer.d.ts +1 -1
  286. package/dist/utils/tracing.d.ts +38 -38
  287. package/dist/utils/unref.d.ts +3 -3
  288. package/dist/{web-socket-DwBNhgre.cjs → web-socket-BTuvYoJI.cjs} +2 -2
  289. package/dist/web-socket-BTuvYoJI.cjs.map +1 -0
  290. package/dist/{web-socket-B-5qqPy7.js → web-socket-DthJuSAg.js} +14 -15
  291. package/dist/web-socket-DthJuSAg.js.map +1 -0
  292. package/dist/web-vitals-Ch5BpDmo.cjs +2 -0
  293. package/dist/web-vitals-Ch5BpDmo.cjs.map +1 -0
  294. package/dist/web-vitals-CsGCWnUr.js +77 -0
  295. package/dist/web-vitals-CsGCWnUr.js.map +1 -0
  296. package/dist/{worker-protocol-0HMf4-kY.js → worker-protocol-B0_8rWy5.js} +6 -7
  297. package/dist/worker-protocol-B0_8rWy5.js.map +1 -0
  298. package/dist/{worker-protocol-DXekoADQ.cjs → worker-protocol-BjzFORfq.cjs} +2 -2
  299. package/dist/worker-protocol-BjzFORfq.cjs.map +1 -0
  300. package/dist/worker-server-4en-Lt-3.cjs +2 -0
  301. package/dist/worker-server-4en-Lt-3.cjs.map +1 -0
  302. package/dist/{worker-server-CKcmX5m5.js → worker-server-Cne9MX9I.js} +25 -26
  303. package/dist/{worker-server-CKcmX5m5.js.map → worker-server-Cne9MX9I.js.map} +1 -1
  304. package/dist/worker-transport-B-GF4Aqn.cjs +2 -0
  305. package/dist/worker-transport-B-GF4Aqn.cjs.map +1 -0
  306. package/dist/{worker-transport-2220ghFZ.js → worker-transport-C3SjJAEC.js} +64 -65
  307. package/dist/worker-transport-C3SjJAEC.js.map +1 -0
  308. package/package.json +33 -41
  309. package/dist/batch-BHXypM1j.cjs.map +0 -1
  310. package/dist/batch-BMdT9mKm.js.map +0 -1
  311. package/dist/bus-DKfBaica.js.map +0 -1
  312. package/dist/bus-Dea9rVhy.cjs +0 -2
  313. package/dist/bus-Dea9rVhy.cjs.map +0 -1
  314. package/dist/console-BX_0UCV7.js.map +0 -1
  315. package/dist/console-DZEcs7FL.cjs +0 -2
  316. package/dist/console-DZEcs7FL.cjs.map +0 -1
  317. package/dist/constants-CL0ZdI2f.cjs +0 -2
  318. package/dist/constants-CL0ZdI2f.cjs.map +0 -1
  319. package/dist/constants-CU60FG4w.js +0 -305
  320. package/dist/constants-CU60FG4w.js.map +0 -1
  321. package/dist/context-storage-DxZf4Gfh.js.map +0 -1
  322. package/dist/deadline-5_PecIl5.js.map +0 -1
  323. package/dist/deadline-XSnm95pg.cjs +0 -2
  324. package/dist/deadline-XSnm95pg.cjs.map +0 -1
  325. package/dist/debug-bundle-CZZ6SQQh.js.map +0 -1
  326. package/dist/debug-bundle-yRkrU1ny.cjs +0 -2
  327. package/dist/debug-bundle-yRkrU1ny.cjs.map +0 -1
  328. package/dist/emergency-queue-CQ-9acZf.cjs.map +0 -1
  329. package/dist/emergency-queue-Cs8-i2xw.js.map +0 -1
  330. package/dist/error-like-Ywo5uRHo.js.map +0 -1
  331. package/dist/errors-CigX45pL.cjs.map +0 -1
  332. package/dist/errors-oyxrpHjY.js.map +0 -1
  333. package/dist/factory-Bgsky_e0.js.map +0 -1
  334. package/dist/factory-BkjNzPYL.cjs.map +0 -1
  335. package/dist/fixed-window-CtaFHanJ.js.map +0 -1
  336. package/dist/global-scope-dp2jADRl.js.map +0 -1
  337. package/dist/guards-CpvOpJL6.js.map +0 -1
  338. package/dist/identity-BMlKGHUM.cjs.map +0 -1
  339. package/dist/identity-DOaHdfhT.js.map +0 -1
  340. package/dist/indexeddb-storage-CaXGJqDD.cjs.map +0 -1
  341. package/dist/indexeddb-storage-D-lUW_5P.js.map +0 -1
  342. package/dist/interactions-8DgxtmgO.cjs.map +0 -1
  343. package/dist/interactions-CqDNrtIR.js.map +0 -1
  344. package/dist/journey-5tcxEbnG.cjs +0 -2
  345. package/dist/journey-5tcxEbnG.cjs.map +0 -1
  346. package/dist/journey-DgIjhrIc.js.map +0 -1
  347. package/dist/keys-D5r_GH9q.js.map +0 -1
  348. package/dist/library-console-CabK2j2-.js +0 -14
  349. package/dist/library-console-CabK2j2-.js.map +0 -1
  350. package/dist/library-console-g_VU-wzP.cjs.map +0 -1
  351. package/dist/library-request-CyC-9IOk.js.map +0 -1
  352. package/dist/library-request-FQaiWjCP.cjs.map +0 -1
  353. package/dist/lifecycle-BLC4VU7c.js.map +0 -1
  354. package/dist/lifecycle-C2z_d8OX.cjs.map +0 -1
  355. package/dist/log-record-CndanC-p.js.map +0 -1
  356. package/dist/log-record-DKvo-B-d.cjs.map +0 -1
  357. package/dist/long-frames-BQef9rXR.js.map +0 -1
  358. package/dist/long-frames-CV5ZG2cx.cjs +0 -2
  359. package/dist/long-frames-CV5ZG2cx.cjs.map +0 -1
  360. package/dist/network-CqnQOqon.cjs.map +0 -1
  361. package/dist/network-CvkvYzRU.js.map +0 -1
  362. package/dist/openfin-BwEN0uj4.js +0 -8
  363. package/dist/openfin-BwEN0uj4.js.map +0 -1
  364. package/dist/otlp-CYIL7MOE.js.map +0 -1
  365. package/dist/otlp-RVbkNQRh.cjs +0 -2
  366. package/dist/otlp-RVbkNQRh.cjs.map +0 -1
  367. package/dist/patch-CCWfuEY7.js.map +0 -1
  368. package/dist/platform-KMWkoI-v.cjs.map +0 -1
  369. package/dist/platform-wcAkkv9F.js.map +0 -1
  370. package/dist/remote-rules-BL8km4xk.cjs.map +0 -1
  371. package/dist/remote-rules-CH_7PphT.js.map +0 -1
  372. package/dist/reports-BOKyY3_A.js.map +0 -1
  373. package/dist/reports-Bh_-KpZ2.cjs.map +0 -1
  374. package/dist/resource-timing-BROnEJ0E.js.map +0 -1
  375. package/dist/resource-timing-CbgwNpog.cjs.map +0 -1
  376. package/dist/sampling-BLO_pcV4.js.map +0 -1
  377. package/dist/sampling-ECGVYiDD.cjs.map +0 -1
  378. package/dist/sanitize-Bsn8HQWC.cjs.map +0 -1
  379. package/dist/sanitize-DS0G4_ea.js.map +0 -1
  380. package/dist/select-DWO0-w8_.cjs.map +0 -1
  381. package/dist/select-wqt9Wxio.js.map +0 -1
  382. package/dist/sender-BkAVt-Rq.js.map +0 -1
  383. package/dist/sender-D82PxlCY.cjs +0 -2
  384. package/dist/sender-D82PxlCY.cjs.map +0 -1
  385. package/dist/storage-w7Tslvlq.js.map +0 -1
  386. package/dist/storm-DCEsqViG.cjs.map +0 -1
  387. package/dist/storm-DD4cUkoL.js.map +0 -1
  388. package/dist/types-BR9t_w28.js.map +0 -1
  389. package/dist/unclean-exit-BYZ5yaSI.js.map +0 -1
  390. package/dist/unclean-exit-CwdpbUDg.cjs.map +0 -1
  391. package/dist/user-timing-C1kB3JEg.cjs +0 -2
  392. package/dist/user-timing-C1kB3JEg.cjs.map +0 -1
  393. package/dist/user-timing-Di2ra5DB.js.map +0 -1
  394. package/dist/web-socket-B-5qqPy7.js.map +0 -1
  395. package/dist/web-socket-DwBNhgre.cjs.map +0 -1
  396. package/dist/web-vitals-Bflr5jSA.js +0 -53
  397. package/dist/web-vitals-Bflr5jSA.js.map +0 -1
  398. package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
  399. package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
  400. package/dist/worker-protocol-0HMf4-kY.js.map +0 -1
  401. package/dist/worker-protocol-DXekoADQ.cjs.map +0 -1
  402. package/dist/worker-server-BQK5z2yl.cjs +0 -2
  403. package/dist/worker-server-BQK5z2yl.cjs.map +0 -1
  404. package/dist/worker-transport-2220ghFZ.js.map +0 -1
  405. package/dist/worker-transport-Dj2yCQN5.cjs +0 -2
  406. package/dist/worker-transport-Dj2yCQN5.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -1,80 +1,80 @@
1
- import { $t as e, Bn as t, Ct as n, D as r, Et as i, F as a, Fn as o, G as s, Hn as c, I as l, In as u, J as d, K as f, Kt as p, L as m, Mn as h, Mt as g, N as _, Nn as v, Nt as y, Pn as ee, Pt as te, Qt as ne, U as re, Un as ie, W as ae, Wn as oe, X as se, Zt as ce, _ as le, a as ue, an as de, bn as fe, c as b, cn as pe, d as me, dn as he, en as ge, f as x, fn as _e, g as ve, h as ye, in as be, jn as xe, ln as Se, m as Ce, mn as S, nn as we, o as Te, on as Ee, p as De, q as Oe, qt as ke, rn as Ae, s as je, sn as Me, tn as Ne, u as Pe, un as Fe, v as C, wn as Ie, wt as w, xn as T, y as Le, zn as Re } from "./constants-CU60FG4w.js";
2
- import { n as ze, r as Be, t as Ve } from "./log-record-CndanC-p.js";
3
- import { n as He, r as Ue, t as We } from "./error-like-Ywo5uRHo.js";
4
- import { t as E } from "./guards-CpvOpJL6.js";
5
- import { r as Ge } from "./deadline-5_PecIl5.js";
6
- import { i as D, n as Ke, t as qe } from "./platform-wcAkkv9F.js";
7
- import { n as O, t as Je } from "./library-console-CabK2j2-.js";
8
- import { i as Ye, n as Xe, r as k } from "./sanitize-DS0G4_ea.js";
9
- import { a as Ze, i as A, n as Qe, o as $e, r as et, s as tt, t as nt } from "./identity-DOaHdfhT.js";
10
- import { r as rt } from "./library-request-CyC-9IOk.js";
11
- import { r as it, t as at } from "./batch-BMdT9mKm.js";
12
- import { n as ot, t as st } from "./journey-DgIjhrIc.js";
13
- import { a as ct, i as lt, n as ut, o as dt } from "./sampling-BLO_pcV4.js";
14
- //#region src/utils/timer.ts
15
- function ft(e) {
1
+ import { Cn as e, D as t, Dt as n, En as r, F as i, Ft as a, G as o, Gn as s, Gt as c, I as l, In as u, J as d, Jn as f, K as p, Kn as m, L as h, Mn as ee, N as g, Nn as _, Nt as v, Pt as y, Qn as te, Sn as ne, Tt as b, U as re, Un as ie, W as ae, Wn as oe, X as se, Zn as ce, _ as le, _n as ue, _t as de, a as fe, bn as pe, c as x, d as me, dn as he, er as ge, f as S, fn as _e, g as ve, gn as ye, h as be, hn as xe, ln as Se, m as Ce, mn as we, nn as Te, nr as Ee, o as De, p as Oe, pn as ke, q as Ae, qn as je, s as Me, tn as Ne, tr as Pe, u as Fe, un as Ie, v as Le, vn as Re, wn as ze, wt as Be, xn as Ve, y as He, yn as Ue } from "./constants-Bwl_YtQi.js";
2
+ import { n as We, r as Ge, t as Ke } from "./log-record-DIA6McNr.js";
3
+ import { n as qe, r as Je, t as Ye } from "./error-like-B11pB4aL.js";
4
+ import { t as C } from "./guards-Cidk71ME.js";
5
+ import { t as Xe } from "./unref-DgHPQeWv.js";
6
+ import { i as w, n as Ze, t as Qe } from "./platform-CVewe4wQ.js";
7
+ import { t as T } from "./profiler-BVWIOgnq.js";
8
+ import { n as E, t as $e } from "./library-console-Dl_Ly6DQ.js";
9
+ import { i as et, n as tt, r as D } from "./sanitize-CNmsD9r3.js";
10
+ import { a as nt, i as O, n as rt, o as it, r as at, s as ot, t as st } from "./identity-BrQp_5J5.js";
11
+ import { r as ct } from "./library-request-nI6pvI6I.js";
12
+ import { r as lt, t as ut } from "./batch-BjQUwjA6.js";
13
+ import { n as dt, t as ft } from "./journey-35yCMNFo.js";
14
+ import { a as pt, i as mt, n as ht, o as gt } from "./sampling-UUDbi3K0.js";
15
+ // src/utils/timer.ts
16
+ function _t(e) {
16
17
  return Math.round((performance.now() - e) * se) / se;
17
18
  }
18
- function pt(e, t, n, r, i) {
19
+ function vt(e, t, n, r, i) {
19
20
  e.logMetric(`${t}.duration`, n, "ms", "histogram", {
20
21
  status: r,
21
22
  ...i
22
23
  });
23
24
  }
24
- function mt(e, t, n, r, i) {
25
- let a = ft(n);
25
+ function yt(e, t, n, r, i) {
26
+ let a = _t(n);
26
27
  e.error(`${t} failed`, r, {
27
28
  "action.duration_ms": a,
28
29
  status: "FAILURE",
29
30
  ...i
30
- }), pt(e, t, a, "FAILURE", i);
31
+ }), vt(e, t, a, "FAILURE", i);
31
32
  }
32
- function ht(e, t, n, r) {
33
+ function bt(e, t, n, r) {
33
34
  let i = performance.now();
34
35
  try {
35
36
  let a = n();
36
- return pt(e, t, ft(i), "SUCCESS", r), a;
37
+ return vt(e, t, _t(i), "SUCCESS", r), a;
37
38
  } catch (n) {
38
- throw mt(e, t, i, n, r), n;
39
+ throw yt(e, t, i, n, r), n;
39
40
  }
40
41
  }
41
- async function gt(e, t, n, r) {
42
+ async function xt(e, t, n, r) {
42
43
  let i = performance.now();
43
44
  try {
44
45
  let a = await n();
45
- return pt(e, t, ft(i), "SUCCESS", r), a;
46
+ return vt(e, t, _t(i), "SUCCESS", r), a;
46
47
  } catch (n) {
47
- throw mt(e, t, i, n, r), n;
48
+ throw yt(e, t, i, n, r), n;
48
49
  }
49
50
  }
50
- //#endregion
51
- //#region src/core/deferred.ts
52
- var j = /* @__PURE__ */ new WeakMap();
53
- function _t(e) {
51
+ // src/core/deferred.ts
52
+ var k = /* @__PURE__ */ new WeakMap();
53
+ function St(e) {
54
54
  let t = e.idle;
55
55
  t !== void 0 && (e.diagnostics.guard("pipeline.crashed", "The idle callback could not be cancelled.", () => {
56
56
  cancelIdleCallback(t);
57
57
  }), e.idle = void 0), clearTimeout(e.timer), e.timer = void 0;
58
58
  }
59
- function vt(e, t) {
59
+ function Ct(e, t) {
60
60
  typeof requestIdleCallback == "function" && typeof cancelIdleCallback == "function" && (t.idle = t.diagnostics.guard("pipeline.crashed", "The idle callback could not be scheduled.", () => requestIdleCallback((n) => {
61
- M(e, t, n);
62
- }, { timeout: s })), t.idle !== void 0) || (t.timer = setTimeout(() => {
63
- M(e, t);
64
- }, 0), Ge(t.timer));
65
- }
66
- function M(e, t, n) {
67
- if (j.get(e) !== t || t.draining) return;
68
- _t(t), t.draining = !0;
61
+ A(e, t, n);
62
+ }, { timeout: o })), t.idle !== void 0) || (t.timer = setTimeout(() => {
63
+ A(e, t);
64
+ }, 0), Xe(t.timer));
65
+ }
66
+ function A(e, t, n) {
67
+ if (k.get(e) !== t || t.draining) return;
68
+ St(t), t.draining = !0;
69
69
  let r = t.work;
70
70
  t.work = [];
71
71
  let i = 0;
72
- for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++, j.get(e) !== t) return;
73
- t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? vt(e, t) : j.delete(e);
72
+ for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++, k.get(e) !== t) return;
73
+ t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? Ct(e, t) : k.delete(e);
74
74
  }
75
- function yt(e, t, n, r) {
76
- let i = j.get(e), a = r > 0 ? Math.min(r, f) : f;
77
- if (i && i.work.length >= a && !i.draining && (M(e, i), i = j.get(e)), i) {
75
+ function wt(e, t, n, r) {
76
+ let i = k.get(e), a = r > 0 ? Math.min(r, p) : p;
77
+ if (i && i.work.length >= a && !i.draining && (A(e, i), i = k.get(e)), i) {
78
78
  if (i.work.length >= a) {
79
79
  n.count("record.dropped_by_ceiling");
80
80
  return;
@@ -84,30 +84,29 @@ function yt(e, t, n, r) {
84
84
  work: [t],
85
85
  diagnostics: n,
86
86
  draining: !1
87
- }, j.set(e, i), vt(e, i);
87
+ }, k.set(e, i), Ct(e, i);
88
88
  }
89
- function N(e) {
90
- let t = j.get(e);
91
- t && M(e, t);
89
+ function j(e) {
90
+ let t = k.get(e);
91
+ t && A(e, t);
92
92
  }
93
- function bt(e) {
94
- let t = j.get(e);
93
+ function Tt(e) {
94
+ let t = k.get(e);
95
95
  if (t) {
96
- _t(t), j.delete(e);
96
+ St(t), k.delete(e);
97
97
  for (let e of t.work) t.diagnostics.count("record.dropped_by_ceiling");
98
98
  t.work = [];
99
99
  }
100
100
  }
101
- //#endregion
102
- //#region src/core/logger.ts
103
- var xt = [
104
- _,
105
- Ie,
106
- Oe
101
+ // src/core/logger.ts
102
+ var Et = [
103
+ g,
104
+ u,
105
+ Ae
107
106
  ];
108
- function St(e, t) {
107
+ function Dt(e, t) {
109
108
  let n = t.guard("record.sanitize_failed", "The library could not read the error reason.", () => {
110
- if (!(e instanceof Error) && !Ue(e)) return;
109
+ if (!(e instanceof Error) && !Je(e)) return;
111
110
  let t = Error(e.message);
112
111
  return t.name = e.name, t.stack = e.stack, t;
113
112
  });
@@ -115,38 +114,38 @@ function St(e, t) {
115
114
  let r = t.guard("record.sanitize_failed", "The library could not convert the error reason to text.", () => String(e));
116
115
  return Error(r ?? typeof e);
117
116
  }
118
- function Ct(e, t, n) {
117
+ function Ot(e, t, n) {
119
118
  return n.guard("record.sanitize_failed", "The library could not read the error reason.", () => e instanceof Error ? e : t) ?? t;
120
119
  }
121
- function wt(e, t) {
120
+ function kt(e, t) {
122
121
  if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e == "symbol") return e;
123
122
  if (typeof e == "object" && e) return t.guard("record.sanitize_failed", "The library could not read the properties of the error reason.", () => {
124
- let t = e, n = Ue(e), r = {}, i = 0;
123
+ let t = e, n = Je(e), r = {}, i = 0;
125
124
  for (let e of Object.keys(t)) {
126
125
  let a = t[e];
127
- (!n || !We.has(e)) && He(a) && (r[e] = a, i++);
126
+ n && Ye.has(e) || !qe(a) || (r[e] = a, i++);
128
127
  }
129
128
  return i === 0 ? void 0 : r;
130
129
  });
131
130
  }
132
- function Tt(e) {
133
- if (!E(e) || e instanceof Error) return !1;
131
+ function At(e) {
132
+ if (!C(e) || e instanceof Error) return !1;
134
133
  let t = Object.getPrototypeOf(e);
135
134
  return t === null || Object.getPrototypeOf(t) === null;
136
135
  }
137
- function Et(e) {
138
- return xt.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
136
+ function jt(e) {
137
+ return Et.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
139
138
  }
140
- function P(e, t) {
139
+ function M(e, t) {
141
140
  return e === void 0 ? {} : t.guard("record.sanitize_failed", "The library could not read the payload.", () => ({ ...e })) ?? { "uiobs.sanitize_failed": !0 };
142
141
  }
143
- var F = class e {
142
+ var N = class e {
144
143
  bind;
145
144
  namespace;
146
145
  options;
147
146
  levelType;
148
147
  constructor(e, t, n = {}) {
149
- this.bind = e, this.namespace = t, this.options = n, this.levelType = Et(t);
148
+ this.bind = e, this.namespace = t, this.options = n, this.levelType = jt(t);
150
149
  }
151
150
  child(t, n = {}) {
152
151
  return new e(this.bind, `${this.namespace}.${t}`, { scopedContext: {
@@ -185,7 +184,7 @@ var F = class e {
185
184
  }
186
185
  let a = this.bind();
187
186
  this.submit(a, "INFO", "metric", (o) => {
188
- let s = P(i, a.diagnostics), c = {
187
+ let s = M(i, a.diagnostics), c = {
189
188
  ...s,
190
189
  "metric.name": e,
191
190
  "metric.value": t,
@@ -196,8 +195,8 @@ var F = class e {
196
195
  this.writeNow(a, "INFO", "metric", e, c, !0, o);
197
196
  });
198
197
  };
199
- timeSync = (e, t, n) => ht(this, e, t, n);
200
- timeAsync = (e, t, n) => gt(this, e, t, n);
198
+ timeSync = (e, t, n) => bt(this, e, t, n);
199
+ timeAsync = (e, t, n) => xt(this, e, t, n);
201
200
  write(e, t, n, r) {
202
201
  let i = this.bind();
203
202
  this.submit(i, e, t, (a) => {
@@ -210,13 +209,13 @@ var F = class e {
210
209
  else if (e.config.payloadMode === "defer" && e.config.enabled && !e.config.debugBuffer.enabled && this.namespace !== "uiobs.diagnostics") {
211
210
  if (!e.builder.isEnabled(t, this.namespace, n) && !this.mirrors(e, t)) return;
212
211
  let i = e.journey.current(), a = {
213
- timeUnixNano: Be(),
212
+ timeUnixNano: Ge(),
214
213
  trace: e.tracing.resolve(),
215
214
  journey: i ? { ...i } : null,
216
215
  context: e.context.getAll(),
217
- url: qe(e.diagnostics)
216
+ url: Qe(e.diagnostics)
218
217
  };
219
- yt(e, () => {
218
+ wt(e, () => {
220
219
  r(a);
221
220
  }, e.diagnostics, e.config.buffering.maxPendingRecords);
222
221
  } else r();
@@ -234,7 +233,7 @@ var F = class e {
234
233
  body: r,
235
234
  namespace: this.namespace,
236
235
  scoped: this.options.scopedContext,
237
- payload: a ? i : P(i, e.diagnostics)
236
+ payload: a ? i : M(i, e.diagnostics)
238
237
  }, { record: c, dropped: l } = e.builder.build(s), u = !!e.config.redact || e.config.processors.length > 0, d = n !== "metric" && e.config.capturePolicy.breadcrumbs > 0, f = l === "sampling" && u && d ? e.builder.build(s, !0) : void 0, p = c ?? f?.record ?? null, m = p ? p.body : l === "sampling" && !u ? r : void 0;
239
238
  d && m !== void 0 && e.breadcrumbs.push({
240
239
  t: o ? Number(o.timeUnixNano.slice(0, -6)) : Date.now(),
@@ -251,12 +250,12 @@ var F = class e {
251
250
  writeErrorNow(e, t, n, r, i, a) {
252
251
  let o = e.builder.isEnabled(t, this.namespace);
253
252
  if (!o && !this.mirrors(e, t)) return;
254
- let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => Tt(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : St(l, e.diagnostics), d = u === void 0 ? void 0 : Ct(l, u, e.diagnostics);
253
+ let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => At(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : Dt(l, e.diagnostics), d = u === void 0 ? void 0 : Ot(l, u, e.diagnostics);
255
254
  if (!o) {
256
255
  this.print(e, t, n, c, d, null, void 0, a);
257
256
  return;
258
257
  }
259
- let f = u ? wt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
258
+ let f = u ? kt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
260
259
  snapshot: a,
261
260
  level: t,
262
261
  type: this.levelType,
@@ -264,14 +263,14 @@ var F = class e {
264
263
  namespace: this.namespace,
265
264
  scoped: this.options.scopedContext,
266
265
  payload: {
267
- ...P(c, e.diagnostics),
266
+ ...M(c, e.diagnostics),
268
267
  ...u ? {
269
268
  "error.type": u.name,
270
269
  "error.message": u.message,
271
270
  "error.stack_trace": u.stack
272
271
  } : {},
273
272
  ...f === void 0 ? {} : { [me]: f },
274
- [b]: e.breadcrumbs.snapshot()
273
+ [x]: e.breadcrumbs.snapshot()
275
274
  }
276
275
  });
277
276
  this.print(e, t, n, c, d, p, m, a), e.emit(p);
@@ -294,7 +293,7 @@ var F = class e {
294
293
  namespace: this.namespace,
295
294
  scoped: this.options.scopedContext,
296
295
  payload: {
297
- ...P(r, e.diagnostics),
296
+ ...M(r, e.diagnostics),
298
297
  ...i ? {
299
298
  "error.type": i.name,
300
299
  "error.message": i.message,
@@ -307,33 +306,33 @@ var F = class e {
307
306
  mirrors(e, t) {
308
307
  return e.config.enabled && e.console.accepts(t);
309
308
  }
310
- }, Dt = "overflow", Ot = /* @__PURE__ */ new Set([
309
+ }, Mt = "overflow", Nt = /* @__PURE__ */ new Set([
311
310
  ve,
312
- ye,
313
- ue,
314
- C,
315
- x,
316
- De,
311
+ be,
312
+ fe,
313
+ Le,
314
+ S,
315
+ Oe,
317
316
  Ce
318
317
  ]);
319
- function kt(e = {}) {
318
+ function Pt(e = {}) {
320
319
  let t = {};
321
320
  for (let n of Object.keys(e).sort()) {
322
- if (n.startsWith("metric.") || Ot.has(n)) continue;
321
+ if (n.startsWith("metric.") || Nt.has(n)) continue;
323
322
  let r = e[n];
324
323
  (typeof r == "string" || typeof r == "boolean" || typeof r == "number" && Number.isFinite(r)) && (t[n] = r);
325
324
  }
326
325
  return t;
327
326
  }
328
- function At(e, t) {
327
+ function Ft(e, t) {
329
328
  if (!Array.isArray(e)) return null;
330
329
  let n = t === 0 ? e.length : Math.min(e.length, t + 1);
331
330
  return Array.from({ length: n }, (t, n) => e[n]);
332
331
  }
333
- function jt(e, t) {
332
+ function It(e, t) {
334
333
  return Array.isArray(e) && (t === 0 || e.length <= t) && e.every((t, n) => typeof t == "number" && Number.isFinite(t) && (n === 0 || t > e[n - 1]));
335
334
  }
336
- function Mt(e, t, n) {
335
+ function Lt(e, t, n) {
337
336
  let r = {
338
337
  "metric.name": e.name,
339
338
  "metric.unit": e.unit,
@@ -351,29 +350,42 @@ function Mt(e, t, n) {
351
350
  [y.buckets]: t.buckets
352
351
  };
353
352
  }
354
- function Nt(e, t, n) {
355
- let r = {
353
+ function Rt(e, t) {
354
+ try {
355
+ return {
356
+ unit: e.unit,
357
+ boundaries: e.boundaries
358
+ };
359
+ } catch (e) {
360
+ return t(e), {
361
+ unit: void 0,
362
+ boundaries: void 0
363
+ };
364
+ }
365
+ }
366
+ function zt(e, t, n, r) {
367
+ let i = {
356
368
  name: e,
357
369
  kind: "counter",
358
- unit: t.unit ?? "count",
370
+ unit: Rt(t, r).unit ?? "count",
359
371
  boundaries: []
360
372
  };
361
373
  return { add: (e, t) => {
362
- n(r, e, t);
374
+ n(i, e, t);
363
375
  } };
364
376
  }
365
- function Pt(e, t, n) {
366
- let r = {
377
+ function Bt(e, t, n, r) {
378
+ let { unit: i, boundaries: a } = Rt(t, r), o = {
367
379
  name: e,
368
380
  kind: "histogram",
369
- unit: t.unit ?? "count",
370
- boundaries: t.boundaries ?? g
381
+ unit: i ?? "count",
382
+ boundaries: a ?? v
371
383
  };
372
384
  return { record: (e, t) => {
373
- n(r, e, t);
385
+ n(o, e, t);
374
386
  } };
375
387
  }
376
- var Ft = class {
388
+ var Vt = class {
377
389
  intervalMs;
378
390
  emit;
379
391
  diagnostics;
@@ -391,25 +403,25 @@ var Ft = class {
391
403
  record(e, t, n) {
392
404
  !Number.isFinite(t) || e.kind === "counter" && t < 0 ? this.diagnostics.report("record.dropped_malformed", `The value of the metric ${e.name} is not valid. The library dropped it.`, { "metric.name": e.name }) : this.diagnostics.guard("record.sanitize_failed", `The library could not read the attributes of the metric ${e.name}.`, () => {
393
405
  let r = this.instrumentOf(e);
394
- r && (this.add(r, t, kt(n)), this.arm());
406
+ r && (this.add(r, t, Pt(n)), this.arm());
395
407
  });
396
408
  }
397
409
  collect() {
398
410
  this.timer !== null && (clearTimeout(this.timer), this.timer = null);
399
411
  let e = `${String(this.startedAt)}000000`, t = [...this.instruments.values()];
400
412
  this.instruments.clear();
401
- for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Mt(n, t, e));
413
+ for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Lt(n, t, e));
402
414
  }
403
415
  instrumentOf(e) {
404
416
  let t = this.instruments.get(e.name);
405
417
  if (t) return t.def.kind === e.kind ? t : (this.diagnostics.report("record.dropped_malformed", `The metric ${e.name} is a counter and a histogram. The library dropped the value.`, { "metric.name": e.name }), null);
406
418
  if (this.policy.maxInstruments && this.instruments.size >= this.policy.maxInstruments) return this.diagnostics.count("record.dropped_by_ceiling"), null;
407
- let n = At(e.boundaries, this.policy.maxHistogramBoundaries), r = jt(n, this.policy.maxHistogramBoundaries);
419
+ let n = Ft(e.boundaries, this.policy.maxHistogramBoundaries), r = It(n, this.policy.maxHistogramBoundaries);
408
420
  e.kind === "histogram" && !r && this.diagnostics.report("config.invalid", `The boundaries of the metric ${e.name} must meet metrics.maxHistogramBoundaries and contain finite numbers in ascending order. The library uses the default boundaries.`);
409
421
  let i = {
410
422
  def: {
411
423
  ...e,
412
- boundaries: r ? n : [...g]
424
+ boundaries: r ? n : [...v]
413
425
  },
414
426
  series: /* @__PURE__ */ new Map()
415
427
  };
@@ -417,7 +429,7 @@ var Ft = class {
417
429
  }
418
430
  add(e, t, n) {
419
431
  let r = JSON.stringify(n), i = e.series.get(r), a = n;
420
- if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r = Dt, i = e.series.get(r), a = { [le]: !0 }), !i) {
432
+ if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r = Mt, i = e.series.get(r), a = { [le]: !0 }), !i) {
421
433
  let n = e.def.kind === "histogram" ? e.def.boundaries.length + 1 : 0, o = Array(n).fill(0);
422
434
  i = {
423
435
  attributes: a,
@@ -436,81 +448,81 @@ var Ft = class {
436
448
  arm() {
437
449
  this.timer === null && (this.startedAt = Date.now(), this.timer = setTimeout(() => {
438
450
  this.collect();
439
- }, this.intervalMs()), Ge(this.timer));
451
+ }, this.intervalMs()), Xe(this.timer));
440
452
  }
441
- }, It = {
453
+ }, Ht = {
442
454
  TRACE: "debug",
443
455
  DEBUG: "debug",
444
456
  INFO: "info",
445
457
  WARN: "warn",
446
458
  ERROR: "error",
447
459
  FATAL: "error"
448
- }, Lt = class {
460
+ }, Ut = class {
449
461
  settings;
450
462
  diagnostics;
451
463
  limits;
452
- constructor(e, t, n = p) {
464
+ constructor(e, t, n = Ne) {
453
465
  this.settings = e, this.diagnostics = t, this.limits = n;
454
466
  }
455
467
  update(e) {
456
468
  this.settings = e;
457
469
  }
458
470
  accepts(e) {
459
- return this.settings.level === null || !Object.hasOwn(w, this.settings.level) ? !1 : w[e] >= w[this.settings.level];
471
+ return this.settings.level === null || !Object.hasOwn(b, this.settings.level) ? !1 : b[e] >= b[this.settings.level];
460
472
  }
461
473
  write(e, t, n, r, i) {
462
- if (!this.accepts(t) || typeof console > "u" || Je()) return;
463
- let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = It[t];
474
+ if (!this.accepts(t) || typeof console > "u" || $e()) return;
475
+ let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Ht[t];
464
476
  this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
465
477
  let c = [];
466
- i !== void 0 && c.push(i), r !== void 0 && c.push(Xe(r, this.limits, this.diagnostics)), O(() => {
478
+ i !== void 0 && c.push(i), r !== void 0 && c.push(tt(r, this.limits, this.diagnostics)), E(() => {
467
479
  console[s](a, o.namespace, e, o[t], "", n, ...c);
468
480
  });
469
481
  });
470
482
  }
471
- }, Rt = class {
483
+ }, Wt = class {
472
484
  value = 0;
473
485
  next() {
474
486
  return ++this.value;
475
487
  }
476
- }, zt = /^[0-9a-f]{32}$/, Bt = /^[0-9a-f]{16}$/, Vt = /[1-9a-f]/;
477
- function Ht(e) {
478
- return zt.test(e.traceId) && Vt.test(e.traceId) && Bt.test(e.spanId) && Vt.test(e.spanId);
488
+ }, Gt = /^[0-9a-f]{32}$/, Kt = /^[0-9a-f]{16}$/, qt = /[1-9a-f]/;
489
+ function Jt(e) {
490
+ return Gt.test(e.traceId) && qt.test(e.traceId) && Kt.test(e.spanId) && qt.test(e.spanId);
479
491
  }
480
- function Ut() {
481
- return $e(16);
492
+ function Yt() {
493
+ return it(16);
482
494
  }
483
- function Wt() {
484
- return $e(8);
495
+ function Xt() {
496
+ return it(8);
485
497
  }
486
- function Gt(e) {
498
+ function Zt(e) {
487
499
  return {
488
- traceId: Ut(),
489
- spanId: Wt(),
500
+ traceId: Yt(),
501
+ spanId: Xt(),
490
502
  traceFlags: 1,
491
503
  startedAt: Date.now(),
492
504
  reason: e,
493
505
  ended: !1
494
506
  };
495
507
  }
496
- function Kt(e, t, n) {
508
+ function Qt(e, t, n) {
497
509
  return `00-${e}-${t}-${(n & 255).toString(16).padStart(2, "0")}`;
498
510
  }
499
- function qt(e) {
511
+ function $t(e) {
500
512
  return {
501
513
  traceId: e.traceId,
502
514
  spanId: e.spanId,
503
515
  traceFlags: e.traceFlags
504
516
  };
505
517
  }
506
- var Jt = class {
518
+ var en = class {
507
519
  diagnostics;
508
520
  maxAgeMs;
509
521
  load;
510
522
  spans;
511
- ambient = Gt("start");
523
+ ambient = Zt("start");
512
524
  otel;
513
- constructor(e, t = o, n, r) {
525
+ constructor(e, t = je, n, r) {
514
526
  this.diagnostics = e, this.maxAgeMs = t, this.load = n, this.spans = r;
515
527
  }
516
528
  async loadOtel() {
@@ -524,7 +536,7 @@ var Jt = class {
524
536
  return this.activeSpanContext() ?? this.ambientContext();
525
537
  }
526
538
  ambientContext() {
527
- return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), qt(this.ambient);
539
+ return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), $t(this.ambient);
528
540
  }
529
541
  activeSpanContext() {
530
542
  let e = this.otel;
@@ -532,7 +544,7 @@ var Jt = class {
532
544
  let t = e.trace.getActiveSpan();
533
545
  if (t === void 0) return;
534
546
  let n = t.spanContext();
535
- if (Ht(n)) return {
547
+ if (Jt(n)) return {
536
548
  traceId: n.traceId,
537
549
  spanId: n.spanId,
538
550
  traceFlags: n.traceFlags
@@ -541,8 +553,8 @@ var Jt = class {
541
553
  }
542
554
  rotate(e) {
543
555
  let t = this.ambient;
544
- this.ambient = Gt(e);
545
- let n = qt(this.ambient);
556
+ this.ambient = Zt(e);
557
+ let n = $t(this.ambient);
546
558
  return this.finish(t), n;
547
559
  }
548
560
  end() {
@@ -569,9 +581,9 @@ var Jt = class {
569
581
  n.propagation.inject(n.context.active(), t);
570
582
  }), t.traceparent) return { headers: t };
571
583
  let r = this.activeSpanContext(), i = r ?? this.ambientContext(), a = r ? void 0 : this.spans;
572
- if (!a?.enabled()) return t[ee] = Kt(i.traceId, i.spanId, i.traceFlags), { headers: t };
573
- let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Wt() : i.spanId;
574
- return t[ee] = Kt(i.traceId, c, s), !e || !o ? { headers: t } : {
584
+ if (!a?.enabled()) return t[m] = Qt(i.traceId, i.spanId, i.traceFlags), { headers: t };
585
+ let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Xt() : i.spanId;
586
+ return t[m] = Qt(i.traceId, c, s), !e || !o ? { headers: t } : {
575
587
  headers: t,
576
588
  span: {
577
589
  traceId: i.traceId,
@@ -580,7 +592,7 @@ var Jt = class {
580
592
  }
581
593
  };
582
594
  }
583
- }, Yt = class {
595
+ }, tn = class {
584
596
  buffer;
585
597
  pointer = 0;
586
598
  filled = !1;
@@ -601,45 +613,45 @@ var Jt = class {
601
613
  snapshot() {
602
614
  return (this.filled ? [...this.buffer.slice(this.pointer), ...this.buffer.slice(0, this.pointer)] : this.buffer.slice(0, this.pointer)).filter((e) => e !== void 0);
603
615
  }
604
- }, Xt = Object.keys(w), Zt = ["gzip", "none"], Qt = [
616
+ }, nn = Object.keys(b), rn = ["gzip", "none"], an = [
605
617
  "omit",
606
618
  "same-origin",
607
619
  "include"
608
- ], $t = [
620
+ ], on = [
609
621
  "auto",
610
622
  "indexeddb",
611
623
  "localstorage",
612
624
  "memory",
613
625
  "none"
614
- ], en = ["storage", "memory"], tn = [
626
+ ], sn = ["storage", "memory"], cn = [
615
627
  "auto",
616
628
  "sender",
617
629
  "forwarder",
618
630
  "off"
619
- ], nn = [
631
+ ], ln = [
620
632
  "auto",
621
633
  "provider",
622
634
  "client"
623
- ], rn = [
635
+ ], un = [
624
636
  "auto",
625
637
  "context",
626
638
  "tab",
627
639
  "origin"
628
- ], an = [
640
+ ], dn = [
629
641
  "error",
630
642
  "warn",
631
643
  "info",
632
644
  "log"
633
- ], on = ["limited", "until-delivered"], sn = {
645
+ ], fn = ["limited", "until-delivered"], pn = {
634
646
  logFlushIntervalMs: [100, 6e4],
635
647
  logBatchSize: [1, 1e3],
636
648
  metricFlushIntervalMs: [100, 6e4],
637
649
  metricBatchSize: [1, 1e3]
638
- }, cn = {
650
+ }, mn = {
639
651
  maxBatches: [1, 5e3],
640
652
  maxAgeMs: [6e4, 6048e5],
641
653
  maxAttempts: [1, 20]
642
- }, ln = {
654
+ }, hn = {
643
655
  maxBodyChars: [256, 65536],
644
656
  maxAttributeChars: [256, 65536],
645
657
  maxAttributeCount: [1, 1024],
@@ -647,42 +659,46 @@ var Jt = class {
647
659
  maxDepth: [1, 16],
648
660
  maxArrayLength: [1, 1e4],
649
661
  maxNodes: [100, 1e5],
650
- maxRecordBytes: [1024, r]
651
- }, un = [6e4, 864e5], I = [0, 2147483647], L = [0, 2 ** 53 - 1], dn = [1, 2 ** 53 - 1], fn = [100, 1e4], pn = {
662
+ maxRecordBytes: [1024, t]
663
+ }, gn = [6e4, 864e5], P = [0, 2147483647], F = [0, 2 ** 53 - 1], _n = [1, 2 ** 53 - 1], vn = [100, 1e4], yn = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), bn = (e) => Array.isArray(e) && e.every((e) => typeof e == "function"), xn = (e) => e === null || typeof e == "function", Sn = (e) => xn(e) || Cn(e) && Object.values(e).every((e) => typeof e == "string"), Cn = (e) => typeof e == "object" && !!e && !Array.isArray(e);
664
+ function I(e, t) {
665
+ return (n, r, i, a) => r === void 0 ? i : e(r) ? r : (R(a, n, t, r, "the current value"), i);
666
+ }
667
+ var wn = {
652
668
  capturePolicy: { ranges: {
653
669
  breadcrumbs: [0, 1e6],
654
- errorDedupeMs: I,
655
- maxErrorSignatures: L,
656
- errorsPerWindow: L,
657
- consolePerWindow: L,
658
- longFramesPerWindow: L,
659
- webSocketPerWindow: L,
660
- reportsPerWindow: L,
661
- resourcesPerWindow: L,
662
- lifecyclePerWindow: L,
663
- windowMs: I,
664
- errorCeiling: L
670
+ errorDedupeMs: P,
671
+ maxErrorSignatures: F,
672
+ errorsPerWindow: F,
673
+ consolePerWindow: F,
674
+ longFramesPerWindow: F,
675
+ webSocketPerWindow: F,
676
+ reportsPerWindow: F,
677
+ resourcesPerWindow: F,
678
+ lifecyclePerWindow: F,
679
+ windowMs: P,
680
+ errorCeiling: F
665
681
  } },
666
682
  metadata: { ranges: {} },
667
683
  persistence: { ranges: {} },
668
684
  diagnostics: {
669
- ranges: { throttleMs: I },
670
- custom: { records: jn }
685
+ ranges: { throttleMs: P },
686
+ custom: { records: Hn }
671
687
  },
672
688
  correlation: { ranges: {
673
- sessionIdleMs: I,
674
- sessionTouchMs: I,
675
- traceMaxAgeMs: I
689
+ sessionIdleMs: P,
690
+ sessionTouchMs: P,
691
+ traceMaxAgeMs: P
676
692
  } },
677
693
  metrics: { ranges: {
678
- maxSeries: L,
679
- maxInstruments: L,
680
- maxHistogramBoundaries: L
694
+ maxSeries: F,
695
+ maxInstruments: F,
696
+ maxHistogramBoundaries: F
681
697
  } },
682
698
  buffering: {
683
699
  ranges: {
684
- maxPendingRecords: L,
685
- maxPendingBytes: L
700
+ maxPendingRecords: F,
701
+ maxPendingBytes: F
686
702
  },
687
703
  choices: { overflow: [
688
704
  "drop-oldest",
@@ -692,12 +708,12 @@ var Jt = class {
692
708
  },
693
709
  delivery: {
694
710
  ranges: {
695
- requestTimeoutMs: [1, I[1]],
696
- maxConcurrentRequests: dn,
697
- retryBaseDelayMs: I,
698
- retryMaxDelayMs: I,
699
- retryIdleDelayMs: I,
700
- batchesPerDrain: dn
711
+ requestTimeoutMs: [1, P[1]],
712
+ maxConcurrentRequests: _n,
713
+ retryBaseDelayMs: P,
714
+ retryMaxDelayMs: P,
715
+ retryIdleDelayMs: P,
716
+ batchesPerDrain: _n
701
717
  },
702
718
  choices: { priority: [
703
719
  "low",
@@ -707,9 +723,36 @@ var Jt = class {
707
723
  },
708
724
  debugBuffer: { ranges: {
709
725
  maxRecords: [1, 1e4],
710
- maxAgeMs: I
711
- } }
712
- }, mn = [
726
+ maxAgeMs: P
727
+ } },
728
+ profiler: { ranges: {
729
+ flushIntervalMs: [1e3, 6e5],
730
+ maxProbes: [1, c]
731
+ } },
732
+ replay: {
733
+ ranges: {
734
+ bufferMs: [5e3, 6e5],
735
+ maxBufferBytes: [1e5, 2e8],
736
+ afterErrorMs: [0, 6e5],
737
+ uploadsPerWindow: F,
738
+ batchSize: [1, 1e4],
739
+ batchBytes: [1e4, 1e7],
740
+ flushIntervalMs: [100, 6e4],
741
+ maxQueueBytes: [1e5, 2e8],
742
+ maxAttempts: [1, 10]
743
+ },
744
+ choices: { mode: ["onError"] },
745
+ custom: {
746
+ maskSelectors: I(yn, "a list of strings"),
747
+ blockSelectors: I(yn, "a list of strings"),
748
+ loader: I(xn, "a function or null"),
749
+ onSegment: I(xn, "a function or null"),
750
+ headers: I(Sn, "an object of strings, a function or null"),
751
+ plugins: I(bn, "a list of functions"),
752
+ recordOptions: I(Cn, "an object")
753
+ }
754
+ }
755
+ }, Tn = [
713
756
  "errors",
714
757
  "rejections",
715
758
  "resourceErrors",
@@ -726,123 +769,123 @@ var Jt = class {
726
769
  "serverTiming",
727
770
  "reports",
728
771
  "lifecycle"
729
- ], hn = "null", R = `a level name: ${Sn(Xt)}`, gn = `true, false or a list of ${Sn(an)}`, _n = "a list of strings and RegExp patterns", vn = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", yn = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", bn = "a list of strings", xn = "true, false or a list of diagnostic codes";
730
- function Sn(e) {
772
+ ], En = "null", L = `a level name: ${Nn(nn)}`, Dn = `true, false or a list of ${Nn(dn)}`, On = "a list of strings and RegExp patterns", kn = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", An = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", jn = "a list of strings", Mn = "true, false or a list of diagnostic codes";
773
+ function Nn(e) {
731
774
  let t = e.map((e) => `"${e}"`);
732
775
  return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
733
776
  }
734
- function Cn(e) {
777
+ function Pn(e) {
735
778
  return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
736
779
  }
737
- function z(e, t, n, r, i) {
738
- e.report("config.invalid", `${t} must be ${n}. The value is ${Cn(r)}. The library keeps ${i}.`);
780
+ function R(e, t, n, r, i) {
781
+ e.report("config.invalid", `${t} must be ${n}. The value is ${Pn(r)}. The library keeps ${i}.`);
739
782
  }
740
- function B(e, t, n, r, i) {
783
+ function z(e, t, n, r, i) {
741
784
  if (t === void 0) return r;
742
785
  let a = n.find((e) => e === t);
743
- return a === void 0 ? (z(i, e, Sn(n), t, `"${r}"`), r) : a;
786
+ return a === void 0 ? (R(i, e, Nn(n), t, `"${r}"`), r) : a;
744
787
  }
745
- function V(e, t, n, r) {
746
- return t === void 0 ? n : typeof t == "boolean" ? t : (z(r, e, "true or false", t, String(n)), n);
788
+ function B(e, t, n, r) {
789
+ return t === void 0 ? n : typeof t == "boolean" ? t : (R(r, e, "true or false", t, String(n)), n);
747
790
  }
748
- function wn(e, t, n, r) {
749
- return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (z(r, e, "a finite number of 0 or more", t, String(n)), n);
791
+ function Fn(e, t, n, r) {
792
+ return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (R(r, e, "a finite number of 0 or more", t, String(n)), n);
750
793
  }
751
- function H(e, t, n, r, i) {
794
+ function V(e, t, n, r, i) {
752
795
  if (t === void 0) return r;
753
796
  let [a, o] = n;
754
- return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (z(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
797
+ return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (R(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
755
798
  }
756
- function Tn(e, t, n) {
757
- return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (z(n, "loggerCache.maxEntries", "a nonnegative safe integer or null", e, String(t)), t);
799
+ function In(e, t, n) {
800
+ return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (R(n, "loggerCache.maxEntries", "a nonnegative safe integer or null", e, String(t)), t);
758
801
  }
759
- function En(e, t, n, r, i) {
802
+ function Ln(e, t, n, r, i) {
760
803
  let a = t ?? {}, o = Object.keys(r);
761
- return Object.fromEntries(o.map((t) => [t, H(`${e}.${t}`, a[t], r[t], n[t], i)]));
804
+ return Object.fromEntries(o.map((t) => [t, V(`${e}.${t}`, a[t], r[t], n[t], i)]));
762
805
  }
763
- function U(e) {
806
+ function H(e) {
764
807
  if (typeof e != "string") return;
765
808
  let t = e.toUpperCase();
766
- return Xt.find((e) => e === t);
809
+ return nn.find((e) => e === t);
767
810
  }
768
- function Dn(e, t, n, r) {
811
+ function Rn(e, t, n, r) {
769
812
  if (t === void 0) return n;
770
- let i = U(t);
771
- return i === void 0 ? (z(r, e, R, t, `"${n}"`), n) : i;
813
+ let i = H(t);
814
+ return i === void 0 ? (R(r, e, L, t, `"${n}"`), n) : i;
772
815
  }
773
- function On(e, t, n) {
816
+ function zn(e, t, n) {
774
817
  if (e === void 0) return t;
775
- if (!E(e)) return z(n, "minLevels", "an object of level names", e, "the value in force"), t;
818
+ if (!C(e)) return R(n, "minLevels", "an object of level names", e, "the current value"), t;
776
819
  let r = [];
777
820
  for (let [t, i] of Object.entries(e)) {
778
- let e = U(i);
779
- t !== "" && e !== void 0 ? r.push([t, e]) : z(n, `minLevels["${t}"]`, R, i, "minLevel for it");
821
+ let e = H(i);
822
+ t !== "" && e !== void 0 ? r.push([t, e]) : R(n, `minLevels["${t}"]`, L, i, "minLevel for it");
780
823
  }
781
824
  return Object.fromEntries(r);
782
825
  }
783
- function W(e, t, n, r, i, a) {
826
+ function U(e, t, n, r, i, a) {
784
827
  if (t === void 0) return n;
785
- if (!Array.isArray(t)) return z(a, e, r, t, "the list in force"), n;
828
+ if (!Array.isArray(t)) return R(a, e, r, t, "the current list"), n;
786
829
  let o = [], s = t;
787
830
  for (let t of s) {
788
831
  let n = i(t);
789
- n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Cn(t)}. ${e} must be ${r}.`) : o.push(n);
832
+ n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Pn(t)}. ${e} must be ${r}.`) : o.push(n);
790
833
  }
791
834
  return o;
792
835
  }
793
- function kn(e) {
836
+ function Bn(e) {
794
837
  return typeof e == "function" ? e : void 0;
795
838
  }
796
- function An(e) {
797
- return E(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
839
+ function Vn(e) {
840
+ return C(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
798
841
  }
799
- function jn(e, t, n, r) {
800
- return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? W(e, t, [], xn, Mn, r) : (z(r, e, xn, t, "the value in force"), n);
842
+ function Hn(e, t, n, r) {
843
+ return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? U(e, t, [], Mn, Un, r) : (R(r, e, Mn, t, "the current value"), n);
801
844
  }
802
- function Mn(e) {
845
+ function Un(e) {
803
846
  return typeof e == "string" ? e : void 0;
804
847
  }
805
- function Nn(e) {
848
+ function Wn(e) {
806
849
  return typeof e == "string" || e instanceof RegExp ? e : void 0;
807
850
  }
808
- function Pn(e) {
809
- return an.find((t) => t === e);
851
+ function Gn(e) {
852
+ return dn.find((t) => t === e);
810
853
  }
811
- function Fn(e) {
854
+ function Kn(e) {
812
855
  if (typeof e == "string") try {
813
856
  let { origin: t } = new URL(e);
814
- return t === hn ? void 0 : t;
857
+ return t === En ? void 0 : t;
815
858
  } catch {
816
859
  return;
817
860
  }
818
861
  }
819
- function In(e) {
820
- return e instanceof RegExp ? e : Fn(e);
862
+ function qn(e) {
863
+ return e instanceof RegExp ? e : Kn(e);
821
864
  }
822
- function Ln(e) {
823
- return E(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
865
+ function Jn(e) {
866
+ return C(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
824
867
  }
825
- function Rn(e, t, n) {
826
- if (e !== void 0) return typeof e == "function" || Ln(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the headers in force."), t);
868
+ function Yn(e, t, n) {
869
+ if (e !== void 0) return typeof e == "function" || Jn(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the current headers."), t);
827
870
  }
828
- function zn(e) {
871
+ function Xn(e) {
829
872
  return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
830
873
  }
831
- function Bn(e, t, n) {
832
- return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || zn(e) ? e : (n.report("config.invalid", `serializer must be "${S}", "ecs" or an implementation. The library uses "${S}".`), S);
874
+ function Zn(e, t, n) {
875
+ return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Xn(e) ? e : (n.report("config.invalid", `serializer must be "${r}", "ecs" or an implementation. The library uses "${r}".`), r);
833
876
  }
834
- var Vn = new Set(Object.keys(m));
835
- function Hn(e, t) {
877
+ var Qn = new Set(Object.keys(h));
878
+ function $n(e, t) {
836
879
  let n = {}, r = Object.entries(e ?? {});
837
- for (let [e, i] of r) Vn.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the style in force.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
880
+ for (let [e, i] of r) Qn.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the current style.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
838
881
  return n;
839
882
  }
840
- function Un(e, t, n) {
883
+ function er(e, t, n) {
841
884
  if (e === void 0) return t ?? "DEBUG";
842
- let r = U(e);
843
- return r === void 0 ? (z(n, "console.level", R, e, "the console level in force"), t) : r;
885
+ let r = H(e);
886
+ return r === void 0 ? (R(n, "console.level", L, e, "the current console level"), t) : r;
844
887
  }
845
- function Wn(e, t, n) {
888
+ function tr(e, t, n) {
846
889
  if (e === void 0) return t;
847
890
  if (e === !1) return {
848
891
  level: null,
@@ -853,21 +896,21 @@ function Wn(e, t, n) {
853
896
  styles: t.styles
854
897
  };
855
898
  if (typeof e == "string") {
856
- let r = U(e);
857
- return r === void 0 ? (z(n, "console", R, e, "the console level in force"), t) : {
899
+ let r = H(e);
900
+ return r === void 0 ? (R(n, "console", L, e, "the current console level"), t) : {
858
901
  level: r,
859
902
  styles: t.styles
860
903
  };
861
904
  }
862
- return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The console settings in force stay."), t) : {
863
- level: Un(e.level, t.level, n),
905
+ return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The current console settings stay."), t) : {
906
+ level: er(e.level, t.level, n),
864
907
  styles: {
865
908
  ...t.styles,
866
- ...Hn(e.styles, n)
909
+ ...$n(e.styles, n)
867
910
  }
868
911
  };
869
912
  }
870
- function Gn(e, t, n) {
913
+ function nr(e, t, n) {
871
914
  let r = e ?? {};
872
915
  return {
873
916
  ...t,
@@ -876,66 +919,66 @@ function Gn(e, t, n) {
876
919
  ...t.rates,
877
920
  ...r.rates
878
921
  },
879
- alwaysSampleTypes: W("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, bn, Mn, n),
880
- alwaysSampleFrom: Dn("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
881
- remote: V("sampling.remote", r.remote, t.remote, n)
922
+ alwaysSampleTypes: U("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, jn, Un, n),
923
+ alwaysSampleFrom: Rn("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
924
+ remote: B("sampling.remote", r.remote, t.remote, n)
882
925
  };
883
926
  }
884
- function Kn(e, t, n) {
927
+ function rr(e, t, n) {
885
928
  let r = e ?? {};
886
929
  return {
887
- maxTrackedSources: H("bus.maxTrackedSources", r.maxTrackedSources, [0, 2 ** 53 - 1], t.maxTrackedSources, n),
888
- sourcePolicy: B("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
889
- validation: B("bus.validation", r.validation, ["strict", "envelope"], t.validation, n),
890
- maxMessageBytes: H("bus.maxMessageBytes", r.maxMessageBytes, [0, 2 ** 53 - 1], t.maxMessageBytes, n),
891
- maxRecordsPerMessage: H("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, [0, 2 ** 53 - 1], t.maxRecordsPerMessage, n),
892
- maxMessagesPerSecond: H("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, [0, 2 ** 53 - 1], t.maxMessagesPerSecond, n),
893
- mode: B("bus.mode", r.mode, tn, t.mode, n),
894
- trustedOrigins: W("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, yn, Fn, n),
895
- openFinRole: B("bus.openFinRole", r.openFinRole, nn, t.openFinRole, n)
930
+ maxTrackedSources: V("bus.maxTrackedSources", r.maxTrackedSources, [0, 2 ** 53 - 1], t.maxTrackedSources, n),
931
+ sourcePolicy: z("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
932
+ validation: z("bus.validation", r.validation, ["strict", "envelope"], t.validation, n),
933
+ maxMessageBytes: V("bus.maxMessageBytes", r.maxMessageBytes, [0, 2 ** 53 - 1], t.maxMessageBytes, n),
934
+ maxRecordsPerMessage: V("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, [0, 2 ** 53 - 1], t.maxRecordsPerMessage, n),
935
+ maxMessagesPerSecond: V("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, [0, 2 ** 53 - 1], t.maxMessagesPerSecond, n),
936
+ mode: z("bus.mode", r.mode, cn, t.mode, n),
937
+ trustedOrigins: U("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, An, Kn, n),
938
+ openFinRole: z("bus.openFinRole", r.openFinRole, ln, t.openFinRole, n)
896
939
  };
897
940
  }
898
- function qn(e, t, n) {
941
+ function ir(e, t, n) {
899
942
  let r = e ?? {};
900
943
  return {
901
- scope: B("journey.scope", r.scope, rn, t.scope, n),
902
- maxAgeMs: H("journey.maxAgeMs", r.maxAgeMs, un, t.maxAgeMs, n)
944
+ scope: z("journey.scope", r.scope, un, t.scope, n),
945
+ maxAgeMs: V("journey.maxAgeMs", r.maxAgeMs, gn, t.maxAgeMs, n)
903
946
  };
904
947
  }
905
- function Jn(e, t, n) {
948
+ function ar(e, t, n) {
906
949
  let r = e ?? {};
907
950
  return {
908
- mode: B("retention.mode", r.mode, on, t.mode, n),
909
- ...En("retention", r, t, cn, n)
951
+ mode: z("retention.mode", r.mode, fn, t.mode, n),
952
+ ...Ln("retention", r, t, mn, n)
910
953
  };
911
954
  }
912
- function Yn(e, t, n) {
913
- return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? W("capture.console", e, [], gn, Pn, n) : (z(n, "capture.console", gn, e, "the value in force"), t);
955
+ function or(e, t, n) {
956
+ return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? U("capture.console", e, [], Dn, Gn, n) : (R(n, "capture.console", Dn, e, "the current value"), t);
914
957
  }
915
- function Xn(e, t, n) {
958
+ function sr(e, t, n) {
916
959
  let r = e ?? {}, i = {
917
960
  ...t,
918
961
  ...r,
919
- remoteToggles: W("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => ke.find((t) => t === e), n),
920
- resourceTiming: Zn(r.resourceTiming, t.resourceTiming, n),
921
- interactions: Qn(r.interactions, t.interactions, n),
922
- console: Yn(r.console, t.console, n),
923
- longFrameThresholdMs: wn("capture.longFrameThresholdMs", r.longFrameThresholdMs, t.longFrameThresholdMs, n),
924
- ignoreUrls: W("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, _n, Nn, n),
925
- userTimingInclude: W("capture.userTimingInclude", r.userTimingInclude, t.userTimingInclude, _n, Nn, n),
926
- propagateTraceHeaderTo: W("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, vn, In, n),
927
- plugins: W("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", An, n)
962
+ remoteToggles: U("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => Te.find((t) => t === e), n),
963
+ resourceTiming: cr(r.resourceTiming, t.resourceTiming, n),
964
+ interactions: lr(r.interactions, t.interactions, n),
965
+ console: or(r.console, t.console, n),
966
+ longFrameMs: Fn("capture.longFrameMs", r.longFrameMs, t.longFrameMs, n),
967
+ ignoreUrls: U("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, On, Wn, n),
968
+ userTimingInclude: U("capture.userTimingInclude", r.userTimingInclude, t.userTimingInclude, On, Wn, n),
969
+ propagateTraceHeaderTo: U("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, kn, qn, n),
970
+ plugins: U("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", Vn, n)
928
971
  };
929
- for (let e of mn) i[e] = V(`capture.${e}`, r[e], t[e], n);
972
+ for (let e of Tn) i[e] = B(`capture.${e}`, r[e], t[e], n);
930
973
  return i;
931
974
  }
932
- function Zn(e, t, n) {
933
- return e === void 0 ? t : typeof e == "boolean" ? e : E(e) ? { slowMs: wn("capture.resourceTiming.slowMs", e.slowMs, typeof t == "object" ? t.slowMs ?? 1e3 : Ee, n) } : (n.report("config.invalid", "capture.resourceTiming must be a boolean or an options object."), t);
975
+ function cr(e, t, n) {
976
+ return e === void 0 ? t : typeof e == "boolean" ? e : C(e) ? { slowMs: Fn("capture.resourceTiming.slowMs", e.slowMs, typeof t == "object" ? t.slowMs ?? 1e3 : Re, n) } : (n.report("config.invalid", "capture.resourceTiming must be a boolean or an options object."), t);
934
977
  }
935
- function Qn(e, t, n) {
978
+ function lr(e, t, n) {
936
979
  if (e === void 0) return t;
937
980
  if (typeof e == "boolean") return e;
938
- if (!E(e)) return n.report("config.invalid", "capture.interactions must be a boolean or an options object."), t;
981
+ if (!C(e)) return n.report("config.invalid", "capture.interactions must be a boolean or an options object."), t;
939
982
  let r = typeof t == "object" ? t : {}, i = e.ignoreSelector, a = i === void 0 ? r.ignoreSelector : i;
940
983
  if (a != null) try {
941
984
  if (typeof a != "string") throw Error("Invalid selector");
@@ -944,113 +987,113 @@ function Qn(e, t, n) {
944
987
  n.report("config.invalid", "capture.interactions.ignoreSelector must be a valid CSS selector or null."), a = r.ignoreSelector;
945
988
  }
946
989
  let o = r.actionAttribute ?? "data-observability-action";
947
- return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute : z(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${o}"`)), {
990
+ return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute : R(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${o}"`)), {
948
991
  actionAttribute: o,
949
- text: V("capture.interactions.text", e.text, r.text ?? !1, n),
950
- selector: V("capture.interactions.selector", e.selector, r.selector ?? !1, n),
992
+ text: B("capture.interactions.text", e.text, r.text ?? !1, n),
993
+ selector: B("capture.interactions.selector", e.selector, r.selector ?? !1, n),
951
994
  ignoreSelector: typeof a == "string" || a === null ? a : void 0,
952
- maxTextChars: H("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], r.maxTextChars ?? 50, n),
953
- rageClicks: V("capture.interactions.rageClicks", e.rageClicks, r.rageClicks ?? !1, n),
954
- rageClickCount: H("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], r.rageClickCount ?? 3, n),
955
- rageClickWindowMs: H("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, fn, r.rageClickWindowMs ?? 1e3, n),
956
- deadClicks: V("capture.interactions.deadClicks", e.deadClicks, r.deadClicks ?? !1, n),
957
- deadClickMs: H("capture.interactions.deadClickMs", e.deadClickMs, fn, r.deadClickMs ?? 1e3, n)
995
+ maxTextChars: V("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], r.maxTextChars ?? 50, n),
996
+ rageClicks: B("capture.interactions.rageClicks", e.rageClicks, r.rageClicks ?? !1, n),
997
+ rageClickCount: V("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], r.rageClickCount ?? 3, n),
998
+ rageClickWindowMs: V("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, vn, r.rageClickWindowMs ?? 1e3, n),
999
+ deadClicks: B("capture.interactions.deadClicks", e.deadClicks, r.deadClicks ?? !1, n),
1000
+ deadClickMs: V("capture.interactions.deadClickMs", e.deadClickMs, vn, r.deadClickMs ?? 1e3, n)
958
1001
  };
959
1002
  }
960
- var $n = {
1003
+ var ur = {
961
1004
  metricsEndpoint: "The library sends metric records as log records.",
962
1005
  tracesEndpoint: "The library sends no span."
963
1006
  };
964
- function er(e, t, n, r, i) {
965
- let a = n;
1007
+ function dr(e, t, n, i, a) {
1008
+ let o = n;
966
1009
  if (typeof t == "string" && t !== "") try {
967
- new URL(t), a = t;
1010
+ new URL(t), o = t;
968
1011
  } catch (n) {
969
- i.report("config.invalid", `${e} is not a valid absolute URL: ${D(t, !1)}. The library keeps the value in force.`, void 0, n);
1012
+ a.report("config.invalid", `${e} is not a valid absolute URL: ${w(t, !1)}. The library keeps the current value.`, void 0, n);
970
1013
  }
971
- else t === "" ? a = "" : t !== void 0 && z(i, e, "a URL string", t, "the value in force");
972
- return a !== "" && r !== "otlp" ? (i.report("config.invalid", `${e} needs serializer "${S}". ${$n[e]}`), "") : a;
1014
+ else t === "" ? o = "" : t !== void 0 && R(a, e, "a URL string", t, "the current value");
1015
+ return o !== "" && i !== "otlp" ? (a.report("config.invalid", `${e} needs serializer "${r}". ${ur[e]}`), "") : o;
973
1016
  }
974
- function tr(e, t, n, r, i) {
1017
+ function fr(e, t, n, r, i) {
975
1018
  let a = { ...n };
976
1019
  for (let o of Object.keys(n)) {
977
1020
  let s = t?.[o], c = n[o], l = r.ranges[o], u = r.choices?.[o], d = r.custom?.[o], f = c;
978
- d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f = H(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? f = V(`${e}.${o}`, s, c, i) : u ? f = B(`${e}.${o}`, s, u, String(c), i) : s === void 0 || typeof s == "string" ? f = s ?? c : z(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: f });
1021
+ d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f = V(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? f = B(`${e}.${o}`, s, c, i) : u ? f = z(`${e}.${o}`, s, u, String(c), i) : s === void 0 || typeof s == "string" ? f = s ?? c : R(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: f });
979
1022
  }
980
1023
  return a;
981
1024
  }
982
- function G(e, t, n) {
983
- let r = n ?? re, i = Object.fromEntries(Object.keys(pn).map((n) => [n, tr(n, e[n], r[n], pn[n], t)])), a = {
1025
+ function W(e, t, n) {
1026
+ let r = n ?? re, i = Object.fromEntries(Object.keys(wn).map((n) => [n, fr(n, e[n], r[n], wn[n], t)])), a = {
984
1027
  ...r,
985
1028
  ...e,
986
1029
  ...i,
987
- lockConfiguration: V("lockConfiguration", e.lockConfiguration, r.lockConfiguration, t),
988
- loggerCache: { maxEntries: Tn(e.loggerCache?.maxEntries, r.loggerCache.maxEntries, t) },
1030
+ lockConfiguration: B("lockConfiguration", e.lockConfiguration, r.lockConfiguration, t),
1031
+ loggerCache: { maxEntries: In(e.loggerCache?.maxEntries, r.loggerCache.maxEntries, t) },
989
1032
  securityContext: {
990
1033
  id: typeof e.securityContext?.id == "string" && e.securityContext.id || r.securityContext.id,
991
- isolation: V("securityContext.isolation", e.securityContext?.isolation, r.securityContext.isolation, t)
1034
+ isolation: B("securityContext.isolation", e.securityContext?.isolation, r.securityContext.isolation, t)
992
1035
  },
993
1036
  endpoint: e.endpoint === void 0 ? r.endpoint : e.endpoint,
994
- enabled: V("enabled", e.enabled, r.enabled, t),
995
- payloadMode: B("payloadMode", e.payloadMode, ["copy", "defer"], r.payloadMode, t),
996
- minLevel: Dn("minLevel", e.minLevel, r.minLevel, t),
997
- minLevels: On(e.minLevels, r.minLevels, t),
998
- processors: W("processors", e.processors, r.processors, "a list of functions", kn, t),
999
- compression: B("compression", e.compression, Zt, r.compression, t),
1000
- credentials: B("credentials", e.credentials, Qt, r.credentials, t),
1001
- headers: "headers" in e ? Rn(e.headers, r.headers, t) : r.headers,
1002
- storage: B("storage", e.storage, $t, r.storage, t),
1003
- identity: B("identity", e.identity, en, r.identity, t),
1004
- serializer: Bn(e.serializer, n?.serializer, t),
1005
- console: Wn(e.console, r.console, t),
1006
- sampling: Gn(e.sampling, r.sampling, t),
1007
- bus: Kn(e.bus, r.bus, t),
1008
- batching: En("batching", e.batching, r.batching, sn, t),
1009
- retention: Jn(e.retention, r.retention, t),
1010
- limits: En("limits", e.limits, r.limits, ln, t),
1011
- journey: qn(e.journey, r.journey, t),
1012
- capture: Xn(e.capture, r.capture, t)
1037
+ enabled: B("enabled", e.enabled, r.enabled, t),
1038
+ payloadMode: z("payloadMode", e.payloadMode, ["copy", "defer"], r.payloadMode, t),
1039
+ minLevel: Rn("minLevel", e.minLevel, r.minLevel, t),
1040
+ minLevels: zn(e.minLevels, r.minLevels, t),
1041
+ processors: U("processors", e.processors, r.processors, "a list of functions", Bn, t),
1042
+ compression: z("compression", e.compression, rn, r.compression, t),
1043
+ credentials: z("credentials", e.credentials, an, r.credentials, t),
1044
+ headers: "headers" in e ? Yn(e.headers, r.headers, t) : r.headers,
1045
+ storage: z("storage", e.storage, on, r.storage, t),
1046
+ identity: z("identity", e.identity, sn, r.identity, t),
1047
+ serializer: Zn(e.serializer, n?.serializer, t),
1048
+ console: tr(e.console, r.console, t),
1049
+ sampling: nr(e.sampling, r.sampling, t),
1050
+ bus: rr(e.bus, r.bus, t),
1051
+ batching: Ln("batching", e.batching, r.batching, pn, t),
1052
+ retention: ar(e.retention, r.retention, t),
1053
+ limits: Ln("limits", e.limits, r.limits, hn, t),
1054
+ journey: ir(e.journey, r.journey, t),
1055
+ capture: sr(e.capture, r.capture, t)
1013
1056
  };
1014
- for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] = er(n, e[n], r[n], a.serializer, t);
1015
- if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the value in force."), a.transportWorker = r.transportWorker), a.transportOnExit !== void 0 && typeof a.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), a.transportOnExit = r.transportOnExit), a.endpoint === "") a.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
1057
+ for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] = dr(n, e[n], r[n], a.serializer, t);
1058
+ if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the current value."), a.transportWorker = r.transportWorker), a.transportOnExit !== void 0 && typeof a.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), a.transportOnExit = r.transportOnExit), a.endpoint === "") a.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
1016
1059
  else if (a.endpoint !== null) try {
1017
1060
  new URL(a.endpoint);
1018
1061
  } catch (e) {
1019
- t.report("config.invalid", `endpoint is not a valid absolute URL: ${D(a.endpoint, !1)}.`, void 0, e);
1062
+ t.report("config.invalid", `endpoint is not a valid absolute URL: ${w(a.endpoint, !1)}.`, void 0, e);
1020
1063
  }
1021
1064
  for (let e of ["metricsEndpoint", "tracesEndpoint"]) a[e] !== "" && a.endpoint === null && !a.transport && t.report("config.invalid", `${e} needs endpoint or transport. The library sends nothing to ${e}.`);
1022
- a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${oe}'.`), oe);
1065
+ a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${Ee}'.`), Ee);
1023
1066
  let o = a.sampling.defaultRate;
1024
1067
  (typeof o != "number" || o < 0 || o > 1) && (t.report("config.invalid", `sampling.defaultRate must be 0..1. The value is ${String(o)}. The library uses 1.`), a.sampling.defaultRate = 1);
1025
1068
  let s = a.sampling.remoteMaxRate;
1026
- (typeof s != "number" || !(s >= 0 && s <= 1)) && (t.report("config.invalid", `sampling.remoteMaxRate must be 0..1. The value is ${String(s)}. The library uses 1.`), a.sampling.remoteMaxRate = 1);
1069
+ typeof s == "number" && s >= 0 && s <= 1 || (t.report("config.invalid", `sampling.remoteMaxRate must be 0..1. The value is ${String(s)}. The library uses 1.`), a.sampling.remoteMaxRate = 1);
1027
1070
  let c = Object.entries(a.sampling.rates);
1028
1071
  for (let [e, n] of c) (typeof n != "number" || n < 0 || n > 1) && (t.report("config.invalid", `sampling.rates["${e}"] must be 0..1. The value is ${String(n)}. The library uses 1.`), a.sampling.rates[e] = 1);
1029
- a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint);
1072
+ a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint && e !== n?.replay.endpoint);
1030
1073
  for (let e of [
1031
1074
  a.endpoint,
1032
1075
  a.metricsEndpoint,
1033
- a.tracesEndpoint
1076
+ a.tracesEndpoint,
1077
+ a.replay.endpoint
1034
1078
  ]) e && !a.capture.ignoreUrls.includes(e) && (a.capture.ignoreUrls = [...a.capture.ignoreUrls, e]);
1035
- return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform), nr(e, t), a;
1079
+ return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform), pr(e, t), a;
1036
1080
  }
1037
- function nr(e, t) {
1038
- let n = /* @__PURE__ */ new Set([...Object.keys(re), ...c]);
1081
+ function pr(e, t) {
1082
+ let n = /* @__PURE__ */ new Set([...Object.keys(re), ...ge]);
1039
1083
  for (let r of Object.keys(e)) n.has(r) || t.report("config.invalid", `The library ignores the unknown config key "${r}". Check the spelling.`);
1040
- for (let n of a) {
1084
+ for (let n of i) {
1041
1085
  let r = e[n];
1042
1086
  if (typeof r != "object" || !r) continue;
1043
- let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...ie[n]]);
1087
+ let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...Pe[n]]);
1044
1088
  for (let e of Object.keys(r)) i.has(e) || t.report("config.invalid", `The library ignores the unknown config key "${n}.${e}". Check the spelling.`);
1045
1089
  }
1046
1090
  }
1047
- function rr(e, t) {
1048
- for (let n of Object.keys(t)) a.includes(n) || Object.assign(e, { [n]: t[n] });
1049
- for (let n of a) Object.assign(e[n], t[n]);
1091
+ function mr(e, t) {
1092
+ for (let n of Object.keys(t)) i.includes(n) || Object.assign(e, { [n]: t[n] });
1093
+ for (let n of i) Object.assign(e[n], t[n]);
1050
1094
  }
1051
- //#endregion
1052
- //#region src/core/context.ts
1053
- var ir = class {
1095
+ // src/core/context.ts
1096
+ var hr = class {
1054
1097
  map = /* @__PURE__ */ new Map();
1055
1098
  set(e, t) {
1056
1099
  this.map.set(e, t);
@@ -1067,7 +1110,7 @@ var ir = class {
1067
1110
  getAll() {
1068
1111
  return Object.fromEntries(this.map);
1069
1112
  }
1070
- }, ar = class {
1113
+ }, gr = class {
1071
1114
  policy;
1072
1115
  kept = [];
1073
1116
  constructor(e) {
@@ -1086,7 +1129,7 @@ var ir = class {
1086
1129
  ...e,
1087
1130
  attributes: {
1088
1131
  ...e.attributes,
1089
- [Pe]: !0
1132
+ [Fe]: !0
1090
1133
  }
1091
1134
  }));
1092
1135
  }
@@ -1102,7 +1145,7 @@ var ir = class {
1102
1145
  clear() {
1103
1146
  this.kept = [];
1104
1147
  }
1105
- }, or = class {
1148
+ }, _r = class {
1106
1149
  handler;
1107
1150
  throttleMs;
1108
1151
  consoleFallback;
@@ -1121,27 +1164,29 @@ var ir = class {
1121
1164
  let n = (this.counters.get(e) ?? 0) + t;
1122
1165
  return this.counters.set(e, n), n;
1123
1166
  }
1124
- report(e, t, n, r) {
1167
+ report(e, t, r, i) {
1125
1168
  let a = this.count(e), o = Date.now();
1126
- if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return;
1169
+ if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return !1;
1127
1170
  this.lastEmitted.set(e, o);
1128
1171
  let s = {
1129
1172
  code: e,
1130
1173
  message: t,
1131
- detail: n,
1132
- cause: r,
1174
+ detail: r,
1175
+ cause: i,
1133
1176
  at: o,
1134
1177
  count: a
1135
1178
  }, { handler: c } = this;
1136
- if (c) try {
1137
- O(() => {
1179
+ if (!c) return !0;
1180
+ try {
1181
+ E(() => {
1138
1182
  c(s);
1139
1183
  });
1140
1184
  } catch {
1141
- this.count("handler.threw"), this.consoleFallback && typeof console < "u" && O(() => {
1142
- console.warn(`${i} The onDiagnostic handler threw an error.`);
1185
+ this.count("handler.threw"), this.consoleFallback && typeof console < "u" && E(() => {
1186
+ console.warn(`${n} The onDiagnostic handler threw an error.`);
1143
1187
  });
1144
1188
  }
1189
+ return !0;
1145
1190
  }
1146
1191
  guard(e, t, n) {
1147
1192
  try {
@@ -1163,12 +1208,11 @@ var ir = class {
1163
1208
  return Object.fromEntries(this.counters);
1164
1209
  }
1165
1210
  };
1166
- //#endregion
1167
- //#region src/core/drops.ts
1168
- function sr(e, t) {
1211
+ // src/core/drops.ts
1212
+ function vr(e, t) {
1169
1213
  e.length < 20 && !e.includes(t) && e.push(t);
1170
1214
  }
1171
- var cr = class {
1215
+ var yr = class {
1172
1216
  config;
1173
1217
  diagnostics;
1174
1218
  pending = /* @__PURE__ */ new Map();
@@ -1187,12 +1231,12 @@ var cr = class {
1187
1231
  journeyIds: [],
1188
1232
  actions: []
1189
1233
  }, this.pending.set(e, r)), r.records += t.length;
1190
- for (let e of n) sr(r.batchIds, e);
1234
+ for (let e of n) vr(r.batchIds, e);
1191
1235
  for (let e of t) {
1192
- let t = at(e, x);
1193
- typeof t == "string" && sr(r.journeyIds, t);
1194
- let n = it(e) ? e.body : void 0;
1195
- typeof n == "string" && sr(r.actions, n);
1236
+ let t = ut(e, S);
1237
+ typeof t == "string" && vr(r.journeyIds, t);
1238
+ let n = lt(e) ? e.body : void 0;
1239
+ typeof n == "string" && vr(r.actions, n);
1196
1240
  }
1197
1241
  this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
1198
1242
  this.flush();
@@ -1206,8 +1250,8 @@ var cr = class {
1206
1250
  if (t) {
1207
1251
  this.reporting = !0;
1208
1252
  for (let n of e) this.diagnostics.guard("handler.threw", "The onDrop hook threw an error.", () => {
1209
- rt(() => {
1210
- O(() => {
1253
+ ct(() => {
1254
+ E(() => {
1211
1255
  t(n);
1212
1256
  });
1213
1257
  });
@@ -1215,7 +1259,7 @@ var cr = class {
1215
1259
  this.reporting = !1;
1216
1260
  }
1217
1261
  }
1218
- }, lr = class {
1262
+ }, br = class {
1219
1263
  onDrop;
1220
1264
  held = [];
1221
1265
  actions = 0;
@@ -1229,10 +1273,10 @@ var cr = class {
1229
1273
  return this.held.length;
1230
1274
  }
1231
1275
  push(e) {
1232
- let t = it(e);
1276
+ let t = lt(e);
1233
1277
  if ((t ? this.actions : this.held.length - this.actions) < (t ? 2e3 : 500)) this.actions += +!!t;
1234
1278
  else {
1235
- let e = this.held.findIndex((e) => it(e) === t), [n] = this.held.splice(e, 1);
1279
+ let e = this.held.findIndex((e) => lt(e) === t), [n] = this.held.splice(e, 1);
1236
1280
  this.onDrop(n);
1237
1281
  }
1238
1282
  this.held.push(e);
@@ -1241,20 +1285,20 @@ var cr = class {
1241
1285
  let e = this.held;
1242
1286
  return this.held = [], this.actions = 0, e;
1243
1287
  }
1244
- }, ur = {
1288
+ }, xr = {
1245
1289
  name: "ui.measure.duration",
1246
1290
  kind: "histogram",
1247
1291
  unit: "ms",
1248
- boundaries: g
1249
- }, dr = {
1292
+ boundaries: v
1293
+ }, Sr = {
1250
1294
  name: "ui.measure.phase.duration",
1251
1295
  kind: "histogram",
1252
1296
  unit: "ms",
1253
- boundaries: g
1297
+ boundaries: v
1254
1298
  };
1255
- function fr(e, t, n, r) {
1299
+ function Cr(e, t, n, r) {
1256
1300
  let i = String(e), a = Date.now(), o = performance.now(), s, c = !1, l = (e) => a + e - o, u = (e, a) => {
1257
- s &&= (r.metric(dr, e - s.at, {
1301
+ s &&= (r.metric(Sr, e - s.at, {
1258
1302
  ...t,
1259
1303
  "measure.name": i,
1260
1304
  "measure.phase": s.name
@@ -1262,7 +1306,7 @@ function fr(e, t, n, r) {
1262
1306
  name: s.name,
1263
1307
  kind: "internal",
1264
1308
  traceId: n.traceId,
1265
- spanId: Wt(),
1309
+ spanId: Xt(),
1266
1310
  parentSpanId: n.spanId,
1267
1311
  startMs: l(s.at),
1268
1312
  endMs: l(e),
@@ -1288,7 +1332,7 @@ function fr(e, t, n, r) {
1288
1332
  ...t,
1289
1333
  "measure.outcome": e
1290
1334
  };
1291
- r.metric(ur, s - o, {
1335
+ r.metric(xr, s - o, {
1292
1336
  ...f,
1293
1337
  "measure.name": i
1294
1338
  }), n && r.span({
@@ -1303,13 +1347,12 @@ function fr(e, t, n, r) {
1303
1347
  }
1304
1348
  };
1305
1349
  }
1306
- //#endregion
1307
- //#region src/core/record.ts
1308
- var pr = "error.", mr = [
1309
- C,
1310
- x,
1311
- De
1312
- ], hr = {
1350
+ // src/core/record.ts
1351
+ var wr = "error.", Tr = [
1352
+ Le,
1353
+ S,
1354
+ Oe
1355
+ ], Er = {
1313
1356
  processor: {
1314
1357
  label: "A processor",
1315
1358
  code: "record.dropped_by_processor"
@@ -1318,21 +1361,21 @@ var pr = "error.", mr = [
1318
1361
  label: "The redact hook",
1319
1362
  code: "record.dropped_by_redact"
1320
1363
  }
1321
- }, gr = [
1364
+ }, Dr = [
1322
1365
  "metric.name",
1323
1366
  "metric.unit",
1324
1367
  "metric.type",
1325
1368
  "metric.value",
1326
1369
  ...Object.values(y),
1327
- ...Object.values(T)
1370
+ ...Object.values(_)
1328
1371
  ];
1329
- function _r(e) {
1330
- return Object.fromEntries(gr.filter((t) => t in e).map((t) => [t, e[t]]));
1372
+ function Or(e) {
1373
+ return Object.fromEntries(Dr.filter((t) => t in e).map((t) => [t, e[t]]));
1331
1374
  }
1332
- function K(e) {
1375
+ function G(e) {
1333
1376
  return e;
1334
1377
  }
1335
- var vr = class {
1378
+ var kr = class {
1336
1379
  deps;
1337
1380
  resourceCache = null;
1338
1381
  constructor(e) {
@@ -1341,12 +1384,12 @@ var vr = class {
1341
1384
  invalidateResource() {
1342
1385
  this.resourceCache = null;
1343
1386
  }
1344
- isEnabled(e, t, r) {
1345
- let { config: i } = this.deps;
1346
- if (!i.enabled) return !1;
1347
- if (r !== void 0 && n.includes(r)) return !0;
1348
- let a = this.deps.remote.sampling?.minLevelFor(t) ?? ut(t, i);
1349
- return w[e] >= w[a];
1387
+ isEnabled(e, t, n) {
1388
+ let { config: r } = this.deps;
1389
+ if (!r.enabled) return !1;
1390
+ if (n !== void 0 && Be.includes(n)) return !0;
1391
+ let i = this.deps.remote.sampling?.minLevelFor(t) ?? ht(t, r);
1392
+ return b[e] >= b[i];
1350
1393
  }
1351
1394
  keepForDebug(e) {
1352
1395
  let { config: t, debug: n } = this.deps;
@@ -1360,7 +1403,7 @@ var vr = class {
1360
1403
  record: null,
1361
1404
  dropped: "level"
1362
1405
  };
1363
- let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = dt({
1406
+ let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = gt({
1364
1407
  level: e.level,
1365
1408
  type: e.type,
1366
1409
  namespace: e.namespace,
@@ -1372,27 +1415,27 @@ var vr = class {
1372
1415
  record: null,
1373
1416
  dropped: "sampling"
1374
1417
  };
1375
- let f = o.next(), p = e.snapshot?.url ?? qe(r), m = n.metadata.pageUrl ? D(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
1418
+ let f = o.next(), p = e.snapshot?.url ?? Qe(r), m = n.metadata.pageUrl ? w(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
1376
1419
  try {
1377
- let t = k(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = k(this.provided(), s, r), i = k(e.scoped ?? {}, s, r), a = k(e.payload ?? {}, s, r);
1420
+ let t = D(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = D(this.provided(), s, r), i = D(e.scoped ?? {}, s, r), a = D(e.payload ?? {}, s, r);
1378
1421
  g = t.bytes + n.bytes + i.bytes + a.bytes, h = {
1379
- ...K(t.value),
1380
- ...K(n.value),
1381
- ...K(i.value),
1382
- ...K(a.value)
1422
+ ...G(t.value),
1423
+ ...G(n.value),
1424
+ ...G(i.value),
1425
+ ...G(a.value)
1383
1426
  };
1384
1427
  } catch (e) {
1385
- r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [Le]: !0 };
1428
+ r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [He]: !0 };
1386
1429
  }
1387
- Object.assign(h, e.fixed), h[ve] = e.type, h[ye] = f, h[ue] = e.namespace, h[C] = m, u && (h[x] = u.id, h[De] = u.name, u.parentId !== void 0 && (h[Ce] = u.parentId));
1388
- let _ = Ye(e.body, s.maxBodyChars);
1430
+ Object.assign(h, e.fixed), h[ve] = e.type, h[be] = f, h[fe] = e.namespace, h[Le] = m, u && (h[S] = u.id, h[Oe] = u.name, u.parentId !== void 0 && (h[Ce] = u.parentId));
1431
+ let _ = et(e.body, s.maxBodyChars);
1389
1432
  _ !== e.body && r.count("record.truncated");
1390
1433
  let v = {
1391
- timeUnixNano: e.snapshot?.timeUnixNano ?? Be(),
1434
+ timeUnixNano: e.snapshot?.timeUnixNano ?? Ge(),
1392
1435
  traceId: l.traceId,
1393
1436
  spanId: l.spanId,
1394
1437
  traceFlags: l.traceFlags,
1395
- severityNumber: fe[e.level],
1438
+ severityNumber: ee[e.level],
1396
1439
  severityText: e.level,
1397
1440
  body: _,
1398
1441
  attributes: h,
@@ -1413,19 +1456,19 @@ var vr = class {
1413
1456
  });
1414
1457
  let t = {
1415
1458
  [ve]: e.type,
1416
- [ye]: f,
1417
- [ue]: e.namespace,
1418
- [je]: !0,
1419
- [Te]: g
1459
+ [be]: f,
1460
+ [fe]: e.namespace,
1461
+ [Me]: !0,
1462
+ [De]: g
1420
1463
  };
1421
- for (let e of mr) e in v.attributes && (t[e] = v.attributes[e]);
1422
- for (let [e, n] of Object.entries(v.attributes)) e.startsWith(pr) && (t[e] = n);
1423
- let n = k(t, s, r).bytes;
1424
- n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n = k(t, s, r).bytes);
1425
- let i = v.attributes[b];
1464
+ for (let e of Tr) e in v.attributes && (t[e] = v.attributes[e]);
1465
+ for (let [e, n] of Object.entries(v.attributes)) e.startsWith(wr) && (t[e] = n);
1466
+ let n = D(t, s, r).bytes;
1467
+ n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n = D(t, s, r).bytes);
1468
+ let i = v.attributes[x];
1426
1469
  if (i !== void 0) {
1427
- let e = k(i, s, r).bytes;
1428
- n + e <= s.maxRecordBytes && (t[b] = i);
1470
+ let e = D(i, s, r).bytes;
1471
+ n + e <= s.maxRecordBytes && (t[x] = i);
1429
1472
  }
1430
1473
  Object.assign(t, e.fixed), v.attributes = t;
1431
1474
  }
@@ -1434,7 +1477,7 @@ var vr = class {
1434
1477
  redactForwarded(e) {
1435
1478
  let { redact: t } = this.deps.config;
1436
1479
  if (!t) return e;
1437
- let n = [[t, "redact"]], r = this.applyHooks(e, n, _r(e.attributes));
1480
+ let n = [[t, "redact"]], r = this.applyHooks(e, n, Or(e.attributes));
1438
1481
  return typeof r == "string" ? null : r.record;
1439
1482
  }
1440
1483
  applyHooks(e, t, n) {
@@ -1444,7 +1487,7 @@ var vr = class {
1444
1487
  if (typeof t == "string") return t;
1445
1488
  r = t;
1446
1489
  }
1447
- let { diagnostics: i, limits: a } = this.deps, o = k(r.attributes, a, i), s = K(o.value);
1490
+ let { diagnostics: i, limits: a } = this.deps, o = D(r.attributes, a, i), s = G(o.value);
1448
1491
  return Object.assign(s, n), {
1449
1492
  record: {
1450
1493
  ...r,
@@ -1454,7 +1497,7 @@ var vr = class {
1454
1497
  };
1455
1498
  }
1456
1499
  runHook(e, t, n) {
1457
- let { diagnostics: r } = this.deps, { label: i, code: a } = hr[t], o;
1500
+ let { diagnostics: r } = this.deps, { label: i, code: a } = Er[t], o;
1458
1501
  try {
1459
1502
  o = e(n);
1460
1503
  } catch (e) {
@@ -1462,9 +1505,9 @@ var vr = class {
1462
1505
  }
1463
1506
  if (o === null) return r.count(a), t;
1464
1507
  let s = o ?? n;
1465
- return ze(s) ? Ve(s.severityText) ? {
1508
+ return We(s) ? Ke(s.severityText) ? {
1466
1509
  ...s,
1467
- severityNumber: fe[s.severityText]
1510
+ severityNumber: ee[s.severityText]
1468
1511
  } : (r.report("record.dropped_malformed", `${i} set a severityText that is not a log level. The library dropped the record.`), "malformed") : s === n ? (r.report("record.dropped_malformed", `${i} changed the record to a shape that is not a record. The library dropped it.`), "malformed") : (r.report(a, `${i} returned a value that is not a record. The library dropped the record.`), t);
1469
1512
  }
1470
1513
  provided() {
@@ -1472,42 +1515,42 @@ var vr = class {
1472
1515
  if (!e) return {};
1473
1516
  let { diagnostics: t } = this.deps, n = t.guard("handler.threw", "The contextProvider threw an error. The record has no attributes from it.", () => {
1474
1517
  let t = e();
1475
- return t === void 0 ? {} : E(t) && typeof t.then != "function" ? t : null;
1518
+ return t === void 0 ? {} : C(t) && typeof t.then != "function" ? t : null;
1476
1519
  });
1477
1520
  return n === null && t.report("config.invalid", "contextProvider must return an object of attributes. The library ignores the value."), n ?? {};
1478
1521
  }
1479
1522
  resource() {
1480
1523
  if (this.resourceCache) return this.resourceCache;
1481
- let { config: t, identity: n, platform: r } = this.deps;
1524
+ let { config: e, identity: t, platform: n } = this.deps;
1482
1525
  return this.resourceCache = {
1483
- [Ae]: t.serviceName,
1484
- [be]: t.serviceVersion,
1485
- [e]: t.environment,
1486
- [Se]: h,
1487
- [Fe]: v,
1488
- [pe]: xe,
1489
- [ge]: r.platform,
1490
- [de]: n.sessionId,
1491
- [Me]: n.tabId,
1492
- [ne]: n.contextId,
1493
- ...t.metadata.userAgent ? { [ce]: r.userAgent } : {},
1494
- ...!t.metadata.openfin || r.openfinUuid === void 0 ? {} : { [we]: r.openfinUuid },
1495
- ...!t.metadata.openfin || r.openfinName === void 0 ? {} : { [Ne]: r.openfinName }
1526
+ [xe]: e.serviceName,
1527
+ [ye]: e.serviceVersion,
1528
+ [he]: e.environment,
1529
+ [Ve]: oe,
1530
+ [ne]: s,
1531
+ [pe]: ie,
1532
+ [_e]: n.platform,
1533
+ [ue]: t.sessionId,
1534
+ [Ue]: t.tabId,
1535
+ [Ie]: t.contextId,
1536
+ ...e.metadata.userAgent ? { [Se]: n.userAgent } : {},
1537
+ ...!e.metadata.openfin || n.openfinUuid === void 0 ? {} : { [we]: n.openfinUuid },
1538
+ ...!e.metadata.openfin || n.openfinName === void 0 ? {} : { [ke]: n.openfinName }
1496
1539
  }, this.resourceCache;
1497
1540
  }
1498
- }, yr = 1e3, br = {
1541
+ }, Ar = 1e3, jr = {
1499
1542
  start: "ui.start",
1500
1543
  interaction: "ui.interaction",
1501
1544
  navigation: "ui.navigation",
1502
1545
  explicit: "ui.trace",
1503
1546
  maxAge: "ui.trace"
1504
1547
  };
1505
- function xr(e) {
1506
- return `${String(Math.round(e * yr))}000`;
1548
+ function Mr(e) {
1549
+ return `${String(Math.round(e * Ar))}000`;
1507
1550
  }
1508
- function Sr(e) {
1551
+ function Nr(e) {
1509
1552
  return {
1510
- name: br[e.reason],
1553
+ name: jr[e.reason],
1511
1554
  kind: "internal",
1512
1555
  traceId: e.traceId,
1513
1556
  spanId: e.spanId,
@@ -1518,39 +1561,41 @@ function Sr(e) {
1518
1561
  attributes: {}
1519
1562
  };
1520
1563
  }
1521
- function Cr(e) {
1564
+ function Pr(e) {
1522
1565
  return {
1523
- [T.kind]: e.kind,
1524
- [T.parentId]: e.parentSpanId,
1525
- [T.start]: xr(e.startMs),
1526
- [T.end]: xr(e.endMs),
1527
- [T.status]: e.error ? "error" : "unset",
1566
+ [_.kind]: e.kind,
1567
+ [_.parentId]: e.parentSpanId,
1568
+ [_.start]: Mr(e.startMs),
1569
+ [_.end]: Mr(e.endMs),
1570
+ [_.status]: e.error ? "error" : "unset",
1528
1571
  ...e.link ? {
1529
- [T.linkTraceId]: e.link.traceId,
1530
- [T.linkSpanId]: e.link.spanId
1572
+ [_.linkTraceId]: e.link.traceId,
1573
+ [_.linkSpanId]: e.link.spanId
1531
1574
  } : {}
1532
1575
  };
1533
1576
  }
1534
- //#endregion
1535
- //#region src/core/runtime.ts
1536
- var wr = {
1537
- errors: async () => (await import("./errors-oyxrpHjY.js")).ErrorCapture,
1538
- network: async () => (await import("./network-CvkvYzRU.js")).NetworkCapture,
1539
- interactions: async () => (await import("./interactions-CqDNrtIR.js")).InteractionCapture,
1540
- webVitals: async () => (await import("./web-vitals-Bflr5jSA.js")).WebVitalsCapture,
1541
- longFrames: async () => (await import("./long-frames-BQef9rXR.js")).LongFrameCapture,
1542
- console: async () => (await import("./console-BX_0UCV7.js")).ConsoleCapture,
1543
- uncleanExit: async () => (await import("./unclean-exit-BYZ5yaSI.js")).UncleanExitCapture,
1544
- userTiming: async () => (await import("./user-timing-Di2ra5DB.js")).UserTimingCapture,
1545
- reports: async () => (await import("./reports-BOKyY3_A.js")).ReportCapture,
1546
- resourceTiming: async () => (await import("./resource-timing-BROnEJ0E.js")).ResourceTimingCapture,
1547
- lifecycle: async () => (await import("./lifecycle-BLC4VU7c.js")).LifecycleCapture
1548
- }, Tr = /* @__PURE__ */ new WeakMap(), Er = 0;
1549
- function Dr(e) {
1550
- let t = Tr.get(e);
1551
- return t === void 0 && (t = ++Er, Tr.set(e, t)), t;
1552
- }
1553
- var Or = Symbol.for(he), kr = Symbol.for(_e), Ar = ["batching", "retention"], jr = {
1577
+ // src/core/runtime.ts
1578
+ var Fr = {
1579
+ errors: async () => (await import("./errors-D6bwgJtO.js")).ErrorCapture,
1580
+ network: async () => (await import("./network-C7SkLf4v.js")).NetworkCapture,
1581
+ interactions: async () => (await import("./interactions-B6z2I4tU.js")).InteractionCapture,
1582
+ webVitals: async () => (await import("./web-vitals-CsGCWnUr.js")).WebVitalsCapture,
1583
+ longFrames: async () => (await import("./long-frames-430_85Da.js")).LongFrameCapture,
1584
+ console: async () => (await import("./console-cwgHKXvM.js")).ConsoleCapture,
1585
+ uncleanExit: async () => (await import("./unclean-exit-Cob_jyTv.js")).UncleanExitCapture,
1586
+ userTiming: async () => (await import("./user-timing-DgHubxCI.js")).UserTimingCapture,
1587
+ reports: async () => (await import("./reports-BuXekPOS.js")).ReportCapture,
1588
+ resourceTiming: async () => (await import("./resource-timing-CXGHwFRD.js")).ResourceTimingCapture,
1589
+ lifecycle: async () => (await import("./lifecycle-CZ6RRXc6.js")).LifecycleCapture,
1590
+ framePhases: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePhasesCapture,
1591
+ framePacing: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePacingCapture,
1592
+ replay: async () => (await import("./replay-0zAJv9T3.js")).ReplayCapture
1593
+ }, Ir = /* @__PURE__ */ new WeakMap(), Lr = 0;
1594
+ function K(e) {
1595
+ let t = Ir.get(e);
1596
+ return t === void 0 && (t = ++Lr, Ir.set(e, t)), t;
1597
+ }
1598
+ var Rr = Symbol.for(e), zr = Symbol.for(ze), Br = ["batching", "retention"], Vr = {
1554
1599
  endpoint: null,
1555
1600
  metricsEndpoint: "",
1556
1601
  tracesEndpoint: "",
@@ -1559,34 +1604,34 @@ var Or = Symbol.for(he), kr = Symbol.for(_e), Ar = ["batching", "retention"], jr
1559
1604
  transport: void 0,
1560
1605
  transportOnExit: void 0,
1561
1606
  transportWorker: void 0
1562
- }, Mr = Object.keys(jr), Nr = /* @__PURE__ */ new Set([
1607
+ }, Hr = Object.keys(Vr), Ur = /* @__PURE__ */ new Set([
1563
1608
  "bus.role_resolved",
1564
1609
  "config.reconfigured",
1565
1610
  "security.rotated",
1566
1611
  "journey.adopted",
1567
1612
  "journey.expired"
1568
1613
  ]);
1569
- function Pr(e) {
1614
+ function Wr(e) {
1570
1615
  return JSON.stringify({
1571
1616
  ...e,
1572
- urlTransform: e.urlTransform ? Dr(e.urlTransform) : void 0,
1617
+ urlTransform: e.urlTransform ? K(e.urlTransform) : void 0,
1573
1618
  webVitalsLoader: e.webVitalsLoader !== void 0,
1574
1619
  ignoreUrls: e.ignoreUrls.map(String),
1575
1620
  propagateTraceHeaderTo: e.propagateTraceHeaderTo.map(String),
1576
1621
  userTimingInclude: e.userTimingInclude.map(String),
1577
- plugins: e.plugins.map(Dr)
1622
+ plugins: e.plugins.map(K)
1578
1623
  });
1579
1624
  }
1580
- function Fr(e) {
1581
- if (!E(e)) return e;
1625
+ function Gr(e) {
1626
+ if (!C(e)) return e;
1582
1627
  let t = { ...e };
1583
1628
  for (let e of ["url", "endpoint"]) {
1584
1629
  let n = t[e];
1585
- typeof n == "string" && (t[e] = D(n, !1));
1630
+ typeof n == "string" && (t[e] = w(n, !1));
1586
1631
  }
1587
1632
  return t;
1588
1633
  }
1589
- function Ir(e) {
1634
+ function Kr(e) {
1590
1635
  return {
1591
1636
  ...e,
1592
1637
  endpoint: null,
@@ -1601,14 +1646,15 @@ function Ir(e) {
1601
1646
  }
1602
1647
  };
1603
1648
  }
1604
- function Lr(e) {
1649
+ function qr(e) {
1605
1650
  return !!e.endpoint || !!e.metricsEndpoint || !!e.tracesEndpoint || e.transport !== void 0 || e.transportWorker !== void 0;
1606
1651
  }
1607
- function Rr(e) {
1608
- return e.sdkVersion === v;
1652
+ function Jr(e) {
1653
+ return e.sdkVersion === s;
1609
1654
  }
1610
1655
  var q = class e {
1611
1656
  rotating = !1;
1657
+ profilerOn = !1;
1612
1658
  closingContext = !1;
1613
1659
  mismatchVersion = null;
1614
1660
  contextMismatch = !1;
@@ -1616,8 +1662,8 @@ var q = class e {
1616
1662
  memoryStorage;
1617
1663
  storagePersistence = "off";
1618
1664
  recordingDiagnostic = !1;
1619
- diagnosticLogger = new F(() => this, Oe);
1620
- debugBuffer = new ar(() => this.config.debugBuffer);
1665
+ diagnosticLogger = new N(() => this, Ae);
1666
+ debugBuffer = new gr(() => this.config.debugBuffer);
1621
1667
  explicitSecurityContext;
1622
1668
  ownerAdopted = !1;
1623
1669
  isRotating() {
@@ -1627,7 +1673,7 @@ var q = class e {
1627
1673
  typeof e == "boolean" && (this.config.lockConfiguration = e);
1628
1674
  }
1629
1675
  static local = null;
1630
- sdkVersion = v;
1676
+ sdkVersion = s;
1631
1677
  diagnostics;
1632
1678
  config;
1633
1679
  platform;
@@ -1635,10 +1681,10 @@ var q = class e {
1635
1681
  stores;
1636
1682
  identityBuiltAs;
1637
1683
  sessionTouch;
1638
- context = new ir();
1684
+ context = new hr();
1639
1685
  breadcrumbs;
1640
1686
  tracing;
1641
- sequence = new Rt();
1687
+ sequence = new Wt();
1642
1688
  journey;
1643
1689
  builder;
1644
1690
  remote = {
@@ -1648,8 +1694,12 @@ var q = class e {
1648
1694
  }
1649
1695
  };
1650
1696
  identityEpoch = 0;
1697
+ errorHook;
1698
+ replayConsent;
1699
+ replay;
1651
1700
  remoteCaptureTimer;
1652
1701
  installedCaptureKey = "";
1702
+ replayBuiltKey = "";
1653
1703
  console;
1654
1704
  drops;
1655
1705
  meter;
@@ -1659,7 +1709,7 @@ var q = class e {
1659
1709
  storageBuiltAs;
1660
1710
  sender;
1661
1711
  senderLoad;
1662
- pendingRecords = new lr((e) => {
1712
+ pendingRecords = new br((e) => {
1663
1713
  this.dropHeld(e);
1664
1714
  });
1665
1715
  captures = [];
@@ -1671,7 +1721,7 @@ var q = class e {
1671
1721
  uncleanExit: !1,
1672
1722
  userTiming: !1
1673
1723
  };
1674
- bootBuffer = new lr((e) => {
1724
+ bootBuffer = new br((e) => {
1675
1725
  this.dropHeld(e);
1676
1726
  });
1677
1727
  forwardBuffer = [];
@@ -1687,23 +1737,23 @@ var q = class e {
1687
1737
  degraded;
1688
1738
  serverReported = !1;
1689
1739
  onPageHide = () => {
1690
- N(this), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1740
+ j(this), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1691
1741
  };
1692
1742
  constructor(e, t = !1) {
1693
- this.diagnostics = new or(e.onDiagnostic), this.platform = Ke(this.diagnostics), this.degraded = t || this.onServer(), this.config = G(this.allowed(e), this.diagnostics), this.explicitSecurityContext = !!e.securityContext?.id, this.config.securityContext.id ||= A(this.diagnostics), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" || this.onServer() ? et() : nt, this.identity = tt(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new Qe(this.diagnostics, this.stores, this.config.correlation.sessionTouchMs, this.config.correlation.sessionIdleMs), this.breadcrumbs = new Yt(this.config.capturePolicy.breadcrumbs);
1694
- let n = (e) => lt(e, this.config.sampling.defaultRate);
1695
- this.tracing = new Jt(this.diagnostics, this.config.correlation.traceMaxAgeMs || Infinity, this.config.otelLoader, {
1743
+ this.diagnostics = new _r(e.onDiagnostic), this.platform = Ze(this.diagnostics), this.degraded = t || this.onServer(), this.config = W(this.allowed(e), this.diagnostics), this.explicitSecurityContext = !!e.securityContext?.id, this.config.securityContext.id ||= O(this.diagnostics), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" || this.onServer() ? at() : st, this.identity = ot(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new rt(this.diagnostics, this.stores, this.config.correlation.sessionTouchMs, this.config.correlation.sessionIdleMs), this.breadcrumbs = new tn(this.config.capturePolicy.breadcrumbs);
1744
+ let n = (e) => mt(e, this.config.sampling.defaultRate);
1745
+ this.tracing = new en(this.diagnostics, this.config.correlation.traceMaxAgeMs || Infinity, this.config.otelLoader, {
1696
1746
  enabled: () => this.config.tracesEndpoint !== "",
1697
1747
  keeps: n,
1698
1748
  onEnd: (e) => {
1699
- n(e.traceId) && this.recordSpan(Sr(e));
1749
+ n(e.traceId) && this.recordSpan(Nr(e));
1700
1750
  }
1701
- }), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new Lt(this.config.console, this.diagnostics, this.limits), this.drops = new cr(this.config, this.diagnostics), this.journeyOptions = {
1702
- ...st,
1751
+ }), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new Ut(this.config.console, this.diagnostics, this.limits), this.drops = new yr(this.config, this.diagnostics), this.journeyOptions = {
1752
+ ...ft,
1703
1753
  maxAgeMs: this.config.journey.maxAgeMs
1704
- }, this.journey = new ot(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1754
+ }, this.journey = new dt(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1705
1755
  this.bus?.broadcastJourney(e);
1706
- }, this.stores), this.builder = new vr({
1756
+ }, this.stores), this.builder = new kr({
1707
1757
  remote: this.remote,
1708
1758
  config: this.config,
1709
1759
  limits: this.limits,
@@ -1715,9 +1765,9 @@ var q = class e {
1715
1765
  identity: this.identity,
1716
1766
  platform: this.platform,
1717
1767
  debug: this.debugBuffer
1718
- }), this.meter = new Ft(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1768
+ }), this.meter = new Vt(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
1719
1769
  this.emitPoint(e, t, n);
1720
- }, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler());
1770
+ }, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler()), this.syncProfiler();
1721
1771
  }
1722
1772
  diagnosticHandler() {
1723
1773
  return this.config.diagnostics.records === !1 ? this.config.onDiagnostic : (e) => {
@@ -1729,10 +1779,10 @@ var q = class e {
1729
1779
  if ((t === !0 || t !== !1 && t.includes(e.code)) && !this.recordingDiagnostic) {
1730
1780
  this.recordingDiagnostic = !0;
1731
1781
  try {
1732
- (Nr.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1782
+ (Ur.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1733
1783
  "diagnostic.code": e.code,
1734
1784
  "diagnostic.count": e.count,
1735
- "diagnostic.detail": Fr(e.detail)
1785
+ "diagnostic.detail": Gr(e.detail)
1736
1786
  });
1737
1787
  } finally {
1738
1788
  this.recordingDiagnostic = !1;
@@ -1744,11 +1794,11 @@ var q = class e {
1744
1794
  let n = {
1745
1795
  t: Date.now(),
1746
1796
  category: "custom",
1747
- message: Ye(String(e), this.limits.maxBodyChars)
1797
+ message: et(String(e), this.limits.maxBodyChars)
1748
1798
  };
1749
1799
  if (t !== void 0) {
1750
- let e = Xe(t, this.limits, this.diagnostics);
1751
- n.data = E(e) ? e : { value: e };
1800
+ let e = tt(t, this.limits, this.diagnostics);
1801
+ n.data = C(e) ? e : { value: e };
1752
1802
  }
1753
1803
  this.breadcrumbs.push(n);
1754
1804
  });
@@ -1757,8 +1807,8 @@ var q = class e {
1757
1807
  !this.destroyed && !this.rotating && this.meter.record(e, t, n);
1758
1808
  }
1759
1809
  startMeasure(e, t) {
1760
- let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n);
1761
- return fr(e, this.diagnostics.guard("record.sanitize_failed", "The library could not read the attributes of the measure.", () => ({ ...t })) ?? {}, this.tracing.request().span, {
1810
+ let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n), i = this.diagnostics.guard("record.sanitize_failed", "The library could not read the attributes of the measure.", () => ({ ...t }));
1811
+ return Cr(this.diagnostics.guard("record.sanitize_failed", "The library could not read the name of the measure.", () => `${e}`) ?? "", i ?? {}, this.tracing.request().span, {
1762
1812
  metric: (e, t, n) => {
1763
1813
  r() && this.recordMetric(e, t, n);
1764
1814
  },
@@ -1773,9 +1823,9 @@ var q = class e {
1773
1823
  level: "INFO",
1774
1824
  type: "span",
1775
1825
  body: e.name,
1776
- namespace: u,
1826
+ namespace: f,
1777
1827
  payload: e.attributes,
1778
- fixed: Cr(e),
1828
+ fixed: Pr(e),
1779
1829
  trace: {
1780
1830
  traceId: e.traceId,
1781
1831
  spanId: e.spanId,
@@ -1789,13 +1839,49 @@ var q = class e {
1789
1839
  level: "INFO",
1790
1840
  type: "metric",
1791
1841
  body: e,
1792
- namespace: te,
1842
+ namespace: a,
1793
1843
  payload: t,
1794
1844
  fixed: n,
1795
1845
  aggregated: !0
1796
1846
  });
1797
1847
  this.emit(r);
1798
1848
  }
1849
+ syncProfiler() {
1850
+ let { enabled: e } = this.config.profiler;
1851
+ if (e === this.profilerOn) return;
1852
+ this.profilerOn = e;
1853
+ let t = T();
1854
+ if (!e) {
1855
+ t.collect(!1), t.detach();
1856
+ return;
1857
+ }
1858
+ let n = {
1859
+ capacity: this.config.profiler.maxProbes,
1860
+ intervalMs: () => this.config.profiler.flushIntervalMs,
1861
+ emit: (e, t, n) => {
1862
+ this.emitPoint(e, t, n);
1863
+ },
1864
+ diagnostics: this.diagnostics,
1865
+ ready: () => !this.rotating || this.closingContext,
1866
+ outlier: (e, t) => {
1867
+ this.breadcrumbs.push({
1868
+ t: Date.now(),
1869
+ category: "profile",
1870
+ message: `${e} ${String(Math.round(t))} ms`
1871
+ });
1872
+ }
1873
+ };
1874
+ t.attach(n);
1875
+ }
1876
+ setReplay(e) {
1877
+ this.replayConsent = e, e ? this.replay?.start() : this.replay?.stop();
1878
+ }
1879
+ collectPoints() {
1880
+ this.meter.collect(), this.profilerOn && T().collect(!1);
1881
+ }
1882
+ advanceIdentity() {
1883
+ this.identityEpoch++, this.profilerOn && this.config.securityContext.isolation && T().reset();
1884
+ }
1799
1885
  busCanAccept = (e, t) => this.bus?.isRegistered(e, t) ?? !1;
1800
1886
  busAccept = (e, t, n) => {
1801
1887
  this.destroyed || this.ensureBus().then((r) => {
@@ -1805,19 +1891,19 @@ var q = class e {
1805
1891
  });
1806
1892
  };
1807
1893
  static pinned() {
1808
- return globalThis[Or] ?? null;
1894
+ return globalThis[Rr] ?? null;
1809
1895
  }
1810
1896
  static current() {
1811
1897
  let t = e.local;
1812
1898
  if (t) return t.destroyed ? null : t;
1813
1899
  let n = e.pinned();
1814
- return n && Rr(n) ? n : null;
1900
+ return n && Jr(n) ? n : null;
1815
1901
  }
1816
1902
  static stopped() {
1817
1903
  let t = e.local;
1818
1904
  if (t?.destroyed) return t;
1819
- let n = globalThis[kr];
1820
- return n && Rr(n) ? n : null;
1905
+ let n = globalThis[zr];
1906
+ return n && Jr(n) ? n : null;
1821
1907
  }
1822
1908
  isDestroyed() {
1823
1909
  return this.destroyed;
@@ -1828,19 +1914,19 @@ var q = class e {
1828
1914
  e.local = null;
1829
1915
  let i = e.pinned();
1830
1916
  if (i) {
1831
- if (!Rr(i)) return e.startDegraded(t, i.sdkVersion);
1917
+ if (!Jr(i)) return e.startDegraded(t, i.sdkVersion);
1832
1918
  if (!i.destroyed) return i.reconfigure(t), i;
1833
1919
  }
1834
1920
  let a = new e(t);
1835
- return a.tunablesLocked = !n, globalThis[Or] = a, Reflect.deleteProperty(globalThis, kr), a.init(), a;
1921
+ return a.tunablesLocked = !n, globalThis[Rr] = a, Reflect.deleteProperty(globalThis, zr), a.init(), a;
1836
1922
  }
1837
1923
  static startDegraded(t, n) {
1838
1924
  let r = new e(t, !0);
1839
1925
  e.local = r;
1840
1926
  let i = typeof n == "string" ? n : "before 0.9.0";
1841
- return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${v}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1927
+ return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${s}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1842
1928
  found: i,
1843
- own: v
1929
+ own: s
1844
1930
  }), r.init(), r;
1845
1931
  }
1846
1932
  reconfigure(e) {
@@ -1849,34 +1935,34 @@ var q = class e {
1849
1935
  return;
1850
1936
  }
1851
1937
  if (this.config.lockConfiguration) {
1852
- let t = G(e, this.diagnostics, this.config);
1938
+ let t = W(e, this.diagnostics, this.config);
1853
1939
  J(this.config, t) || this.diagnostics.report("config.locked", "Runtime configuration is locked. Use setConfigurationLocked(false) to unlock it explicitly.");
1854
1940
  return;
1855
1941
  }
1856
- N(this);
1942
+ j(this);
1857
1943
  let t = this.keepDestination(this.keepRouting(this.allowed(e)));
1858
1944
  !this.tunablesLocked && t.securityContext?.id && (this.explicitSecurityContext = !0);
1859
1945
  for (let e of ["correlation", "persistence"]) (e !== "persistence" || this.tunablesLocked || this.senderLoad !== void 0) && t[e] && !J({
1860
1946
  ...this.config[e],
1861
1947
  ...t[e]
1862
1948
  }, this.config[e]) && (this.diagnostics.report("config.invalid", `${e} cannot change after startup.`), Object.assign(t, { [e]: this.config[e] }));
1863
- let n = G(t, this.diagnostics, this.config);
1949
+ let n = W(t, this.diagnostics, this.config);
1864
1950
  this.keepStartupTunables(n);
1865
1951
  let { redact: r, processors: i } = this.config;
1866
- rr(this.config, n), (this.config.redact !== r || this.config.processors !== i) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.capturePolicy.breadcrumbs), this.diagnostics.setHandler(this.diagnosticHandler()), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1952
+ mr(this.config, n), (this.config.redact !== r || this.config.processors !== i) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.capturePolicy.breadcrumbs), this.diagnostics.setHandler(this.diagnosticHandler()), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.syncProfiler(), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1867
1953
  }
1868
1954
  onServer() {
1869
1955
  return this.platform.platform === "node";
1870
1956
  }
1871
1957
  allowed(e) {
1872
- return this.degraded ? (this.onServer() && !this.serverReported && Lr(e) && (this.serverReported = !0, this.diagnostics.report("config.invalid", "The library runs console-only on Node. It sends no record and installs no capture. It ignores endpoint, metricsEndpoint, tracesEndpoint, transport and transportWorker.")), Ir(e)) : e;
1958
+ return this.degraded ? (this.onServer() && !this.serverReported && qr(e) && (this.serverReported = !0, this.diagnostics.report("config.invalid", "The library runs console-only on Node. It sends no record and installs no capture. It ignores endpoint, metricsEndpoint, tracesEndpoint, transport and transportWorker.")), Kr(e)) : e;
1873
1959
  }
1874
1960
  keepRouting(e) {
1875
1961
  if (!this.tunablesLocked || this.degraded || !this.config.securityContext.isolation) return e;
1876
- let t = G(e, new or(), this.config), n = Mr.filter((e) => !J(t[e], this.config[e]));
1962
+ let t = W(e, new _r(), this.config), n = Hr.filter((e) => !J(t[e], this.config[e]));
1877
1963
  if (t.securityContext.id !== this.config.securityContext.id && n.push("securityContext.id"), n.length === 0) return e;
1878
1964
  let r = { ...e };
1879
- for (let e of Mr) n.includes(e) && Reflect.deleteProperty(r, e);
1965
+ for (let e of Hr) n.includes(e) && Reflect.deleteProperty(r, e);
1880
1966
  if (n.includes("securityContext.id")) {
1881
1967
  let t = { ...e.securityContext };
1882
1968
  Reflect.deleteProperty(t, "id"), r.securityContext = t;
@@ -1884,16 +1970,18 @@ var q = class e {
1884
1970
  return this.diagnostics.report("config.invalid", `Isolation refuses changes to ${n.join(", ")}. Use rotateSecurityContext() for these changes. To permit them, set securityContext.isolation: false in a separate configure() call. The other settings apply.`), r;
1885
1971
  }
1886
1972
  keepStartupTunables(e) {
1887
- if (this.senderLoad !== void 0 && this.keepSections(e, Ar), !this.tunablesLocked) {
1973
+ if (this.senderLoad !== void 0 && this.keepSections(e, Br), !this.tunablesLocked) {
1888
1974
  this.tunablesLocked = !0, Object.assign(this.limits, e.limits), this.journeyOptions.maxAgeMs = e.journey.maxAgeMs;
1889
1975
  return;
1890
1976
  }
1891
1977
  this.keepSections(e, ["limits"]);
1892
1978
  let { maxAgeMs: t } = this.config.journey;
1893
1979
  e.journey.maxAgeMs !== t && (this.diagnostics.report("config.invalid", `journey.maxAgeMs cannot change after startup. It stays ${String(t)}.`, { requested: e.journey.maxAgeMs }), e.journey.maxAgeMs = t);
1980
+ let { maxProbes: n } = this.config.profiler;
1981
+ e.profiler.maxProbes !== n && (this.diagnostics.report("config.invalid", `profiler.maxProbes cannot change after startup. It stays ${String(n)}.`, { requested: e.profiler.maxProbes }), e.profiler.maxProbes = n);
1894
1982
  }
1895
1983
  keepSections(e, t) {
1896
- for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The values in force stay.`, { requested: e[n] }), Object.assign(e, { [n]: this.config[n] }));
1984
+ for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The current values stay.`, { requested: e[n] }), Object.assign(e, { [n]: this.config[n] }));
1897
1985
  }
1898
1986
  keepBuiltStorage() {
1899
1987
  let e = this.storageBuiltAs;
@@ -1902,8 +1990,8 @@ var q = class e {
1902
1990
  keepDestination(e) {
1903
1991
  if (this.senderLoad === void 0) return e;
1904
1992
  let t = e;
1905
- for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The transport in force stays.`), t = { ...t }, Reflect.deleteProperty(t, n));
1906
- return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The endpoint in force stays."), t = {
1993
+ for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The current transport stays.`), t = { ...t }, Reflect.deleteProperty(t, n));
1994
+ return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The current endpoint stays."), t = {
1907
1995
  ...t,
1908
1996
  endpoint: void 0
1909
1997
  }), t;
@@ -1944,22 +2032,22 @@ var q = class e {
1944
2032
  }
1945
2033
  async buildBus() {
1946
2034
  try {
1947
- let { Bus: e } = await import("./bus-DKfBaica.js");
2035
+ let { Bus: e } = await import("./bus-ecxUNTja.js");
1948
2036
  if (this.destroyed) return null;
1949
2037
  let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
1950
2038
  onSecurityContext: (e) => {
1951
2039
  if (this.explicitSecurityContext && this.config.securityContext.id !== e) return this.contextMismatch = !0, this.diagnostics.report("security.context_mismatch", "The configured security context differs from the upstream owner."), !1;
1952
2040
  if (this.contextMismatch = !1, this.config.securityContext.id !== e) {
1953
2041
  if (this.ownerAdopted) {
1954
- N(this), this.drops.add("security_context", [
2042
+ j(this), this.drops.add("security_context", [
1955
2043
  ...this.bootBuffer.take(),
1956
2044
  ...this.pendingRecords.take(),
1957
2045
  ...this.forwardBuffer
1958
2046
  ]), this.forwardBuffer = [], this.context.clear(), this.breadcrumbs.clear();
1959
2047
  let e = this.rotating;
1960
- this.rotating = !0, this.meter.collect();
2048
+ this.rotating = !0, this.collectPoints(), this.profilerOn && T().reset();
1961
2049
  let t = this.sessionTouch.stored();
1962
- this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : A(this.diagnostics)), this.rotating = e, this.identityEpoch++, this.remote.sampling = null, this.refreshCaptures();
2050
+ this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : O(this.diagnostics)), this.rotating = e, this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures();
1963
2051
  }
1964
2052
  this.config.securityContext.id = e;
1965
2053
  }
@@ -1997,7 +2085,7 @@ var q = class e {
1997
2085
  async buildSender() {
1998
2086
  this.storageBuiltAs = this.config.storage;
1999
2087
  try {
2000
- let { Sender: e } = await import("./sender-BkAVt-Rq.js"), t = this.destroyed ? null : await e.create({
2088
+ let { Sender: e } = await import("./sender-15zEsZpr.js"), t = this.destroyed ? null : await e.create({
2001
2089
  storage: this.memoryStorage,
2002
2090
  onStorage: (e) => {
2003
2091
  e.name === "memory" && (this.memoryStorage = e);
@@ -2011,7 +2099,7 @@ var q = class e {
2011
2099
  onLoss: this.reportLoss,
2012
2100
  remote: this.remote,
2013
2101
  beforeExit: () => {
2014
- N(this), this.meter.collect(), this.tracing.end();
2102
+ j(this), this.collectPoints(), this.tracing.end();
2015
2103
  }
2016
2104
  });
2017
2105
  if (!t || this.destroyed) {
@@ -2029,11 +2117,35 @@ var q = class e {
2029
2117
  let e = this.remote.sampling?.wire();
2030
2118
  e && (this.remoteCaptureTimer = setTimeout(() => {
2031
2119
  this.refreshCaptures();
2032
- }, e.ttlMs), Ge(this.remoteCaptureTimer)), Pr(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
2120
+ }, e.ttlMs), Xe(this.remoteCaptureTimer)), this.captureState(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
2121
+ }
2122
+ captureState(e) {
2123
+ let { enabled: t, framePhases: n, framePacing: r } = this.config.profiler;
2124
+ return `${Wr(e)}${String(t && n)}${String(t && r)}${this.replayState(e)}`;
2125
+ }
2126
+ replayState(e) {
2127
+ let { replay: t } = this.config;
2128
+ return t.enabled ? JSON.stringify([
2129
+ t.loader && K(t.loader),
2130
+ t.onSegment && K(t.onSegment),
2131
+ K(t.recordOptions),
2132
+ t.endpoint,
2133
+ t.requireConsent,
2134
+ t.mode,
2135
+ t.maskText,
2136
+ t.maskInputs,
2137
+ t.maskSelectors,
2138
+ t.blockSelectors,
2139
+ t.recordCanvas,
2140
+ t.bufferMs,
2141
+ t.plugins.map(K),
2142
+ e.fullUrls,
2143
+ e.ignoreUrls.map(String)
2144
+ ]) : "";
2033
2145
  }
2034
2146
  effectiveCapture() {
2035
2147
  let e = { ...this.config.capture }, t = this.remote.sampling?.current()?.capture;
2036
- for (let n of ke) {
2148
+ for (let n of Te) {
2037
2149
  let r = t?.[n];
2038
2150
  if (e.remoteToggles.includes(n) && r !== void 0) {
2039
2151
  if (r && typeof e[n] == "object") continue;
@@ -2045,19 +2157,21 @@ var q = class e {
2045
2157
  async installCaptures() {
2046
2158
  if (this.degraded) return;
2047
2159
  let e = ++this.captureGeneration, t = this.effectiveCapture();
2048
- this.installedCaptureKey = Pr(t);
2049
- let n = [];
2050
- (t.errors || t.rejections || t.resourceErrors) && n.push("errors"), (t.fetch || t.xhr) && n.push("network"), (t.interactions || t.navigation) && n.push("interactions"), t.webVitals && n.push("webVitals"), t.longFrames && n.push("longFrames"), (Array.isArray(t.console) ? t.console.length > 0 : t.console) && n.push("console"), t.uncleanExit && n.push("uncleanExit"), t.userTiming && n.push("userTiming"), t.reports && n.push("reports"), t.resourceTiming && n.push("resourceTiming"), t.lifecycle && n.push("lifecycle");
2051
- let [r, i] = await Promise.all([Promise.all(n.map((e) => this.loadCapture(e))), t.webSocket ? this.loadWebSocket() : void 0]);
2160
+ this.installedCaptureKey = this.captureState(t);
2161
+ let n = this.replayState(t);
2162
+ n !== this.replayBuiltKey && (this.replayBuiltKey = "");
2163
+ let r = n !== "" && n === this.replayBuiltKey ? this.replay : void 0, i = [], { profiler: a } = this.config;
2164
+ (t.errors || t.rejections || t.resourceErrors) && i.push("errors"), (t.fetch || t.xhr) && i.push("network"), (t.interactions || t.navigation) && i.push("interactions"), t.webVitals && i.push("webVitals"), t.longFrames && i.push("longFrames"), (Array.isArray(t.console) ? t.console.length > 0 : t.console) && i.push("console"), t.uncleanExit && i.push("uncleanExit"), t.userTiming && i.push("userTiming"), t.reports && i.push("reports"), t.resourceTiming && i.push("resourceTiming"), t.lifecycle && i.push("lifecycle"), a.enabled && a.framePhases && i.push("framePhases"), a.enabled && a.framePacing && i.push("framePacing"), this.config.replay.enabled && !r && i.push("replay");
2165
+ let [o, s] = await Promise.all([Promise.all(i.map((e) => this.loadCapture(e))), t.webSocket ? this.loadWebSocket() : void 0]);
2052
2166
  if (e !== this.captureGeneration || this.destroyed) return;
2053
- this.uninstallCaptures();
2054
- let a = {
2167
+ this.uninstallCaptures(r);
2168
+ let c = {
2055
2169
  isActive: () => !this.destroyed && !this.rotating,
2056
2170
  config: Object.assign(Object.create(this.config), { capture: t }),
2057
2171
  diagnostics: this.diagnostics,
2058
2172
  breadcrumbs: this.breadcrumbs,
2059
2173
  tracing: this.tracing,
2060
- logger: new F(() => this, _),
2174
+ logger: new N(() => this, g),
2061
2175
  once: this.captureOnce,
2062
2176
  recordMetric: (e, t, n) => {
2063
2177
  this.recordMetric(e, t, n);
@@ -2065,40 +2179,54 @@ var q = class e {
2065
2179
  recordSpan: (e) => {
2066
2180
  this.recordSpan(e);
2067
2181
  },
2068
- sessionId: () => this.identity.sessionId
2182
+ sessionId: () => this.identity.sessionId,
2183
+ onError: (e) => {
2184
+ this.errorHook = e;
2185
+ },
2186
+ setContext: (e, t) => {
2187
+ t === void 0 ? this.context.remove(e) : this.context.set(e, t);
2188
+ },
2189
+ replayConsent: () => this.replayConsent
2069
2190
  };
2070
- for (let e of r) e && this.captures.push(new e(a));
2071
- let o = i ? [...t.plugins, new i(this.diagnostics, a.config)] : t.plugins;
2072
- for (let e of o) this.captures.push(this.pluginCapture(e));
2191
+ o.forEach((e, t) => {
2192
+ if (e) {
2193
+ let r = new e(c);
2194
+ this.captures.push(r), i[t] === "replay" && (this.replay = r, this.replayBuiltKey = n);
2195
+ }
2196
+ });
2197
+ let l = s ? [...t.plugins, new s(this.diagnostics, c.config)] : t.plugins;
2198
+ for (let e of l) this.captures.push(this.pluginCapture(e));
2073
2199
  for (let e of this.captures) this.diagnostics.guard("capture.install_failed", `The library could not install the ${e.name} capture.`, () => {
2074
2200
  e.install();
2075
2201
  });
2076
2202
  }
2077
- uninstallCaptures() {
2078
- for (let e of this.captures) this.diagnostics.guard("capture.install_failed", `The library could not uninstall the ${e.name} capture.`, () => {
2079
- e.uninstall();
2203
+ uninstallCaptures(e) {
2204
+ for (let t of this.captures) t !== e && this.diagnostics.guard("capture.install_failed", `The library could not uninstall the ${t.name} capture.`, () => {
2205
+ t.uninstall();
2080
2206
  });
2081
- this.captures.length = 0;
2207
+ this.captures.length = 0, this.replay = e, e && this.captures.push(e);
2082
2208
  }
2083
2209
  loadWebSocket() {
2084
- return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-B-5qqPy7.js")).WebSocketCapture);
2210
+ return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-DthJuSAg.js")).WebSocketCapture);
2085
2211
  }
2086
2212
  pluginCapture(e) {
2087
2213
  let { name: t } = e, n = (e, t, n) => {
2088
2214
  this.recordMetric(e, t, n);
2089
- }, r = {
2090
- logger: new F(() => this, `${_}.${t}`),
2091
- counter: (e, t = {}) => Nt(e, t, n),
2092
- histogram: (e, t = {}) => Pt(e, t, n),
2215
+ }, r = (e) => {
2216
+ this.diagnostics.report("config.invalid", de, void 0, e);
2217
+ }, i = {
2218
+ logger: new N(() => this, `${g}.${t}`),
2219
+ counter: (e, t = {}) => zt(e, t, n, r),
2220
+ histogram: (e, t = {}) => Bt(e, t, n, r),
2093
2221
  addBreadcrumb: (e, t) => {
2094
2222
  this.addBreadcrumb(e, t);
2095
2223
  },
2096
- ownRequest: rt
2224
+ ownRequest: ct
2097
2225
  };
2098
2226
  return {
2099
2227
  name: t,
2100
2228
  install: () => {
2101
- e.install(r);
2229
+ e.install(i);
2102
2230
  },
2103
2231
  uninstall: () => {
2104
2232
  e.uninstall();
@@ -2106,7 +2234,7 @@ var q = class e {
2106
2234
  };
2107
2235
  }
2108
2236
  loadCapture(e) {
2109
- return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, wr[e]);
2237
+ return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, Fr[e]);
2110
2238
  }
2111
2239
  registerWorker(e, t = {}) {
2112
2240
  let n = !1, r;
@@ -2128,15 +2256,16 @@ var q = class e {
2128
2256
  }
2129
2257
  async destroy() {
2130
2258
  if (this.destroyed) return;
2131
- N(this), this.meter.collect(), this.tracing.end(), this.destroyed = !0, bt(this), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
2259
+ j(this), this.collectPoints(), this.profilerOn && (this.profilerOn = !1, T().detach()), this.tracing.end(), this.destroyed = !0, Tt(this), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
2132
2260
  let t = this.sender?.destroy();
2133
- this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, Or), globalThis[kr] = this);
2261
+ this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, Rr), globalThis[zr] = this);
2134
2262
  }
2135
2263
  emit(e) {
2136
2264
  if (!e || this.destroyed || this.rotating && !this.closingContext) return;
2137
2265
  this.sessionTouch.touch(this.identity.sessionId);
2138
- let t = e.severityText === "ERROR" || e.severityText === "FATAL" ? [...this.debugBuffer.drain(), e] : [e];
2139
- for (let e of t) this.ready ? this.route(e) : this.bootBuffer.push(e);
2266
+ let t = e.severityText === "ERROR" || e.severityText === "FATAL", n = t ? [...this.debugBuffer.drain(), e] : [e];
2267
+ t && this.errorHook?.(e);
2268
+ for (let e of n) this.ready ? this.route(e) : this.bootBuffer.push(e);
2140
2269
  }
2141
2270
  route(e) {
2142
2271
  this.role() === "forwarder" ? this.forward(e) : this.deliver(e);
@@ -2148,7 +2277,7 @@ var q = class e {
2148
2277
  this.diagnostics.count("record.dropped_boot_buffer_full"), this.drops.add("buffer_full", [e]);
2149
2278
  }
2150
2279
  forward(e) {
2151
- this.forwardBuffer.push(e), !this.forwardScheduled && (this.forwardScheduled = !0, queueMicrotask(() => {
2280
+ this.forwardBuffer.push(e), this.forwardScheduled || (this.forwardScheduled = !0, queueMicrotask(() => {
2152
2281
  this.forwardScheduled = !1, this.sendForwarded();
2153
2282
  }));
2154
2283
  }
@@ -2164,11 +2293,11 @@ var q = class e {
2164
2293
  }
2165
2294
  let t = [];
2166
2295
  for (let n of e) {
2167
- if (!ze(n)) {
2296
+ if (!We(n)) {
2168
2297
  this.diagnostics.count("record.dropped_malformed");
2169
2298
  continue;
2170
2299
  }
2171
- if (n.attributes["uiobs.debug_buffer"] !== !0 && !ct(n, this.config, this.remote.sampling?.current() ?? null)) {
2300
+ if (n.attributes["uiobs.debug_buffer"] !== !0 && !pt(n, this.config, this.remote.sampling?.current() ?? null)) {
2172
2301
  this.diagnostics.count("record.dropped_by_sampling");
2173
2302
  continue;
2174
2303
  }
@@ -2188,51 +2317,51 @@ var q = class e {
2188
2317
  reportGap = (e, t) => {
2189
2318
  this.drops.add(e.reason, t.flatMap((e) => e.records), t.map((e) => e.id));
2190
2319
  let n = Date.now();
2191
- n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new F(() => this, Ie).warn("stored records were dropped before delivery", {
2320
+ n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new N(() => this, u).warn("stored records were dropped before delivery", {
2192
2321
  "gap.batches": e.batches,
2193
2322
  "gap.records": e.records,
2194
2323
  "gap.reason": e.reason
2195
2324
  }));
2196
2325
  };
2197
2326
  regenerateTabId() {
2198
- let e = A(this.diagnostics);
2327
+ let e = O(this.diagnostics);
2199
2328
  this.diagnostics.report("bus.role_resolved", "Another context uses this tab id. A duplicated tab is the usual cause. The library makes a new tab id.", {
2200
2329
  was: this.identity.tabId,
2201
2330
  now: e
2202
- }), this.identity.tabId = e, Ze(e, this.diagnostics, this.stores), this.builder.invalidateResource();
2331
+ }), this.identity.tabId = e, nt(e, this.diagnostics, this.stores), this.builder.invalidateResource();
2203
2332
  }
2204
2333
  newSession() {
2205
- this.destroyed || (N(this), this.resetSession(A(this.diagnostics)));
2334
+ this.destroyed || (j(this), this.resetSession(O(this.diagnostics)));
2206
2335
  }
2207
2336
  resetSession(e) {
2208
- this.meter.collect(), this.tracing.rotate("explicit"), this.journey.end(), this.breadcrumbs.clear(), this.debugBuffer.clear(), this.identity.sessionId = e, this.sessionTouch.restart(e), this.builder.invalidateResource();
2337
+ this.collectPoints(), this.tracing.rotate("explicit"), this.journey.end(), this.breadcrumbs.clear(), this.debugBuffer.clear(), this.replay?.reset(), this.identity.sessionId = e, this.sessionTouch.restart(e), this.builder.invalidateResource();
2209
2338
  }
2210
2339
  rotateSecurityContext(e, t = {}) {
2211
2340
  if (this.rotation) return Promise.reject(/* @__PURE__ */ Error("A security-context rotation is already running."));
2212
2341
  let n = t.pending ?? "discard", r = t.timeoutMs ?? 5e3;
2213
- return !E(e) || !E(e.delivery) || ![
2342
+ return !C(e) || !C(e.delivery) || ![
2214
2343
  "discard",
2215
2344
  "flush",
2216
2345
  "retain",
2217
2346
  "carry"
2218
- ].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (N(this), this.rotating = !0, this.rotation = this.rotateContext(e, n, r).finally(() => {
2347
+ ].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (j(this), this.rotating = !0, this.rotation = this.rotateContext(e, n, r).finally(() => {
2219
2348
  this.rotating = !1, this.rotation = void 0;
2220
2349
  }), this.rotation);
2221
2350
  }
2222
2351
  async rotateContext(e, t, n) {
2223
2352
  if (await this.started, this.role() === "forwarder") throw Error("Rotate the security context on the upstream owner, or use bus.mode: sender for an independent identity.");
2224
2353
  await this.senderLoad;
2225
- let r = this.config.securityContext.id, i = e.id ?? A(this.diagnostics);
2354
+ let r = this.config.securityContext.id, i = e.id ?? O(this.diagnostics);
2226
2355
  if (i === r) throw Error("A rotation requires a different security-context id.");
2227
2356
  let a = {
2228
- ...jr,
2357
+ ...Vr,
2229
2358
  ...e.delivery
2230
- }, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s = G(this.allowed({
2359
+ }, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s = W(this.allowed({
2231
2360
  ...a,
2232
2361
  securityContext: { id: i }
2233
2362
  }), this.diagnostics, {
2234
2363
  ...this.config,
2235
- ...jr
2364
+ ...Vr
2236
2365
  });
2237
2366
  if ((this.diagnostics.snapshot()["config.invalid"] ?? 0) !== o) throw Error("Invalid delivery settings for the next security context.");
2238
2367
  let c = e.context ? Object.fromEntries(Object.entries(e.context)) : void 0, l = /* @__PURE__ */ new Set([
@@ -2246,7 +2375,7 @@ var q = class e {
2246
2375
  ]);
2247
2376
  s.capture.ignoreUrls = s.capture.ignoreUrls.filter((e) => !l.has(e) || u.has(e)), this.closingContext = !0;
2248
2377
  try {
2249
- this.meter.collect(), this.tracing.end(), this.journey.end();
2378
+ this.collectPoints(), this.tracing.end(), this.journey.end();
2250
2379
  } finally {
2251
2380
  this.closingContext = !1;
2252
2381
  }
@@ -2264,20 +2393,20 @@ var q = class e {
2264
2393
  };
2265
2394
  if (this.destroyed) return;
2266
2395
  let m = [...d, ...p.buffered], h = p.stored.flatMap((e) => e.records);
2267
- t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration, rr(this.config, s), this.identityEpoch++, this.remote.sampling = null, this.refreshCaptures(), this.context.clear(), c && this.context.setMany(c), this.breadcrumbs.clear(), this.newSession(), this.builder.invalidateResource(), await this.syncSender(), this.bus?.rotateContext(), this.rotating = !1, t === "carry" && await this.carry(m, p.stored), this.diagnostics.report("security.rotated", "The runtime rotated its security context.", { pending: t });
2396
+ t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration, mr(this.config, s), this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures(), this.context.clear(), c && this.context.setMany(c), this.breadcrumbs.clear(), this.newSession(), this.builder.invalidateResource(), await this.syncSender(), this.bus?.rotateContext(), this.rotating = !1, t === "carry" && await this.carry(m, p.stored), this.diagnostics.report("security.rotated", "The runtime rotated its security context.", { pending: t });
2268
2397
  }
2269
2398
  async carry(e, t) {
2270
2399
  for (let t of e) this.route(t);
2271
2400
  this.sender && await this.sender.adopt(t, this.config.securityContext.id);
2272
2401
  }
2273
2402
  async debugBundle(e) {
2274
- let { configSummary: t } = await import("./debug-bundle-CZZ6SQQh.js"), { record: n } = this.builder.build({
2403
+ let { configSummary: t } = await import("./debug-bundle-BOdYmCeV.js"), { record: n } = this.builder.build({
2275
2404
  level: "INFO",
2276
2405
  type: "system",
2277
2406
  body: "debug bundle",
2278
- namespace: Oe,
2279
- payload: { [b]: this.breadcrumbs.snapshot() }
2280
- }, !0), r = n?.attributes ?? {}, i = r[b], a = r[C];
2407
+ namespace: Ae,
2408
+ payload: { [x]: this.breadcrumbs.snapshot() }
2409
+ }, !0), r = n?.attributes ?? {}, i = r[x], a = r[Le];
2281
2410
  return {
2282
2411
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
2283
2412
  sdkVersion: this.sdkVersion,
@@ -2339,10 +2468,10 @@ var q = class e {
2339
2468
  return;
2340
2469
  }
2341
2470
  let [{ createStorage: t, storageName: n }, { ContextStorage: r }, { storageLimits: i }, { clearEmergencyContext: a }] = await Promise.all([
2342
- import("./factory-Bgsky_e0.js"),
2343
- import("./context-storage-DxZf4Gfh.js"),
2344
- import("./storage-w7Tslvlq.js"),
2345
- import("./emergency-queue-Cs8-i2xw.js")
2471
+ import("./factory-e9Qo3K0z.js"),
2472
+ import("./context-storage-BzkoHzkQ.js"),
2473
+ import("./storage-DZwed89z.js"),
2474
+ import("./emergency-queue-B9WZxanZ.js")
2346
2475
  ]), o = this.config.persistence.namespace, s = this.memoryStorage ?? await t(this.config.storage, n(o), i(this.config.retention), this.diagnostics, void 0, o), c = new r(s, this.config.securityContext, o);
2347
2476
  try {
2348
2477
  e === "namespace" ? await c.clearNamespace() : await c.clear(), a(this.config.securityContext.id, this.diagnostics, o, e === "namespace");
@@ -2354,7 +2483,7 @@ var q = class e {
2354
2483
  return await this.senderLoad, await this.sender?.queueDepth() ?? 0;
2355
2484
  }
2356
2485
  async flush() {
2357
- N(this), this.meter.collect(), this.ready || await this.started, this.role() === "forwarder" ? this.sendForwarded() : (await this.senderLoad, await this.sender?.flush());
2486
+ j(this), this.collectPoints(), this.ready || await this.started, this.role() === "forwarder" ? this.sendForwarded() : (await this.senderLoad, await this.sender?.flush());
2358
2487
  }
2359
2488
  };
2360
2489
  function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
@@ -2366,38 +2495,36 @@ function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
2366
2495
  let r = Object.keys(e), i = Object.keys(t);
2367
2496
  return r.length === i.length && r.every((r) => Object.hasOwn(t, r) && J(Reflect.get(e, r), Reflect.get(t, r), n));
2368
2497
  }
2369
- //#endregion
2370
- //#region src/transport/worker-entry.ts
2498
+ // src/transport/worker-entry.ts
2371
2499
  var Y;
2372
- function zr(e = {}) {
2500
+ function Yr(e = {}) {
2373
2501
  if (Y) return Y;
2374
- let n = new or(e.onDiagnostic);
2375
- if (typeof document < "u" || typeof addEventListener != "function") return n.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
2376
- let r = !1, i, a, o = (e) => {
2377
- n.guard("transport.http_error", "The transport worker could not read its connection.", () => {
2378
- let o = e.data;
2379
- if (!E(o) || o.p !== "ui-observability.transport/1" || o.t !== t.connect || e.ports.length === 0) return;
2380
- let s = e.ports[0];
2381
- i || o.v !== "0.10.0" ? (s.postMessage(Re), s.close()) : (i = s, import("./worker-server-CKcmX5m5.js").then((e) => {
2382
- r || (a = e.serveWorkerPort(s, n));
2502
+ let t = new _r(e.onDiagnostic);
2503
+ if (typeof document < "u" || typeof addEventListener != "function") return t.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
2504
+ let n = !1, r, i, a = (e) => {
2505
+ t.guard("transport.http_error", "The transport worker could not read its connection.", () => {
2506
+ let a = e.data;
2507
+ if (!C(a) || a.p !== "ui-observability.transport/1" || a.t !== te.connect || e.ports.length === 0) return;
2508
+ let o = e.ports[0];
2509
+ r || a.v !== "0.12.0" ? (o.postMessage(ce), o.close()) : (r = o, import("./worker-server-Cne9MX9I.js").then((e) => {
2510
+ n || (i = e.serveWorkerPort(o, t));
2383
2511
  }).catch((e) => {
2384
- n.report("transport.http_error", "The transport worker delivery module could not load.", void 0, e), n.guard("transport.http_error", "The failed transport port could not be closed.", () => {
2385
- s.postMessage(Re), s.close();
2512
+ t.report("transport.http_error", "The transport worker delivery module could not load.", void 0, e), t.guard("transport.http_error", "The failed transport port could not be closed.", () => {
2513
+ o.postMessage(ce), o.close();
2386
2514
  });
2387
2515
  }));
2388
2516
  });
2389
- }, s = () => {
2390
- r || (r = !0, Y = void 0, removeEventListener("message", o), a?.(), n.guard("transport.http_error", "The transport service could not close its port.", () => {
2391
- i?.postMessage(Re);
2392
- }), n.guard("transport.http_error", "The transport port could not close.", () => {
2393
- i?.close();
2517
+ }, o = () => {
2518
+ n || (n = !0, Y = void 0, removeEventListener("message", a), i?.(), t.guard("transport.http_error", "The transport service could not close its port.", () => {
2519
+ r?.postMessage(ce);
2520
+ }), t.guard("transport.http_error", "The transport port could not close.", () => {
2521
+ r?.close();
2394
2522
  }));
2395
2523
  };
2396
- return addEventListener("message", o), Y = s, s;
2524
+ return addEventListener("message", a), Y = o, o;
2397
2525
  }
2398
- //#endregion
2399
- //#region src/transport/memory-transport.ts
2400
- function Br() {
2526
+ // src/transport/memory-transport.ts
2527
+ function Xr() {
2401
2528
  let e = [], t = [], n = { status: 200 };
2402
2529
  return {
2403
2530
  transport: (r) => (e.push(r), n.status >= 200 && n.status < 300 && t.push(r), Promise.resolve({ ...n })),
@@ -2414,25 +2541,24 @@ function Br() {
2414
2541
  }
2415
2542
  };
2416
2543
  }
2417
- //#endregion
2418
- //#region src/index.ts
2544
+ // src/index.ts
2419
2545
  var X = /* @__PURE__ */ new Map();
2420
2546
  function Z() {
2421
2547
  return (q.current() ?? q.stopped()) || q.configure({}, !0);
2422
2548
  }
2423
- function Vr(e = "context") {
2549
+ function Zr(e = "context") {
2424
2550
  return ["context", "namespace"].includes(e) ? Z().clearPersisted(e) : Promise.reject(/* @__PURE__ */ Error("Invalid persistence scope."));
2425
2551
  }
2426
- function Hr(e) {
2552
+ function Qr(e) {
2427
2553
  q.configure(e), Q();
2428
2554
  }
2429
- function Ur(e) {
2555
+ function $r(e) {
2430
2556
  Z().setConfigurationLocked(e);
2431
2557
  }
2432
- function Wr(e, t) {
2558
+ function ei(e, t) {
2433
2559
  return Z().rotateSecurityContext(e, t);
2434
2560
  }
2435
- async function Gr() {
2561
+ async function ti() {
2436
2562
  let e = Z();
2437
2563
  return Q(), {
2438
2564
  ...await e.health(),
@@ -2442,8 +2568,8 @@ async function Gr() {
2442
2568
  }
2443
2569
  };
2444
2570
  }
2445
- async function Kr() {
2446
- let e = await Gr();
2571
+ async function ni() {
2572
+ let e = await ti();
2447
2573
  return Z().debugBundle(e);
2448
2574
  }
2449
2575
  function Q() {
@@ -2454,119 +2580,131 @@ function Q() {
2454
2580
  }
2455
2581
  return t;
2456
2582
  }
2457
- function qr(e, t) {
2583
+ function ri(e, t) {
2458
2584
  let n = Q();
2459
- if (t || n === 0) return new F(Z, e, t);
2585
+ if (t || n === 0) return new N(Z, e, t);
2460
2586
  let r = X.get(e);
2461
- return r ??= new F(Z, e), X.delete(e), X.set(e, r), Q(), r;
2587
+ return r ??= new N(Z, e), X.delete(e), X.set(e, r), Q(), r;
2462
2588
  }
2463
2589
  function $() {
2464
- return qr("app");
2590
+ return ri("app");
2465
2591
  }
2466
- function Jr(e, t) {
2592
+ function ii(e, t) {
2467
2593
  $().trace(e, t);
2468
2594
  }
2469
- function Yr(e, t) {
2595
+ function ai(e, t) {
2470
2596
  $().debug(e, t);
2471
2597
  }
2472
- function Xr(e, t) {
2598
+ function oi(e, t) {
2473
2599
  $().info(e, t);
2474
2600
  }
2475
- function Zr(e, t) {
2601
+ function si(e, t) {
2476
2602
  $().warn(e, t);
2477
2603
  }
2478
- function Qr(e, t, n) {
2604
+ function ci(e, t, n) {
2479
2605
  $().error(e, t, n);
2480
2606
  }
2481
- function $r(e, t, n) {
2607
+ function li(e, t, n) {
2482
2608
  $().fatal(e, t, n);
2483
2609
  }
2484
- function ei(e, t) {
2610
+ function ui(e, t) {
2485
2611
  $().logAction(e, t);
2486
2612
  }
2487
- function ti(e, t) {
2613
+ function di(e, t) {
2488
2614
  $().logEvent(e, t);
2489
2615
  }
2490
- function ni(e, t, n, r, i) {
2616
+ function fi(e, t, n, r, i) {
2491
2617
  $().logMetric(e, t, n, r, i);
2492
2618
  }
2493
- function ri(e, t = {}) {
2494
- return Nt(e, t, (e, t, n) => {
2619
+ function pi(e) {
2620
+ q.current()?.diagnostics.report("config.invalid", de, void 0, e);
2621
+ }
2622
+ function mi(e, t = {}) {
2623
+ return zt(e, t, (e, t, n) => {
2495
2624
  Z().recordMetric(e, t, n);
2496
- });
2625
+ }, pi);
2497
2626
  }
2498
- function ii(e, t = {}) {
2499
- return Pt(e, t, (e, t, n) => {
2627
+ function hi(e, t = {}) {
2628
+ return Bt(e, t, (e, t, n) => {
2500
2629
  Z().recordMetric(e, t, n);
2501
- });
2630
+ }, pi);
2502
2631
  }
2503
- function ai(e, t) {
2632
+ function gi(e, t) {
2504
2633
  return Z().startMeasure(e, t);
2505
2634
  }
2506
- function oi(e, t, n) {
2635
+ function _i() {
2636
+ Z().setReplay(!0);
2637
+ }
2638
+ function vi() {
2639
+ Z().setReplay(!1);
2640
+ }
2641
+ var yi = {
2642
+ probe: (e, t) => T().probe(e, t, q.current()?.diagnostics),
2643
+ time: (e, t) => T().time(e, t, q.current()?.diagnostics)
2644
+ };
2645
+ function bi(e, t, n) {
2507
2646
  return $().timeSync(e, t, n);
2508
2647
  }
2509
- function si(e, t, n) {
2648
+ function xi(e, t, n) {
2510
2649
  return $().timeAsync(e, t, n);
2511
2650
  }
2512
- function ci(e, t) {
2651
+ function Si(e, t) {
2513
2652
  Z().addBreadcrumb(e, t);
2514
2653
  }
2515
- function li(e, t) {
2654
+ function Ci(e, t) {
2516
2655
  Z().context.set(e, t);
2517
2656
  }
2518
- function ui(e) {
2657
+ function wi(e) {
2519
2658
  Z().context.setMany(e);
2520
2659
  }
2521
- function di(e) {
2660
+ function Ti(e) {
2522
2661
  Z().context.remove(e);
2523
2662
  }
2524
- function fi(e, t) {
2663
+ function Ei(e, t) {
2525
2664
  return Z().journey.start(e, t);
2526
2665
  }
2527
- function pi() {
2666
+ function Di() {
2528
2667
  Z().journey.end();
2529
2668
  }
2530
- function mi() {
2669
+ function Oi() {
2531
2670
  return Z().journey.current();
2532
2671
  }
2533
- function hi() {
2672
+ function ki() {
2534
2673
  return Z().journey.getToken();
2535
2674
  }
2536
- function gi(e) {
2675
+ function Ai(e) {
2537
2676
  return Z().journey.adopt(e, "manual", !0);
2538
2677
  }
2539
- function _i(e, t) {
2678
+ function ji(e, t) {
2540
2679
  return Z().registerWorker(e, t);
2541
2680
  }
2542
- function vi(e, t) {
2681
+ function Mi(e, t) {
2543
2682
  return Z().registerFrame(e, t);
2544
2683
  }
2545
- function yi() {
2684
+ function Ni() {
2546
2685
  Z().tracing.rotate("explicit");
2547
2686
  }
2548
- function bi() {
2687
+ function Pi() {
2549
2688
  return Z().tracing.headers();
2550
2689
  }
2551
- function xi() {
2690
+ function Fi() {
2552
2691
  return Z().flush();
2553
2692
  }
2554
- function Si() {
2693
+ function Ii() {
2555
2694
  return Z().queueDepth();
2556
2695
  }
2557
- function Ci() {
2696
+ function Li() {
2558
2697
  return Z().stats();
2559
2698
  }
2560
- function wi() {
2699
+ function Ri() {
2561
2700
  Z().newSession();
2562
2701
  }
2563
- function Ti() {
2702
+ function zi() {
2564
2703
  return Z().diagnostics.snapshot();
2565
2704
  }
2566
- async function Ei() {
2705
+ async function Bi() {
2567
2706
  await q.current()?.destroy();
2568
2707
  }
2569
- //#endregion
2570
- export { F as OneLogger, ci as addBreadcrumb, gi as adoptJourney, Vr as clearPersistedLogs, Kr as collectDebugBundle, Hr as configure, ri as counter, Br as createMemoryTransport, mi as currentJourney, Yr as debug, pi as endJourney, Qr as error, $r as fatal, xi as flush, Ti as getDiagnosticCounters, Gr as getHealth, hi as getJourneyToken, qr as getLogger, Si as getQueueDepth, Ci as getStats, bi as getTraceHeaders, ii as histogram, Xr as info, ei as logAction, ti as logEvent, ni as logMetric, wi as newSession, vi as registerFrame, _i as registerWorker, di as removeContext, Wr as rotateSecurityContext, zr as serveTransportWorker, Ur as setConfigurationLocked, li as setContext, ui as setContextMap, Ei as shutdown, fi as startJourney, ai as startMeasure, yi as startTrace, si as timeAsync, oi as timeSync, Jr as trace, Zr as warn };
2708
+ export { N as OneLogger, Si as addBreadcrumb, Ai as adoptJourney, Zr as clearPersistedLogs, ni as collectDebugBundle, Qr as configure, mi as counter, Xr as createMemoryTransport, Oi as currentJourney, ai as debug, Di as endJourney, ci as error, li as fatal, Fi as flush, zi as getDiagnosticCounters, ti as getHealth, ki as getJourneyToken, ri as getLogger, Ii as getQueueDepth, Li as getStats, Pi as getTraceHeaders, hi as histogram, oi as info, ui as logAction, di as logEvent, fi as logMetric, Ri as newSession, yi as profiler, Mi as registerFrame, ji as registerWorker, Ti as removeContext, ei as rotateSecurityContext, Yr as serveTransportWorker, $r as setConfigurationLocked, Ci as setContext, wi as setContextMap, Bi as shutdown, Ei as startJourney, gi as startMeasure, _i as startReplay, Ni as startTrace, vi as stopReplay, xi as timeAsync, bi as timeSync, ii as trace, si as warn };
2571
2709
 
2572
2710
  //# sourceMappingURL=index.js.map