@utk09/ui-observability 1.1.0 → 1.2.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 (271) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/{batch-D3NHhF9L.js → batch-120Kc9jr.js} +3 -3
  3. package/dist/{batch-D3NHhF9L.js.map → batch-120Kc9jr.js.map} +1 -1
  4. package/dist/{batch-DnYRJqhU.cjs → batch-C3uNp5kU.cjs} +2 -2
  5. package/dist/{batch-DnYRJqhU.cjs.map → batch-C3uNp5kU.cjs.map} +1 -1
  6. package/dist/bus/bus.d.cts +5 -0
  7. package/dist/bus/bus.d.ts +5 -0
  8. package/dist/bus-Dj8IEVcC.cjs +2 -0
  9. package/dist/bus-Dj8IEVcC.cjs.map +1 -0
  10. package/dist/{bus-dw7T92sO.js → bus-DyNafxZN.js} +104 -94
  11. package/dist/bus-DyNafxZN.js.map +1 -0
  12. package/dist/capture/errors.d.cts +10 -0
  13. package/dist/capture/errors.d.ts +10 -0
  14. package/dist/capture/replay.d.cts +1 -1
  15. package/dist/capture/replay.d.ts +1 -1
  16. package/dist/capture/types.d.cts +5 -0
  17. package/dist/capture/types.d.ts +5 -0
  18. package/dist/capture/web-vitals.d.cts +1 -0
  19. package/dist/capture/web-vitals.d.ts +1 -0
  20. package/dist/{compression-SHPAvS4U.js → compression-BWkDWY3v.js} +2 -2
  21. package/dist/{compression-SHPAvS4U.js.map → compression-BWkDWY3v.js.map} +1 -1
  22. package/dist/{compression-C0hUHKR-.cjs → compression-CEVe7NPX.cjs} +2 -2
  23. package/dist/{compression-C0hUHKR-.cjs.map → compression-CEVe7NPX.cjs.map} +1 -1
  24. package/dist/config-C0PtemvC.cjs +2 -0
  25. package/dist/config-C0PtemvC.cjs.map +1 -0
  26. package/dist/{config-CSNcS7OZ.js → config-DK1Zf7jn.js} +83 -85
  27. package/dist/config-DK1Zf7jn.js.map +1 -0
  28. package/dist/{console-BsM-fSCQ.js → console-CAyCQOpm.js} +5 -5
  29. package/dist/{console-BsM-fSCQ.js.map → console-CAyCQOpm.js.map} +1 -1
  30. package/dist/{console-Dkxs6IVQ.cjs → console-Dk6GH4yj.cjs} +2 -2
  31. package/dist/{console-Dkxs6IVQ.cjs.map → console-Dk6GH4yj.cjs.map} +1 -1
  32. package/dist/{constants-BwJDXzj6.js → constants-CEHN6KuY.js} +42 -21
  33. package/dist/constants-CEHN6KuY.js.map +1 -0
  34. package/dist/constants-NtiQDWL_.cjs +2 -0
  35. package/dist/constants-NtiQDWL_.cjs.map +1 -0
  36. package/dist/constants.d.cts +11 -0
  37. package/dist/constants.d.ts +11 -0
  38. package/dist/core/config.d.cts +9 -3
  39. package/dist/core/config.d.ts +9 -3
  40. package/dist/core/diagnostics.d.cts +1 -1
  41. package/dist/core/diagnostics.d.ts +1 -1
  42. package/dist/core/pipeline.d.cts +11 -0
  43. package/dist/core/pipeline.d.ts +11 -0
  44. package/dist/core/record.d.cts +2 -2
  45. package/dist/core/record.d.ts +2 -2
  46. package/dist/core/sender.d.cts +3 -2
  47. package/dist/core/sender.d.ts +3 -2
  48. package/dist/{debug-bundle-B2v6Cym-.cjs → debug-bundle-DMzUfiQc.cjs} +2 -2
  49. package/dist/{debug-bundle-B2v6Cym-.cjs.map → debug-bundle-DMzUfiQc.cjs.map} +1 -1
  50. package/dist/{debug-bundle-Cs_YWzTa.js → debug-bundle-w78W46zr.js} +4 -4
  51. package/dist/{debug-bundle-Cs_YWzTa.js.map → debug-bundle-w78W46zr.js.map} +1 -1
  52. package/dist/doctor.cjs +1 -1
  53. package/dist/doctor.js +22 -22
  54. package/dist/doctor.js.map +1 -1
  55. package/dist/errors-07pmZ7VY.cjs +3 -0
  56. package/dist/errors-07pmZ7VY.cjs.map +1 -0
  57. package/dist/{errors-Q3Ng1ciC.js → errors-C-LYbqyB.js} +27 -24
  58. package/dist/errors-C-LYbqyB.js.map +1 -0
  59. package/dist/{factory-DV17sm2p.js → factory-BHYrcSaU.js} +42 -31
  60. package/dist/factory-BHYrcSaU.js.map +1 -0
  61. package/dist/factory-DsaNdcXp.cjs +2 -0
  62. package/dist/factory-DsaNdcXp.cjs.map +1 -0
  63. package/dist/{identity-BgtHyY4u.js → identity-Byh3gCdT.js} +11 -11
  64. package/dist/{identity-BgtHyY4u.js.map → identity-Byh3gCdT.js.map} +1 -1
  65. package/dist/{identity-CvuyqZk7.cjs → identity-BzAzdQyv.cjs} +2 -2
  66. package/dist/{identity-CvuyqZk7.cjs.map → identity-BzAzdQyv.cjs.map} +1 -1
  67. package/dist/index.cjs +1 -1
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.js +539 -534
  70. package/dist/index.js.map +1 -1
  71. package/dist/{indexeddb-storage-e-13ZLWm.js → indexeddb-storage-BYywz-v6.js} +4 -4
  72. package/dist/{indexeddb-storage-e-13ZLWm.js.map → indexeddb-storage-BYywz-v6.js.map} +1 -1
  73. package/dist/{indexeddb-storage-D4KVcqdD.cjs → indexeddb-storage-BfqGkLFe.cjs} +2 -2
  74. package/dist/{indexeddb-storage-D4KVcqdD.cjs.map → indexeddb-storage-BfqGkLFe.cjs.map} +1 -1
  75. package/dist/{interactions-OK85T-Dk.cjs → interactions-BXzEel4F.cjs} +2 -2
  76. package/dist/interactions-BXzEel4F.cjs.map +1 -0
  77. package/dist/{interactions-Byxf1C82.js → interactions-DdKPMWIN.js} +12 -12
  78. package/dist/interactions-DdKPMWIN.js.map +1 -0
  79. package/dist/{journey-nMbob3OB.cjs → journey-BUmsrgaw.cjs} +2 -2
  80. package/dist/{journey-nMbob3OB.cjs.map → journey-BUmsrgaw.cjs.map} +1 -1
  81. package/dist/{journey-C93FTYcs.js → journey-Nu655gEO.js} +3 -3
  82. package/dist/{journey-C93FTYcs.js.map → journey-Nu655gEO.js.map} +1 -1
  83. package/dist/{library-console-DJUQzcgM.cjs → library-console-DdIlzzph.cjs} +2 -2
  84. package/dist/{library-console-DJUQzcgM.cjs.map → library-console-DdIlzzph.cjs.map} +1 -1
  85. package/dist/{library-console-DklSmucS.js → library-console-amePMnP8.js} +2 -2
  86. package/dist/{library-console-DklSmucS.js.map → library-console-amePMnP8.js.map} +1 -1
  87. package/dist/{library-request-UGEwOHpf.js → library-request-Cv7C05jf.js} +2 -2
  88. package/dist/{library-request-UGEwOHpf.js.map → library-request-Cv7C05jf.js.map} +1 -1
  89. package/dist/{library-request-kY9iTpIF.cjs → library-request-DO3Ec7KE.cjs} +2 -2
  90. package/dist/{library-request-kY9iTpIF.cjs.map → library-request-DO3Ec7KE.cjs.map} +1 -1
  91. package/dist/{lifecycle-DaMdH_X7.cjs → lifecycle-B5yfH5is.cjs} +2 -2
  92. package/dist/{lifecycle-DaMdH_X7.cjs.map → lifecycle-B5yfH5is.cjs.map} +1 -1
  93. package/dist/{lifecycle-B2PlIuQu.js → lifecycle-CMHz2Zbs.js} +2 -2
  94. package/dist/{lifecycle-B2PlIuQu.js.map → lifecycle-CMHz2Zbs.js.map} +1 -1
  95. package/dist/{log-record-DSt2P-Sr.js → log-record-B_nSqxoe.js} +2 -2
  96. package/dist/{log-record-DSt2P-Sr.js.map → log-record-B_nSqxoe.js.map} +1 -1
  97. package/dist/{log-record-Bmx6etMh.cjs → log-record-Bdywwg0k.cjs} +2 -2
  98. package/dist/{log-record-Bmx6etMh.cjs.map → log-record-Bdywwg0k.cjs.map} +1 -1
  99. package/dist/{long-frames-Bamjs1WV.js → long-frames-6NGl1-uN.js} +3 -3
  100. package/dist/{long-frames-Bamjs1WV.js.map → long-frames-6NGl1-uN.js.map} +1 -1
  101. package/dist/{long-frames-lhtONgGt.cjs → long-frames-D9DfSWqv.cjs} +2 -2
  102. package/dist/{long-frames-lhtONgGt.cjs.map → long-frames-D9DfSWqv.cjs.map} +1 -1
  103. package/dist/models/config.d.cts +4 -3
  104. package/dist/models/config.d.ts +4 -3
  105. package/dist/{network-BCn8Gn47.cjs → network-BNHBI0Fc.cjs} +2 -2
  106. package/dist/{network-BCn8Gn47.cjs.map → network-BNHBI0Fc.cjs.map} +1 -1
  107. package/dist/{network-Cg1L2w2r.js → network-Cc3tSB7e.js} +13 -13
  108. package/dist/{network-Cg1L2w2r.js.map → network-Cc3tSB7e.js.map} +1 -1
  109. package/dist/{observed-windows-BrwaJNlj.js → observed-windows-8JtCsIr1.js} +3 -3
  110. package/dist/{observed-windows-BrwaJNlj.js.map → observed-windows-8JtCsIr1.js.map} +1 -1
  111. package/dist/{observed-windows-B3gJkdql.cjs → observed-windows-BlE25nrn.cjs} +2 -2
  112. package/dist/{observed-windows-B3gJkdql.cjs.map → observed-windows-BlE25nrn.cjs.map} +1 -1
  113. package/dist/openfin-Bxelt0yg.js.map +1 -1
  114. package/dist/openfin-DtH2f7zX.cjs.map +1 -1
  115. package/dist/{otlp-D6dRZyB8.js → otlp-Btix3EBa.js} +7 -7
  116. package/dist/{otlp-D6dRZyB8.js.map → otlp-Btix3EBa.js.map} +1 -1
  117. package/dist/{otlp-CrAWkQdO.cjs → otlp-CFSW-Dno.cjs} +2 -2
  118. package/dist/{otlp-CrAWkQdO.cjs.map → otlp-CFSW-Dno.cjs.map} +1 -1
  119. package/dist/patch-DlcKzIi-.cjs +2 -0
  120. package/dist/patch-DlcKzIi-.cjs.map +1 -0
  121. package/dist/patch-Sr1wKg7W.js +9 -0
  122. package/dist/patch-Sr1wKg7W.js.map +1 -0
  123. package/dist/platform-BZjp9wp1.cjs +2 -0
  124. package/dist/platform-BZjp9wp1.cjs.map +1 -0
  125. package/dist/{platform-8DLhjddo.js → platform-Dba6R3Hp.js} +22 -9
  126. package/dist/platform-Dba6R3Hp.js.map +1 -0
  127. package/dist/{profiler-BaXSqCfz.js → profiler-DNKcqu09.js} +19 -19
  128. package/dist/{profiler-BaXSqCfz.js.map → profiler-DNKcqu09.js.map} +1 -1
  129. package/dist/{profiler-BvWW2kNM.cjs → profiler-DpoPi1hH.cjs} +2 -2
  130. package/dist/{profiler-BvWW2kNM.cjs.map → profiler-DpoPi1hH.cjs.map} +1 -1
  131. package/dist/{profiler-frames-DeaBiB-5.cjs → profiler-frames-C9zJNd8_.cjs} +2 -2
  132. package/dist/{profiler-frames-DeaBiB-5.cjs.map → profiler-frames-C9zJNd8_.cjs.map} +1 -1
  133. package/dist/{profiler-frames-C4ySHN0X.js → profiler-frames-CGXZeZ_3.js} +4 -4
  134. package/dist/{profiler-frames-C4ySHN0X.js.map → profiler-frames-CGXZeZ_3.js.map} +1 -1
  135. package/dist/{remote-rules-Dq9xe7Qn.js → remote-rules-DNK96vLa.js} +15 -15
  136. package/dist/{remote-rules-Dq9xe7Qn.js.map → remote-rules-DNK96vLa.js.map} +1 -1
  137. package/dist/{remote-rules-D7L6D_D2.cjs → remote-rules-DuMFRlit.cjs} +2 -2
  138. package/dist/{remote-rules-D7L6D_D2.cjs.map → remote-rules-DuMFRlit.cjs.map} +1 -1
  139. package/dist/replay-Cab-lSit.cjs +2 -0
  140. package/dist/replay-Cab-lSit.cjs.map +1 -0
  141. package/dist/{replay-B0M8kWz_.js → replay-Dy6OiaOZ.js} +89 -62
  142. package/dist/replay-Dy6OiaOZ.js.map +1 -0
  143. package/dist/{reports-ojuMKGO7.cjs → reports-CGK9YQch.cjs} +2 -2
  144. package/dist/{reports-ojuMKGO7.cjs.map → reports-CGK9YQch.cjs.map} +1 -1
  145. package/dist/{reports--8APRLa-.js → reports-CX57-S9s.js} +3 -3
  146. package/dist/{reports--8APRLa-.js.map → reports-CX57-S9s.js.map} +1 -1
  147. package/dist/{resource-timing-BzR05rE-.js → resource-timing-CWVDCbrY.js} +4 -4
  148. package/dist/{resource-timing-BzR05rE-.js.map → resource-timing-CWVDCbrY.js.map} +1 -1
  149. package/dist/{resource-timing-pAG3ZhB5.cjs → resource-timing-DalulXiR.cjs} +2 -2
  150. package/dist/{resource-timing-pAG3ZhB5.cjs.map → resource-timing-DalulXiR.cjs.map} +1 -1
  151. package/dist/response-body-Cpz5__4g.cjs +3 -0
  152. package/dist/response-body-Cpz5__4g.cjs.map +1 -0
  153. package/dist/{response-body-BWvwKQ2p.js → response-body-yi92Rpvo.js} +100 -100
  154. package/dist/response-body-yi92Rpvo.js.map +1 -0
  155. package/dist/{rotation-BylN1B9e.js → rotation-ChBbNDE2.js} +24 -24
  156. package/dist/rotation-ChBbNDE2.js.map +1 -0
  157. package/dist/rotation-fTnNJcfH.cjs +2 -0
  158. package/dist/rotation-fTnNJcfH.cjs.map +1 -0
  159. package/dist/{sampling-zXA6r-Nw.js → sampling-DZTOD28D.js} +6 -6
  160. package/dist/{sampling-zXA6r-Nw.js.map → sampling-DZTOD28D.js.map} +1 -1
  161. package/dist/{sampling-B46LW0cy.cjs → sampling-wAVJIZXp.cjs} +2 -2
  162. package/dist/{sampling-B46LW0cy.cjs.map → sampling-wAVJIZXp.cjs.map} +1 -1
  163. package/dist/{sanitize-DjnR6RXR.js → sanitize-B2GKlSFp.js} +2 -2
  164. package/dist/{sanitize-DjnR6RXR.js.map → sanitize-B2GKlSFp.js.map} +1 -1
  165. package/dist/{sanitize-Qj6LuZqp.cjs → sanitize-BZdhoghq.cjs} +2 -2
  166. package/dist/{sanitize-Qj6LuZqp.cjs.map → sanitize-BZdhoghq.cjs.map} +1 -1
  167. package/dist/{sender-Bdp-TAS4.js → sender-BRSpc7R8.js} +175 -161
  168. package/dist/sender-BRSpc7R8.js.map +1 -0
  169. package/dist/sender-CFu98DAB.cjs +2 -0
  170. package/dist/sender-CFu98DAB.cjs.map +1 -0
  171. package/dist/storage/emergency-queue.d.cts +3 -1
  172. package/dist/storage/emergency-queue.d.ts +3 -1
  173. package/dist/storage/stored-context.d.cts +3 -2
  174. package/dist/storage/stored-context.d.ts +3 -2
  175. package/dist/stored-context-CPLlzgpm.cjs +2 -0
  176. package/dist/stored-context-CPLlzgpm.cjs.map +1 -0
  177. package/dist/{stored-context-CSttrAsw.js → stored-context-df1dEnht.js} +10 -8
  178. package/dist/stored-context-df1dEnht.js.map +1 -0
  179. package/dist/{storm-DKlpv0FL.js → storm-U3_ek1nA.js} +2 -2
  180. package/dist/{storm-DKlpv0FL.js.map → storm-U3_ek1nA.js.map} +1 -1
  181. package/dist/{storm-BHgI12iS.cjs → storm-qiE_AMC7.cjs} +2 -2
  182. package/dist/{storm-BHgI12iS.cjs.map → storm-qiE_AMC7.cjs.map} +1 -1
  183. package/dist/transport/exit-flush.d.cts +23 -0
  184. package/dist/transport/exit-flush.d.ts +23 -0
  185. package/dist/transport/http-transport.d.cts +3 -2
  186. package/dist/transport/http-transport.d.ts +3 -2
  187. package/dist/transport/retry-engine.d.cts +11 -3
  188. package/dist/transport/retry-engine.d.ts +11 -3
  189. package/dist/types-BAerHgCq.js.map +1 -1
  190. package/dist/types-C7WNpnG1.cjs.map +1 -1
  191. package/dist/{unclean-exit-BcOB8A2e.js → unclean-exit-Bj6gYHeL.js} +2 -2
  192. package/dist/{unclean-exit-BcOB8A2e.js.map → unclean-exit-Bj6gYHeL.js.map} +1 -1
  193. package/dist/{unclean-exit-BYPYYkQ5.cjs → unclean-exit-CuBh-ee5.cjs} +2 -2
  194. package/dist/{unclean-exit-BYPYYkQ5.cjs.map → unclean-exit-CuBh-ee5.cjs.map} +1 -1
  195. package/dist/{user-timing-BsU2wQKE.cjs → user-timing-BWqzYF2Q.cjs} +2 -2
  196. package/dist/{user-timing-BsU2wQKE.cjs.map → user-timing-BWqzYF2Q.cjs.map} +1 -1
  197. package/dist/{user-timing-4KIJ74Vi.js → user-timing-Duz0d-OA.js} +2 -2
  198. package/dist/{user-timing-4KIJ74Vi.js.map → user-timing-Duz0d-OA.js.map} +1 -1
  199. package/dist/utils/lock.d.cts +3 -2
  200. package/dist/utils/lock.d.ts +3 -2
  201. package/dist/utils/openfin.d.cts +18 -6
  202. package/dist/utils/openfin.d.ts +18 -6
  203. package/dist/utils/patch.d.cts +1 -1
  204. package/dist/utils/patch.d.ts +1 -1
  205. package/dist/utils/platform.d.cts +6 -0
  206. package/dist/utils/platform.d.ts +6 -0
  207. package/dist/{web-socket-Zg0hj1LB.js → web-socket-CE_9Q22z.js} +5 -5
  208. package/dist/{web-socket-Zg0hj1LB.js.map → web-socket-CE_9Q22z.js.map} +1 -1
  209. package/dist/{web-socket-Cs1ZbmmN.cjs → web-socket-sm3rD-A_.cjs} +2 -2
  210. package/dist/{web-socket-Cs1ZbmmN.cjs.map → web-socket-sm3rD-A_.cjs.map} +1 -1
  211. package/dist/{web-vitals-4pWACwaR.js → web-vitals-CGwXGF-M.js} +4 -4
  212. package/dist/web-vitals-CGwXGF-M.js.map +1 -0
  213. package/dist/web-vitals-Df4Wsfx9.cjs +2 -0
  214. package/dist/web-vitals-Df4Wsfx9.cjs.map +1 -0
  215. package/dist/{worker-protocol-DFYXIFus.cjs → worker-protocol-D5VnCdWY.cjs} +2 -2
  216. package/dist/{worker-protocol-DFYXIFus.cjs.map → worker-protocol-D5VnCdWY.cjs.map} +1 -1
  217. package/dist/{worker-protocol-CYpAbrVl.js → worker-protocol-h4-tRWqy.js} +6 -6
  218. package/dist/{worker-protocol-CYpAbrVl.js.map → worker-protocol-h4-tRWqy.js.map} +1 -1
  219. package/dist/{worker-server--yGTadTA.cjs → worker-server-CF1yatXq.cjs} +2 -2
  220. package/dist/{worker-server--yGTadTA.cjs.map → worker-server-CF1yatXq.cjs.map} +1 -1
  221. package/dist/worker-server-FYfKHQhJ.js +94 -0
  222. package/dist/{worker-server-BokySIII.js.map → worker-server-FYfKHQhJ.js.map} +1 -1
  223. package/dist/{worker-transport-BdEvh_-a.cjs → worker-transport-COgY4RX8.cjs} +2 -2
  224. package/dist/{worker-transport-BdEvh_-a.cjs.map → worker-transport-COgY4RX8.cjs.map} +1 -1
  225. package/dist/{worker-transport-JK-Fby9J.js → worker-transport-jzX1IusG.js} +34 -34
  226. package/dist/{worker-transport-JK-Fby9J.js.map → worker-transport-jzX1IusG.js.map} +1 -1
  227. package/llms.txt +1 -2
  228. package/package.json +1 -1
  229. package/dist/bus-B__467mL.cjs +0 -2
  230. package/dist/bus-B__467mL.cjs.map +0 -1
  231. package/dist/bus-dw7T92sO.js.map +0 -1
  232. package/dist/config-CSNcS7OZ.js.map +0 -1
  233. package/dist/config-CybPP5VM.cjs +0 -2
  234. package/dist/config-CybPP5VM.cjs.map +0 -1
  235. package/dist/constants-BwJDXzj6.js.map +0 -1
  236. package/dist/constants-CtF52hIV.cjs +0 -2
  237. package/dist/constants-CtF52hIV.cjs.map +0 -1
  238. package/dist/errors-DP2RUm4V.cjs +0 -3
  239. package/dist/errors-DP2RUm4V.cjs.map +0 -1
  240. package/dist/errors-Q3Ng1ciC.js.map +0 -1
  241. package/dist/factory-DV17sm2p.js.map +0 -1
  242. package/dist/factory-K8O6gpux.cjs +0 -2
  243. package/dist/factory-K8O6gpux.cjs.map +0 -1
  244. package/dist/interactions-Byxf1C82.js.map +0 -1
  245. package/dist/interactions-OK85T-Dk.cjs.map +0 -1
  246. package/dist/patch-BX8KrPCT.cjs +0 -2
  247. package/dist/patch-BX8KrPCT.cjs.map +0 -1
  248. package/dist/patch-UdPz1ea8.js +0 -8
  249. package/dist/patch-UdPz1ea8.js.map +0 -1
  250. package/dist/platform-8DLhjddo.js.map +0 -1
  251. package/dist/platform-BqRc-7RO.cjs +0 -2
  252. package/dist/platform-BqRc-7RO.cjs.map +0 -1
  253. package/dist/replay-B0M8kWz_.js.map +0 -1
  254. package/dist/replay-QOFBpAXh.cjs +0 -2
  255. package/dist/replay-QOFBpAXh.cjs.map +0 -1
  256. package/dist/response-body-BWvwKQ2p.js.map +0 -1
  257. package/dist/response-body-CKEJ5itk.cjs +0 -3
  258. package/dist/response-body-CKEJ5itk.cjs.map +0 -1
  259. package/dist/rotation-BylN1B9e.js.map +0 -1
  260. package/dist/rotation-E2eKClIs.cjs +0 -2
  261. package/dist/rotation-E2eKClIs.cjs.map +0 -1
  262. package/dist/sender-Bdp-TAS4.js.map +0 -1
  263. package/dist/sender-DR7ZycZY.cjs +0 -2
  264. package/dist/sender-DR7ZycZY.cjs.map +0 -1
  265. package/dist/stored-context-BOu54M8Y.cjs +0 -2
  266. package/dist/stored-context-BOu54M8Y.cjs.map +0 -1
  267. package/dist/stored-context-CSttrAsw.js.map +0 -1
  268. package/dist/web-vitals-4pWACwaR.js.map +0 -1
  269. package/dist/web-vitals-__X7t4pj.cjs +0 -2
  270. package/dist/web-vitals-__X7t4pj.cjs.map +0 -1
  271. package/dist/worker-server-BokySIII.js +0 -94
package/dist/index.js CHANGED
@@ -1,47 +1,47 @@
1
- import { An as e, At as t, Bt as n, Cn as r, Dn as i, Fn as a, Gn as o, In as s, J as c, Jn as l, K as u, M as d, Mt as f, Nn as p, On as m, P as h, Rt as g, Sn as ee, St as _, Tn as te, Vt as ne, Wn as re, X as ie, Y as ae, _ as oe, _n as se, a as v, ar as ce, bn as le, c as y, d as ue, f as b, g as x, h as S, ir as de, it as fe, j as pe, kn as me, kt as he, ln as ge, lr as _e, m as ve, nr as ye, o as be, or as xe, ot as Se, p as Ce, q as we, rr as C, s as Te, tr as Ee, u as De, un as Oe, ur as ke, v as w, vn as Ae, wn as je, xn as Me, y as Ne, yn as Pe } from "./constants-BwJDXzj6.js";
2
- import { n as Fe, r as Ie, t as Le } from "./log-record-DSt2P-Sr.js";
3
- import { n as Re, r as ze, t as Be } from "./error-like-B11pB4aL.js";
4
- import { n as T, t as Ve } from "./guards-BlYGRK4l.js";
5
- import { t as E } from "./unref-DgHPQeWv.js";
6
- import { i as He, n as Ue, t as We } from "./platform-8DLhjddo.js";
7
- import { t as D } from "./defineProperty-s2S8BXUc.js";
8
- import { a as Ge, i as O, n as Ke, o as qe, r as Je, s as Ye, t as Xe } from "./identity-BgtHyY4u.js";
9
- import { t as k } from "./profiler-BaXSqCfz.js";
10
- import { n as A, t as Ze } from "./library-console-DklSmucS.js";
11
- import { i as Qe, n as $e, r as j } from "./sanitize-DjnR6RXR.js";
12
- import { r as et } from "./library-request-UGEwOHpf.js";
13
- import { n as tt, r as M, t as N } from "./config-CSNcS7OZ.js";
14
- import { r as nt, t as rt } from "./batch-D3NHhF9L.js";
15
- import { n as it, t as at } from "./journey-C93FTYcs.js";
16
- import { a as ot, i as st, n as ct, o as lt } from "./sampling-zXA6r-Nw.js";
17
- import { r as ut } from "./observed-windows-BrwaJNlj.js";
1
+ import { An as e, At as t, Bt as n, Cn as r, En as i, Gn as a, In as o, J as s, K as c, Kn as l, Ln as u, M as d, Mt as f, On as p, P as m, Pn as h, Rt as g, Sn as _, St as v, Tn as y, Vt as ee, X as te, Y as ne, Yn as re, _ as ie, a as b, ar as ae, bn as oe, c as x, d as se, dn as ce, dr as le, f as S, g as C, h as w, ir as T, it as ue, j as de, jn as fe, kn as pe, kt as me, m as he, nr as ge, o as _e, or as ve, ot as ye, p as be, q as xe, rr as Se, s as Ce, sr as we, u as Te, un as Ee, ur as De, v as E, vn as Oe, wn as ke, xn as Ae, y as je, yn as Me } from "./constants-CEHN6KuY.js";
2
+ import { n as Ne, r as Pe, t as Fe } from "./log-record-B_nSqxoe.js";
3
+ import { n as Ie, r as Le, t as Re } from "./error-like-B11pB4aL.js";
4
+ import { n as D, t as ze } from "./guards-BlYGRK4l.js";
5
+ import { t as O } from "./unref-DgHPQeWv.js";
6
+ import { a as Be, n as Ve, t as He } from "./platform-Dba6R3Hp.js";
7
+ import { t as k } from "./defineProperty-s2S8BXUc.js";
8
+ import { a as Ue, i as A, n as We, o as Ge, r as Ke, s as qe, t as Je } from "./identity-Byh3gCdT.js";
9
+ import { t as j } from "./profiler-DNKcqu09.js";
10
+ import { n as M, t as Ye } from "./library-console-amePMnP8.js";
11
+ import { i as Xe, n as Ze, r as N } from "./sanitize-B2GKlSFp.js";
12
+ import { r as Qe } from "./library-request-Cv7C05jf.js";
13
+ import { n as $e, r as P, t as F } from "./config-DK1Zf7jn.js";
14
+ import { r as et, t as tt } from "./batch-120Kc9jr.js";
15
+ import { n as nt, t as rt } from "./journey-Nu655gEO.js";
16
+ import { a as it, i as at, n as ot, o as st } from "./sampling-DZTOD28D.js";
17
+ import { r as ct } from "./observed-windows-8JtCsIr1.js";
18
18
  // src/core/deferred.ts
19
- var P = /* @__PURE__ */ new WeakMap();
20
- function dt(e) {
19
+ var I = /* @__PURE__ */ new WeakMap();
20
+ function lt(e) {
21
21
  let t = e.idle;
22
22
  t !== void 0 && (e.diagnostics.guard("pipeline.crashed", "The idle callback could not be cancelled.", () => {
23
23
  cancelIdleCallback(t);
24
24
  }), e.idle = void 0), clearTimeout(e.timer), e.timer = void 0;
25
25
  }
26
- function ft(e, t) {
26
+ function ut(e, t) {
27
27
  typeof requestIdleCallback == "function" && typeof cancelIdleCallback == "function" && (t.idle = t.diagnostics.guard("pipeline.crashed", "The idle callback could not be scheduled.", () => requestIdleCallback((n) => {
28
- F(e, t, n);
29
- }, { timeout: we })), t.idle !== void 0) || (t.timer = setTimeout(() => {
30
- F(e, t);
31
- }, 0), E(t.timer));
32
- }
33
- function F(e, t, n) {
34
- if (P.get(e) !== t || t.draining) return;
35
- dt(t), t.draining = !0;
28
+ L(e, t, n);
29
+ }, { timeout: xe })), t.idle !== void 0) || (t.timer = setTimeout(() => {
30
+ L(e, t);
31
+ }, 0), O(t.timer));
32
+ }
33
+ function L(e, t, n) {
34
+ if (I.get(e) !== t || t.draining) return;
35
+ lt(t), t.draining = !0;
36
36
  let r = t.work;
37
37
  t.work = [];
38
38
  let i = 0;
39
- 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++, P.get(e) !== t) return;
40
- t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? ft(e, t) : P.delete(e);
39
+ 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++, I.get(e) !== t) return;
40
+ t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? ut(e, t) : I.delete(e);
41
41
  }
42
- function pt(e, t, n, r) {
43
- let i = P.get(e), a = r === null ? c : Math.min(r, c);
44
- if (i && i.work.length >= a && !i.draining && (F(e, i), i = P.get(e)), i) {
42
+ function dt(e, t, n, r) {
43
+ let i = I.get(e), a = r === null ? s : Math.min(r, s);
44
+ if (i && i.work.length >= a && !i.draining && (L(e, i), i = I.get(e)), i) {
45
45
  if (i.work.length >= a) {
46
46
  n.count("record.dropped_by_ceiling");
47
47
  return;
@@ -51,29 +51,29 @@ function pt(e, t, n, r) {
51
51
  work: [t],
52
52
  diagnostics: n,
53
53
  draining: !1
54
- }, P.set(e, i), ft(e, i);
54
+ }, I.set(e, i), ut(e, i);
55
55
  }
56
- function I(e) {
57
- let t = P.get(e);
58
- t && F(e, t);
56
+ function R(e) {
57
+ let t = I.get(e);
58
+ t && L(e, t);
59
59
  }
60
- function mt(e) {
61
- let t = P.get(e);
60
+ function ft(e) {
61
+ let t = I.get(e);
62
62
  if (t) {
63
- dt(t), P.delete(e);
63
+ lt(t), I.delete(e);
64
64
  for (let e of t.work) t.diagnostics.count("record.dropped_by_ceiling");
65
65
  t.work = [];
66
66
  }
67
67
  }
68
68
  // src/core/logger.ts
69
- var ht = [
70
- h,
71
- l,
72
- ae
69
+ var pt = [
70
+ m,
71
+ re,
72
+ ne
73
73
  ];
74
- function gt(e, t) {
74
+ function mt(e, t) {
75
75
  let n = t.guard("record.sanitize_failed", "The library could not read the error reason.", () => {
76
- if (!(e instanceof Error) && !ze(e)) return;
76
+ if (!(e instanceof Error) && !Le(e)) return;
77
77
  let t = Error(e.message);
78
78
  return t.name = e.name, t.stack = e.stack, t;
79
79
  });
@@ -81,50 +81,50 @@ function gt(e, t) {
81
81
  let r = t.guard("record.sanitize_failed", "The library could not convert the error reason to text.", () => String(e));
82
82
  return Error(r ?? typeof e);
83
83
  }
84
- function _t(e, t, n) {
84
+ function ht(e, t, n) {
85
85
  return n.guard("record.sanitize_failed", "The library could not read the error reason.", () => e instanceof Error ? e : t) ?? t;
86
86
  }
87
- function vt(e, t) {
87
+ function gt(e, t) {
88
88
  if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e == "symbol") return e;
89
89
  if (typeof e == "object" && e) return t.guard("record.sanitize_failed", "The library could not read the properties of the error reason.", () => {
90
- let t = e, n = ze(e), r = {}, i = 0;
90
+ let t = e, n = Le(e), r = {}, i = 0;
91
91
  for (let e of Object.keys(t)) {
92
92
  let a = t[e];
93
- n && Be.has(e) || !Re(a) || (r[e] = a, i++);
93
+ n && Re.has(e) || !Ie(a) || (r[e] = a, i++);
94
94
  }
95
95
  return i === 0 ? void 0 : r;
96
96
  });
97
97
  }
98
- function yt(e) {
99
- if (!T(e) || e instanceof Error) return !1;
98
+ function _t(e) {
99
+ if (!D(e) || e instanceof Error) return !1;
100
100
  let t = Object.getPrototypeOf(e);
101
101
  return t === null || Object.getPrototypeOf(t) === null;
102
102
  }
103
- function bt(e) {
104
- return ht.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
103
+ function vt(e) {
104
+ return pt.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
105
105
  }
106
- function L(e, t) {
106
+ function z(e, t) {
107
107
  return e === void 0 ? {} : t.guard("record.sanitize_failed", "The library could not read the payload.", () => ({ ...e })) ?? { "uiobs.sanitize_failed": !0 };
108
108
  }
109
- var R = class e {
109
+ var B = class e {
110
110
  constructor(e, t, n = {}) {
111
- D(this, "bind", void 0), D(this, "namespace", void 0), D(this, "options", void 0), D(this, "levelType", void 0), D(this, "trace", (e, t) => {
111
+ k(this, "bind", void 0), k(this, "namespace", void 0), k(this, "options", void 0), k(this, "levelType", void 0), k(this, "trace", (e, t) => {
112
112
  this.write("TRACE", this.levelType, e, t);
113
- }), D(this, "debug", (e, t) => {
113
+ }), k(this, "debug", (e, t) => {
114
114
  this.write("DEBUG", this.levelType, e, t);
115
- }), D(this, "info", (e, t) => {
115
+ }), k(this, "info", (e, t) => {
116
116
  this.write("INFO", this.levelType, e, t);
117
- }), D(this, "warn", (e, t) => {
117
+ }), k(this, "warn", (e, t) => {
118
118
  this.write("WARN", this.levelType, e, t);
119
- }), D(this, "error", (e, t, n) => {
119
+ }), k(this, "error", (e, t, n) => {
120
120
  this.writeError("ERROR", e, t, n);
121
- }), D(this, "fatal", (e, t, n) => {
121
+ }), k(this, "fatal", (e, t, n) => {
122
122
  this.writeError("FATAL", e, t, n);
123
- }), D(this, "logAction", (e, t) => {
123
+ }), k(this, "logAction", (e, t) => {
124
124
  this.write("INFO", "action", e, t);
125
- }), D(this, "logEvent", (e, t) => {
125
+ }), k(this, "logEvent", (e, t) => {
126
126
  this.write("INFO", "event", e, t);
127
- }), this.bind = e, this.namespace = t, this.options = n, this.levelType = bt(t);
127
+ }), this.bind = e, this.namespace = t, this.options = n, this.levelType = vt(t);
128
128
  }
129
129
  child(t, n = {}) {
130
130
  return new e(this.bind, `${this.namespace}.${t}`, { scopedContext: {
@@ -144,13 +144,13 @@ var R = class e {
144
144
  else if (e.config.payloadMode === "defer" && e.config.enabled && !e.config.debugBuffer.enabled && this.namespace !== "uiobs.diagnostics") {
145
145
  if (!e.builder.isEnabled(t, this.namespace, n) && !this.mirrors(e, t)) return;
146
146
  let i = e.journey.current(), a = {
147
- timeUnixNano: Ie(),
147
+ timeUnixNano: Pe(),
148
148
  trace: e.tracing.resolve(),
149
149
  journey: i ? { ...i } : null,
150
150
  context: e.context.getAll(),
151
- url: We(e.diagnostics)
151
+ url: He(e.diagnostics)
152
152
  };
153
- pt(e, () => {
153
+ dt(e, () => {
154
154
  r(a);
155
155
  }, e.diagnostics, e.config.buffering.maxPendingRecords);
156
156
  } else r();
@@ -168,7 +168,7 @@ var R = class e {
168
168
  body: r,
169
169
  namespace: this.namespace,
170
170
  scoped: this.options.scopedContext,
171
- payload: a ? i : L(i, e.diagnostics)
171
+ payload: a ? i : z(i, e.diagnostics)
172
172
  }, { record: c, dropped: l } = e.builder.build(s), u = !!e.config.redact || e.config.processors.length > 0, d = n !== "metric" && e.config.captureLimits.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;
173
173
  d && m !== void 0 && e.breadcrumbs.push({
174
174
  t: o ? Number(o.timeUnixNano.slice(0, -6)) : Date.now(),
@@ -185,12 +185,12 @@ var R = class e {
185
185
  writeErrorNow(e, t, n, r, i, a) {
186
186
  let o = e.builder.isEnabled(t, this.namespace);
187
187
  if (!o && !this.mirrors(e, t)) return;
188
- let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => yt(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : gt(l, e.diagnostics), d = u === void 0 ? void 0 : _t(l, u, e.diagnostics);
188
+ let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => _t(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : mt(l, e.diagnostics), d = u === void 0 ? void 0 : ht(l, u, e.diagnostics);
189
189
  if (!o) {
190
190
  this.print(e, t, n, c, d, null, void 0, a);
191
191
  return;
192
192
  }
193
- let f = u ? vt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
193
+ let f = u ? gt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
194
194
  snapshot: a,
195
195
  level: t,
196
196
  type: this.levelType,
@@ -198,14 +198,14 @@ var R = class e {
198
198
  namespace: this.namespace,
199
199
  scoped: this.options.scopedContext,
200
200
  payload: {
201
- ...L(c, e.diagnostics),
201
+ ...z(c, e.diagnostics),
202
202
  ...u ? {
203
203
  "error.type": u.name,
204
204
  "error.message": u.message,
205
205
  "error.stack_trace": u.stack
206
206
  } : {},
207
- ...f === void 0 ? {} : { [ue]: f },
208
- [y]: e.breadcrumbs.snapshot()
207
+ ...f === void 0 ? {} : { [se]: f },
208
+ [x]: e.breadcrumbs.snapshot()
209
209
  }
210
210
  });
211
211
  this.print(e, t, n, c, d, p, m, a), e.emit(p);
@@ -228,7 +228,7 @@ var R = class e {
228
228
  namespace: this.namespace,
229
229
  scoped: this.options.scopedContext,
230
230
  payload: {
231
- ...L(r, e.diagnostics),
231
+ ...z(r, e.diagnostics),
232
232
  ...i ? {
233
233
  "error.type": i.name,
234
234
  "error.message": i.message,
@@ -241,17 +241,17 @@ var R = class e {
241
241
  mirrors(e, t) {
242
242
  return e.config.enabled && e.console.accepts(t);
243
243
  }
244
- }, xt = class extends R {
244
+ }, yt = class extends B {
245
245
  constructor(...e) {
246
- super(...e), D(this, "logMetric", (e, t, r = u, i = "gauge", a, o) => {
246
+ super(...e), k(this, "logMetric", (e, t, r = c, i = "gauge", a, o) => {
247
247
  if (!Number.isFinite(t)) {
248
248
  this.bind().diagnostics.report("record.dropped_malformed", "The metric value is not a finite number. The library dropped the metric.", { "metric.name": e });
249
249
  return;
250
250
  }
251
251
  let s = this.bind();
252
252
  this.submit(s, "INFO", "metric", (c) => {
253
- let l = L(a, s.diagnostics), u = {
254
- ...L(o, s.diagnostics),
253
+ let l = z(a, s.diagnostics), u = {
254
+ ...z(o, s.diagnostics),
255
255
  ...l,
256
256
  "metric.name": e,
257
257
  "metric.value": t,
@@ -263,39 +263,39 @@ var R = class e {
263
263
  });
264
264
  });
265
265
  }
266
- }, St = /^[0-9a-f]{32}$/, Ct = /^[0-9a-f]{16}$/, wt = /[1-9a-f]/;
267
- function Tt(e) {
268
- return St.test(e.traceId) && wt.test(e.traceId) && Ct.test(e.spanId) && wt.test(e.spanId);
266
+ }, bt = /^[0-9a-f]{32}$/, xt = /^[0-9a-f]{16}$/, St = /[1-9a-f]/;
267
+ function Ct(e) {
268
+ return bt.test(e.traceId) && St.test(e.traceId) && xt.test(e.spanId) && St.test(e.spanId);
269
269
  }
270
- function Et() {
271
- return qe(16);
270
+ function wt() {
271
+ return Ge(16);
272
272
  }
273
- function Dt() {
274
- return qe(8);
273
+ function Tt() {
274
+ return Ge(8);
275
275
  }
276
- function Ot(e) {
276
+ function Et(e) {
277
277
  return {
278
- traceId: Et(),
279
- spanId: Dt(),
278
+ traceId: wt(),
279
+ spanId: Tt(),
280
280
  traceFlags: 1,
281
281
  startedAt: Date.now(),
282
282
  reason: e,
283
283
  ended: !1
284
284
  };
285
285
  }
286
- function kt(e, t, n) {
286
+ function Dt(e, t, n) {
287
287
  return `00-${e}-${t}-${(n & 255).toString(16).padStart(2, "0")}`;
288
288
  }
289
- function At(e) {
289
+ function Ot(e) {
290
290
  return {
291
291
  traceId: e.traceId,
292
292
  spanId: e.spanId,
293
293
  traceFlags: e.traceFlags
294
294
  };
295
295
  }
296
- var jt = class {
297
- constructor(e, t = ce, n, r) {
298
- D(this, "diagnostics", void 0), D(this, "maxAgeMs", void 0), D(this, "load", void 0), D(this, "spans", void 0), D(this, "ambient", Ot("start")), D(this, "otel", void 0), this.diagnostics = e, this.maxAgeMs = t, this.load = n, this.spans = r;
296
+ var kt = class {
297
+ constructor(e, t = ve, n, r) {
298
+ k(this, "diagnostics", void 0), k(this, "maxAgeMs", void 0), k(this, "load", void 0), k(this, "spans", void 0), k(this, "ambient", Et("start")), k(this, "otel", void 0), this.diagnostics = e, this.maxAgeMs = t, this.load = n, this.spans = r;
299
299
  }
300
300
  setup(e, t) {
301
301
  this.maxAgeMs = e, this.load = t;
@@ -311,7 +311,7 @@ var jt = class {
311
311
  return this.activeSpanContext() ?? this.ambientContext();
312
312
  }
313
313
  ambientContext() {
314
- return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), At(this.ambient);
314
+ return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), Ot(this.ambient);
315
315
  }
316
316
  activeSpanContext() {
317
317
  let e = this.otel;
@@ -319,7 +319,7 @@ var jt = class {
319
319
  let t = e.trace.getActiveSpan();
320
320
  if (t === void 0) return;
321
321
  let n = t.spanContext();
322
- if (Tt(n)) return {
322
+ if (Ct(n)) return {
323
323
  traceId: n.traceId,
324
324
  spanId: n.spanId,
325
325
  traceFlags: n.traceFlags
@@ -328,8 +328,8 @@ var jt = class {
328
328
  }
329
329
  rotate(e) {
330
330
  let t = this.ambient;
331
- this.ambient = Ot(e);
332
- let n = At(this.ambient);
331
+ this.ambient = Et(e);
332
+ let n = Ot(this.ambient);
333
333
  return this.finish(t), n;
334
334
  }
335
335
  end() {
@@ -356,9 +356,9 @@ var jt = class {
356
356
  n.propagation.inject(n.context.active(), t);
357
357
  }), t.traceparent) return { headers: t };
358
358
  let r = this.activeSpanContext(), i = r ?? this.ambientContext(), a = r ? void 0 : this.spans;
359
- if (!a?.enabled()) return t[de] = kt(i.traceId, i.spanId, i.traceFlags), { headers: t };
360
- let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Dt() : i.spanId;
361
- return t[de] = kt(i.traceId, c, s), !e || !o ? { headers: t } : {
359
+ if (!a?.enabled()) return t[ae] = Dt(i.traceId, i.spanId, i.traceFlags), { headers: t };
360
+ let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Tt() : i.spanId;
361
+ return t[ae] = Dt(i.traceId, c, s), !e || !o ? { headers: t } : {
362
362
  headers: t,
363
363
  span: {
364
364
  traceId: i.traceId,
@@ -367,20 +367,20 @@ var jt = class {
367
367
  }
368
368
  };
369
369
  }
370
- }, Mt = {
370
+ }, At = {
371
371
  name: "ui.measure.duration",
372
372
  kind: "histogram",
373
373
  unit: "ms",
374
374
  boundaries: g
375
- }, Nt = {
375
+ }, jt = {
376
376
  name: "ui.measure.phase.duration",
377
377
  kind: "histogram",
378
378
  unit: "ms",
379
379
  boundaries: g
380
380
  };
381
- function Pt(e, t, n, r) {
381
+ function Mt(e, t, n, r) {
382
382
  let i = String(e), a = Date.now(), o = performance.now(), s, c = !1, l = (e) => a + e - o, u = (e, a) => {
383
- s &&= (r.metric(Nt, e - s.at, {
383
+ s &&= (r.metric(jt, e - s.at, {
384
384
  ...t,
385
385
  "measure.name": i,
386
386
  "measure.phase": s.name
@@ -388,7 +388,7 @@ function Pt(e, t, n, r) {
388
388
  name: s.name,
389
389
  kind: "internal",
390
390
  traceId: n.traceId,
391
- spanId: Dt(),
391
+ spanId: Tt(),
392
392
  parentSpanId: n.spanId,
393
393
  startMs: l(s.at),
394
394
  endMs: l(e),
@@ -414,7 +414,7 @@ function Pt(e, t, n, r) {
414
414
  ...t,
415
415
  "measure.outcome": e
416
416
  };
417
- r.metric(Mt, s - o, {
417
+ r.metric(At, s - o, {
418
418
  ...f,
419
419
  "measure.name": i
420
420
  }), n && r.span({
@@ -429,7 +429,7 @@ function Pt(e, t, n, r) {
429
429
  }
430
430
  };
431
431
  }
432
- function Ft(e, t, n) {
432
+ function Nt(e, t, n) {
433
433
  let r = "error";
434
434
  try {
435
435
  let i = t(), a = n.guard("record.sanitize_failed", "The library could not read what the function of the measure returned. The measure ends now.", () => i?.then);
@@ -443,33 +443,33 @@ function Ft(e, t, n) {
443
443
  }
444
444
  }
445
445
  // src/core/meter.ts
446
- var It = "overflow", Lt = /* @__PURE__ */ new Set([
447
- x,
448
- S,
449
- v,
446
+ var Pt = "overflow", Ft = /* @__PURE__ */ new Set([
447
+ C,
450
448
  w,
451
449
  b,
452
- Ce,
453
- ve
450
+ E,
451
+ S,
452
+ be,
453
+ he
454
454
  ]);
455
- function Rt(e = {}) {
455
+ function It(e = {}) {
456
456
  let t = {};
457
457
  for (let n of Object.keys(e).sort()) {
458
- if (n.startsWith("metric.") || Lt.has(n)) continue;
458
+ if (n.startsWith("metric.") || Ft.has(n)) continue;
459
459
  let r = e[n];
460
460
  (typeof r == "string" || typeof r == "boolean" || typeof r == "number" && Number.isFinite(r)) && (t[n] = r);
461
461
  }
462
462
  return t;
463
463
  }
464
- function zt(e, t) {
464
+ function Lt(e, t) {
465
465
  if (!Array.isArray(e)) return null;
466
466
  let n = t === null ? e.length : Math.min(e.length, t + 1);
467
467
  return Array.from({ length: n }, (t, n) => e[n]);
468
468
  }
469
- function Bt(e, t) {
469
+ function Rt(e, t) {
470
470
  return Array.isArray(e) && (t === null || e.length <= t) && e.every((t, n) => typeof t == "number" && Number.isFinite(t) && (n === 0 || t > e[n - 1]));
471
471
  }
472
- function Vt(e, t, r) {
472
+ function zt(e, t, r) {
473
473
  let i = {
474
474
  "metric.name": e.name,
475
475
  "metric.unit": e.unit,
@@ -487,7 +487,7 @@ function Vt(e, t, r) {
487
487
  [n.buckets]: t.buckets
488
488
  } : (i["metric.value"] = e.kind === "gauge" ? t.last : t.sum, i);
489
489
  }
490
- function Ht(e, t) {
490
+ function Bt(e, t) {
491
491
  try {
492
492
  return {
493
493
  unit: e.unit,
@@ -500,28 +500,28 @@ function Ht(e, t) {
500
500
  };
501
501
  }
502
502
  }
503
- function Ut(e, t, n, r) {
503
+ function Vt(e, t, n, r) {
504
504
  return {
505
505
  name: e,
506
506
  kind: t,
507
- unit: Ht(n, r).unit ?? "count",
507
+ unit: Bt(n, r).unit ?? "count",
508
508
  boundaries: []
509
509
  };
510
510
  }
511
- function Wt(e, t, n, r) {
512
- let i = Ut(e, "counter", t, r);
511
+ function Ht(e, t, n, r) {
512
+ let i = Vt(e, "counter", t, r);
513
513
  return { add: (e, t) => {
514
514
  n(i, e, t);
515
515
  } };
516
516
  }
517
- function Gt(e, t, n, r) {
518
- let i = Ut(e, "gauge", t, r);
517
+ function Ut(e, t, n, r) {
518
+ let i = Vt(e, "gauge", t, r);
519
519
  return { set: (e, t) => {
520
520
  n(i, e, t);
521
521
  } };
522
522
  }
523
- function Kt(e, t, n, r) {
524
- let { unit: i, boundaries: a } = Ht(t, r), o = {
523
+ function Wt(e, t, n, r) {
524
+ let { unit: i, boundaries: a } = Bt(t, r), o = {
525
525
  name: e,
526
526
  kind: "histogram",
527
527
  unit: i ?? "count",
@@ -532,32 +532,32 @@ function Kt(e, t, n, r) {
532
532
  n(o, e, t);
533
533
  } };
534
534
  }
535
- var qt = class {
535
+ var Gt = class {
536
536
  constructor(e, t, n, r = {
537
537
  maxSeries: 100,
538
538
  maxInstruments: 1e3,
539
539
  maxHistogramBoundaries: 50
540
540
  }) {
541
- D(this, "intervalMs", void 0), D(this, "emit", void 0), D(this, "diagnostics", void 0), D(this, "policy", void 0), D(this, "instruments", /* @__PURE__ */ new Map()), D(this, "timer", null), D(this, "startedAt", 0), this.intervalMs = e, this.emit = t, this.diagnostics = n, this.policy = r;
541
+ k(this, "intervalMs", void 0), k(this, "emit", void 0), k(this, "diagnostics", void 0), k(this, "policy", void 0), k(this, "instruments", /* @__PURE__ */ new Map()), k(this, "timer", null), k(this, "startedAt", 0), this.intervalMs = e, this.emit = t, this.diagnostics = n, this.policy = r;
542
542
  }
543
543
  record(e, t, n) {
544
544
  !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}.`, () => {
545
545
  let r = this.instrumentOf(e);
546
- r && (this.add(r, t, Rt(n)), this.arm());
546
+ r && (this.add(r, t, It(n)), this.arm());
547
547
  });
548
548
  }
549
549
  collect() {
550
550
  this.timer !== null && (clearTimeout(this.timer), this.timer = null);
551
551
  let e = `${String(this.startedAt)}000000`, t = [...this.instruments.values()];
552
552
  this.instruments.clear();
553
- for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Vt(n, t, e));
553
+ for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, zt(n, t, e));
554
554
  }
555
555
  instrumentOf(e) {
556
556
  let t = this.instruments.get(e.name);
557
557
  if (t) return t.def.kind === e.kind ? t : (this.diagnostics.report("record.dropped_malformed", `The metric ${e.name} is a ${t.def.kind} and a ${e.kind}. The library dropped the value.`, { "metric.name": e.name }), null);
558
558
  let { maxInstruments: n } = this.policy;
559
559
  if (n !== null && this.instruments.size >= n) return this.diagnostics.count("record.dropped_by_ceiling"), null;
560
- let r = e.fromApp === !0 ? this.policy.maxHistogramBoundaries : null, i = zt(e.boundaries, r), a = Bt(i, r);
560
+ let r = e.fromApp === !0 ? this.policy.maxHistogramBoundaries : null, i = Lt(e.boundaries, r), a = Rt(i, r);
561
561
  e.kind === "histogram" && !a && 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.`);
562
562
  let o = {
563
563
  def: {
@@ -570,7 +570,7 @@ var qt = class {
570
570
  }
571
571
  add(e, t, n) {
572
572
  let r = JSON.stringify(n), i = e.series.get(r), a = n, { maxSeries: o } = this.policy;
573
- if (!i && o !== null && e.series.size >= o && (r = It, i = e.series.get(r), a = { [oe]: !0 }), !i) {
573
+ if (!i && o !== null && e.series.size >= o && (r = Pt, i = e.series.get(r), a = { [ie]: !0 }), !i) {
574
574
  let n = e.def.kind === "histogram" ? e.def.boundaries.length + 1 : 0, o = Array(n).fill(0);
575
575
  i = {
576
576
  attributes: a,
@@ -590,45 +590,45 @@ var qt = class {
590
590
  arm() {
591
591
  this.timer === null && (this.startedAt = Date.now(), this.timer = setTimeout(() => {
592
592
  this.collect();
593
- }, this.intervalMs()), E(this.timer));
593
+ }, this.intervalMs()), O(this.timer));
594
594
  }
595
- }, Jt = {
595
+ }, Kt = {
596
596
  TRACE: "debug",
597
597
  DEBUG: "debug",
598
598
  INFO: "info",
599
599
  WARN: "warn",
600
600
  ERROR: "error",
601
601
  FATAL: "error"
602
- }, Yt = class {
603
- constructor(e, t, n = ge) {
604
- D(this, "settings", void 0), D(this, "diagnostics", void 0), D(this, "limits", void 0), this.settings = e, this.diagnostics = t, this.limits = n;
602
+ }, qt = class {
603
+ constructor(e, t, n = Ee) {
604
+ k(this, "settings", void 0), k(this, "diagnostics", void 0), k(this, "limits", void 0), this.settings = e, this.diagnostics = t, this.limits = n;
605
605
  }
606
606
  update(e) {
607
607
  this.settings = e;
608
608
  }
609
609
  accepts(e) {
610
- return this.settings.level === null || !Ve(t, this.settings.level) ? !1 : t[e] >= t[this.settings.level];
610
+ return this.settings.level === null || !ze(t, this.settings.level) ? !1 : t[e] >= t[this.settings.level];
611
611
  }
612
612
  write(e, t, n, r, i) {
613
- if (!this.accepts(t) || typeof console > "u" || Ze()) return;
614
- let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Jt[t];
613
+ if (!this.accepts(t) || typeof console > "u" || Ye()) return;
614
+ let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Kt[t];
615
615
  this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
616
616
  let c = [];
617
- i !== void 0 && c.push(i), r !== void 0 && c.push($e(r, this.limits, this.diagnostics)), A(() => {
617
+ i !== void 0 && c.push(i), r !== void 0 && c.push(Ze(r, this.limits, this.diagnostics)), M(() => {
618
618
  console[s](a, o.namespace, e, o[t], "", n, ...c);
619
619
  });
620
620
  });
621
621
  }
622
- }, Xt = class {
622
+ }, Jt = class {
623
623
  constructor() {
624
- D(this, "value", 0);
624
+ k(this, "value", 0);
625
625
  }
626
626
  next() {
627
627
  return ++this.value;
628
628
  }
629
- }, Zt = class {
629
+ }, Yt = class {
630
630
  constructor(e) {
631
- D(this, "buffer", void 0), D(this, "pointer", 0), D(this, "filled", !1), D(this, "capacity", void 0), this.capacity = e === 0 ? 0 : Math.max(e, 1), this.buffer = Array(this.capacity);
631
+ k(this, "buffer", void 0), k(this, "pointer", 0), k(this, "filled", !1), k(this, "capacity", void 0), this.capacity = e === 0 ? 0 : Math.max(e, 1), this.buffer = Array(this.capacity);
632
632
  }
633
633
  resize(e) {
634
634
  let t = this.snapshot().slice(-e);
@@ -648,9 +648,9 @@ var qt = class {
648
648
  snapshot() {
649
649
  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);
650
650
  }
651
- }, Qt = class {
651
+ }, Xt = class {
652
652
  constructor() {
653
- D(this, "map", /* @__PURE__ */ new Map());
653
+ k(this, "map", /* @__PURE__ */ new Map());
654
654
  }
655
655
  merge(e) {
656
656
  for (let [t, n] of Object.entries(e)) n === null ? this.map.delete(t) : n !== void 0 && this.map.set(t, n);
@@ -664,9 +664,9 @@ var qt = class {
664
664
  getAll() {
665
665
  return Object.fromEntries(this.map);
666
666
  }
667
- }, $t = class {
667
+ }, Zt = class {
668
668
  constructor(e) {
669
- D(this, "policy", void 0), D(this, "kept", []), this.policy = e;
669
+ k(this, "policy", void 0), k(this, "kept", []), this.policy = e;
670
670
  }
671
671
  push(e) {
672
672
  let { enabled: t, maxRecords: n } = this.policy();
@@ -681,7 +681,7 @@ var qt = class {
681
681
  ...e,
682
682
  attributes: {
683
683
  ...e.attributes,
684
- [De]: !0
684
+ [Te]: !0
685
685
  }
686
686
  }));
687
687
  }
@@ -697,9 +697,9 @@ var qt = class {
697
697
  clear() {
698
698
  this.kept = [];
699
699
  }
700
- }, z = class {
701
- constructor(e, t = ie, n = !1) {
702
- D(this, "handler", void 0), D(this, "throttleMs", void 0), D(this, "consoleFallback", void 0), D(this, "counters", /* @__PURE__ */ new Map()), D(this, "lastEmitted", /* @__PURE__ */ new Map()), this.handler = e, this.throttleMs = t, this.consoleFallback = n;
700
+ }, V = class {
701
+ constructor(e, t = te, n = !1) {
702
+ k(this, "handler", void 0), k(this, "throttleMs", void 0), k(this, "consoleFallback", void 0), k(this, "counters", /* @__PURE__ */ new Map()), k(this, "lastEmitted", /* @__PURE__ */ new Map()), this.handler = e, this.throttleMs = t, this.consoleFallback = n;
703
703
  }
704
704
  setPolicy(e, t) {
705
705
  this.throttleMs = e, this.consoleFallback = t;
@@ -725,11 +725,11 @@ var qt = class {
725
725
  }, { handler: s } = this;
726
726
  if (!s) return !0;
727
727
  try {
728
- A(() => {
728
+ M(() => {
729
729
  s(o);
730
730
  });
731
731
  } catch {
732
- this.count("handler.threw"), this.consoleFallback && typeof console < "u" && A(() => {
732
+ this.count("handler.threw"), this.consoleFallback && typeof console < "u" && M(() => {
733
733
  console.warn(`${f} The onDiagnostic handler threw an error.`);
734
734
  });
735
735
  }
@@ -756,12 +756,12 @@ var qt = class {
756
756
  }
757
757
  };
758
758
  // src/core/drops.ts
759
- function en(e, t) {
759
+ function Qt(e, t) {
760
760
  e.length < 20 && !e.includes(t) && e.push(t);
761
761
  }
762
- var tn = class {
762
+ var $t = class {
763
763
  constructor(e, t) {
764
- D(this, "config", void 0), D(this, "diagnostics", void 0), D(this, "pending", /* @__PURE__ */ new Map()), D(this, "scheduled", !1), D(this, "reporting", !1), D(this, "lost", {}), this.config = e, this.diagnostics = t;
764
+ k(this, "config", void 0), k(this, "diagnostics", void 0), k(this, "pending", /* @__PURE__ */ new Map()), k(this, "scheduled", !1), k(this, "reporting", !1), k(this, "lost", {}), this.config = e, this.diagnostics = t;
765
765
  }
766
766
  add(e, t, n = [], r = t.length) {
767
767
  if (r > 0 && (this.lost[e] = (this.lost[e] ?? 0) + r), !this.config.onDrop || this.reporting || t.length === 0 && n.length === 0) return;
@@ -773,12 +773,12 @@ var tn = class {
773
773
  journeyIds: [],
774
774
  actions: []
775
775
  }, this.pending.set(e, i)), i.records += r;
776
- for (let e of n) en(i.batchIds, e);
776
+ for (let e of n) Qt(i.batchIds, e);
777
777
  for (let e of t) {
778
- let t = rt(e, b);
779
- typeof t == "string" && en(i.journeyIds, t);
780
- let n = nt(e) ? e.body : void 0;
781
- typeof n == "string" && en(i.actions, n);
778
+ let t = tt(e, S);
779
+ typeof t == "string" && Qt(i.journeyIds, t);
780
+ let n = et(e) ? e.body : void 0;
781
+ typeof n == "string" && Qt(i.actions, n);
782
782
  }
783
783
  this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
784
784
  this.flush();
@@ -795,8 +795,8 @@ var tn = class {
795
795
  if (t) {
796
796
  this.reporting = !0;
797
797
  for (let n of e) this.diagnostics.guard("handler.threw", "The onDrop hook threw an error.", () => {
798
- et(() => {
799
- A(() => {
798
+ Qe(() => {
799
+ M(() => {
800
800
  t(n);
801
801
  });
802
802
  });
@@ -804,15 +804,15 @@ var tn = class {
804
804
  this.reporting = !1;
805
805
  }
806
806
  }
807
- }, nn = class {
807
+ }, en = class {
808
808
  constructor(e) {
809
- D(this, "onDrop", void 0), D(this, "actions", {
809
+ k(this, "onDrop", void 0), k(this, "actions", {
810
810
  head: [],
811
811
  tail: []
812
- }), D(this, "others", {
812
+ }), k(this, "others", {
813
813
  head: [],
814
814
  tail: []
815
- }), D(this, "arrivals", 0), this.onDrop = e;
815
+ }), k(this, "arrivals", 0), this.onDrop = e;
816
816
  }
817
817
  get records() {
818
818
  return this.inOrder();
@@ -822,7 +822,7 @@ var tn = class {
822
822
  return e.head.length + e.tail.length + t.head.length + t.tail.length;
823
823
  }
824
824
  push(e, t) {
825
- let n = nt(e), r = n ? this.actions : this.others, i = n ? pe : t, a = {
825
+ let n = et(e), r = n ? this.actions : this.others, i = n ? de : t, a = {
826
826
  record: e,
827
827
  arrival: this.arrivals
828
828
  };
@@ -851,11 +851,11 @@ var tn = class {
851
851
  ...t.tail
852
852
  ].sort((e, t) => e.arrival - t.arrival).map((e) => e.record);
853
853
  }
854
- }, rn = "error.", an = [
855
- w,
856
- b,
857
- Ce
858
- ], on = {
854
+ }, tn = "error.", nn = [
855
+ E,
856
+ S,
857
+ be
858
+ ], rn = {
859
859
  processor: {
860
860
  label: "A processor",
861
861
  code: "record.dropped_by_processor",
@@ -866,47 +866,47 @@ var tn = class {
866
866
  code: "record.dropped_by_redact",
867
867
  refused: "redact is not a function. The library drops each record until redact is a function or null."
868
868
  }
869
- }, B = (e) => typeof e == "number" && Number.isFinite(e), sn = (e) => Array.isArray(e) && e.every(B), V = (e) => typeof e == "string" && /^\d{1,20}$/.test(e), cn = (e) => typeof e == "string" && /^[0-9a-f]{32}$/.test(e), ln = (e) => typeof e == "string" && /^[0-9a-f]{16}$/.test(e), un = (e) => e === "" || ln(e), dn = (e) => e === "counter", fn = (e) => e === "histogram", pn = (e) => e === "client" || e === "internal", mn = (e) => e === "error" || e === "unset", hn = {
870
- "metric.type": dn,
871
- "metric.value": B,
872
- [n.start]: V
869
+ }, H = (e) => typeof e == "number" && Number.isFinite(e), an = (e) => Array.isArray(e) && e.every(H), U = (e) => typeof e == "string" && /^\d{1,20}$/.test(e), on = (e) => typeof e == "string" && /^[0-9a-f]{32}$/.test(e), sn = (e) => typeof e == "string" && /^[0-9a-f]{16}$/.test(e), cn = (e) => e === "" || sn(e), ln = (e) => e === "counter", un = (e) => e === "histogram", dn = (e) => e === "client" || e === "internal", fn = (e) => e === "error" || e === "unset", pn = {
870
+ "metric.type": ln,
871
+ "metric.value": H,
872
+ [n.start]: U
873
+ }, mn = {
874
+ "metric.type": un,
875
+ [n.start]: U,
876
+ [n.count]: H,
877
+ [n.sum]: H,
878
+ [n.min]: H,
879
+ [n.max]: H,
880
+ [n.bounds]: an,
881
+ [n.buckets]: an
882
+ }, hn = {
883
+ [l.kind]: dn,
884
+ [l.parentId]: cn,
885
+ [l.start]: U,
886
+ [l.end]: U,
887
+ [l.status]: fn
873
888
  }, gn = {
874
- "metric.type": fn,
875
- [n.start]: V,
876
- [n.count]: B,
877
- [n.sum]: B,
878
- [n.min]: B,
879
- [n.max]: B,
880
- [n.bounds]: sn,
881
- [n.buckets]: sn
882
- }, _n = {
883
- [o.kind]: pn,
884
- [o.parentId]: un,
885
- [o.start]: V,
886
- [o.end]: V,
887
- [o.status]: mn
888
- }, vn = {
889
- [o.linkTraceId]: cn,
890
- [o.linkSpanId]: ln
889
+ [l.linkTraceId]: on,
890
+ [l.linkSpanId]: sn
891
891
  };
892
- function yn(e) {
893
- let t = e[x], n = e[v];
894
- return t === "span" && n === "uiobs.traces" ? [_n, vn] : t !== "metric" || n !== "uiobs.metrics" ? [] : e["metric.type"] === "histogram" ? [gn] : [hn];
892
+ function _n(e) {
893
+ let t = e[C], n = e[b];
894
+ return t === "span" && n === "uiobs.traces" ? [hn, gn] : t !== "metric" || n !== "uiobs.metrics" ? [] : e["metric.type"] === "histogram" ? [mn] : [pn];
895
895
  }
896
- function bn(e) {
896
+ function vn(e) {
897
897
  let t = {};
898
- for (let n of yn(e)) {
898
+ for (let n of _n(e)) {
899
899
  let r = Object.keys(n);
900
900
  if (r.every((t) => n[t](e[t]))) for (let n of r) t[n] = e[n];
901
901
  }
902
902
  return t;
903
903
  }
904
- function H(e) {
904
+ function W(e) {
905
905
  return e;
906
906
  }
907
- var xn = class {
907
+ var yn = class {
908
908
  constructor(e) {
909
- D(this, "deps", void 0), D(this, "resourceCache", null), this.deps = e;
909
+ k(this, "deps", void 0), k(this, "resourceCache", null), this.deps = e;
910
910
  }
911
911
  invalidateResource() {
912
912
  this.resourceCache = null;
@@ -916,8 +916,8 @@ var xn = class {
916
916
  }
917
917
  passesLevel(e, n, r) {
918
918
  let { config: i } = this.deps;
919
- if (r !== void 0 && he.includes(r)) return !0;
920
- let a = this.deps.remote.sampling?.minLevelFor(n) ?? ct(n, i);
919
+ if (r !== void 0 && me.includes(r)) return !0;
920
+ let a = this.deps.remote.sampling?.minLevelFor(n) ?? ot(n, i);
921
921
  return t[e] >= t[a];
922
922
  }
923
923
  keepForDebug(e) {
@@ -927,79 +927,83 @@ var xn = class {
927
927
  r && n.push(r);
928
928
  }
929
929
  build(e, t = !1) {
930
- let { config: n, diagnostics: r, tracing: i, journey: a, sequence: o, limits: s, remote: c } = this.deps;
930
+ let { config: n, diagnostics: r, tracing: i, journey: o, sequence: s, limits: c, remote: l } = this.deps;
931
931
  if (!t && !this.isEnabled(e.level, e.namespace, e.type)) return r.count("record.dropped_by_level"), this.keepForDebug(e), {
932
932
  record: null,
933
933
  dropped: "level"
934
934
  };
935
- let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = lt({
935
+ let u = e.trace ?? e.snapshot?.trace ?? i.resolve(), d = e.snapshot ? e.snapshot.journey : o.current(), f = st({
936
936
  level: e.level,
937
937
  type: e.type,
938
938
  namespace: e.namespace,
939
- journeyId: u?.id ?? "",
940
- traceId: l.traceId,
939
+ journeyId: d?.id ?? "",
940
+ traceId: u.traceId,
941
941
  aggregated: e.aggregated
942
- }, n, c.sampling?.current() ?? null);
943
- if (!t && !d) return r.count("record.dropped_by_sampling"), this.keepForDebug(e), {
942
+ }, n, l.sampling?.current() ?? null);
943
+ if (!t && !f) return r.count("record.dropped_by_sampling"), this.keepForDebug(e), {
944
944
  record: null,
945
945
  dropped: "sampling"
946
946
  };
947
- let f = o.next(), p = e.snapshot?.url ?? We(r), m = n.metadata.pageUrl ? He(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
947
+ let p = s.next(), m = e.snapshot?.url ?? He(r), h = n.metadata.pageUrl ? Be(m, n.capture.fullUrls, n.capture.urlTransform, r) : "", g, _ = 0;
948
948
  try {
949
- let t = j(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = j(this.provided(), s, r), i = j(e.scoped ?? {}, s, r), a = j(e.payload ?? {}, s, r);
950
- g = t.bytes + n.bytes + i.bytes + a.bytes, h = {
951
- ...H(t.value),
952
- ...H(n.value),
953
- ...H(i.value),
954
- ...H(a.value)
949
+ let t = N(e.snapshot?.context ?? this.deps.context.getAll(), c, r), n = N(this.provided(), c, r), i = N(e.scoped ?? {}, c, r), a = N(e.payload ?? {}, c, r);
950
+ _ = t.bytes + n.bytes + i.bytes + a.bytes, g = {
951
+ ...W(t.value),
952
+ ...W(n.value),
953
+ ...W(i.value),
954
+ ...W(a.value)
955
955
  };
956
956
  } catch (e) {
957
- r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [Ne]: !0 };
957
+ r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), g = { [je]: !0 };
958
958
  }
959
- Object.assign(h, e.fixed), h[x] = e.type, h[S] = f, h[v] = e.namespace, h[w] = m, u && (h[b] = u.id, h[Ce] = u.name, u.parentId !== void 0 && (h[ve] = u.parentId));
960
- let ee = Qe(e.body, s.maxBodyChars);
961
- ee !== e.body && r.count("record.truncated");
962
- let _ = {
963
- timeUnixNano: e.snapshot?.timeUnixNano ?? Ie(),
964
- traceId: l.traceId,
965
- spanId: l.spanId,
966
- traceFlags: l.traceFlags,
967
- severityNumber: re[e.level],
959
+ Object.assign(g, e.fixed), g[C] = e.type, g[w] = p, g[b] = e.namespace, g[E] = h, d && (g[S] = d.id, g[be] = d.name, d.parentId !== void 0 && (g[he] = d.parentId));
960
+ let v = Xe(e.body, c.maxBodyChars);
961
+ v !== e.body && r.count("record.truncated");
962
+ let y = {
963
+ timeUnixNano: e.snapshot?.timeUnixNano ?? Pe(),
964
+ traceId: u.traceId,
965
+ spanId: u.spanId,
966
+ traceFlags: u.traceFlags,
967
+ severityNumber: a[e.level],
968
968
  severityText: e.level,
969
- body: ee,
970
- attributes: h,
969
+ body: v,
970
+ attributes: g,
971
971
  resource: this.resource()
972
- }, te = this.hookStages();
973
- if (te.length > 0) {
974
- let t = this.applyHooks(_, te, e.fixed);
972
+ }, ee = this.hookStages();
973
+ if (ee.length > 0) {
974
+ let t = this.applyHooks(y, ee, e.fixed);
975
975
  if (typeof t == "string") return {
976
976
  record: null,
977
977
  dropped: t
978
978
  };
979
- ({record: _, bytes: g} = t);
979
+ ({record: y, bytes: _} = t);
980
980
  }
981
- let ne = {
982
- [x]: e.type,
983
- [S]: f,
984
- [v]: e.namespace
981
+ let te = {
982
+ [C]: e.type,
983
+ [w]: p,
984
+ [b]: e.namespace
985
985
  };
986
- return { record: this.fit(_, g, ne, e.fixed) };
986
+ return { record: this.fit(y, _, te, e.fixed) };
987
987
  }
988
988
  redactForwarded(e) {
989
- let { redact: t } = this.deps.config;
990
- if (!t) return e;
991
- let n = [[t, "redact"]], r = this.applyHooks(e, n, bn(e.attributes));
992
- return typeof r == "string" ? null : r.record;
989
+ let { config: t, diagnostics: n, limits: r } = this.deps, i = vn(e.attributes), a = Math.max(r.maxAttributeCount, 128), o = {
990
+ ...r,
991
+ maxAttributeCount: a
992
+ }, s = W(N(e.resource, o, n).value), c = t.redact ? [[t.redact, "redact"]] : [], l = this.applyHooks({
993
+ ...e,
994
+ resource: s
995
+ }, c, i);
996
+ return typeof l == "string" ? null : l.record;
993
997
  }
994
998
  rehook(e) {
995
- let { config: t, diagnostics: n, limits: r, remote: i, debug: a } = this.deps, { attributes: o } = e, s = String(o[v]), c = this.passesLevel(e.severityText, s, o[x]), l = c && ot(e, t, i.sampling?.current() ?? null), u = t.metadata.pageUrl ? He(String(o[w]), t.capture.fullUrls, t.capture.urlTransform, n) : "", d = Qe(e.body, r.maxBodyChars);
999
+ let { config: t, diagnostics: n, limits: r, remote: i, debug: a } = this.deps, { attributes: o } = e, s = String(o[b]), c = this.passesLevel(e.severityText, s, o[C]), l = c && it(e, t, i.sampling?.current() ?? null), u = t.metadata.pageUrl ? Be(String(o[E]), t.capture.fullUrls, t.capture.urlTransform, n) : "", d = Xe(e.body, r.maxBodyChars);
996
1000
  d !== e.body && n.count("record.truncated");
997
- let f = bn(o), p = {
1001
+ let f = vn(o), p = {
998
1002
  ...e,
999
1003
  body: d,
1000
1004
  attributes: {
1001
1005
  ...o,
1002
- [w]: u
1006
+ [E]: u
1003
1007
  },
1004
1008
  resource: this.resource()
1005
1009
  }, m = this.applyHooks(p, this.hookStages(), f), h = typeof m == "string" ? null : this.fit(m.record, m.bytes, o, f);
@@ -1013,20 +1017,20 @@ var xn = class {
1013
1017
  body: e.body
1014
1018
  });
1015
1019
  let o = {
1016
- [x]: n[x],
1017
- [S]: n[S],
1018
- [v]: n[v],
1019
- [Te]: !0,
1020
- [be]: t
1020
+ [C]: n[C],
1021
+ [w]: n[w],
1022
+ [b]: n[b],
1023
+ [Ce]: !0,
1024
+ [_e]: t
1021
1025
  };
1022
- for (let t of an) t in e.attributes && (o[t] = e.attributes[t]);
1023
- for (let [t, n] of Object.entries(e.attributes)) t.startsWith(rn) && (o[t] = n);
1024
- let s = j(o, a, i).bytes;
1025
- s > a.maxRecordBytes && "error.data" in o && (Reflect.deleteProperty(o, ue), s = j(o, a, i).bytes);
1026
- let c = e.attributes[y];
1026
+ for (let t of nn) t in e.attributes && (o[t] = e.attributes[t]);
1027
+ for (let [t, n] of Object.entries(e.attributes)) t.startsWith(tn) && (o[t] = n);
1028
+ let s = N(o, a, i).bytes;
1029
+ s > a.maxRecordBytes && "error.data" in o && (Reflect.deleteProperty(o, se), s = N(o, a, i).bytes);
1030
+ let c = e.attributes[x];
1027
1031
  if (c !== void 0) {
1028
- let e = j(c, a, i).bytes;
1029
- s + e <= a.maxRecordBytes && (o[y] = c);
1032
+ let e = N(c, a, i).bytes;
1033
+ s + e <= a.maxRecordBytes && (o[x] = c);
1030
1034
  }
1031
1035
  return Object.assign(o, r), e.attributes = o, e;
1032
1036
  }
@@ -1041,7 +1045,7 @@ var xn = class {
1041
1045
  if (typeof t == "string") return t;
1042
1046
  r = t;
1043
1047
  }
1044
- let { diagnostics: i, limits: a } = this.deps, o = j(r.attributes, a, i), s = H(o.value);
1048
+ let { diagnostics: i, limits: a } = this.deps, o = N(r.attributes, a, i), s = W(o.value);
1045
1049
  return Object.assign(s, n), {
1046
1050
  record: {
1047
1051
  ...r,
@@ -1051,25 +1055,25 @@ var xn = class {
1051
1055
  };
1052
1056
  }
1053
1057
  runHook(e, t, n) {
1054
- let { diagnostics: r } = this.deps, { label: i, code: a, refused: o } = on[t], s;
1058
+ let { diagnostics: r } = this.deps, { label: i, code: o, refused: s } = rn[t], c;
1055
1059
  try {
1056
- s = e(n);
1060
+ c = e(n);
1057
1061
  } catch (e) {
1058
- return r.report(a, `${i} threw an error. The library dropped the record.`, void 0, e), t;
1062
+ return r.report(o, `${i} threw an error. The library dropped the record.`, void 0, e), t;
1059
1063
  }
1060
- if (s === null) return e === N ? r.report(a, o) : r.count(a), t;
1061
- let c = s ?? n;
1062
- return Fe(c) ? Le(c.severityText) ? {
1063
- ...c,
1064
- severityNumber: re[c.severityText]
1065
- } : (r.report("record.dropped_malformed", `${i} set a severityText that is not a log level. The library dropped the record.`), "malformed") : c === 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);
1064
+ if (c === null) return e === F ? r.report(o, s) : r.count(o), t;
1065
+ let l = c ?? n;
1066
+ return Ne(l) ? Fe(l.severityText) ? {
1067
+ ...l,
1068
+ severityNumber: a[l.severityText]
1069
+ } : (r.report("record.dropped_malformed", `${i} set a severityText that is not a log level. The library dropped the record.`), "malformed") : l === 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(o, `${i} returned a value that is not a record. The library dropped the record.`), t);
1066
1070
  }
1067
1071
  provided() {
1068
1072
  let e = this.deps.config.contextProvider;
1069
1073
  if (!e) return {};
1070
1074
  let { diagnostics: t } = this.deps, n = t.guard("handler.threw", "The contextProvider threw an error. The record has no attributes from it.", () => {
1071
1075
  let t = e();
1072
- return t === void 0 ? {} : T(t) && typeof t.then != "function" ? t : null;
1076
+ return t === void 0 ? {} : D(t) && typeof t.then != "function" ? t : null;
1073
1077
  });
1074
1078
  return n === null && t.report("config.invalid", "contextProvider must return an object of attributes. The library ignores the value."), n ?? {};
1075
1079
  }
@@ -1077,34 +1081,34 @@ var xn = class {
1077
1081
  if (this.resourceCache) return this.resourceCache;
1078
1082
  let { config: t, identity: n, platform: a } = this.deps;
1079
1083
  return this.resourceCache = {
1080
- [r]: t.serviceName,
1081
- [je]: t.serviceVersion,
1082
- [Pe]: t.environment,
1083
- [me]: ye,
1084
- [e]: C,
1085
- [m]: Ee,
1086
- [le]: a.platform,
1087
- [te]: n.sessionId,
1088
- [i]: n.tabId,
1089
- [Ae]: n.contextId,
1090
- ...t.metadata.userAgent ? { [se]: a.userAgent } : {},
1091
- ...!t.metadata.openfin || a.openfinUuid === void 0 ? {} : { [ee]: a.openfinUuid },
1092
- ...!t.metadata.openfin || a.openfinName === void 0 ? {} : { [Me]: a.openfinName }
1084
+ [ke]: t.serviceName,
1085
+ [y]: t.serviceVersion,
1086
+ [oe]: t.environment,
1087
+ [e]: Se,
1088
+ [fe]: T,
1089
+ [pe]: ge,
1090
+ [Ae]: a.platform,
1091
+ [i]: n.sessionId,
1092
+ [p]: n.tabId,
1093
+ [Me]: n.contextId,
1094
+ ...t.metadata.userAgent ? { [Oe]: a.userAgent } : {},
1095
+ ...!t.metadata.openfin || a.openfinUuid === void 0 ? {} : { [r]: a.openfinUuid },
1096
+ ...!t.metadata.openfin || a.openfinName === void 0 ? {} : { [_]: a.openfinName }
1093
1097
  }, this.resourceCache;
1094
1098
  }
1095
- }, Sn = 1e3, Cn = {
1099
+ }, bn = 1e3, xn = {
1096
1100
  start: "ui.start",
1097
1101
  interaction: "ui.interaction",
1098
1102
  navigation: "ui.navigation",
1099
1103
  explicit: "ui.trace",
1100
1104
  maxAge: "ui.trace"
1101
1105
  };
1102
- function wn(e) {
1103
- return `${String(Math.round(e * Sn))}000`;
1106
+ function Sn(e) {
1107
+ return `${String(Math.round(e * bn))}000`;
1104
1108
  }
1105
- function Tn(e) {
1109
+ function Cn(e) {
1106
1110
  return {
1107
- name: Cn[e.reason],
1111
+ name: xn[e.reason],
1108
1112
  kind: "internal",
1109
1113
  traceId: e.traceId,
1110
1114
  spanId: e.spanId,
@@ -1115,72 +1119,73 @@ function Tn(e) {
1115
1119
  attributes: {}
1116
1120
  };
1117
1121
  }
1118
- function En(e) {
1122
+ function wn(e) {
1119
1123
  return {
1120
- [o.kind]: e.kind,
1121
- [o.parentId]: e.parentSpanId,
1122
- [o.start]: wn(e.startMs),
1123
- [o.end]: wn(e.endMs),
1124
- [o.status]: e.error ? "error" : "unset",
1124
+ [l.kind]: e.kind,
1125
+ [l.parentId]: e.parentSpanId,
1126
+ [l.start]: Sn(e.startMs),
1127
+ [l.end]: Sn(e.endMs),
1128
+ [l.status]: e.error ? "error" : "unset",
1125
1129
  ...e.link ? {
1126
- [o.linkTraceId]: e.link.traceId,
1127
- [o.linkSpanId]: e.link.spanId
1130
+ [l.linkTraceId]: e.link.traceId,
1131
+ [l.linkSpanId]: e.link.spanId
1128
1132
  } : {}
1129
1133
  };
1130
1134
  }
1131
1135
  // src/core/runtime.ts
1132
- var Dn = {
1133
- errors: async () => (await import("./errors-Q3Ng1ciC.js")).ErrorCapture,
1134
- network: async () => (await import("./network-Cg1L2w2r.js")).NetworkCapture,
1135
- interactions: async () => (await import("./interactions-Byxf1C82.js")).InteractionCapture,
1136
- webVitals: async () => (await import("./web-vitals-4pWACwaR.js")).WebVitalsCapture,
1137
- longFrames: async () => (await import("./long-frames-Bamjs1WV.js")).LongFrameCapture,
1138
- console: async () => (await import("./console-BsM-fSCQ.js")).ConsoleCapture,
1139
- uncleanExit: async () => (await import("./unclean-exit-BcOB8A2e.js")).UncleanExitCapture,
1140
- userTiming: async () => (await import("./user-timing-4KIJ74Vi.js")).UserTimingCapture,
1141
- reports: async () => (await import("./reports--8APRLa-.js")).ReportCapture,
1142
- resourceTiming: async () => (await import("./resource-timing-BzR05rE-.js")).ResourceTimingCapture,
1143
- lifecycle: async () => (await import("./lifecycle-B2PlIuQu.js")).LifecycleCapture,
1144
- framePhases: async () => (await import("./profiler-frames-C4ySHN0X.js")).FramePhasesCapture,
1145
- framePacing: async () => (await import("./profiler-frames-C4ySHN0X.js")).FramePacingCapture,
1146
- replay: async () => (await import("./replay-B0M8kWz_.js")).ReplayCapture
1147
- }, On = /* @__PURE__ */ new WeakMap(), kn = 0;
1148
- function U(e) {
1149
- let t = On.get(e);
1150
- return t === void 0 && (t = ++kn, On.set(e, t)), t;
1151
- }
1152
- var An = Symbol.for(a), jn = Symbol.for(s), Mn = ["batching", "retention"], Nn = [
1136
+ var Tn = {
1137
+ errors: async () => (await import("./errors-C-LYbqyB.js")).ErrorCapture,
1138
+ network: async () => (await import("./network-Cc3tSB7e.js")).NetworkCapture,
1139
+ interactions: async () => (await import("./interactions-DdKPMWIN.js")).InteractionCapture,
1140
+ webVitals: async () => (await import("./web-vitals-CGwXGF-M.js")).WebVitalsCapture,
1141
+ longFrames: async () => (await import("./long-frames-6NGl1-uN.js")).LongFrameCapture,
1142
+ console: async () => (await import("./console-CAyCQOpm.js")).ConsoleCapture,
1143
+ uncleanExit: async () => (await import("./unclean-exit-Bj6gYHeL.js")).UncleanExitCapture,
1144
+ userTiming: async () => (await import("./user-timing-Duz0d-OA.js")).UserTimingCapture,
1145
+ reports: async () => (await import("./reports-CX57-S9s.js")).ReportCapture,
1146
+ resourceTiming: async () => (await import("./resource-timing-CWVDCbrY.js")).ResourceTimingCapture,
1147
+ lifecycle: async () => (await import("./lifecycle-CMHz2Zbs.js")).LifecycleCapture,
1148
+ framePhases: async () => (await import("./profiler-frames-CGXZeZ_3.js")).FramePhasesCapture,
1149
+ framePacing: async () => (await import("./profiler-frames-CGXZeZ_3.js")).FramePacingCapture,
1150
+ replay: async () => (await import("./replay-Dy6OiaOZ.js")).ReplayCapture
1151
+ }, En = /* @__PURE__ */ new WeakMap(), Dn = 0;
1152
+ function G(e) {
1153
+ let t = En.get(e);
1154
+ return t === void 0 && (t = ++Dn, En.set(e, t)), t;
1155
+ }
1156
+ var On = Symbol.for(o), kn = Symbol.for(u), An = ["batching", "retention"], jn = [
1153
1157
  "log",
1154
1158
  "event",
1155
1159
  "action"
1156
- ], Pn = "configure() could not read its options. The library drops each record and installs no capture until a configure() call sets redact to a function or null.", Fn = "shutdown() got invalid options. The library discards the records in memory. An invalid clearStorage removes the \"context\" scope.", In = "flush() got invalid options. The library waits the default 5000 ms.", Ln = /* @__PURE__ */ new Set([
1160
+ ], Mn = "configure() could not read its options. The library drops each record and installs no capture until a configure() call sets redact to a function or null.", Nn = "shutdown() got invalid options. The library discards the records in memory. An invalid clearStorage removes the \"context\" scope.", Pn = "flush() got invalid options. The library waits the default 5000 ms.", Fn = /* @__PURE__ */ new Set([
1157
1161
  "bus.role_resolved",
1162
+ "bus.tab_id_changed",
1158
1163
  "config.reconfigured",
1159
1164
  "security.rotated",
1160
1165
  "journey.adopted",
1161
1166
  "journey.expired"
1162
1167
  ]);
1163
- function Rn(e) {
1168
+ function In(e) {
1164
1169
  return JSON.stringify({
1165
1170
  ...e,
1166
- urlTransform: e.urlTransform ? U(e.urlTransform) : void 0,
1171
+ urlTransform: e.urlTransform ? G(e.urlTransform) : void 0,
1167
1172
  webVitals: typeof e.webVitals == "object" ? { loader: e.webVitals.loader !== void 0 } : e.webVitals,
1168
1173
  ignoreUrls: e.ignoreUrls.map(String),
1169
1174
  propagateTraceHeaderTo: e.propagateTraceHeaderTo.map(String),
1170
1175
  userTiming: typeof e.userTiming == "object" ? { include: e.userTiming.include?.map(String) } : e.userTiming,
1171
- plugins: e.plugins.map(U)
1176
+ plugins: e.plugins.map(G)
1172
1177
  });
1173
1178
  }
1174
- function zn(e) {
1175
- if (!T(e)) return e;
1179
+ function Ln(e) {
1180
+ if (!D(e)) return e;
1176
1181
  let t = { ...e };
1177
1182
  for (let e of ["url", "endpoint"]) {
1178
1183
  let n = t[e];
1179
- typeof n == "string" && (t[e] = He(n, !1));
1184
+ typeof n == "string" && (t[e] = Be(n, !1));
1180
1185
  }
1181
1186
  return t;
1182
1187
  }
1183
- function Bn(e) {
1188
+ function Rn(e) {
1184
1189
  return {
1185
1190
  ...e,
1186
1191
  endpoint: null,
@@ -1195,10 +1200,10 @@ function Bn(e) {
1195
1200
  }
1196
1201
  };
1197
1202
  }
1198
- function Vn(e) {
1203
+ function zn(e) {
1199
1204
  return !!e.endpoint || !!e.metricsEndpoint || !!e.tracesEndpoint || !!e.transport || !!e.transportWorker;
1200
1205
  }
1201
- function Hn(e, t) {
1206
+ function Bn(e, t) {
1202
1207
  return {
1203
1208
  status: e,
1204
1209
  accepted: 0,
@@ -1209,13 +1214,13 @@ function Hn(e, t) {
1209
1214
  ...t
1210
1215
  };
1211
1216
  }
1212
- function W(e) {
1213
- return Hn(e.pending > 0 ? "timeout" : "complete", e);
1217
+ function K(e) {
1218
+ return Bn(e.pending > 0 ? "timeout" : "complete", e);
1214
1219
  }
1215
- function G(e) {
1216
- return e.sdkVersion === C;
1220
+ function Vn(e) {
1221
+ return e.sdkVersion === T;
1217
1222
  }
1218
- var K = class e {
1223
+ var q = class e {
1219
1224
  isRotating() {
1220
1225
  return this.rotating;
1221
1226
  }
@@ -1223,59 +1228,59 @@ var K = class e {
1223
1228
  typeof e == "boolean" && (this.config.lockConfiguration = e);
1224
1229
  }
1225
1230
  constructor(e, t) {
1226
- D(this, "rotating", !1), D(this, "rotationSeq", 0), D(this, "profilerOn", !1), D(this, "closingContext", !1), D(this, "mismatchVersion", null), D(this, "contextMismatch", !1), D(this, "rotation", void 0), D(this, "memoryStorage", void 0), D(this, "storagePersistence", "off"), D(this, "recordingDiagnostic", !1), D(this, "holdingRecords", !1), D(this, "heldDiagnostics", []), D(this, "diagnosticLogger", new R(() => this, ae)), D(this, "debugBuffer", new $t(() => this.config.debugBuffer)), D(this, "explicitSecurityContext", void 0), D(this, "ownerAdopted", !1), D(this, "sdkVersion", C), D(this, "protocol", d), D(this, "diagnostics", void 0), D(this, "config", void 0), D(this, "platform", void 0), D(this, "identity", void 0), D(this, "backing", Je()), D(this, "stores", {
1231
+ k(this, "rotating", !1), k(this, "rotationSeq", 0), k(this, "profilerOn", !1), k(this, "closingContext", !1), k(this, "mismatchVersion", null), k(this, "contextMismatch", !1), k(this, "rotation", void 0), k(this, "memoryStorage", void 0), k(this, "storagePersistence", "off"), k(this, "recordingDiagnostic", !1), k(this, "holdingRecords", !1), k(this, "heldDiagnostics", []), k(this, "diagnosticLogger", new B(() => this, ne)), k(this, "debugBuffer", new Zt(() => this.config.debugBuffer)), k(this, "explicitSecurityContext", void 0), k(this, "ownerAdopted", !1), k(this, "sdkVersion", T), k(this, "protocol", d), k(this, "diagnostics", void 0), k(this, "config", void 0), k(this, "platform", void 0), k(this, "identity", void 0), k(this, "backing", Ke()), k(this, "stores", {
1227
1232
  local: () => this.backing.local(),
1228
1233
  session: () => this.backing.session(),
1229
1234
  opener: () => this.backing.opener?.() ?? null
1230
- }), D(this, "identityBuiltAs", void 0), D(this, "sessionTouch", void 0), D(this, "context", new Qt()), D(this, "breadcrumbs", void 0), D(this, "tracing", void 0), D(this, "sequence", new Xt()), D(this, "journey", void 0), D(this, "builder", void 0), D(this, "remote", {
1235
+ }), k(this, "identityBuiltAs", void 0), k(this, "sessionTouch", void 0), k(this, "context", new Xt()), k(this, "breadcrumbs", void 0), k(this, "tracing", void 0), k(this, "sequence", new Jt()), k(this, "journey", void 0), k(this, "builder", void 0), k(this, "remote", {
1231
1236
  sampling: null,
1232
1237
  changed: () => {
1233
1238
  this.refreshCaptures();
1234
1239
  }
1235
- }), D(this, "identityEpoch", 0), D(this, "errorHook", void 0), D(this, "replayConsent", void 0), D(this, "replay", void 0), D(this, "remoteCaptureTimer", void 0), D(this, "installedCaptureKey", ""), D(this, "replayBuiltKey", ""), D(this, "console", void 0), D(this, "drops", void 0), D(this, "meter", void 0), D(this, "bus", null), D(this, "busBuilt", void 0), D(this, "busLoad", void 0), D(this, "sender", void 0), D(this, "senderLoad", void 0), D(this, "pendingRecords", new nn((e) => {
1240
+ }), k(this, "identityEpoch", 0), k(this, "errorHook", void 0), k(this, "replayConsent", void 0), k(this, "replay", void 0), k(this, "remoteCaptureTimer", void 0), k(this, "installedCaptureKey", ""), k(this, "replayBuiltKey", ""), k(this, "console", void 0), k(this, "drops", void 0), k(this, "meter", void 0), k(this, "bus", null), k(this, "busBuilt", void 0), k(this, "busLoad", void 0), k(this, "sender", void 0), k(this, "senderLoad", void 0), k(this, "pendingRecords", new en((e) => {
1236
1241
  this.dropHeld(e);
1237
- })), D(this, "pausedLoss", /* @__PURE__ */ new WeakSet()), D(this, "carried", []), D(this, "sessionPicked", !1), D(this, "deliveryClosed", !1), D(this, "parkedSender", void 0), D(this, "retiring", void 0), D(this, "startFailed", !1), D(this, "running", !1), D(this, "openGate", void 0), D(this, "startGate", new Promise((e) => {
1242
+ })), k(this, "pausedLoss", /* @__PURE__ */ new WeakSet()), k(this, "carried", []), k(this, "sessionPicked", !1), k(this, "deliveryClosed", !1), k(this, "parkedSender", void 0), k(this, "retiring", void 0), k(this, "startFailed", !1), k(this, "running", !1), k(this, "openGate", void 0), k(this, "startGate", new Promise((e) => {
1238
1243
  this.openGate = e;
1239
- })), D(this, "captures", []), D(this, "captureGeneration", 0), D(this, "captureOnce", {
1244
+ })), k(this, "captures", []), k(this, "captureGeneration", 0), k(this, "captureOnce", {
1240
1245
  webVitals: !1,
1241
1246
  navigationTiming: !1,
1242
1247
  longFrames: !1,
1243
1248
  uncleanExit: !1,
1244
1249
  userTiming: !1
1245
- }), D(this, "bootBuffer", new nn((e) => {
1250
+ }), k(this, "bootBuffer", new en((e) => {
1246
1251
  this.dropHeld(e);
1247
- })), D(this, "forwardBuffer", []), D(this, "forwardScheduled", !1), D(this, "roleResolved", !1), D(this, "started", Promise.resolve()), D(this, "ready", !1), D(this, "destroyed", !1), D(this, "stopping", void 0), D(this, "lastSendAt", null), D(this, "lastGapAt", 0), D(this, "limits", void 0), D(this, "journeyOptions", void 0), D(this, "tunablesLocked", !1), D(this, "degraded", void 0), D(this, "serverReported", !1), D(this, "onPageHide", () => {
1248
- I(this), this.dropPaused(), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1249
- }), D(this, "busCanAccept", (e, t) => this.bus?.isRegistered(e, t) ?? !1), D(this, "busAccept", (e, t, n) => {
1252
+ })), k(this, "forwardBuffer", []), k(this, "forwardScheduled", !1), k(this, "roleResolved", !1), k(this, "started", Promise.resolve()), k(this, "ready", !1), k(this, "destroyed", !1), k(this, "stopping", void 0), k(this, "lastSendAt", null), k(this, "lastGapAt", 0), k(this, "limits", void 0), k(this, "journeyOptions", void 0), k(this, "tunablesLocked", !1), k(this, "degraded", void 0), k(this, "serverReported", !1), k(this, "onPageHide", () => {
1253
+ R(this), this.dropPaused(), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
1254
+ }), k(this, "busCanAccept", (e, t) => this.bus?.isRegistered(e, t) ?? !1), k(this, "busAccept", (e, t, n) => {
1250
1255
  this.destroyed || this.ensureBus().then((r) => {
1251
1256
  r && !this.destroyed && this.diagnostics.guard("bus.send_failed", "The bus could not accept a direct message from a child frame.", () => {
1252
1257
  r.acceptDirect(e, t, n);
1253
1258
  });
1254
1259
  });
1255
- }), D(this, "reportLoss", (e, t, n, r) => {
1260
+ }), k(this, "reportLoss", (e, t, n, r) => {
1256
1261
  this.drops.add(e, t, n, r);
1257
- }), D(this, "reportGap", (e, t) => {
1262
+ }), k(this, "reportGap", (e, t) => {
1258
1263
  this.drops.add(e.reason, t.flatMap((e) => e.records), t.map((e) => e.id));
1259
1264
  let n = Date.now();
1260
- n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new R(() => this, l).warn("stored records were dropped before delivery", {
1265
+ n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new B(() => this, re).warn("stored records were dropped before delivery", {
1261
1266
  "gap.batches": e.batches,
1262
1267
  "gap.records": e.records,
1263
1268
  "gap.reason": e.reason
1264
1269
  }));
1265
- }), this.diagnostics = new z(typeof e.onDiagnostic == "function" ? e.onDiagnostic : void 0), this.platform = Ue(this.diagnostics), this.degraded = t || this.onServer(), this.config = M(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.identity = Ye(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new Ke(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.breadcrumbs = new Zt(this.config.captureLimits.breadcrumbs);
1266
- let n = (e) => st(e, this.config.sampling.defaultRate);
1267
- this.tracing = new jt(this.diagnostics, this.config.correlation.traceMaxAgeMs ?? Infinity, this.config.otelLoader, {
1270
+ }), this.diagnostics = new V(typeof e.onDiagnostic == "function" ? e.onDiagnostic : void 0), this.platform = Ve(this.diagnostics), this.degraded = t || this.onServer(), this.config = P(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.identity = qe(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new We(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.breadcrumbs = new Yt(this.config.captureLimits.breadcrumbs);
1271
+ let n = (e) => at(e, this.config.sampling.defaultRate);
1272
+ this.tracing = new kt(this.diagnostics, this.config.correlation.traceMaxAgeMs ?? Infinity, this.config.otelLoader, {
1268
1273
  enabled: () => this.config.tracesEndpoint !== null,
1269
1274
  keeps: n,
1270
1275
  onEnd: (e) => {
1271
- n(e.traceId) && this.recordSpan(Tn(e));
1276
+ n(e.traceId) && this.recordSpan(Cn(e));
1272
1277
  }
1273
- }), this.limits = { ...this.config.limits }, this.console = new Yt(this.config.consoleOutput, this.diagnostics, this.limits), this.drops = new tn(this.config, this.diagnostics), this.journeyOptions = {
1274
- ...at,
1278
+ }), this.limits = { ...this.config.limits }, this.console = new qt(this.config.consoleOutput, this.diagnostics, this.limits), this.drops = new $t(this.config, this.diagnostics), this.journeyOptions = {
1279
+ ...rt,
1275
1280
  maxAgeMs: this.config.journey.maxAgeMs
1276
- }, this.journey = new it(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1281
+ }, this.journey = new nt(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
1277
1282
  this.bus?.broadcastJourney(e);
1278
- }, this.stores), this.builder = new xn({
1283
+ }, this.stores), this.builder = new yn({
1279
1284
  remote: this.remote,
1280
1285
  config: this.config,
1281
1286
  limits: this.limits,
@@ -1287,7 +1292,7 @@ var K = class e {
1287
1292
  identity: this.identity,
1288
1293
  platform: this.platform,
1289
1294
  debug: this.debugBuffer
1290
- }), this.meter = new qt(() => this.config.metrics.intervalMs, (e, t, n) => {
1295
+ }), this.meter = new Gt(() => this.config.metrics.intervalMs, (e, t, n) => {
1291
1296
  this.emitPoint(e, t, n);
1292
1297
  }, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler()), this.syncProfiler();
1293
1298
  }
@@ -1303,10 +1308,10 @@ var K = class e {
1303
1308
  else {
1304
1309
  this.recordingDiagnostic = !0;
1305
1310
  try {
1306
- (Ln.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1311
+ (Fn.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
1307
1312
  "diagnostic.code": e.code,
1308
1313
  "diagnostic.count": e.count,
1309
- "diagnostic.detail": zn(e.detail)
1314
+ "diagnostic.detail": Ln(e.detail)
1310
1315
  });
1311
1316
  } finally {
1312
1317
  this.recordingDiagnostic = !1;
@@ -1323,11 +1328,11 @@ var K = class e {
1323
1328
  let n = {
1324
1329
  t: Date.now(),
1325
1330
  category: "custom",
1326
- message: Qe(String(e), this.limits.maxBodyChars)
1331
+ message: Xe(String(e), this.limits.maxBodyChars)
1327
1332
  };
1328
1333
  if (t !== void 0) {
1329
- let e = $e(t, this.limits, this.diagnostics);
1330
- n.data = T(e) ? e : { value: e };
1334
+ let e = Ze(t, this.limits, this.diagnostics);
1335
+ n.data = D(e) ? e : { value: e };
1331
1336
  }
1332
1337
  this.breadcrumbs.push(n);
1333
1338
  });
@@ -1337,7 +1342,7 @@ var K = class e {
1337
1342
  }
1338
1343
  startMeasure(e, t) {
1339
1344
  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 }));
1340
- return Pt(this.diagnostics.guard("record.sanitize_failed", "The library could not read the name of the measure.", () => `${e}`) ?? "", i ?? {}, this.tracing.request().span, {
1345
+ return Mt(this.diagnostics.guard("record.sanitize_failed", "The library could not read the name of the measure.", () => `${e}`) ?? "", i ?? {}, this.tracing.request().span, {
1341
1346
  metric: (e, t, n) => {
1342
1347
  r() && this.recordMetric(e, t, n);
1343
1348
  },
@@ -1352,9 +1357,9 @@ var K = class e {
1352
1357
  level: "INFO",
1353
1358
  type: "span",
1354
1359
  body: e.name,
1355
- namespace: xe,
1360
+ namespace: we,
1356
1361
  payload: e.attributes,
1357
- fixed: En(e),
1362
+ fixed: wn(e),
1358
1363
  trace: {
1359
1364
  traceId: e.traceId,
1360
1365
  spanId: e.spanId,
@@ -1369,7 +1374,7 @@ var K = class e {
1369
1374
  level: "INFO",
1370
1375
  type: "metric",
1371
1376
  body: e,
1372
- namespace: ne,
1377
+ namespace: ee,
1373
1378
  payload: t,
1374
1379
  fixed: n,
1375
1380
  aggregated: !0
@@ -1380,7 +1385,7 @@ var K = class e {
1380
1385
  let e = this.config.profiler.enabled && this.config.enabled;
1381
1386
  if (e === this.profilerOn) return;
1382
1387
  this.profilerOn = e;
1383
- let t = k();
1388
+ let t = j();
1384
1389
  if (!e) {
1385
1390
  t.collect(!1), t.detach();
1386
1391
  return;
@@ -1407,25 +1412,25 @@ var K = class e {
1407
1412
  this.replayConsent = e, e ? this.replay?.start() : this.replay?.stop();
1408
1413
  }
1409
1414
  collectPoints() {
1410
- this.meter.collect(), this.profilerOn && k().collect(!1);
1415
+ this.meter.collect(), this.profilerOn && j().collect(!1);
1411
1416
  }
1412
1417
  advanceIdentity() {
1413
- this.identityEpoch++, this.profilerOn && this.config.securityContext.isolation && k().reset(), this.remote.sampling = null, this.refreshCaptures();
1418
+ this.identityEpoch++, this.profilerOn && this.config.securityContext.isolation && j().reset(), this.remote.sampling = null, this.refreshCaptures();
1414
1419
  }
1415
1420
  static pinned() {
1416
- return globalThis[An] ?? null;
1421
+ return globalThis[On] ?? null;
1417
1422
  }
1418
1423
  static current() {
1419
1424
  let t = e.local;
1420
1425
  if (t) return t.destroyed ? null : t;
1421
1426
  let n = e.pinned();
1422
- return n && G(n) ? n : null;
1427
+ return n && Vn(n) ? n : null;
1423
1428
  }
1424
1429
  static stopped() {
1425
1430
  let t = e.local;
1426
1431
  if (t?.destroyed) return t;
1427
- let n = globalThis[jn];
1428
- return n && G(n) ? n : null;
1432
+ let n = globalThis[kn];
1433
+ return n && Vn(n) ? n : null;
1429
1434
  }
1430
1435
  isDestroyed() {
1431
1436
  return this.destroyed;
@@ -1442,10 +1447,10 @@ var K = class e {
1442
1447
  }
1443
1448
  refuse(e) {
1444
1449
  this.startFailed = !0;
1445
- let t = M({ redact: N }, new z(), this.config);
1446
- tt(this.config, t), A(() => {
1447
- console.warn(`${f} ${Pn}`);
1448
- }), this.diagnostics.report("config.invalid", Pn, void 0, e), this.rehookHeld();
1450
+ let t = P({ redact: F }, new V(), this.config);
1451
+ $e(this.config, t), M(() => {
1452
+ console.warn(`${f} ${Mn}`);
1453
+ }), this.diagnostics.report("config.invalid", Mn, void 0, e), this.rehookHeld();
1449
1454
  }
1450
1455
  static startOrUpdate(t, n) {
1451
1456
  let r = e.local;
@@ -1453,19 +1458,19 @@ var K = class e {
1453
1458
  e.local = null;
1454
1459
  let i = e.pinned();
1455
1460
  if (i) {
1456
- if (!G(i)) return e.startDegraded(t, i.sdkVersion, n);
1461
+ if (!Vn(i)) return e.startDegraded(t, i.sdkVersion, n);
1457
1462
  if (!i.destroyed) return i.reconfigure(t), i;
1458
1463
  }
1459
1464
  let a = new e(t, !1);
1460
- return globalThis[An] = a, Reflect.deleteProperty(globalThis, jn), n || a.launch(), a;
1465
+ return globalThis[On] = a, Reflect.deleteProperty(globalThis, kn), n || a.launch(), a;
1461
1466
  }
1462
1467
  static startDegraded(t, n, r) {
1463
1468
  let i = new e(t, !0);
1464
1469
  e.local = i;
1465
1470
  let a = typeof n == "string" ? n : "before 0.9.0";
1466
- return i.mismatchVersion = a, i.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${a}, owns the page runtime. This copy, version ${C}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1471
+ return i.mismatchVersion = a, i.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${a}, owns the page runtime. This copy, version ${T}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
1467
1472
  found: a,
1468
- own: C
1473
+ own: T
1469
1474
  }), r || i.launch(), i;
1470
1475
  }
1471
1476
  reconfigure(e) {
@@ -1474,31 +1479,31 @@ var K = class e {
1474
1479
  return;
1475
1480
  }
1476
1481
  if (this.config.lockConfiguration) {
1477
- let t = M(e, this.diagnostics, this.config);
1478
- q(this.config, t) || this.diagnostics.report("config.locked", "Runtime configuration is locked. Use setConfigurationLocked(false) to unlock it explicitly.");
1482
+ let t = P(e, this.diagnostics, this.config);
1483
+ J(this.config, t) || this.diagnostics.report("config.locked", "Runtime configuration is locked. Use setConfigurationLocked(false) to unlock it explicitly.");
1479
1484
  return;
1480
1485
  }
1481
- I(this);
1486
+ R(this);
1482
1487
  let t = this.keepDestination(this.keepRouting(this.allowed(e)));
1483
1488
  !this.tunablesLocked && t.securityContext?.id && (this.explicitSecurityContext = !0);
1484
- let n = M(t, this.diagnostics, this.config), r = this.tunablesLocked ? ["correlation", "storage"] : [];
1485
- for (let e of r) q(n[e], this.config[e]) || (this.diagnostics.report("config.invalid", `${e} cannot change after startup. The library keeps the current settings.`), Object.assign(n, { [e]: this.config[e] }));
1489
+ let n = P(t, this.diagnostics, this.config), r = this.tunablesLocked ? ["correlation", "storage"] : [];
1490
+ for (let e of r) J(n[e], this.config[e]) || (this.diagnostics.report("config.invalid", `${e} cannot change after startup. The library keeps the current settings.`), Object.assign(n, { [e]: this.config[e] }));
1486
1491
  this.keepStartupTunables(n);
1487
1492
  let { redact: i, processors: a, enabled: o } = this.config;
1488
- o && !n.enabled && this.collectPoints(), tt(this.config, n), this.config.redact !== N && (this.startFailed = !1), (this.config.redact !== i || this.config.processors !== a) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.captureLimits.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.consoleOutput), this.keepBuiltIdentity(), this.syncProfiler(), this.launch(), this.running && o !== this.config.enabled && this.sender?.hold(!this.config.enabled), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1493
+ o && !n.enabled && this.collectPoints(), $e(this.config, n), this.config.redact !== F && (this.startFailed = !1), (this.config.redact !== i || this.config.processors !== a) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.captureLimits.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.consoleOutput), this.keepBuiltIdentity(), this.syncProfiler(), this.launch(), this.running && o !== this.config.enabled && this.sender?.hold(!this.config.enabled), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
1489
1494
  }
1490
1495
  onServer() {
1491
1496
  return this.platform.platform === "node";
1492
1497
  }
1493
1498
  allowed(e) {
1494
- return this.degraded ? (this.onServer() && !this.serverReported && Vn(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.")), Bn(e)) : e;
1499
+ return this.degraded ? (this.onServer() && !this.serverReported && zn(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.")), Rn(e)) : e;
1495
1500
  }
1496
1501
  keepRouting(e) {
1497
1502
  if (!this.tunablesLocked || this.degraded || !this.config.securityContext.isolation) return e;
1498
- let t = M(e, new z(), this.config), n = p.filter((e) => !q(t[e], this.config[e]));
1503
+ let t = P(e, new V(), this.config), n = h.filter((e) => !J(t[e], this.config[e]));
1499
1504
  if (t.securityContext.id !== this.config.securityContext.id && n.push("securityContext.id"), n.length === 0) return e;
1500
1505
  let r = { ...e };
1501
- for (let e of p) n.includes(e) && Reflect.deleteProperty(r, e);
1506
+ for (let e of h) n.includes(e) && Reflect.deleteProperty(r, e);
1502
1507
  if (n.includes("securityContext.id")) {
1503
1508
  let t = { ...e.securityContext };
1504
1509
  Reflect.deleteProperty(t, "id"), r.securityContext = t;
@@ -1506,7 +1511,7 @@ var K = class e {
1506
1511
  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;
1507
1512
  }
1508
1513
  keepStartupTunables(e) {
1509
- if (this.senderLoad !== void 0 && this.keepSections(e, Mn), !this.tunablesLocked) {
1514
+ if (this.senderLoad !== void 0 && this.keepSections(e, An), !this.tunablesLocked) {
1510
1515
  Object.assign(this.limits, e.limits), this.journeyOptions.maxAgeMs = e.journey.maxAgeMs;
1511
1516
  return;
1512
1517
  }
@@ -1515,10 +1520,10 @@ var K = class e {
1515
1520
  let { maxAgeMs: t } = this.config.journey;
1516
1521
  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);
1517
1522
  let { maxProbes: n } = this.config.profiler;
1518
- 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);
1523
+ 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), e.otelLoader !== this.config.otelLoader && (this.diagnostics.report("config.invalid", "otelLoader cannot change after startup. The library keeps the current loader."), e.otelLoader = this.config.otelLoader);
1519
1524
  }
1520
1525
  keepSections(e, t) {
1521
- for (let n of t) q(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] }));
1526
+ 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] }));
1522
1527
  }
1523
1528
  keepDestination(e) {
1524
1529
  if (this.senderLoad === void 0) return e;
@@ -1544,9 +1549,9 @@ var K = class e {
1544
1549
  this.startFailed || (this.tunablesLocked || (this.tunablesLocked = !0, this.config.enabled || this.drops.add("disabled", this.rehookHeld())), !this.running && this.config.enabled && this.start());
1545
1550
  }
1546
1551
  start() {
1547
- this.running = !0, this.identityBuiltAs === "storage" && !this.onServer() && (this.backing = Xe);
1548
- let { sessionIdleMs: e, traceMaxAgeMs: t } = this.config.correlation, { sessionId: n, tabId: r } = Ye(this.diagnostics, this.stores, e);
1549
- this.sessionTouch = new Ke(this.diagnostics, this.stores, e), this.sessionPicked ? this.sessionTouch.restart(this.identity.sessionId) : this.identity.sessionId = n, this.identity.tabId = r, this.builder.invalidateResource(), this.breadcrumbs.retain((e) => !Nn.includes(e.category)), this.tracing.setup(t ?? Infinity, this.config.otelLoader), this.tracing.loadOtel();
1552
+ this.running = !0, this.identityBuiltAs === "storage" && !this.onServer() && (this.backing = Je);
1553
+ let { sessionIdleMs: e, traceMaxAgeMs: t } = this.config.correlation, { sessionId: n, tabId: r } = qe(this.diagnostics, this.stores, e);
1554
+ this.sessionTouch = new We(this.diagnostics, this.stores, e), this.sessionPicked ? this.sessionTouch.restart(this.identity.sessionId) : this.identity.sessionId = n, this.identity.tabId = r, this.builder.invalidateResource(), this.breadcrumbs.retain((e) => !jn.includes(e.category)), this.tracing.setup(t ?? Infinity, this.config.otelLoader), this.tracing.loadOtel();
1550
1555
  for (let e of this.rehookHeld()) this.bootBuffer.push(e, this.config.buffering.maxHeldRecords);
1551
1556
  this.openGate(), this.init();
1552
1557
  }
@@ -1586,22 +1591,22 @@ var K = class e {
1586
1591
  async buildBus() {
1587
1592
  try {
1588
1593
  await this.startGate;
1589
- let { Bus: e } = await import("./bus-dw7T92sO.js");
1594
+ let { Bus: e } = await import("./bus-DyNafxZN.js");
1590
1595
  if (this.destroyed) return null;
1591
1596
  let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
1592
1597
  onSecurityContext: (e) => {
1593
1598
  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;
1594
1599
  if (this.contextMismatch = !1, this.config.securityContext.id !== e) {
1595
1600
  if (this.ownerAdopted) {
1596
- I(this), this.drops.add("security_context", [
1601
+ R(this), this.drops.add("security_context", [
1597
1602
  ...this.bootBuffer.take(),
1598
1603
  ...this.pendingRecords.take(),
1599
1604
  ...this.forwardBuffer
1600
1605
  ]), this.forwardBuffer = [], this.context.clear(), this.breadcrumbs.clear();
1601
1606
  let e = this.rotating;
1602
- this.rotating = !0, this.collectPoints(), this.profilerOn && k().reset();
1607
+ this.rotating = !0, this.collectPoints(), this.profilerOn && j().reset();
1603
1608
  let t = this.sessionTouch.stored();
1604
- this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : O(this.diagnostics)), this.rotating = e, this.advanceIdentity();
1609
+ this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : A(this.diagnostics)), this.rotating = e, this.advanceIdentity();
1605
1610
  }
1606
1611
  this.config.securityContext.id = e;
1607
1612
  }
@@ -1640,7 +1645,7 @@ var K = class e {
1640
1645
  }
1641
1646
  async buildSender() {
1642
1647
  try {
1643
- let { Sender: e } = await import("./sender-Bdp-TAS4.js"), t = this.destroyed ? null : await e.create({
1648
+ let { Sender: e } = await import("./sender-BRSpc7R8.js"), t = this.destroyed ? null : await e.create({
1644
1649
  storage: this.memoryStorage,
1645
1650
  onStorage: (e) => {
1646
1651
  e.name === "memory" && (this.memoryStorage = e);
@@ -1654,7 +1659,7 @@ var K = class e {
1654
1659
  onLoss: this.reportLoss,
1655
1660
  remote: this.remote,
1656
1661
  beforeExit: () => {
1657
- I(this), this.collectPoints(), this.tracing.end();
1662
+ R(this), this.collectPoints(), this.tracing.end();
1658
1663
  },
1659
1664
  onSent: (e) => {
1660
1665
  this.lastSendAt = e;
@@ -1686,18 +1691,18 @@ var K = class e {
1686
1691
  let e = this.remote.sampling?.wire();
1687
1692
  e && (this.remoteCaptureTimer = setTimeout(() => {
1688
1693
  this.refreshCaptures();
1689
- }, e.ttlMs), E(this.remoteCaptureTimer)), this.captureState(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
1694
+ }, e.ttlMs), O(this.remoteCaptureTimer)), this.captureState(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
1690
1695
  }
1691
1696
  captureState(e) {
1692
1697
  let { enabled: t, framePhases: n, framePacing: r } = this.config.profiler;
1693
- return `${String(this.config.enabled)}${Rn(e)}${String(t && n)}${String(t && r)}${this.replayState(e)}`;
1698
+ return `${String(this.config.enabled)}${In(e)}${String(t && n)}${String(t && r)}${this.replayState(e)}`;
1694
1699
  }
1695
1700
  replayState(e) {
1696
1701
  let { replay: t } = this.config;
1697
1702
  return t.enabled ? JSON.stringify([
1698
- t.loader && U(t.loader),
1699
- t.onSegment && U(t.onSegment),
1700
- U(t.recordOptions),
1703
+ t.loader && G(t.loader),
1704
+ t.onSegment && G(t.onSegment),
1705
+ G(t.recordOptions),
1701
1706
  t.endpoint,
1702
1707
  t.requireConsent,
1703
1708
  t.mode,
@@ -1707,14 +1712,14 @@ var K = class e {
1707
1712
  t.blockSelectors,
1708
1713
  t.recordCanvas,
1709
1714
  t.bufferMs,
1710
- t.plugins.map(U),
1715
+ t.plugins.map(G),
1711
1716
  e.fullUrls,
1712
1717
  e.ignoreUrls.map(String)
1713
1718
  ]) : "";
1714
1719
  }
1715
1720
  effectiveCapture() {
1716
1721
  let e = { ...this.config.capture }, t = this.remote.sampling?.current()?.capture;
1717
- for (let n of Oe) {
1722
+ for (let n of ce) {
1718
1723
  let r = t?.[n];
1719
1724
  if (e.remoteToggles.includes(n) && r !== void 0) {
1720
1725
  if (r && typeof e[n] == "object") continue;
@@ -1743,7 +1748,7 @@ var K = class e {
1743
1748
  diagnostics: this.diagnostics,
1744
1749
  breadcrumbs: this.breadcrumbs,
1745
1750
  tracing: this.tracing,
1746
- logger: new xt(() => this, h),
1751
+ logger: new yt(() => this, m),
1747
1752
  once: this.captureOnce,
1748
1753
  recordMetric: (e, t, n) => {
1749
1754
  this.recordMetric(e, t, n);
@@ -1779,21 +1784,21 @@ var K = class e {
1779
1784
  this.captures.length = 0, this.replay = e, e && this.captures.push(e);
1780
1785
  }
1781
1786
  loadWebSocket() {
1782
- return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-Zg0hj1LB.js")).WebSocketCapture);
1787
+ return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-CE_9Q22z.js")).WebSocketCapture);
1783
1788
  }
1784
1789
  pluginCapture(e) {
1785
1790
  let { name: t } = e, n = (e, t, n) => {
1786
1791
  this.recordMetric(e, t, n);
1787
1792
  }, r = (e) => {
1788
- this.diagnostics.report("config.invalid", _, void 0, e);
1793
+ this.diagnostics.report("config.invalid", v, void 0, e);
1789
1794
  }, i = {
1790
- logger: new R(() => this, `${h}.${t}`),
1791
- counter: (e, t = {}) => Wt(e, t, n, r),
1792
- histogram: (e, t = {}) => Kt(e, t, n, r),
1795
+ logger: new B(() => this, `${m}.${t}`),
1796
+ counter: (e, t = {}) => Ht(e, t, n, r),
1797
+ histogram: (e, t = {}) => Wt(e, t, n, r),
1793
1798
  addBreadcrumb: (e, t) => {
1794
1799
  this.addBreadcrumb(e, t);
1795
1800
  },
1796
- ownRequest: et
1801
+ ownRequest: Qe
1797
1802
  };
1798
1803
  return {
1799
1804
  name: t,
@@ -1806,7 +1811,7 @@ var K = class e {
1806
1811
  };
1807
1812
  }
1808
1813
  loadCapture(e) {
1809
- return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, Dn[e]);
1814
+ return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, Tn[e]);
1810
1815
  }
1811
1816
  registerWorker(e, t = {}) {
1812
1817
  let n = !1, r;
@@ -1831,21 +1836,21 @@ var K = class e {
1831
1836
  this.stopping ??= this.stop(t), await this.stopping, n !== void 0 && await this.clearStorage(n);
1832
1837
  }
1833
1838
  async stop(t) {
1834
- t || (I(this), this.collectPoints(), this.tracing.end()), this.profilerOn && (this.profilerOn = !1, k().detach()), this.destroyed = !0, this.backing = Je(), mt(this), this.collectPoints(), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
1839
+ t || (R(this), this.collectPoints(), this.tracing.end()), this.profilerOn && (this.profilerOn = !1, j().detach()), this.destroyed = !0, this.backing = Ke(), ft(this), this.collectPoints(), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
1835
1840
  let n = t ? this.discardHeld() : this.flushHeld();
1836
1841
  this.journey.destroy(), this.bus?.destroy(), await n, await this.senderLoad, await this.rotation?.catch(() => void 0);
1837
1842
  let r = this.parkedSender;
1838
1843
  this.parkedSender = void 0, await this.diagnostics.guardAsync("pipeline.crashed", "The delivery stack of the old context did not stop at shutdown. The library leaves its stored batches in storage.", async () => {
1839
1844
  await (t ? r?.discard() : r?.retire("retain", 0, this.config.securityContext.id));
1840
- }), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, An), globalThis[jn] = this);
1845
+ }), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, On), globalThis[kn] = this);
1841
1846
  }
1842
1847
  shutdownRule(e) {
1843
- let t = this.readOptions(e, Fn);
1848
+ let t = this.readOptions(e, Nn);
1844
1849
  if (t === void 0) return { discard: !0 };
1845
1850
  let { pending: n, clearStorage: r } = t, i = r == null, a = i || r === "context" || r === "namespace", o;
1846
1851
  i || (o = r === "namespace" ? "namespace" : "context");
1847
1852
  let s = n === void 0 || n === "flush";
1848
- return (!a || !(s || n === "discard") || n === "flush" && o) && this.diagnostics.report("config.invalid", Fn), {
1853
+ return (!a || !(s || n === "discard") || n === "flush" && o) && this.diagnostics.report("config.invalid", Nn), {
1849
1854
  discard: !s || o !== void 0,
1850
1855
  scope: o
1851
1856
  };
@@ -1869,7 +1874,7 @@ var K = class e {
1869
1874
  }
1870
1875
  async clearStorage(e) {
1871
1876
  this.tunablesLocked && await this.diagnostics.guardAsync("storage.degraded", "The library could not remove the stored batches at shutdown.", async () => {
1872
- let { clearStored: t } = await import("./stored-context-CSttrAsw.js"), n = this.carried.map((e) => e.id);
1877
+ let { clearStored: t } = await import("./stored-context-df1dEnht.js"), n = this.carried.map((e) => e.id);
1873
1878
  this.carried = [], await t(this.storeAccess(), e, n, this.identityBuiltAs === "storage" && !this.onServer());
1874
1879
  });
1875
1880
  }
@@ -1930,11 +1935,11 @@ var K = class e {
1930
1935
  }
1931
1936
  let t = [];
1932
1937
  for (let n of e) {
1933
- if (!Fe(n)) {
1938
+ if (!Ne(n)) {
1934
1939
  this.diagnostics.count("record.dropped_malformed");
1935
1940
  continue;
1936
1941
  }
1937
- if (n.attributes["uiobs.debug_buffer"] !== !0 && !ot(n, this.config, this.remote.sampling?.current() ?? null)) {
1942
+ if (n.attributes["uiobs.debug_buffer"] !== !0 && !it(n, this.config, this.remote.sampling?.current() ?? null)) {
1938
1943
  this.diagnostics.count("record.dropped_by_sampling");
1939
1944
  continue;
1940
1945
  }
@@ -1950,14 +1955,14 @@ var K = class e {
1950
1955
  for (let t of e) r && !t.attributes["journey.id"] && (t.attributes["journey.id"] = r.id, t.attributes["journey.name"] = r.name), this.route(t);
1951
1956
  }
1952
1957
  regenerateTabId() {
1953
- let e = O(this.diagnostics);
1954
- 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.", {
1958
+ let e = A(this.diagnostics);
1959
+ this.diagnostics.report("bus.tab_id_changed", "Another context uses this tab id. A duplicated tab is the usual cause. The library makes a new tab id.", {
1955
1960
  was: this.identity.tabId,
1956
1961
  now: e
1957
- }), this.identity.tabId = e, Ge(e, this.diagnostics, this.stores), this.builder.invalidateResource(), this.bus?.setTabId(e);
1962
+ }), this.identity.tabId = e, Ue(e, this.diagnostics, this.stores), this.builder.invalidateResource(), this.bus?.setTabId(e);
1958
1963
  }
1959
1964
  newSession() {
1960
- this.destroyed || (I(this), this.resetSession(O(this.diagnostics)));
1965
+ this.destroyed || (R(this), this.resetSession(A(this.diagnostics)));
1961
1966
  }
1962
1967
  resetSession(e) {
1963
1968
  this.sessionPicked = !0, 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();
@@ -1965,7 +1970,7 @@ var K = class e {
1965
1970
  rotateSecurityContext(e, t = {}) {
1966
1971
  if (this.destroyed) return Promise.reject(/* @__PURE__ */ Error("The runtime has stopped."));
1967
1972
  if (!this.tunablesLocked) return Promise.reject(/* @__PURE__ */ Error("The runtime is not configured. Call configure() before rotateSecurityContext()."));
1968
- I(this), this.rotating = !0;
1973
+ R(this), this.rotating = !0;
1969
1974
  let n = ++this.rotationSeq, r = (this.rotation ?? Promise.resolve()).catch(() => void 0).then(() => this.runRotation(e, t, n));
1970
1975
  this.rotation = r;
1971
1976
  let i = () => {
@@ -1978,7 +1983,7 @@ var K = class e {
1978
1983
  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.");
1979
1984
  let r;
1980
1985
  try {
1981
- r = (await import("./rotation-BylN1B9e.js")).rotateContext;
1986
+ r = (await import("./rotation-ChBbNDE2.js")).rotateContext;
1982
1987
  } catch (e) {
1983
1988
  throw this.diagnostics.report("pipeline.crashed", "The library could not load the security-context rotation.", void 0, e), await this.closeDelivery(), e;
1984
1989
  }
@@ -1992,7 +1997,7 @@ var K = class e {
1992
1997
  rotationHost() {
1993
1998
  return {
1994
1999
  runtime: this,
1995
- quiet: new z(),
2000
+ quiet: new V(),
1996
2001
  senderLoaded: async () => {
1997
2002
  await this.senderLoad;
1998
2003
  },
@@ -2065,13 +2070,13 @@ var K = class e {
2065
2070
  this.parkedSender = e, await this.diagnostics.guardAsync("pipeline.crashed", "The delivery stack of the old context did not stop. The next rotation that succeeds retires it.", () => e.pause(this.config.securityContext.id));
2066
2071
  }
2067
2072
  async debugBundle(e) {
2068
- let { configSummary: t } = await import("./debug-bundle-Cs_YWzTa.js"), { record: n } = this.builder.build({
2073
+ let { configSummary: t } = await import("./debug-bundle-w78W46zr.js"), { record: n } = this.builder.build({
2069
2074
  level: "INFO",
2070
2075
  type: "system",
2071
2076
  body: "debug bundle",
2072
- namespace: ae,
2073
- payload: { [y]: this.breadcrumbs.snapshot() }
2074
- }, !0), r = n?.attributes ?? {}, i = r[y], a = r[w];
2077
+ namespace: ne,
2078
+ payload: { [x]: this.breadcrumbs.snapshot() }
2079
+ }, !0), r = n?.attributes ?? {}, i = r[x], a = r[E];
2075
2080
  return {
2076
2081
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
2077
2082
  sdkVersion: this.sdkVersion,
@@ -2088,7 +2093,7 @@ var K = class e {
2088
2093
  let e = this.sender?.stats(), t = [];
2089
2094
  this.mismatchVersion && t.push("runtime.version_mismatch"), this.contextMismatch && t.push("security.context_mismatch");
2090
2095
  let { redact: n, processors: r } = this.config;
2091
- (n === N || r.includes(N)) && t.push("records.refused"), this.deliveryClosed ? t.push("security.rotation_failed") : this.ready && this.config.enabled && this.hasDestination() && this.role() === "sender" && !this.sender && t.push("sender.unavailable");
2096
+ (n === F || r.includes(F)) && t.push("records.refused"), this.deliveryClosed ? t.push("security.rotation_failed") : this.ready && this.config.enabled && this.hasDestination() && this.role() === "sender" && !this.sender && t.push("sender.unavailable");
2092
2097
  let { sourcePolicy: i, maxMessageBytes: a, maxRecordsPerMessage: o, maxMessagesPerSecond: s } = this.config.bus;
2093
2098
  return {
2094
2099
  delivery: {
@@ -2132,12 +2137,12 @@ var K = class e {
2132
2137
  return this.flushFor(this.flushTimeout(e), !0);
2133
2138
  }
2134
2139
  async flushFor(e, t) {
2135
- I(this), t && this.collectPoints();
2140
+ R(this), t && this.collectPoints();
2136
2141
  let n = this.idle();
2137
2142
  if (n) return n;
2138
2143
  let r = Date.now() + e, i, a = new Promise((t) => {
2139
2144
  let n = setTimeout(t, e);
2140
- E(n), i = () => {
2145
+ O(n), i = () => {
2141
2146
  clearTimeout(n);
2142
2147
  };
2143
2148
  });
@@ -2149,26 +2154,26 @@ var K = class e {
2149
2154
  }
2150
2155
  async flushBefore(e, t) {
2151
2156
  let n = this.heldRecords(), r = this.ready ? this.senderLoad : this.started;
2152
- if (r && (!this.ready || !this.sender) && !await Promise.race([r.then(() => !0), t.then(() => !1)])) return W({ pending: this.waiting() });
2157
+ if (r && (!this.ready || !this.sender) && !await Promise.race([r.then(() => !0), t.then(() => !1)])) return K({ pending: this.waiting() });
2153
2158
  let { bus: i } = this, a = i?.getRole() === "forwarder", o = this.idle();
2154
2159
  if (o) return o;
2155
2160
  if (a) {
2156
- let n = this.forwardBuffer.length, r = this.sendForwarded(), a = n - r, o = Math.floor(Math.max(0, e - Date.now()) * fe), s = await i.requestFlush(o, t);
2161
+ let n = this.forwardBuffer.length, r = this.sendForwarded(), a = n - r, o = Math.floor(Math.max(0, e - Date.now()) * ue), s = await i.requestFlush(o, t);
2157
2162
  return s ? {
2158
2163
  ...s,
2159
2164
  forwarded: r,
2160
2165
  dropped: s.dropped + a
2161
- } : W({
2166
+ } : K({
2162
2167
  forwarded: r,
2163
2168
  pending: r,
2164
2169
  dropped: a
2165
2170
  });
2166
2171
  }
2167
2172
  let { sender: s } = this;
2168
- return s ? W(await s.flushUntil(t)) : this.rotating ? W({ pending: n + this.waiting() }) : Hn("complete", { dropped: n });
2173
+ return s ? K(await s.flushUntil(t)) : this.rotating ? K({ pending: n + this.waiting() }) : Bn("complete", { dropped: n });
2169
2174
  }
2170
2175
  idle() {
2171
- return this.tunablesLocked && this.config.enabled && !this.destroyed ? null : Hn("inactive", { pending: this.destroyed ? 0 : this.waiting() });
2176
+ return this.tunablesLocked && this.config.enabled && !this.destroyed ? null : Bn("inactive", { pending: this.destroyed ? 0 : this.waiting() });
2172
2177
  }
2173
2178
  heldRecords() {
2174
2179
  return this.bootBuffer.length + this.pendingRecords.length + this.forwardBuffer.length;
@@ -2186,52 +2191,52 @@ var K = class e {
2186
2191
  else return this.diagnostics.guard("config.invalid", t, () => ({ ...e }));
2187
2192
  }
2188
2193
  flushTimeout(e) {
2189
- let t = this.readOptions(e, In);
2190
- if (!t) return Se;
2194
+ let t = this.readOptions(e, Pn);
2195
+ if (!t) return ye;
2191
2196
  let n = t.timeoutMs ?? 5e3;
2192
- return typeof n == "number" && n >= 0 && n <= 6e5 ? n : (this.diagnostics.report("config.invalid", In), Se);
2197
+ return typeof n == "number" && n >= 0 && n <= 6e5 ? n : (this.diagnostics.report("config.invalid", Pn), ye);
2193
2198
  }
2194
2199
  };
2195
- D(K, "local", null);
2196
- function q(e, t, n = /* @__PURE__ */ new WeakMap()) {
2200
+ k(q, "local", null);
2201
+ function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
2197
2202
  if (Object.is(e, t)) return !0;
2198
2203
  if (e instanceof RegExp && t instanceof RegExp) return String(e) === String(t);
2199
2204
  if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
2200
2205
  if (n.has(e)) return n.get(e) === t;
2201
2206
  n.set(e, t);
2202
2207
  let r = Object.keys(e), i = Object.keys(t);
2203
- return r.length === i.length && r.every((r) => Ve(t, r) && q(Reflect.get(e, r), Reflect.get(t, r), n));
2208
+ return r.length === i.length && r.every((r) => ze(t, r) && J(Reflect.get(e, r), Reflect.get(t, r), n));
2204
2209
  }
2205
2210
  // src/transport/worker-entry.ts
2206
- var J;
2207
- function Un(e = {}) {
2208
- if (J) return J;
2209
- let t = new z(e.onDiagnostic);
2211
+ var Y;
2212
+ function Hn(e = {}) {
2213
+ if (Y) return Y;
2214
+ let t = new V(e.onDiagnostic);
2210
2215
  if (typeof document < "u" || typeof addEventListener != "function") return t.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
2211
2216
  let n = !1, r, i, a = (e) => {
2212
2217
  t.guard("transport.http_error", "The transport worker could not read its connection.", () => {
2213
2218
  let a = e.data;
2214
- if (!T(a) || a.p !== "ui-observability.transport/1" || a.t !== ke.connect || e.ports.length === 0) return;
2219
+ if (!D(a) || a.p !== "ui-observability.transport/1" || a.t !== le.connect || e.ports.length === 0) return;
2215
2220
  let o = e.ports[0];
2216
- r || a.v !== "1.1.0" ? (o.postMessage(_e), o.close()) : (r = o, import("./worker-server-BokySIII.js").then((e) => {
2221
+ r || a.v !== "1.2.0" ? (o.postMessage(De), o.close()) : (r = o, import("./worker-server-FYfKHQhJ.js").then((e) => {
2217
2222
  n || (i = e.serveWorkerPort(o, t));
2218
2223
  }).catch((e) => {
2219
2224
  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.", () => {
2220
- o.postMessage(_e), o.close();
2225
+ o.postMessage(De), o.close();
2221
2226
  });
2222
2227
  }));
2223
2228
  });
2224
2229
  }, o = () => {
2225
- n || (n = !0, J = void 0, removeEventListener("message", a), i?.(), t.guard("transport.http_error", "The transport service could not close its port.", () => {
2226
- r?.postMessage(_e);
2230
+ n || (n = !0, Y = void 0, removeEventListener("message", a), i?.(), t.guard("transport.http_error", "The transport service could not close its port.", () => {
2231
+ r?.postMessage(De);
2227
2232
  }), t.guard("transport.http_error", "The transport port could not close.", () => {
2228
2233
  r?.close();
2229
2234
  }));
2230
2235
  };
2231
- return addEventListener("message", a), J = o, o;
2236
+ return addEventListener("message", a), Y = o, o;
2232
2237
  }
2233
2238
  // src/transport/memory-transport.ts
2234
- function Wn() {
2239
+ function Un() {
2235
2240
  let e = [], t = [], n = { status: 200 };
2236
2241
  return {
2237
2242
  transport: (r) => (e.push(r), n.status >= 200 && n.status < 300 && t.push(r), Promise.resolve({ ...n })),
@@ -2249,160 +2254,160 @@ function Wn() {
2249
2254
  };
2250
2255
  }
2251
2256
  // src/index.ts
2252
- var Y = /* @__PURE__ */ new Map();
2253
- function X() {
2254
- return (K.current() ?? K.stopped()) || K.configure({}, !0);
2257
+ var X = /* @__PURE__ */ new Map();
2258
+ function Z() {
2259
+ return (q.current() ?? q.stopped()) || q.configure({}, !0);
2255
2260
  }
2256
- function Gn(e) {
2257
- K.configure(e), Z();
2261
+ function Wn(e) {
2262
+ q.configure(e), Q();
2258
2263
  }
2259
- function Kn(e) {
2260
- X().setConfigurationLocked(e);
2264
+ function Gn(e) {
2265
+ Z().setConfigurationLocked(e);
2261
2266
  }
2262
- function qn(e, t) {
2263
- return X().rotateSecurityContext(e, t);
2267
+ function Kn(e, t) {
2268
+ return Z().rotateSecurityContext(e, t);
2264
2269
  }
2265
- async function Jn() {
2266
- let e = X();
2267
- return Z(), {
2270
+ async function qn() {
2271
+ let e = Z();
2272
+ return Q(), {
2268
2273
  ...await e.health(),
2269
2274
  loggerCache: {
2270
2275
  ...e.config.loggerCache,
2271
- size: Y.size
2276
+ size: X.size
2272
2277
  }
2273
2278
  };
2274
2279
  }
2275
- async function Yn() {
2276
- let e = await Jn();
2277
- return X().debugBundle(e);
2280
+ async function Jn() {
2281
+ let e = await qn();
2282
+ return Z().debugBundle(e);
2278
2283
  }
2279
- function Z() {
2280
- let e = (K.current() ?? K.stopped())?.config.loggerCache.maxEntries, t = e === void 0 ? 256 : e;
2281
- if (t !== null) for (let e of Y.keys()) {
2282
- if (Y.size <= t) break;
2283
- Y.delete(e);
2284
+ function Q() {
2285
+ let e = (q.current() ?? q.stopped())?.config.loggerCache.maxEntries, t = e === void 0 ? 256 : e;
2286
+ if (t !== null) for (let e of X.keys()) {
2287
+ if (X.size <= t) break;
2288
+ X.delete(e);
2284
2289
  }
2285
2290
  return t;
2286
2291
  }
2287
- function Xn(e, t) {
2288
- let n = Z();
2289
- if (t || n === 0) return new R(X, e, t);
2290
- let r = Y.get(e);
2291
- return r ??= new R(X, e), Y.delete(e), Y.set(e, r), Z(), r;
2292
+ function Yn(e, t) {
2293
+ let n = Q();
2294
+ if (t || n === 0) return new B(Z, e, t);
2295
+ let r = X.get(e);
2296
+ return r ??= new B(Z, e), X.delete(e), X.set(e, r), Q(), r;
2292
2297
  }
2293
- function Q() {
2294
- return Xn("app");
2298
+ function $() {
2299
+ return Yn("app");
2300
+ }
2301
+ function Xn(e, t) {
2302
+ $().trace(e, t);
2295
2303
  }
2296
2304
  function Zn(e, t) {
2297
- Q().trace(e, t);
2305
+ $().debug(e, t);
2298
2306
  }
2299
2307
  function Qn(e, t) {
2300
- Q().debug(e, t);
2308
+ $().info(e, t);
2301
2309
  }
2302
2310
  function $n(e, t) {
2303
- Q().info(e, t);
2311
+ $().warn(e, t);
2304
2312
  }
2305
- function er(e, t) {
2306
- Q().warn(e, t);
2313
+ function er(e, t, n) {
2314
+ $().error(e, t, n);
2307
2315
  }
2308
2316
  function tr(e, t, n) {
2309
- Q().error(e, t, n);
2317
+ $().fatal(e, t, n);
2310
2318
  }
2311
- function nr(e, t, n) {
2312
- Q().fatal(e, t, n);
2319
+ function nr(e, t) {
2320
+ $().logAction(e, t);
2313
2321
  }
2314
2322
  function rr(e, t) {
2315
- Q().logAction(e, t);
2323
+ $().logEvent(e, t);
2316
2324
  }
2317
- function ir(e, t) {
2318
- Q().logEvent(e, t);
2319
- }
2320
- function $(e) {
2321
- K.current()?.diagnostics.report("config.invalid", _, void 0, e);
2325
+ function ir(e) {
2326
+ q.current()?.diagnostics.report("config.invalid", v, void 0, e);
2322
2327
  }
2323
2328
  function ar(e, t = {}) {
2324
- return Wt(e, t, (e, t, n) => {
2325
- X().recordMetric(e, t, n);
2326
- }, $);
2329
+ return Ht(e, t, (e, t, n) => {
2330
+ Z().recordMetric(e, t, n);
2331
+ }, ir);
2327
2332
  }
2328
2333
  function or(e, t = {}) {
2329
- return Gt(e, t, (e, t, n) => {
2330
- X().recordMetric(e, t, n);
2331
- }, $);
2334
+ return Ut(e, t, (e, t, n) => {
2335
+ Z().recordMetric(e, t, n);
2336
+ }, ir);
2332
2337
  }
2333
2338
  function sr(e, t = {}) {
2334
- return Kt(e, t, (e, t, n) => {
2335
- X().recordMetric(e, t, n);
2336
- }, $);
2339
+ return Wt(e, t, (e, t, n) => {
2340
+ Z().recordMetric(e, t, n);
2341
+ }, ir);
2337
2342
  }
2338
2343
  function cr(e, t) {
2339
- return X().startMeasure(e, t);
2344
+ return Z().startMeasure(e, t);
2340
2345
  }
2341
2346
  function lr(e, t, n) {
2342
- let r = X();
2343
- return Ft(r.startMeasure(e, n), t, r.diagnostics);
2347
+ let r = Z();
2348
+ return Nt(r.startMeasure(e, n), t, r.diagnostics);
2344
2349
  }
2345
2350
  function ur() {
2346
- X().setReplay(!0);
2351
+ Z().setReplay(!0);
2347
2352
  }
2348
2353
  function dr() {
2349
- X().setReplay(!1);
2354
+ Z().setReplay(!1);
2350
2355
  }
2351
2356
  var fr = {
2352
- probe: (e, t) => k().probe(e, t, K.current()?.diagnostics),
2353
- time: (e, t) => k().time(e, t, K.current()?.diagnostics)
2357
+ probe: (e, t) => j().probe(e, t, q.current()?.diagnostics),
2358
+ time: (e, t) => j().time(e, t, q.current()?.diagnostics)
2354
2359
  };
2355
2360
  function pr(e, t) {
2356
- X().addBreadcrumb(e, t);
2361
+ Z().addBreadcrumb(e, t);
2357
2362
  }
2358
2363
  function mr(e) {
2359
- let t = X();
2360
- T(e) ? t.diagnostics.guard("record.sanitize_failed", "The library could not read the values of setContext().", () => {
2364
+ let t = Z();
2365
+ D(e) ? t.diagnostics.guard("record.sanitize_failed", "The library could not read the values of setContext().", () => {
2361
2366
  t.context.merge(e);
2362
2367
  }) : t.diagnostics.report("config.invalid", "setContext() takes an object. The library keeps the current context.");
2363
2368
  }
2364
2369
  function hr(e) {
2365
- X().context.remove(e);
2370
+ Z().context.remove(e);
2366
2371
  }
2367
2372
  function gr(e, t) {
2368
- return X().journey.start(e, t);
2373
+ return Z().journey.start(e, t);
2369
2374
  }
2370
2375
  function _r() {
2371
- X().journey.end();
2376
+ Z().journey.end();
2372
2377
  }
2373
2378
  function vr() {
2374
- return X().journey.current();
2379
+ return Z().journey.current();
2375
2380
  }
2376
2381
  function yr() {
2377
- return X().journey.getToken();
2382
+ return Z().journey.getToken();
2378
2383
  }
2379
2384
  function br(e) {
2380
- return X().journey.adopt(e, "manual", !0);
2385
+ return Z().journey.adopt(e, "manual", !0);
2381
2386
  }
2382
2387
  function xr(e, t) {
2383
- return X().registerWorker(e, t);
2388
+ return Z().registerWorker(e, t);
2384
2389
  }
2385
2390
  function Sr(e, t) {
2386
- return X().registerFrame(e, t);
2391
+ return Z().registerFrame(e, t);
2387
2392
  }
2388
2393
  function Cr() {
2389
- X().tracing.rotate("explicit");
2394
+ Z().tracing.rotate("explicit");
2390
2395
  }
2391
2396
  function wr() {
2392
- return X().tracing.headers();
2397
+ return Z().tracing.headers();
2393
2398
  }
2394
2399
  function Tr(e) {
2395
- return X().flush(e);
2400
+ return Z().flush(e);
2396
2401
  }
2397
2402
  function Er() {
2398
- X().newSession();
2403
+ Z().newSession();
2399
2404
  }
2400
2405
  function Dr() {
2401
- return X().diagnostics.snapshot();
2406
+ return Z().diagnostics.snapshot();
2402
2407
  }
2403
2408
  async function Or(e) {
2404
- await (K.current() ?? K.stopped())?.destroy(e);
2409
+ await (q.current() ?? q.stopped())?.destroy(e);
2405
2410
  }
2406
- export { pr as addBreadcrumb, br as adoptJourney, Yn as collectDebugBundle, Gn as configure, ar as counter, Wn as createMemoryTransport, vr as currentJourney, Qn as debug, _r as endJourney, tr as error, nr as fatal, Tr as flush, or as gauge, Dr as getDiagnosticCounters, Jn as getHealth, yr as getJourneyToken, Xn as getLogger, wr as getTraceHeaders, sr as histogram, $n as info, rr as logAction, ir as logEvent, lr as measure, Er as newSession, Cr as newTrace, ut as observeWindow, fr as profiler, Sr as registerFrame, xr as registerWorker, hr as removeContext, qn as rotateSecurityContext, Un as serveTransportWorker, Kn as setConfigurationLocked, mr as setContext, Or as shutdown, gr as startJourney, cr as startMeasure, ur as startReplay, dr as stopReplay, Zn as trace, er as warn };
2411
+ export { pr as addBreadcrumb, br as adoptJourney, Jn as collectDebugBundle, Wn as configure, ar as counter, Un as createMemoryTransport, vr as currentJourney, Zn as debug, _r as endJourney, er as error, tr as fatal, Tr as flush, or as gauge, Dr as getDiagnosticCounters, qn as getHealth, yr as getJourneyToken, Yn as getLogger, wr as getTraceHeaders, sr as histogram, Qn as info, nr as logAction, rr as logEvent, lr as measure, Er as newSession, Cr as newTrace, ct as observeWindow, fr as profiler, Sr as registerFrame, xr as registerWorker, hr as removeContext, Kn as rotateSecurityContext, Hn as serveTransportWorker, Gn as setConfigurationLocked, mr as setContext, Or as shutdown, gr as startJourney, cr as startMeasure, ur as startReplay, dr as stopReplay, Xn as trace, $n as warn };
2407
2412
 
2408
2413
  //# sourceMappingURL=index.js.map