@powerhousedao/connect 6.0.0-staging.3 → 6.0.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 (659) hide show
  1. package/dist/AddDriveModal-ZK9-BWMB.js +92 -0
  2. package/dist/AddDriveModal-ZK9-BWMB.js.map +1 -0
  3. package/dist/ClearStorageModal-Bfb3ube7.js +47 -0
  4. package/dist/ClearStorageModal-Bfb3ube7.js.map +1 -0
  5. package/dist/CookiesPolicyModal-DiXQV82b.js +33 -0
  6. package/dist/CookiesPolicyModal-DiXQV82b.js.map +1 -0
  7. package/dist/CreateDocumentModal-BhJh4nWt.js +31 -0
  8. package/dist/CreateDocumentModal-BhJh4nWt.js.map +1 -0
  9. package/dist/DebugSettingsModal-CHmUFkkM.js +172 -0
  10. package/dist/DebugSettingsModal-CHmUFkkM.js.map +1 -0
  11. package/dist/DeleteDriveModal-CbuIdjKY.js +43 -0
  12. package/dist/DeleteDriveModal-CbuIdjKY.js.map +1 -0
  13. package/dist/DeleteItemModal-9ErYlauT.js +42 -0
  14. package/dist/DeleteItemModal-9ErYlauT.js.map +1 -0
  15. package/dist/DisclaimerModal-CfDeiBz8.js +24 -0
  16. package/dist/DisclaimerModal-CfDeiBz8.js.map +1 -0
  17. package/dist/DownloadDocumentWithErrorsModal-KZGWQ4J7.js +44 -0
  18. package/dist/DownloadDocumentWithErrorsModal-KZGWQ4J7.js.map +1 -0
  19. package/dist/DriveSettingsModal-DEk05PS7.js +51 -0
  20. package/dist/DriveSettingsModal-DEk05PS7.js.map +1 -0
  21. package/dist/InspectorModal-DV7lUbNo.js +375 -0
  22. package/dist/InspectorModal-DV7lUbNo.js.map +1 -0
  23. package/dist/MissingPackageModal-B2EAV_VJ.js +37 -0
  24. package/dist/MissingPackageModal-B2EAV_VJ.js.map +1 -0
  25. package/dist/SettingsModal-bLjRDGnI.js +297 -0
  26. package/dist/SettingsModal-bLjRDGnI.js.map +1 -0
  27. package/dist/UpgradeDriveModal-BwI5E5k3.js +34 -0
  28. package/dist/UpgradeDriveModal-BwI5E5k3.js.map +1 -0
  29. package/dist/build-info-_k6UQ_N_.js +15 -0
  30. package/dist/build-info-_k6UQ_N_.js.map +1 -0
  31. package/dist/connect.config-Cuh0hj_Q.js +142 -0
  32. package/dist/connect.config-Cuh0hj_Q.js.map +1 -0
  33. package/dist/i18n-4rfcgnb9.js +128 -0
  34. package/dist/i18n-4rfcgnb9.js.map +1 -0
  35. package/dist/load-B3msG504.js +112 -0
  36. package/dist/load-B3msG504.js.map +1 -0
  37. package/dist/main.d.ts +1 -0
  38. package/dist/main.js +12 -0
  39. package/dist/main.js.map +1 -0
  40. package/dist/package-_fdHqCU9.js +117 -0
  41. package/dist/package-_fdHqCU9.js.map +1 -0
  42. package/dist/packages.config-CiH8KJVN.js +32 -0
  43. package/dist/packages.config-CiH8KJVN.js.map +1 -0
  44. package/dist/pglite-runtime-Btp8ZXVH.js +135 -0
  45. package/dist/pglite-runtime-Btp8ZXVH.js.map +1 -0
  46. package/dist/pglite-seed-b1mJUaip.js +49 -0
  47. package/dist/pglite-seed-b1mJUaip.js.map +1 -0
  48. package/dist/pglite.worker.d.ts +1 -0
  49. package/dist/pglite.worker.js +18 -0
  50. package/dist/pglite.worker.js.map +1 -0
  51. package/dist/pglite.worker.legacy.d.ts +1 -0
  52. package/dist/pglite.worker.legacy.js +18 -0
  53. package/dist/pglite.worker.legacy.js.map +1 -0
  54. package/dist/reactor-DFuRedvV.js +913 -0
  55. package/dist/reactor-DFuRedvV.js.map +1 -0
  56. package/dist/registerServiceWorker-CMRF2LWE.js +79 -0
  57. package/dist/registerServiceWorker-CMRF2LWE.js.map +1 -0
  58. package/dist/sidebar-DUc9taAT.js +1473 -0
  59. package/dist/sidebar-DUc9taAT.js.map +1 -0
  60. package/dist/start-connect.d.ts +21 -0
  61. package/dist/start-connect.d.ts.map +1 -0
  62. package/dist/start-connect.js +19 -0
  63. package/dist/start-connect.js.map +1 -0
  64. package/{lib → dist}/style.css +2629 -705
  65. package/dist/toast-DnODOv28.js +23 -0
  66. package/dist/toast-DnODOv28.js.map +1 -0
  67. package/dist/useRegistryPackages-DK8swjWd.js +129 -0
  68. package/dist/useRegistryPackages-DK8swjWd.js.map +1 -0
  69. package/package.json +51 -106
  70. package/public/ph-packages.json +4 -0
  71. package/dist/assets/AddDriveModal-c390br6v.js +0 -2
  72. package/dist/assets/AddDriveModal-c390br6v.js.map +0 -1
  73. package/dist/assets/ClearStorageModal-CHSvDYT5.js +0 -2
  74. package/dist/assets/ClearStorageModal-CHSvDYT5.js.map +0 -1
  75. package/dist/assets/CookiesPolicyModal-Ch-VHBxa.js +0 -2
  76. package/dist/assets/CookiesPolicyModal-Ch-VHBxa.js.map +0 -1
  77. package/dist/assets/CreateDocumentModal-hkUyI6cu.js +0 -2
  78. package/dist/assets/CreateDocumentModal-hkUyI6cu.js.map +0 -1
  79. package/dist/assets/DebugSettingsModal-A4bdlWfB.js +0 -7
  80. package/dist/assets/DebugSettingsModal-A4bdlWfB.js.map +0 -1
  81. package/dist/assets/DeleteDriveModal-vaJNtOnq.js +0 -2
  82. package/dist/assets/DeleteDriveModal-vaJNtOnq.js.map +0 -1
  83. package/dist/assets/DeleteItemModal-Dcr2DBIJ.js +0 -2
  84. package/dist/assets/DeleteItemModal-Dcr2DBIJ.js.map +0 -1
  85. package/dist/assets/DisclaimerModal-DYg-H7Hb.js +0 -2
  86. package/dist/assets/DisclaimerModal-DYg-H7Hb.js.map +0 -1
  87. package/dist/assets/DriveSettingsModal-DpPhRgBP.js +0 -2
  88. package/dist/assets/DriveSettingsModal-DpPhRgBP.js.map +0 -1
  89. package/dist/assets/ExportDocumentWithErrorsModal-B-8LAxJA.js +0 -2
  90. package/dist/assets/ExportDocumentWithErrorsModal-B-8LAxJA.js.map +0 -1
  91. package/dist/assets/SettingsModal-CSPrMeTQ.js +0 -2
  92. package/dist/assets/SettingsModal-CSPrMeTQ.js.map +0 -1
  93. package/dist/assets/UpgradeDriveModal-C1EpIBBh.js +0 -2
  94. package/dist/assets/UpgradeDriveModal-C1EpIBBh.js.map +0 -1
  95. package/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -2
  96. package/dist/assets/__vite-browser-external-BIHI7g3E.js.map +0 -1
  97. package/dist/assets/_virtual_ph_external-packages-CM1tCR4L.js +0 -2
  98. package/dist/assets/_virtual_ph_external-packages-CM1tCR4L.js.map +0 -1
  99. package/dist/assets/analytics-DMklmsZJ.js +0 -3
  100. package/dist/assets/analytics-DMklmsZJ.js.map +0 -1
  101. package/dist/assets/ccip-DDNUQMFj.js +0 -2
  102. package/dist/assets/ccip-DDNUQMFj.js.map +0 -1
  103. package/dist/assets/confirmation-modal-B-jgeNoG.js +0 -2
  104. package/dist/assets/confirmation-modal-B-jgeNoG.js.map +0 -1
  105. package/dist/assets/connect-loader-CvOC68Ih.mp4 +0 -0
  106. package/dist/assets/core-BmuZEe8D.js +0 -2
  107. package/dist/assets/core-BmuZEe8D.js.map +0 -1
  108. package/dist/assets/disclosure-D6kiOLoS.js +0 -2
  109. package/dist/assets/disclosure-D6kiOLoS.js.map +0 -1
  110. package/dist/assets/drive-by-id-oER3gqfy.js +0 -2
  111. package/dist/assets/drive-by-id-oER3gqfy.js.map +0 -1
  112. package/dist/assets/drives-DjHuIXXn.js +0 -2
  113. package/dist/assets/drives-DjHuIXXn.js.map +0 -1
  114. package/dist/assets/dropdown-menu-fQtgf99G.js +0 -2
  115. package/dist/assets/dropdown-menu-fQtgf99G.js.map +0 -1
  116. package/dist/assets/editor-D-pf74Xf.js +0 -46
  117. package/dist/assets/editor-D-pf74Xf.js.map +0 -1
  118. package/dist/assets/editor-sFc5GBjZ.js +0 -2
  119. package/dist/assets/editor-sFc5GBjZ.js.map +0 -1
  120. package/dist/assets/exports-CQVZRuji.js +0 -3
  121. package/dist/assets/exports-CQVZRuji.js.map +0 -1
  122. package/dist/assets/form-input-DQm-t5iF.js +0 -2
  123. package/dist/assets/form-input-DQm-t5iF.js.map +0 -1
  124. package/dist/assets/graphql-editor-CGpuW823.js +0 -74
  125. package/dist/assets/graphql-editor-CGpuW823.js.map +0 -1
  126. package/dist/assets/hmr-Cj7TGDQ6.js +0 -2
  127. package/dist/assets/hmr-Cj7TGDQ6.js.map +0 -1
  128. package/dist/assets/hmr-LMNkvzP7.js +0 -2
  129. package/dist/assets/hmr-LMNkvzP7.js.map +0 -1
  130. package/dist/assets/home-bg-BEhF9NuW.png +0 -0
  131. package/dist/assets/home-bg-BRYzhkhi.avif +0 -0
  132. package/dist/assets/hooks-ChjNy9DZ.js +0 -13
  133. package/dist/assets/hooks-ChjNy9DZ.js.map +0 -1
  134. package/dist/assets/index-B2HJvmmA.js +0 -2
  135. package/dist/assets/index-B2HJvmmA.js.map +0 -1
  136. package/dist/assets/index-BKVXgWGl.js +0 -2
  137. package/dist/assets/index-BKVXgWGl.js.map +0 -1
  138. package/dist/assets/index-BiwdySia.js +0 -222
  139. package/dist/assets/index-BiwdySia.js.map +0 -1
  140. package/dist/assets/index-CpH37puk.js +0 -226
  141. package/dist/assets/index-CpH37puk.js.map +0 -1
  142. package/dist/assets/index-DIWlTVaF.js +0 -2
  143. package/dist/assets/index-DIWlTVaF.js.map +0 -1
  144. package/dist/assets/index-DcvFnjR9.css +0 -1
  145. package/dist/assets/index-DrlXpV0G.js +0 -500
  146. package/dist/assets/index-DrlXpV0G.js.map +0 -1
  147. package/dist/assets/index-V63HK5F8.js +0 -2
  148. package/dist/assets/index-V63HK5F8.js.map +0 -1
  149. package/dist/assets/index-VLRv1f_d.js +0 -32
  150. package/dist/assets/index-VLRv1f_d.js.map +0 -1
  151. package/dist/assets/index.esm-Bd65uCL2.js +0 -2
  152. package/dist/assets/index.esm-Bd65uCL2.js.map +0 -1
  153. package/dist/assets/index.modern-DZugC2qd.js +0 -2
  154. package/dist/assets/index.modern-DZugC2qd.js.map +0 -1
  155. package/dist/assets/json-editor-Ce1YkwgB.js +0 -2
  156. package/dist/assets/json-editor-Ce1YkwgB.js.map +0 -1
  157. package/dist/assets/load-BlyOioLf.js +0 -4
  158. package/dist/assets/load-BlyOioLf.js.map +0 -1
  159. package/dist/assets/location-info-D9cQTxkD.js +0 -2
  160. package/dist/assets/location-info-D9cQTxkD.js.map +0 -1
  161. package/dist/assets/message-list-0lQEck9b.js +0 -2
  162. package/dist/assets/message-list-0lQEck9b.js.map +0 -1
  163. package/dist/assets/migrator-B-v3U2KW.js +0 -82
  164. package/dist/assets/migrator-B-v3U2KW.js.map +0 -1
  165. package/dist/assets/node-input-D6uQgUNe.js +0 -2
  166. package/dist/assets/node-input-D6uQgUNe.js.map +0 -1
  167. package/dist/assets/nodefs-DP_GcR4Q.js +0 -2
  168. package/dist/assets/nodefs-DP_GcR4Q.js.map +0 -1
  169. package/dist/assets/nodefs-_NvywCGz.js +0 -2
  170. package/dist/assets/nodefs-_NvywCGz.js.map +0 -1
  171. package/dist/assets/opfs-ahp-Bim8xYUr.js +0 -4
  172. package/dist/assets/opfs-ahp-Bim8xYUr.js.map +0 -1
  173. package/dist/assets/opfs-ahp-DN9nZuJs.js +0 -4
  174. package/dist/assets/opfs-ahp-DN9nZuJs.js.map +0 -1
  175. package/dist/assets/options-BdOX8f0Q.js +0 -2
  176. package/dist/assets/options-BdOX8f0Q.js.map +0 -1
  177. package/dist/assets/pg_dump-Cvfbb5Q0.wasm +0 -0
  178. package/dist/assets/pglite-COscPi1Y.data +0 -0
  179. package/dist/assets/pglite-CeYkvzd0.wasm +0 -0
  180. package/dist/assets/pglite.db-CVdlKzX2.js +0 -133
  181. package/dist/assets/pglite.db-CVdlKzX2.js.map +0 -1
  182. package/dist/assets/pglite.worker-Ca6pWokV.js +0 -142
  183. package/dist/assets/pglite.worker-Ca6pWokV.js.map +0 -1
  184. package/dist/assets/powerhouse-rounded-CeKGGUG4.png +0 -0
  185. package/dist/assets/processor-host-module-lnkhoS8u.js +0 -3
  186. package/dist/assets/processor-host-module-lnkhoS8u.js.map +0 -1
  187. package/dist/assets/queue-OvbfeDVp.js +0 -2
  188. package/dist/assets/queue-OvbfeDVp.js.map +0 -1
  189. package/dist/assets/reactor-BotX9Wt3.css +0 -1
  190. package/dist/assets/reactor-CantEXOn.js +0 -16
  191. package/dist/assets/reactor-CantEXOn.js.map +0 -1
  192. package/dist/assets/reactor-hbYPlhjt.js +0 -193
  193. package/dist/assets/reactor-hbYPlhjt.js.map +0 -1
  194. package/dist/assets/read-required-modal-BXfwSHO0.js +0 -2
  195. package/dist/assets/read-required-modal-BXfwSHO0.js.map +0 -1
  196. package/dist/assets/renown-DBquRpRZ.js +0 -2
  197. package/dist/assets/renown-DBquRpRZ.js.map +0 -1
  198. package/dist/assets/renown-short-hover-BiSLBV7L.png +0 -0
  199. package/dist/assets/rwa-report-Bb0W5-ac.png +0 -0
  200. package/dist/assets/state-schemas-CXAiPz0J.js +0 -3
  201. package/dist/assets/state-schemas-CXAiPz0J.js.map +0 -1
  202. package/dist/assets/tabs-B-QcOUjA.js +0 -2
  203. package/dist/assets/tabs-B-QcOUjA.js.map +0 -1
  204. package/dist/assets/use-get-switchboard-link-CezXVAll.js +0 -12
  205. package/dist/assets/use-get-switchboard-link-CezXVAll.js.map +0 -1
  206. package/dist/assets/user-permissions-ntgMmz-L.js +0 -2
  207. package/dist/assets/user-permissions-ntgMmz-L.js.map +0 -1
  208. package/dist/assets/vetra-Bu56PPb6.js +0 -221
  209. package/dist/assets/vetra-Bu56PPb6.js.map +0 -1
  210. package/dist/icon.ico +0 -0
  211. package/dist/index.html +0 -32
  212. package/dist/robots.txt +0 -3
  213. package/dist/settings.png +0 -0
  214. package/heroku/Dockerfile +0 -101
  215. package/heroku/Procfile +0 -1
  216. package/heroku/config/nginx.conf.template +0 -77
  217. package/heroku/heroku-entrypoint.sh +0 -38
  218. package/lib/cypress/e2e/navigation.cy.d.ts +0 -2
  219. package/lib/cypress/e2e/navigation.cy.d.ts.map +0 -1
  220. package/lib/cypress/e2e/navigation.cy.js +0 -221
  221. package/lib/cypress/e2e/navigation.cy.js.map +0 -1
  222. package/lib/cypress/e2e/utils/index.d.ts +0 -15
  223. package/lib/cypress/e2e/utils/index.d.ts.map +0 -1
  224. package/lib/cypress/e2e/utils/index.js +0 -121
  225. package/lib/cypress/e2e/utils/index.js.map +0 -1
  226. package/lib/cypress/support/commands.d.ts +0 -2
  227. package/lib/cypress/support/commands.d.ts.map +0 -1
  228. package/lib/cypress/support/commands.js +0 -29
  229. package/lib/cypress/support/commands.js.map +0 -1
  230. package/lib/cypress/support/e2e.d.ts +0 -2
  231. package/lib/cypress/support/e2e.d.ts.map +0 -1
  232. package/lib/cypress/support/e2e.js +0 -19
  233. package/lib/cypress/support/e2e.js.map +0 -1
  234. package/lib/cypress.config.d.ts +0 -3
  235. package/lib/cypress.config.d.ts.map +0 -1
  236. package/lib/cypress.config.js +0 -15
  237. package/lib/cypress.config.js.map +0 -1
  238. package/lib/package.copy.json +0 -168
  239. package/lib/scripts/render-skeleton.d.ts +0 -2
  240. package/lib/scripts/render-skeleton.d.ts.map +0 -1
  241. package/lib/scripts/render-skeleton.js +0 -11
  242. package/lib/scripts/render-skeleton.js.map +0 -1
  243. package/lib/src/components/analytics.d.ts +0 -8
  244. package/lib/src/components/analytics.d.ts.map +0 -1
  245. package/lib/src/components/analytics.js +0 -30
  246. package/lib/src/components/analytics.js.map +0 -1
  247. package/lib/src/components/app-loader.d.ts +0 -3
  248. package/lib/src/components/app-loader.d.ts.map +0 -1
  249. package/lib/src/components/app-loader.js +0 -9
  250. package/lib/src/components/app-loader.js.map +0 -1
  251. package/lib/src/components/app-skeleton.d.ts +0 -3
  252. package/lib/src/components/app-skeleton.d.ts.map +0 -1
  253. package/lib/src/components/app-skeleton.js +0 -38
  254. package/lib/src/components/app-skeleton.js.map +0 -1
  255. package/lib/src/components/app.d.ts +0 -2
  256. package/lib/src/components/app.d.ts.map +0 -1
  257. package/lib/src/components/app.js +0 -29
  258. package/lib/src/components/app.js.map +0 -1
  259. package/lib/src/components/button.d.ts +0 -3
  260. package/lib/src/components/button.d.ts.map +0 -1
  261. package/lib/src/components/button.js +0 -7
  262. package/lib/src/components/button.js.map +0 -1
  263. package/lib/src/components/cookie-banner.d.ts +0 -2
  264. package/lib/src/components/cookie-banner.d.ts.map +0 -1
  265. package/lib/src/components/cookie-banner.js +0 -48
  266. package/lib/src/components/cookie-banner.js.map +0 -1
  267. package/lib/src/components/document-editor-container.d.ts +0 -2
  268. package/lib/src/components/document-editor-container.d.ts.map +0 -1
  269. package/lib/src/components/document-editor-container.js +0 -38
  270. package/lib/src/components/document-editor-container.js.map +0 -1
  271. package/lib/src/components/dots-loader.d.ts +0 -2
  272. package/lib/src/components/dots-loader.d.ts.map +0 -1
  273. package/lib/src/components/dots-loader.js +0 -15
  274. package/lib/src/components/dots-loader.js.map +0 -1
  275. package/lib/src/components/drive-editor-container.d.ts +0 -2
  276. package/lib/src/components/drive-editor-container.d.ts.map +0 -1
  277. package/lib/src/components/drive-editor-container.js +0 -22
  278. package/lib/src/components/drive-editor-container.js.map +0 -1
  279. package/lib/src/components/drive-icon.d.ts +0 -5
  280. package/lib/src/components/drive-icon.d.ts.map +0 -1
  281. package/lib/src/components/drive-icon.js +0 -22
  282. package/lib/src/components/drive-icon.js.map +0 -1
  283. package/lib/src/components/editor-loader.d.ts +0 -9
  284. package/lib/src/components/editor-loader.d.ts.map +0 -1
  285. package/lib/src/components/editor-loader.js +0 -19
  286. package/lib/src/components/editor-loader.js.map +0 -1
  287. package/lib/src/components/editors.d.ts +0 -10
  288. package/lib/src/components/editors.d.ts.map +0 -1
  289. package/lib/src/components/editors.js +0 -94
  290. package/lib/src/components/editors.js.map +0 -1
  291. package/lib/src/components/error-boundary.d.ts +0 -103
  292. package/lib/src/components/error-boundary.d.ts.map +0 -1
  293. package/lib/src/components/error-boundary.js +0 -104
  294. package/lib/src/components/error-boundary.js.map +0 -1
  295. package/lib/src/components/footer.d.ts +0 -2
  296. package/lib/src/components/footer.d.ts.map +0 -1
  297. package/lib/src/components/footer.js +0 -16
  298. package/lib/src/components/footer.js.map +0 -1
  299. package/lib/src/components/index.d.ts +0 -21
  300. package/lib/src/components/index.d.ts.map +0 -1
  301. package/lib/src/components/index.js +0 -21
  302. package/lib/src/components/index.js.map +0 -1
  303. package/lib/src/components/load.d.ts +0 -8
  304. package/lib/src/components/load.d.ts.map +0 -1
  305. package/lib/src/components/load.js +0 -17
  306. package/lib/src/components/load.js.map +0 -1
  307. package/lib/src/components/login.d.ts +0 -2
  308. package/lib/src/components/login.d.ts.map +0 -1
  309. package/lib/src/components/login.js +0 -12
  310. package/lib/src/components/login.js.map +0 -1
  311. package/lib/src/components/modal/modals/AddDriveModal.d.ts +0 -2
  312. package/lib/src/components/modal/modals/AddDriveModal.d.ts.map +0 -1
  313. package/lib/src/components/modal/modals/AddDriveModal.js +0 -90
  314. package/lib/src/components/modal/modals/AddDriveModal.js.map +0 -1
  315. package/lib/src/components/modal/modals/ClearStorageModal.d.ts +0 -2
  316. package/lib/src/components/modal/modals/ClearStorageModal.d.ts.map +0 -1
  317. package/lib/src/components/modal/modals/ClearStorageModal.js +0 -35
  318. package/lib/src/components/modal/modals/ClearStorageModal.js.map +0 -1
  319. package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts +0 -2
  320. package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts.map +0 -1
  321. package/lib/src/components/modal/modals/CookiesPolicyModal.js +0 -16
  322. package/lib/src/components/modal/modals/CookiesPolicyModal.js.map +0 -1
  323. package/lib/src/components/modal/modals/CreateDocumentModal.d.ts +0 -2
  324. package/lib/src/components/modal/modals/CreateDocumentModal.d.ts.map +0 -1
  325. package/lib/src/components/modal/modals/CreateDocumentModal.js +0 -24
  326. package/lib/src/components/modal/modals/CreateDocumentModal.js.map +0 -1
  327. package/lib/src/components/modal/modals/DebugSettingsModal.d.ts +0 -2
  328. package/lib/src/components/modal/modals/DebugSettingsModal.d.ts.map +0 -1
  329. package/lib/src/components/modal/modals/DebugSettingsModal.js +0 -108
  330. package/lib/src/components/modal/modals/DebugSettingsModal.js.map +0 -1
  331. package/lib/src/components/modal/modals/DeleteDriveModal.d.ts +0 -2
  332. package/lib/src/components/modal/modals/DeleteDriveModal.d.ts.map +0 -1
  333. package/lib/src/components/modal/modals/DeleteDriveModal.js +0 -32
  334. package/lib/src/components/modal/modals/DeleteDriveModal.js.map +0 -1
  335. package/lib/src/components/modal/modals/DeleteItemModal.d.ts +0 -3
  336. package/lib/src/components/modal/modals/DeleteItemModal.d.ts.map +0 -1
  337. package/lib/src/components/modal/modals/DeleteItemModal.js +0 -33
  338. package/lib/src/components/modal/modals/DeleteItemModal.js.map +0 -1
  339. package/lib/src/components/modal/modals/DisclaimerModal.d.ts +0 -3
  340. package/lib/src/components/modal/modals/DisclaimerModal.d.ts.map +0 -1
  341. package/lib/src/components/modal/modals/DisclaimerModal.js +0 -12
  342. package/lib/src/components/modal/modals/DisclaimerModal.js.map +0 -1
  343. package/lib/src/components/modal/modals/DriveSettingsModal.d.ts +0 -2
  344. package/lib/src/components/modal/modals/DriveSettingsModal.d.ts.map +0 -1
  345. package/lib/src/components/modal/modals/DriveSettingsModal.js +0 -33
  346. package/lib/src/components/modal/modals/DriveSettingsModal.js.map +0 -1
  347. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts +0 -2
  348. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts.map +0 -1
  349. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js +0 -30
  350. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js.map +0 -1
  351. package/lib/src/components/modal/modals/InspectorModal/InspectorModal.d.ts +0 -2
  352. package/lib/src/components/modal/modals/InspectorModal/InspectorModal.d.ts.map +0 -1
  353. package/lib/src/components/modal/modals/InspectorModal/InspectorModal.js +0 -32
  354. package/lib/src/components/modal/modals/InspectorModal/InspectorModal.js.map +0 -1
  355. package/lib/src/components/modal/modals/InspectorModal/index.d.ts +0 -2
  356. package/lib/src/components/modal/modals/InspectorModal/index.d.ts.map +0 -1
  357. package/lib/src/components/modal/modals/InspectorModal/index.js +0 -2
  358. package/lib/src/components/modal/modals/InspectorModal/index.js.map +0 -1
  359. package/lib/src/components/modal/modals/InspectorModal/useDbExplorer.d.ts +0 -31
  360. package/lib/src/components/modal/modals/InspectorModal/useDbExplorer.d.ts.map +0 -1
  361. package/lib/src/components/modal/modals/InspectorModal/useDbExplorer.js +0 -211
  362. package/lib/src/components/modal/modals/InspectorModal/useDbExplorer.js.map +0 -1
  363. package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts +0 -3
  364. package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts.map +0 -1
  365. package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.js +0 -61
  366. package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.js.map +0 -1
  367. package/lib/src/components/modal/modals/InspectorModal/useRemotesInspector.d.ts +0 -6
  368. package/lib/src/components/modal/modals/InspectorModal/useRemotesInspector.d.ts.map +0 -1
  369. package/lib/src/components/modal/modals/InspectorModal/useRemotesInspector.js +0 -17
  370. package/lib/src/components/modal/modals/InspectorModal/useRemotesInspector.js.map +0 -1
  371. package/lib/src/components/modal/modals/SettingsModal.d.ts +0 -3
  372. package/lib/src/components/modal/modals/SettingsModal.d.ts.map +0 -1
  373. package/lib/src/components/modal/modals/SettingsModal.js +0 -48
  374. package/lib/src/components/modal/modals/SettingsModal.js.map +0 -1
  375. package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts +0 -3
  376. package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts.map +0 -1
  377. package/lib/src/components/modal/modals/UpgradeDriveModal.js +0 -21
  378. package/lib/src/components/modal/modals/UpgradeDriveModal.js.map +0 -1
  379. package/lib/src/components/modal/modals/settings/about.d.ts +0 -2
  380. package/lib/src/components/modal/modals/settings/about.d.ts.map +0 -1
  381. package/lib/src/components/modal/modals/settings/about.js +0 -10
  382. package/lib/src/components/modal/modals/settings/about.js.map +0 -1
  383. package/lib/src/components/modal/modals/settings/danger-zone.d.ts +0 -2
  384. package/lib/src/components/modal/modals/settings/danger-zone.d.ts.map +0 -1
  385. package/lib/src/components/modal/modals/settings/danger-zone.js +0 -15
  386. package/lib/src/components/modal/modals/settings/danger-zone.js.map +0 -1
  387. package/lib/src/components/modal/modals/settings/default-editor.d.ts +0 -2
  388. package/lib/src/components/modal/modals/settings/default-editor.d.ts.map +0 -1
  389. package/lib/src/components/modal/modals/settings/default-editor.js +0 -18
  390. package/lib/src/components/modal/modals/settings/default-editor.js.map +0 -1
  391. package/lib/src/components/modal/modals/settings/package-manager.d.ts +0 -3
  392. package/lib/src/components/modal/modals/settings/package-manager.d.ts.map +0 -1
  393. package/lib/src/components/modal/modals/settings/package-manager.js +0 -87
  394. package/lib/src/components/modal/modals/settings/package-manager.js.map +0 -1
  395. package/lib/src/components/modal/modals-container.d.ts +0 -2
  396. package/lib/src/components/modal/modals-container.d.ts.map +0 -1
  397. package/lib/src/components/modal/modals-container.js +0 -70
  398. package/lib/src/components/modal/modals-container.js.map +0 -1
  399. package/lib/src/components/ph-logo.d.ts +0 -2
  400. package/lib/src/components/ph-logo.d.ts.map +0 -1
  401. package/lib/src/components/ph-logo.js +0 -7
  402. package/lib/src/components/ph-logo.js.map +0 -1
  403. package/lib/src/components/reload-connect-toast.d.ts +0 -2
  404. package/lib/src/components/reload-connect-toast.d.ts.map +0 -1
  405. package/lib/src/components/reload-connect-toast.js +0 -7
  406. package/lib/src/components/reload-connect-toast.js.map +0 -1
  407. package/lib/src/components/root.d.ts +0 -2
  408. package/lib/src/components/root.d.ts.map +0 -1
  409. package/lib/src/components/root.js +0 -8
  410. package/lib/src/components/root.js.map +0 -1
  411. package/lib/src/components/router.d.ts +0 -2
  412. package/lib/src/components/router.d.ts.map +0 -1
  413. package/lib/src/components/router.js +0 -41
  414. package/lib/src/components/router.js.map +0 -1
  415. package/lib/src/components/search-bar.d.ts +0 -2
  416. package/lib/src/components/search-bar.d.ts.map +0 -1
  417. package/lib/src/components/search-bar.js +0 -36
  418. package/lib/src/components/search-bar.js.map +0 -1
  419. package/lib/src/components/sidebar.d.ts +0 -2
  420. package/lib/src/components/sidebar.d.ts.map +0 -1
  421. package/lib/src/components/sidebar.js +0 -28
  422. package/lib/src/components/sidebar.js.map +0 -1
  423. package/lib/src/connect.config.d.ts +0 -115
  424. package/lib/src/connect.config.d.ts.map +0 -1
  425. package/lib/src/connect.config.js +0 -148
  426. package/lib/src/connect.config.js.map +0 -1
  427. package/lib/src/context/index.d.ts +0 -4
  428. package/lib/src/context/index.d.ts.map +0 -1
  429. package/lib/src/context/index.js +0 -4
  430. package/lib/src/context/index.js.map +0 -1
  431. package/lib/src/context/processor-manager.d.ts +0 -2
  432. package/lib/src/context/processor-manager.d.ts.map +0 -1
  433. package/lib/src/context/processor-manager.js +0 -2
  434. package/lib/src/context/processor-manager.js.map +0 -1
  435. package/lib/src/context/processor-manager.old.d.ts +0 -3
  436. package/lib/src/context/processor-manager.old.d.ts.map +0 -1
  437. package/lib/src/context/processor-manager.old.js +0 -189
  438. package/lib/src/context/processor-manager.old.js.map +0 -1
  439. package/lib/src/context/read-mode.d.ts +0 -2
  440. package/lib/src/context/read-mode.d.ts.map +0 -1
  441. package/lib/src/context/read-mode.js +0 -219
  442. package/lib/src/context/read-mode.js.map +0 -1
  443. package/lib/src/context/sentry-provider.d.ts +0 -6
  444. package/lib/src/context/sentry-provider.d.ts.map +0 -1
  445. package/lib/src/context/sentry-provider.js +0 -6
  446. package/lib/src/context/sentry-provider.js.map +0 -1
  447. package/lib/src/feature-flags.d.ts +0 -35
  448. package/lib/src/feature-flags.d.ts.map +0 -1
  449. package/lib/src/feature-flags.js +0 -150
  450. package/lib/src/feature-flags.js.map +0 -1
  451. package/lib/src/globals.d.ts +0 -9
  452. package/lib/src/globals.d.ts.map +0 -1
  453. package/lib/src/globals.js +0 -2
  454. package/lib/src/globals.js.map +0 -1
  455. package/lib/src/hmr.d.ts +0 -3
  456. package/lib/src/hmr.d.ts.map +0 -1
  457. package/lib/src/hmr.js +0 -2
  458. package/lib/src/hmr.js.map +0 -1
  459. package/lib/src/hooks/index.d.ts +0 -10
  460. package/lib/src/hooks/index.d.ts.map +0 -1
  461. package/lib/src/hooks/index.js +0 -10
  462. package/lib/src/hooks/index.js.map +0 -1
  463. package/lib/src/hooks/useAcceptedCookies.d.ts +0 -9
  464. package/lib/src/hooks/useAcceptedCookies.d.ts.map +0 -1
  465. package/lib/src/hooks/useAcceptedCookies.js +0 -34
  466. package/lib/src/hooks/useAcceptedCookies.js.map +0 -1
  467. package/lib/src/hooks/useCheckLatestVersion.d.ts +0 -2
  468. package/lib/src/hooks/useCheckLatestVersion.d.ts.map +0 -1
  469. package/lib/src/hooks/useCheckLatestVersion.js +0 -33
  470. package/lib/src/hooks/useCheckLatestVersion.js.map +0 -1
  471. package/lib/src/hooks/useClientErrorHandler.d.ts +0 -6
  472. package/lib/src/hooks/useClientErrorHandler.d.ts.map +0 -1
  473. package/lib/src/hooks/useClientErrorHandler.js +0 -96
  474. package/lib/src/hooks/useClientErrorHandler.js.map +0 -1
  475. package/lib/src/hooks/useCookieBanner.d.ts +0 -5
  476. package/lib/src/hooks/useCookieBanner.d.ts.map +0 -1
  477. package/lib/src/hooks/useCookieBanner.js +0 -32
  478. package/lib/src/hooks/useCookieBanner.js.map +0 -1
  479. package/lib/src/hooks/useInitSentry.d.ts +0 -2
  480. package/lib/src/hooks/useInitSentry.d.ts.map +0 -1
  481. package/lib/src/hooks/useInitSentry.js +0 -80
  482. package/lib/src/hooks/useInitSentry.js.map +0 -1
  483. package/lib/src/hooks/useNodeActions.d.ts +0 -6
  484. package/lib/src/hooks/useNodeActions.d.ts.map +0 -1
  485. package/lib/src/hooks/useNodeActions.js +0 -35
  486. package/lib/src/hooks/useNodeActions.js.map +0 -1
  487. package/lib/src/hooks/useUndoRedoShortcuts.d.ts +0 -8
  488. package/lib/src/hooks/useUndoRedoShortcuts.d.ts.map +0 -1
  489. package/lib/src/hooks/useUndoRedoShortcuts.js +0 -26
  490. package/lib/src/hooks/useUndoRedoShortcuts.js.map +0 -1
  491. package/lib/src/hooks/useWindowSize.d.ts +0 -5
  492. package/lib/src/hooks/useWindowSize.d.ts.map +0 -1
  493. package/lib/src/hooks/useWindowSize.js +0 -21
  494. package/lib/src/hooks/useWindowSize.js.map +0 -1
  495. package/lib/src/hooks/utils.d.ts +0 -7
  496. package/lib/src/hooks/utils.d.ts.map +0 -1
  497. package/lib/src/hooks/utils.js +0 -46
  498. package/lib/src/hooks/utils.js.map +0 -1
  499. package/lib/src/i18n/index.d.ts +0 -4
  500. package/lib/src/i18n/index.d.ts.map +0 -1
  501. package/lib/src/i18n/index.js +0 -26
  502. package/lib/src/i18n/index.js.map +0 -1
  503. package/lib/src/i18n/locales/en.json +0 -114
  504. package/lib/src/index.d.ts +0 -2
  505. package/lib/src/index.d.ts.map +0 -1
  506. package/lib/src/index.js +0 -2
  507. package/lib/src/index.js.map +0 -1
  508. package/lib/src/main.d.ts +0 -2
  509. package/lib/src/main.d.ts.map +0 -1
  510. package/lib/src/main.js +0 -8
  511. package/lib/src/main.js.map +0 -1
  512. package/lib/src/pages/content.d.ts +0 -2
  513. package/lib/src/pages/content.d.ts.map +0 -1
  514. package/lib/src/pages/content.js +0 -39
  515. package/lib/src/pages/content.js.map +0 -1
  516. package/lib/src/pages/demo/atlas-import.d.ts +0 -2
  517. package/lib/src/pages/demo/atlas-import.d.ts.map +0 -1
  518. package/lib/src/pages/demo/atlas-import.js +0 -122
  519. package/lib/src/pages/demo/atlas-import.js.map +0 -1
  520. package/lib/src/pages/index.d.ts +0 -4
  521. package/lib/src/pages/index.d.ts.map +0 -1
  522. package/lib/src/pages/index.js +0 -4
  523. package/lib/src/pages/index.js.map +0 -1
  524. package/lib/src/pages/settings.d.ts +0 -4
  525. package/lib/src/pages/settings.d.ts.map +0 -1
  526. package/lib/src/pages/settings.js +0 -9
  527. package/lib/src/pages/settings.js.map +0 -1
  528. package/lib/src/pglite.db.d.ts +0 -2
  529. package/lib/src/pglite.db.d.ts.map +0 -1
  530. package/lib/src/pglite.db.js +0 -19
  531. package/lib/src/pglite.db.js.map +0 -1
  532. package/lib/src/pglite.worker.d.ts +0 -2
  533. package/lib/src/pglite.worker.d.ts.map +0 -1
  534. package/lib/src/pglite.worker.js +0 -15
  535. package/lib/src/pglite.worker.js.map +0 -1
  536. package/lib/src/services/hmr.d.ts +0 -13
  537. package/lib/src/services/hmr.d.ts.map +0 -1
  538. package/lib/src/services/hmr.js +0 -85
  539. package/lib/src/services/hmr.js.map +0 -1
  540. package/lib/src/services/index.d.ts +0 -7
  541. package/lib/src/services/index.d.ts.map +0 -1
  542. package/lib/src/services/index.js +0 -6
  543. package/lib/src/services/index.js.map +0 -1
  544. package/lib/src/services/logger.d.ts +0 -2
  545. package/lib/src/services/logger.d.ts.map +0 -1
  546. package/lib/src/services/logger.js +0 -28
  547. package/lib/src/services/logger.js.map +0 -1
  548. package/lib/src/services/storage/base-storage.d.ts +0 -9
  549. package/lib/src/services/storage/base-storage.d.ts.map +0 -1
  550. package/lib/src/services/storage/base-storage.js +0 -21
  551. package/lib/src/services/storage/base-storage.js.map +0 -1
  552. package/lib/src/services/storage/browser.d.ts +0 -5
  553. package/lib/src/services/storage/browser.d.ts.map +0 -1
  554. package/lib/src/services/storage/browser.js +0 -25
  555. package/lib/src/services/storage/browser.js.map +0 -1
  556. package/lib/src/services/storage/types.d.ts +0 -6
  557. package/lib/src/services/storage/types.d.ts.map +0 -1
  558. package/lib/src/services/storage/types.js +0 -2
  559. package/lib/src/services/storage/types.js.map +0 -1
  560. package/lib/src/services/toast.d.ts +0 -8
  561. package/lib/src/services/toast.d.ts.map +0 -1
  562. package/lib/src/services/toast.js +0 -11
  563. package/lib/src/services/toast.js.map +0 -1
  564. package/lib/src/store/document-model.d.ts +0 -3
  565. package/lib/src/store/document-model.d.ts.map +0 -1
  566. package/lib/src/store/document-model.js +0 -80
  567. package/lib/src/store/document-model.js.map +0 -1
  568. package/lib/src/store/editor.d.ts +0 -5
  569. package/lib/src/store/editor.d.ts.map +0 -1
  570. package/lib/src/store/editor.js +0 -29
  571. package/lib/src/store/editor.js.map +0 -1
  572. package/lib/src/store/external-packages.d.ts +0 -4
  573. package/lib/src/store/external-packages.d.ts.map +0 -1
  574. package/lib/src/store/external-packages.js +0 -36
  575. package/lib/src/store/external-packages.js.map +0 -1
  576. package/lib/src/store/index.d.ts +0 -7
  577. package/lib/src/store/index.d.ts.map +0 -1
  578. package/lib/src/store/index.js +0 -7
  579. package/lib/src/store/index.js.map +0 -1
  580. package/lib/src/store/processor-host-module.d.ts +0 -3
  581. package/lib/src/store/processor-host-module.d.ts.map +0 -1
  582. package/lib/src/store/processor-host-module.js +0 -22
  583. package/lib/src/store/processor-host-module.js.map +0 -1
  584. package/lib/src/store/reactor.d.ts +0 -3
  585. package/lib/src/store/reactor.d.ts.map +0 -1
  586. package/lib/src/store/reactor.js +0 -165
  587. package/lib/src/store/reactor.js.map +0 -1
  588. package/lib/src/store/user.d.ts +0 -2
  589. package/lib/src/store/user.d.ts.map +0 -1
  590. package/lib/src/store/user.js +0 -16
  591. package/lib/src/store/user.js.map +0 -1
  592. package/lib/src/store/utils.d.ts +0 -2
  593. package/lib/src/store/utils.d.ts.map +0 -1
  594. package/lib/src/store/utils.js +0 -59
  595. package/lib/src/store/utils.js.map +0 -1
  596. package/lib/src/utils/browser.d.ts +0 -2
  597. package/lib/src/utils/browser.d.ts.map +0 -1
  598. package/lib/src/utils/browser.js +0 -9
  599. package/lib/src/utils/browser.js.map +0 -1
  600. package/lib/src/utils/document-editor-debug-tools.d.ts +0 -17
  601. package/lib/src/utils/document-editor-debug-tools.d.ts.map +0 -1
  602. package/lib/src/utils/document-editor-debug-tools.js +0 -55
  603. package/lib/src/utils/document-editor-debug-tools.js.map +0 -1
  604. package/lib/src/utils/drive-preservation.d.ts +0 -19
  605. package/lib/src/utils/drive-preservation.d.ts.map +0 -1
  606. package/lib/src/utils/drive-preservation.js +0 -51
  607. package/lib/src/utils/drive-preservation.js.map +0 -1
  608. package/lib/src/utils/drive-sections.d.ts +0 -31
  609. package/lib/src/utils/drive-sections.d.ts.map +0 -1
  610. package/lib/src/utils/drive-sections.js +0 -63
  611. package/lib/src/utils/drive-sections.js.map +0 -1
  612. package/lib/src/utils/index.d.ts +0 -12
  613. package/lib/src/utils/index.d.ts.map +0 -1
  614. package/lib/src/utils/index.js +0 -12
  615. package/lib/src/utils/index.js.map +0 -1
  616. package/lib/src/utils/join.d.ts +0 -2
  617. package/lib/src/utils/join.d.ts.map +0 -1
  618. package/lib/src/utils/join.js +0 -11
  619. package/lib/src/utils/join.js.map +0 -1
  620. package/lib/src/utils/openUrl.d.ts +0 -2
  621. package/lib/src/utils/openUrl.d.ts.map +0 -1
  622. package/lib/src/utils/openUrl.js +0 -3
  623. package/lib/src/utils/openUrl.js.map +0 -1
  624. package/lib/src/utils/path.d.ts +0 -4
  625. package/lib/src/utils/path.d.ts.map +0 -1
  626. package/lib/src/utils/path.js +0 -17
  627. package/lib/src/utils/path.js.map +0 -1
  628. package/lib/src/utils/reactor.d.ts +0 -19
  629. package/lib/src/utils/reactor.d.ts.map +0 -1
  630. package/lib/src/utils/reactor.js +0 -67
  631. package/lib/src/utils/reactor.js.map +0 -1
  632. package/lib/src/utils/registerServiceWorker.d.ts +0 -12
  633. package/lib/src/utils/registerServiceWorker.d.ts.map +0 -1
  634. package/lib/src/utils/registerServiceWorker.js +0 -97
  635. package/lib/src/utils/registerServiceWorker.js.map +0 -1
  636. package/lib/src/utils/signature.d.ts +0 -4
  637. package/lib/src/utils/signature.d.ts.map +0 -1
  638. package/lib/src/utils/signature.js +0 -36
  639. package/lib/src/utils/signature.js.map +0 -1
  640. package/lib/src/utils/slug.d.ts +0 -2
  641. package/lib/src/utils/slug.d.ts.map +0 -1
  642. package/lib/src/utils/slug.js +0 -4
  643. package/lib/src/utils/slug.js.map +0 -1
  644. package/lib/test/utils/signer.test.d.ts +0 -2
  645. package/lib/test/utils/signer.test.d.ts.map +0 -1
  646. package/lib/test/utils/signer.test.js +0 -327
  647. package/lib/test/utils/signer.test.js.map +0 -1
  648. package/lib/tsconfig.tsbuildinfo +0 -1
  649. package/lib/vite.config.d.ts +0 -3
  650. package/lib/vite.config.d.ts.map +0 -1
  651. package/lib/vite.config.js +0 -27
  652. package/lib/vite.config.js.map +0 -1
  653. package/lib/vitest.config.d.ts +0 -3
  654. package/lib/vitest.config.d.ts.map +0 -1
  655. package/lib/vitest.config.js +0 -8
  656. package/lib/vitest.config.js.map +0 -1
  657. package/nginx.conf +0 -77
  658. package/package.copy.json +0 -168
  659. package/src/index.css +0 -5
@@ -1,500 +0,0 @@
1
- import{cq as Hp,b4 as Ya,aJ as Te}from"./index-BiwdySia.js";import{D as N,d as _,g as Nt,G as Y,a as ge,b as Ee,S as Ce,i as Ss,c as Xn,e as zn,T as gl,n as ir,f as yt,h as _l,j as ht,k as B,l as Vs,m as qo,o as ar,p as cr,t as me,q as ve,r as K,u as Wp,v as qn,w as fe,x as jp,y as zp,z as Nn,A as Ai,B as P,C as Ka,E as J,F as Jr,H as Xa,I as qp,J as xi,K as Ke,L as Qn,M as Mi,N as Ni,O as Gp,P as Vp,Q as We,_ as Oi,R as Yr,U as Dt,V as yl,W as Jp,X as Sl,Y as Kt,Z as bl,$ as Zn,a0 as Yp,a1 as El,a2 as Kp,a3 as vl,a4 as Pi,a5 as Li,a6 as ur,a7 as bn,a8 as lo,a9 as Tl,aa as Go,ab as Xe,ac as Qa,ad as Ot,ae as Za,af as wl,ag as Il,ah as kl,ai as Xp,aj as It,ak as Di,al as Qp,am as Js,an as Zp,ao as eh,ap as th,aq as nh,ar as rh,as as oh,at as sh,au as Fi,av as Ht,aw as Qe,ax as fo,ay as $i,az as Re,aA as ec,aB as Pt,aC as po,aD as Ys,aE as we,aF as Ks,aG as kt,aH as at,aI as Rl,aJ as ih,aK as ho,aL as Cl,aM as ah,aN as nn,aO as ch,aP as Xs,aQ as Al,aR as tc,aS as uh,aT as Bi,aU as lh,aV as dh,aW as Me,aX as He,aY as xl,aZ as Gt,a_ as fh,a$ as mt,b0 as nc,b1 as rc,b2 as lr,b3 as ph,b4 as hh,b5 as mh,b6 as gh,b7 as _h,b8 as yh,b9 as Ml,ba as Sh,bb as bh,bc as Eh}from"./exports-CQVZRuji.js";import{bd as bC,be as EC,bf as vC,bg as TC,bh as wC,bi as IC,bj as kC,bk as RC,bl as CC,bm as AC,s as xC,bn as MC,bo as NC,bp as OC}from"./exports-CQVZRuji.js";function vh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var bs={exports:{}},re={};var oc;function Th(){if(oc)return re;oc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function I(S){if(typeof S=="object"&&S!==null){var w=S.$$typeof;switch(w){case t:switch(S=S.type,S){case c:case u:case r:case s:case o:case l:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case h:case f:case i:return S;default:return w}}case n:return w}}}function v(S){return I(S)===u}return re.AsyncMode=c,re.ConcurrentMode=u,re.ContextConsumer=a,re.ContextProvider=i,re.Element=t,re.ForwardRef=d,re.Fragment=r,re.Lazy=h,re.Memo=f,re.Portal=n,re.Profiler=s,re.StrictMode=o,re.Suspense=l,re.isAsyncMode=function(S){return v(S)||I(S)===c},re.isConcurrentMode=v,re.isContextConsumer=function(S){return I(S)===a},re.isContextProvider=function(S){return I(S)===i},re.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},re.isForwardRef=function(S){return I(S)===d},re.isFragment=function(S){return I(S)===r},re.isLazy=function(S){return I(S)===h},re.isMemo=function(S){return I(S)===f},re.isPortal=function(S){return I(S)===n},re.isProfiler=function(S){return I(S)===s},re.isStrictMode=function(S){return I(S)===o},re.isSuspense=function(S){return I(S)===l},re.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===s||S===o||S===l||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===f||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===g||S.$$typeof===y||S.$$typeof===b||S.$$typeof===m)},re.typeOf=I,re}var sc;function wh(){return sc||(sc=1,bs.exports=Th()),bs.exports}var Es,ic;function Ih(){if(ic)return Es;ic=1;var e=wh(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=o;function i(h){return e.isMemo(h)?o:s[h.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,p=Object.prototype;function f(h,m,g){if(typeof m!="string"){if(p){var y=l(m);y&&y!==p&&f(h,y,g)}var b=c(m);u&&(b=b.concat(u(m)));for(var I=i(h),v=i(m),S=0;S<b.length;++S){var w=b[S];if(!n[w]&&!(g&&g[w])&&!(v&&v[w])&&!(I&&I[w])){var E=d(m,w);try{a(h,w,E)}catch{}}}}return h}return Es=f,Es}var Nl=Ih();const Ol=Hp(Nl),kh=vh({__proto__:null,default:Ol},[Nl]),Kr={},ac={};function Ft(e,t){Kr[e]=Kr[e]||[],Kr[e].push(t)}function $t(e,t){if(!ac[e]){ac[e]=!0;try{t()}catch(n){N&&_.error(`Error while instrumenting ${e}`,n)}}}function qe(e,t){const n=e&&Kr[e];if(n)for(const r of n)try{r(t)}catch(o){N&&_.error(`Error while triggering instrumentation handler.
2
- Type: ${e}
3
- Name: ${Nt(r)}
4
- Error:`,o)}}let vs=null;function Pl(e){const t="error";Ft(t,e),$t(t,Rh)}function Rh(){vs=Y.onerror,Y.onerror=function(e,t,n,r,o){return qe("error",{column:r,error:o,line:n,msg:e,url:t}),vs?vs.apply(this,arguments):!1},Y.onerror.__SENTRY_INSTRUMENTED__=!0}let Ts=null;function Ll(e){const t="unhandledrejection";Ft(t,e),$t(t,Ch)}function Ch(){Ts=Y.onunhandledrejection,Y.onunhandledrejection=function(e){return qe("unhandledrejection",e),Ts?Ts.apply(this,arguments):!0},Y.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let cc=!1;function Ah(){if(cc)return;function e(){const t=ge(),n=t&&Ee(t);if(n){const r="internal_error";N&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Ce,message:r})}}e.tag="sentry_tracingErrorCallback",cc=!0,Pl(e),Ll(e)}function uc(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function mo(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(Mh(n)){if(Ss(e.description,n))return N&&uc(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Ss(e.description,n.name):!0,o=n.op?e.op&&Ss(e.op,n.op):!0;if(r&&o)return N&&uc(e),!0}return!1}function xh(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function Mh(e){return typeof e=="string"||e instanceof RegExp}class gt{constructor(t={}){this._traceId=t.traceId||Xn(),this._spanId=t.spanId||zn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:gl}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function tt(e,t=[]){return[e,t]}function Nh(e,t){const[n,r]=e;return[n,[...r,t]]}function Xt(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function lc(e,t){return Xt(e,(n,r)=>t.includes(r))}function go(e){const t=_l(Y);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Oh(e){const t=_l(Y);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function _o(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[go(r),s]:r.push(typeof s=="string"?go(s):s)}for(const s of n){const[i,a]=s;if(o(`
5
- ${JSON.stringify(i)}
6
- `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ir(a))}o(c)}}return typeof r=="string"?r:Ph(r)}function Ph(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Lh(e){let t=typeof e=="string"?go(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(Oh(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function Dh(e){return[{type:"span"},e]}function Fh(e){const t=typeof e.data=="string"?go(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const $h={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function dc(e){return $h[e]}function Vo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Dl(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:yt(r)},...o&&{trace:o}}}function Bh(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Uh(e,t,n,r){const o=Vo(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:yt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return tt(s,[i])}function Hh(e,t,n,r){const o=Vo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Bh(e,n?.sdk);const i=Dl(e,o,r,t);return delete e.sdkProcessingMetadata,tt(i,[[{type:s},e]])}function Wh(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=ht(e[0]),o=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:yt(o)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(f=>!mo(B(f),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?f=>{const h=B(f),m=a(h);return m||(Vs(),h)}:B,p=[];for(const f of u){const h=l(f);h&&p.push(Dh(h))}return tt(i,p)}function jh(e){if(!N)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=B(e),{spanId:o}=e.spanContext(),s=qo(e),i=Ee(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=B(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}_.log(`${c}
7
- ${u.join(`
8
- `)}`)}function zh(e){if(!N)return;const{description:t="< unknown name >",op:n="< unknown op >"}=B(e),{spanId:r}=e.spanContext(),s=Ee(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;_.log(i)}function qh(e,t,n,r=ge()){const o=r&&Ee(r);o&&(N&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[cr]:t,[ar]:n}))}function fc(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[ar],s=r[cr];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}const pc=1e3;class Jo{constructor(t={}){this._traceId=t.traceId||Xn(),this._spanId=t.spanId||zn(),this._startTime=t.startTimestamp||me(),this._links=t.links,this._attributes={},this.setAttributes({[K]:"manual",[ve]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Wp:gl}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=qn(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(fe,"custom"),this}end(t){this._endTime||(this._endTime=qn(t),zh(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ve],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:zp(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[K],profile_id:this._attributes[Ai],exclusive_time:this._attributes[Nn],measurements:fc(this._events),is_segment:this._isStandaloneSpan&&Ee(this)===this||void 0,segment_id:this._isStandaloneSpan?Ee(this).spanContext().spanId:void 0,links:jp(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){N&&_.log("[Tracing] Adding an event to span:",t);const o=hc(n)?n:r||me(),s=hc(n)?{}:n||{},i={name:t,time:qn(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=P();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Ee(this)))return;if(this._isStandaloneSpan){this._sampled?Vh(Wh([this],t)):(N&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Ka(this).scope||J()).captureEvent(r)}_convertSpanToTransaction(){if(!mc(B(this)))return;this._name||(N&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Ka(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const s=Jr(this).filter(d=>d!==this&&!Gh(d)).map(d=>B(d)).filter(mc),i=this._attributes[fe];delete this._attributes[Xa],s.forEach(d=>{delete d.data[Xa]});const a={contexts:{trace:qp(this)},spans:s.length>pc?s.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,pc):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ht(this)},request:r,...i&&{transaction_info:{source:i}}},c=fc(this._events);return c&&Object.keys(c).length&&(N&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function hc(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function mc(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Gh(e){return e instanceof Jo&&e.isStandaloneSpan()}function Vh(e){const t=P();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Yo(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return Jh(o,t,n,r)}function Jh(e,t,n,r){return xi(e)?e.then(o=>(n(),r(o),o),o=>{throw t(o),n(),o}):(n(),r(e),e)}function Yh(e,t,n){if(!Ke(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=Qn(o);if(s===void 0)return N&&_.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return N&&_.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,r];const i=n<s;return i||N&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const yo="__SENTRY_SUPPRESS_TRACING__";function On(e,t){const n=dr();if(n.startSpan)return n.startSpan(e,t);const r=Hi(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return We(a,()=>Fl(s)(()=>{const u=J(),d=Wi(u,s),p=e.onlyIfParent&&!d?new gt:Ui({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return Kt(u,p),Yo(()=>t(p),()=>{const{status:f}=B(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:Ce,message:"internal_error"})},()=>{p.end()})}))}function So(e,t){const n=dr();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Hi(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return We(a,()=>Fl(s)(()=>{const u=J(),d=Wi(u,s),p=e.onlyIfParent&&!d?new gt:Ui({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return Kt(u,p),Yo(()=>t(p,()=>p.end()),()=>{const{status:f}=B(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:Ce,message:"internal_error"})})}))}function Ze(e){const t=dr();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Hi(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?i=>We(e.scope,i):o!==void 0?i=>En(o,i):i=>i())(()=>{const i=J(),a=Wi(i,o);return e.onlyIfParent&&!a?new gt:Ui({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}const n1=(e,t)=>{const n=Mi(),r=Ni(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=P(),a=Gp(s);return i&&!Vp(i,a?.org_id)?Xh(t):We(c=>{const u=bl(o,s);return c.setPropagationContext(u),t()})};function En(e,t){const n=dr();return n.withActiveSpan?n.withActiveSpan(e,t):We(r=>(Kt(r,e||void 0),t(r)))}function Kh(e){const t=dr();return t.suppressTracing?t.suppressTracing(e):We(n=>{n.setSDKProcessingMetadata({[yo]:!0});const r=e();return n.setSDKProcessingMetadata({[yo]:void 0}),r})}function Xh(e){return We(t=>(t.setPropagationContext({traceId:Xn(),sampleRand:Math.random()}),N&&_.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),En(null,e)))}function Ui({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ke()){const i=new gt;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ht(i)};Yr(i,a)}return i}const o=Dt();let s;if(e&&!n)s=Qh(e,r,t),yl(e,s);else if(e){const i=ht(e),{traceId:a,spanId:c}=e.spanContext(),u=qo(e);s=gc({traceId:a,parentSpanId:c,...t},r,u),Yr(s,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=gc({traceId:i,parentSpanId:c,...t},r,u),a&&Yr(s,a)}return jh(s),Jp(s,r,o),s}function Hi(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=qn(e.startTime),delete r.startTime,r}return n}function dr(){const e=Mi();return Ni(e)}function gc(e,t,n){const r=P(),o=r?.getOptions()||{},{name:s=""}=e,i={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,p]=t.getScopeData().sdkProcessingMetadata[yo]?[!1]:Yh(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:Qn(u.dsc?.sample_rate)},u.sampleRand),f=new Jo({...e,attributes:{[fe]:"custom",[Sl]:l!==void 0&&p?l:void 0,...c},sampled:d});return!d&&r&&(N&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",f),f}function Qh(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[yo]?!1:qo(e),i=s?new Jo({...n,parentSpanId:r,traceId:o,sampled:s}):new gt({traceId:o});yl(e,i);const a=P();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function Wi(e,t){if(t)return t;if(t===null)return;const n=Oi(e);if(!n)return;const r=P();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Ee(n):n}function Fl(e){return e!==void 0?t=>En(e,t):t=>t()}const Xr={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Zh="heartbeatFailed",em="idleTimeout",tm="finalTimeout",nm="externalFinish";function $l(e,t={}){const n=new Map;let r=!1,o,s=nm,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=Xr.idleTimeout,finalTimeout:u=Xr.finalTimeout,childSpanTimeout:d=Xr.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:p=!0}=t,f=P();if(!f||!Ke()){const E=new gt,k={sample_rate:"0",sampled:"false",...ht(E)};return Yr(E,k),E}const h=J(),m=ge(),g=rm(e);g.end=new Proxy(g.end,{apply(E,k,T){if(l&&l(g),k instanceof gt)return;const[C,...F]=T,R=C||me(),x=qn(R),z=Jr(g).filter(M=>M!==g),X=B(g);if(!z.length||!p)return w(x),Reflect.apply(E,k,[x,...F]);const Q=f.getOptions().ignoreSpans,$=z?.reduce((M,V)=>{const se=B(V);return!se.timestamp||Q&&mo(se,Q)?M:M?Math.max(M,se.timestamp):se.timestamp},void 0),L=X.start_timestamp,D=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(x,$||1/0)));return w(D),Reflect.apply(E,k,[D,...F])}});function y(){o&&(clearTimeout(o),o=void 0)}function b(E){y(),o=setTimeout(()=>{!r&&n.size===0&&i&&(s=em,g.end(E))},c)}function I(E){o=setTimeout(()=>{!r&&i&&(s=Zh,g.end(E))},d)}function v(E){y(),n.set(E,!0);const k=me();I(k+d/1e3)}function S(E){if(n.has(E)&&n.delete(E),n.size===0){const k=me();b(k+c/1e3)}}function w(E){r=!0,n.clear(),a.forEach(x=>x()),Kt(h,m);const k=B(g),{start_timestamp:T}=k;if(!T)return;k.data[Zn]||g.setAttribute(Zn,s),_.log(`[Tracing] Idle span "${k.op}" finished`);const F=Jr(g).filter(x=>x!==g);let R=0;F.forEach(x=>{x.isRecording()&&(x.setStatus({code:Ce,message:"cancelled"}),x.end(E),N&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(x,void 0,2)));const z=B(x),{timestamp:X=0,start_timestamp:Q=0}=z,$=Q<=E,L=(u+c)/1e3,D=X-Q<=L;if(N){const M=JSON.stringify(x,void 0,2);$?D||_.log("[Tracing] Discarding span since it finished after idle span final timeout",M):_.log("[Tracing] Discarding span since it happened after idle span was finished",M)}(!D||!$)&&(Yp(g,x),R++)}),R>0&&g.setAttribute("sentry.idle_span_discarded_spans",R)}return a.push(f.on("spanStart",E=>{if(r||E===g||B(E).timestamp||E instanceof Jo&&E.isStandaloneSpan())return;Jr(g).includes(E)&&v(E.spanContext().spanId)})),a.push(f.on("spanEnd",E=>{r||S(E.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",E=>{E===g&&(i=!0,b(),n.size&&I())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(g.setStatus({code:Ce,message:"deadline_exceeded"}),s=tm,g.end())},u),g}function rm(e){const t=Ze(e);return Kt(J(),t),N&&_.log("[Tracing] Started span is an idle span"),t}const om="7";function Bl(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sm(e){return`${Bl(e)}${e.projectId}/envelope/`}function im(e,t){const n={sentry_version:om};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Ul(e,t,n){return t||`${sm(e)}?${im(e,n)}`}function am(e,t){const n=El(e);if(!n)return"";const r=`${Bl(n)}embed/error-page/`;let o=`dsn=${yt(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const _c=[];function cm(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function um(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return cm(r)}function lm(e,t){const n={};return t.forEach(r=>{r&&Hl(e,r,n)}),n}function yc(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Hl(e,t,n){if(n[t.name]){N&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,_c.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),_c.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}N&&_.log(`Integration installed: ${t.name}`)}function Sc(e){const t=P();if(!t){N&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Wl(e,t){return t?We(t,()=>{const n=ge(),r=n?Kp(n):vl(t);return[n?ht(n):Pi(e,t),r]}):[void 0,void 0]}const dm={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function fm(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function pm(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=yt(r)),tt(o,[fm(e)])}const hm=100;function mm(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function ot(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function gm(e,t){const n=zi(),r=jl(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=hm&&ji(e,r))}function bo(e,t=J(),n=gm){const r=t?.getClient()??P();if(!r){N&&_.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){N&&_.warn("logging option not enabled, log will not be captured.");return}const[,c]=Wl(r,t),u={...e.attributes},{user:{id:d,email:l,username:p}}=_m(t);ot(u,"user.id",d,!1),ot(u,"user.email",l,!1),ot(u,"user.name",p,!1),ot(u,"sentry.release",o),ot(u,"sentry.environment",s);const{name:f,version:h}=r.getSdkMetadata()?.sdk??{};ot(u,"sentry.sdk.name",f),ot(u,"sentry.sdk.version",h);const m=r.getIntegrationByName("Replay"),g=m?.getReplayId(!0);ot(u,"sentry.replay_id",g),g&&m?.getRecordingMode()==="buffer"&&ot(u,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(Li(y)){const{__sentry_template_string__:C,__sentry_template_values__:F=[]}=y;F?.length&&(u["sentry.message.template"]=C),F.forEach((R,x)=>{u[`sentry.message.parameter.${x}`]=R})}const b=Oi(t);ot(u,"sentry.trace.parent_span_id",b?.spanContext().spanId);const I={...e,attributes:u};r.emit("beforeCaptureLog",I);const v=a?ur(()=>a(I)):I;if(!v){r.recordDroppedEvent("before_send","log_item",1),N&&_.warn("beforeSendLog returned null, log will not be captured.");return}const{level:S,message:w,attributes:E={},severityNumber:k}=v,T={timestamp:me(),level:S,body:w,trace_id:c?.trace_id,severity_number:k??dm[S],attributes:Object.keys(E).reduce((C,F)=>(C[F]=mm(E[F]),C),{})};n(r,T),r.emit("afterCaptureLog",v)}function ji(e,t){const n=t??jl(e)??[];if(n.length===0)return;const r=e.getOptions(),o=pm(n,r._metadata,r.tunnel,e.getDsn());zi().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function jl(e){return zi().get(e)}function _m(e){const t=bn().getScopeData();return lo(t,Dt().getScopeData()),lo(t,e.getScopeData()),t}function zi(){return Tl("clientToLogBufferMap",()=>new WeakMap)}function ym(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Sm(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=yt(r)),tt(o,[ym(e)])}const bm=1e3;function Em(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function lt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function vm(e,t){const n=Gi(),r=zl(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=bm&&qi(e,r))}function Tm(e,t){const n=t?.scope??J(),r=t?.captureSerializedMetric??vm,o=n?.getClient()??P();if(!o){N&&_.warn("No client available to capture metric.");return}const{release:s,environment:i,_experiments:a}=o.getOptions();if(!a?.enableMetrics){N&&_.warn("metrics option not enabled, metric will not be captured.");return}const[,c]=Wl(o,n),u={...e.attributes},{user:{id:d,email:l,username:p}}=wm(n);lt(u,"user.id",d,!1),lt(u,"user.email",l,!1),lt(u,"user.name",p,!1),lt(u,"sentry.release",s),lt(u,"sentry.environment",i);const{name:f,version:h}=o.getSdkMetadata()?.sdk??{};lt(u,"sentry.sdk.name",f),lt(u,"sentry.sdk.version",h);const m=o.getIntegrationByName("Replay"),g=m?.getReplayId(!0);lt(u,"sentry.replay_id",g),g&&m?.getRecordingMode()==="buffer"&&lt(u,"sentry._internal.replay_is_buffering",!0);const y={...e,attributes:u},b=a?.beforeSendMetric?a.beforeSendMetric(y):y;if(!b){N&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const I={};for(const k in b.attributes)b.attributes[k]!==void 0&&(I[k]=Em(b.attributes[k]));const v=Oi(n),S=v?v.spanContext().traceId:c?.trace_id,w=v?v.spanContext().spanId:void 0,E={timestamp:me(),trace_id:S,span_id:w,name:b.name,type:b.type,unit:b.unit,value:b.value,attributes:I};N&&_.log("[Metric]",E),r(o,E),o.emit("afterCaptureMetric",y)}function qi(e,t){const n=t??zl(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Sm(n,r._metadata,r.tunnel,e.getDsn());Gi().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function zl(e){return Gi().get(e)}function wm(e){const t=bn().getScopeData();return lo(t,Dt().getScopeData()),lo(t,e.getScopeData()),t}function Gi(){return Tl("clientToMetricBufferMap",()=>new WeakMap)}function Im(e,t,n){const r=[{type:"client_report"},{timestamp:Go(),discarded_events:e}];return tt(t?{dsn:t}:{},[r])}function ql(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function km(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Ai],exclusive_time:i?.[Nn],measurements:e.measurements,is_segment:!0}}function Rm(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Ai]:e.profile_id},...e.exclusive_time&&{[Nn]:e.exclusive_time}}}},measurements:e.measurements}}const bc="Not capturing exception because it's already been captured.",Ec="Discarded session because of missing or non-string release",Gl=Symbol.for("SentryInternalError"),Vl=Symbol.for("SentryDoNotSendEventError"),Cm=5e3;function Qr(e){return{message:e,[Gl]:!0}}function ws(e){return{message:e,[Vl]:!0}}function vc(e){return!!e&&typeof e=="object"&&Gl in e}function Tc(e){return!!e&&typeof e=="object"&&Vl in e}function wc(e,t,n,r,o){let s=0,i;e.on(n,()=>{s=0,clearTimeout(i)}),e.on(t,a=>{s+=r(a),s>=8e5?o(e):(clearTimeout(i),i=setTimeout(()=>{o(e)},Cm))}),e.on("flush",()=>{o(e)})}class Am{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=El(t.dsn):N&&_.warn("No DSN provided, client will not send events."),this._dsn){const n=Ul(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}this._options.enableLogs&&wc(this,"afterCaptureLog","flushLogs",Om,ji),this._options._experiments?.enableMetrics&&wc(this,"afterCaptureMetric","flushMetrics",Nm,qi)}captureException(t,n,r){const o=Xe();if(Qa(t))return N&&_.log(bc),o;const s={event_id:o,...n};return this._process(this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r))),s.event_id}captureMessage(t,n,r,o){const s={event_id:Xe(),...r},i=Li(t)?t:String(t),a=Ot(t)?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(a.then(c=>this._captureEvent(c,s,o))),s.event_id}captureEvent(t,n,r){const o=Xe();if(n?.originalException&&Qa(n.originalException))return N&&_.log(bc),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,a||r,c)),s.event_id}captureSession(t){this.sendSession(t),Za(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Hl(this,t,this._integrations),n||yc(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Hh(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Nh(r,Fh(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=wl}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){N&&_.warn(Ec);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){N&&_.warn(Ec);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=Uh(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;N&&_.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return N&&_.error("Error while sending envelope:",n),{}}return N&&_.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=lm(this,t),yc(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Za(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Il(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:vl(r),...a.contexts};const c=Pi(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=J(),o=Dt()){return N&&Qs(t)&&_.log(`Captured error event \`${ql(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{N&&(Tc(s)?_.log(s.message):vc(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Jl(t),c=Qs(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof i>"u"?void 0:Qn(i);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),kl(ws(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),ws("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return f;const m=Mm(this,s,f,n);return xm(m,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw ws(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,f),a){const g=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=f.spans?f.spans.length:0,b=g-y;b>0&&this.recordDroppedEvent("before_send","span",b)}const m=f.transaction_info;if(a&&m&&f.transaction!==t.transaction){const g="custom";f.transaction_info={...m,source:g}}return this.sendEvent(f,n),f}).then(null,f=>{throw Tc(f)||vc(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),Qr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
9
- Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){N&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){N&&_.log("No outcomes to send");return}if(!this._dsn){N&&_.log("No dsn provided, will not send outcomes");return}N&&_.log("Sending outcomes:",t);const n=Im(t,this._options.tunnel&&yt(this._dsn));this.sendEnvelope(n)}}function xm(e,t){const n=`${t} must return \`null\` or a valid event.`;if(xi(e))return e.then(r=>{if(!It(r)&&r!==null)throw Qr(n);return r},r=>{throw Qr(`${t} rejected with ${r}`)});if(!It(e)&&e!==null)throw Qr(n);return e}function Mm(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(Qs(c)&&o)return o(c,r);if(Jl(c)){if(i||a){const u=km(c);if(a?.length&&mo(u,a))return null;if(i){const d=i(u);d?c=Xp(n,Rm(d)):Vs()}if(c.spans){const d=[],l=c.spans;for(const f of l){if(a?.length&&mo(f,a)){xh(l,f);continue}if(i){const h=i(f);h?d.push(h):(Vs(),d.push(f))}else d.push(f)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function Qs(e){return e.type===void 0}function Jl(e){return e.type==="transaction"}function Nm(e){let t=0;return e.name&&(t+=e.name.length*2),typeof e.value=="string"?t+=e.value.length*2:t+=8,t+Yl(e.attributes)}function Om(e){let t=0;return e.message&&(t+=e.message.length*2),t+Yl(e.attributes)}function Yl(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Ic(n[0]):Ot(n)?t+=Ic(n):t+=100}),t}function Ic(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Pm(e,t){t.debug===!0&&(N?_.enable():ur(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),J().update(t.initialScope);const r=new e(t);return Lm(r),r.init(),r}function Lm(e){J().setClient(e)}const Kl=Symbol.for("SentryBufferFullError");function Xl(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return kl(Kl);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Di(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>setTimeout(()=>u(!1),i))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const Dm=60*1e3;function Ql(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Dm:r-t}function Fm(e,t){return e[t]||e.all||0}function Zl(e,t,n=Date.now()){return Fm(e,t)>n}function ed(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=r+p):o[f]=r+p}else i?o.all=r+Ql(i,r):t===429&&(o.all=r+60*1e3);return o}const $m=64;function Bm(e,t,n=Xl(e.bufferSize||$m)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(Xt(i,(l,p)=>{const f=dc(p);Zl(r,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(l)}),a.length===0)return Promise.resolve({});const c=tt(i[0],a),u=l=>{Xt(c,(p,f)=>{e.recordDroppedEvent(l,dc(f))})},d=()=>t({body:_o(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&N&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=ed(r,l),l),l=>{throw u("network_error"),N&&_.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===Kl)return N&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}const Is=100,ks=5e3,Um=36e5;function Hm(e){function t(...n){N&&_.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=ks,i;function a(l,p,f){return lc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,f):!0}function c(l){i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),d(p,!0).catch(f=>{t("Failed to retry sending",f)}))},l),typeof i!="number"&&i.unref&&i.unref()}function u(){i||(c(s),s=Math.min(s*2,Um))}async function d(l,p=!1){if(!p&&lc(l,["replay_event","replay_recording"]))return await o.push(l),c(Is),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const f=await r.send(l);let h=Is;if(f){if(f.headers?.["retry-after"])h=Ql(f.headers["retry-after"]);else if(f.headers?.["x-sentry-rate-limits"])h=6e4;else if((f.statusCode||0)>=400)return f}return c(h),s=ks,f}catch(f){if(await a(l,f,s))return p?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",f),{};throw f}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(s=ks,c(Is)),r.flush(l))}}}function td(e,t){let n;return Xt(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Wm(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=td(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function jm(e,t){return tt(t?{...e[0],dsn:t}:e[0],e[1])}function r1(e,t){return n=>{const r=e(n),o=new Map;function s(c,u){const d=u?`${c}:${u}`:c;let l=o.get(d);if(!l){const p=Qp(c);if(!p)return;const f=Ul(p,n.tunnel);l=u?Wm(e,u)({...n,url:f}):e({...n,url:f}),o.set(d,l)}return[c,l]}async function i(c){function u(f){const h=f?.length?f:["event"];return td(c,h)}const d=t({envelope:c,getEvent:u}).map(f=>typeof f=="string"?s(f,void 0):s(f.dsn,f.release)).filter(f=>!!f),l=d.length?d:[["",r]];return(await Promise.all(l.map(([f,h])=>h.send(jm(c,f)))))[0]}async function a(c){const u=[...o.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:i,flush:a}}}const zm="thismessage:/";function Vi(e){return"isRelative"in e}function Ji(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?zm:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function qm(e){if(Vi(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Vt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function nd(e){return e.split(/[?#]/,1)[0]}function rd(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Vm(e,n)||Gm(e,r)}function Gm(e,t){return t?kc(e)===kc(t):!1}function Vm(e,t){const n=Ji(e);return!n||Vi(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function kc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Jm(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const Ym=Jm;function Km(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function od(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Js})),version:Js}),e._metadata=o}function sd(e={}){const t=e.client||P();if(!Zp()||!t)return{};const n=Mi(),r=Ni(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||J(),s=e.span||ge(),i=s?eh(s):Xm(o),a=s?ht(s):Pi(t,o),c=th(a);if(!nh.test(i))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":i,baggage:c};if(e.propagateTraceparent){const l=s?rh(s):Qm(o);l&&(d.traceparent=l)}return d}function Xm(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oh(t,r,n)}function Qm(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return sh(t,r,n)}function Zm(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function d(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=d,l}const eg=100;function ct(e,t){const n=P(),r=Dt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=eg}=n.getOptions();if(s<=0)return;const a={timestamp:Go(),...e},c=o?ur(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}let Rc;const tg="FunctionToString",Cc=new WeakMap,ng=(()=>({name:tg,setupOnce(){Rc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Fi(this),n=Cc.has(P())&&t!==void 0?t:this;return Rc.apply(n,e)}}catch{}},setup(e){Cc.set(e,!0)}})),rg=ng,og=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],sg="EventFilters",ig=(e={})=>{let t;return{name:sg,setup(n){const r=n.getOptions();t=Ac(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=Ac(e,s)}return cg(n,t)?null:n}}},ag=((e={})=>({...ig(e),name:"InboundFilters"}));function Ac(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:og],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function cg(e,t){if(e.type){if(e.type==="transaction"&&lg(e,t.ignoreTransactions))return N&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
10
- Event: ${Ht(e)}`),!0}else{if(ug(e,t.ignoreErrors))return N&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
- Event: ${Ht(e)}`),!0;if(hg(e))return N&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
- Event: ${Ht(e)}`),!0;if(dg(e,t.denyUrls))return N&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
- Event: ${Ht(e)}.
14
- Url: ${Eo(e)}`),!0;if(!fg(e,t.allowUrls))return N&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
- Event: ${Ht(e)}.
16
- Url: ${Eo(e)}`),!0}return!1}function ug(e,t){return t?.length?ql(e).some(n=>Qe(n,t)):!1}function lg(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Qe(n,t):!1}function dg(e,t){if(!t?.length)return!1;const n=Eo(e);return n?Qe(n,t):!1}function fg(e,t){if(!t?.length)return!0;const n=Eo(e);return n?Qe(n,t):!0}function pg(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Eo(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?pg(n):null}catch{return N&&_.error(`Cannot extract url for event ${Ht(e)}`),null}}function hg(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function mg(e,t,n,r,o,s){if(!o.exception?.values||!s||!fo(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=Zs(e,t,r,s.originalException,n,o.exception.values,i,0))}function Zs(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(fo(r[o],Error)){xc(i,a);const u=e(t,r[o]),d=c.length;Mc(u,o,d,a),c=Zs(e,t,n,r[o],o,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(fo(u,Error)){xc(i,a);const l=e(t,u),p=c.length;Mc(l,`errors[${d}]`,p,a),c=Zs(e,t,n,u,o,[l,...c],l,p)}}),c}function xc(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Mc(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const id=new Map,Nc=new Set;function gg(e){if(Y._sentryModuleMetadata)for(const t of Object.keys(Y._sentryModuleMetadata)){const n=Y._sentryModuleMetadata[t];if(Nc.has(t))continue;Nc.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){id.set(o.filename,n);break}}}function _g(e,t){return gg(e),id.get(t)}function ad(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=_g(e,r.filename);o&&(r.module_metadata=o)})})}function cd(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const o1=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Xt(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(cd(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;ad(n,t)})}});function Yi(e){const t="console";Ft(t,e),$t(t,yg)}function yg(){"console"in Y&&$i.forEach(function(e){e in Y.console&&Re(Y.console,e,function(t){return ec[e]=t,function(...n){qe("console",{args:n,level:e}),ec[e]?.apply(Y.console,n)}})})}function Ki(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Sg="CaptureConsole",bg=((e={})=>{const t=e.levels||$i,n=e.handled??!0;return{name:Sg,setup(r){"console"in Y&&Yi(({args:o,level:s})=>{P()!==r||!t.includes(s)||Eg(o,s,n)})}}}),s1=bg;function Eg(e,t,n){const r={level:Ki(t),extra:{arguments:e}};We(o=>{if(o.addEventProcessor(a=>(a.logger="console",Pt(a,{handled:n,type:"auto.core.capture_console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${po(e.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",e.slice(1)),Ys(a,r)}return}const s=e.find(a=>a instanceof Error);if(s){we(s,r);return}const i=po(e," ");Ys(i,r)})}const vg="Dedupe",Tg=(()=>{let e;return{name:vg,processEvent(t){if(t.type)return t;try{if(Ig(t,e))return N&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),wg=Tg;function Ig(e,t){return t?!!(kg(e,t)||Rg(e,t)):!1}function kg(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ld(e,t)||!ud(e,t))}function Rg(e,t){const n=Oc(t),r=Oc(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ld(e,t)||!ud(e,t))}function ud(e,t){let n=Ks(e),r=Ks(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function ld(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Oc(e){return e.exception?.values?.[0]}const Cg="ExtraErrorData",Ag=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Cg,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return xg(r,o,t,n,i)}}}),i1=Ag;function xg(e,t={},n,r,o){if(!t.originalException||!kt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=dd(t.originalException,r,o);if(i){const a={...e.contexts},c=ir(i,n);return It(c)&&(at(c,"__sentry_skip_normalization__",!0),a[s]=c),{...e,contexts:a}}return e}function dd(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=kt(i)||typeof i=="string"?n?Rl(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(kt(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:dd(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=kt(a)?a.toString():a}}return o}catch(r){N&&_.error("Unable to extract extra data from the Error object:",r)}return null}function Mg(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Ng=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Og(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Ng.exec(t);return n?n.slice(1):[]}function Pc(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Mg(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Lc(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Pg(e,t){e=Pc(e).slice(1),t=Pc(t).slice(1);const n=Lc(e.split("/")),r=Lc(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function Lg(e,t){return Og(e)[2]||""}const Dg="RewriteFrames",a1=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in Y&&!!Y.window,o=e.iteratee||Fg({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:Dg,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function Fg({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?Pg(t,i):Lg(i);r.filename=`${n}${a}`}return r}}const $g=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Bg=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Ug={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},fd=["select","insert","upsert","update","delete"];function Ko(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Xo(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Hg(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function Wg(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&Ug[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Dc(e,t=!1){return new Proxy(e,{apply(n,r,o){return On({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[K]:"auto.db.supabase",[ve]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(i&&typeof i=="object"&&"error"in i&&i.error?(s.setStatus({code:Ce}),we(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:ih}),s.end(),i)).catch(i=>{throw s.setStatus({code:Ce}),s.end(),we(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function jg(e){const t=e.auth;if(!(!t||Xo(e.auth))){for(const n of $g){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Dc(r))}for(const n of Bg){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Dc(r,!0))}Ko(e.auth)}}function zg(e){Xo(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r),s=o.constructor;return Gg(s),o}}),Ko(e.prototype.from))}function qg(e){Xo(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const o=fd,s=n,i=Hg(s.method,s.headers);if(!o.includes(i)||!s?.url?.pathname||typeof s.url.pathname!="string")return Reflect.apply(t,n,r);const a=s.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[f,h]of s.url.searchParams.entries())u.push(Wg(f,h));const d=Object.create(null);if(It(s.body))for(const[f,h]of Object.entries(s.body))d[f]=h;const l=`${i==="select"?"":`${i}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,p={"db.table":c,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":s.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[K]:"auto.db.supabase",[ve]:"db"};return u.length&&(p["db.query"]=u),Object.keys(d).length&&(p["db.body"]=d),On({name:l,attributes:p},f=>Reflect.apply(t,n,[]).then(h=>{if(f&&(h&&typeof h=="object"&&"status"in h&&ho(f,h.status||500),f.end()),h.error){const y=new Error(h.error.message);h.error.code&&(y.code=h.error.code),h.error.details&&(y.details=h.error.details);const b={};u.length&&(b.query=u),Object.keys(d).length&&(b.body=d),we(y,I=>(I.addEventProcessor(v=>(Pt(v,{handled:!1,type:"auto.db.supabase.postgres"}),v)),I.setContext("supabase",b),I))}const m={type:"supabase",category:`db.${i}`,message:l},g={};return u.length&&(g.query=u),Object.keys(d).length&&(g.body=d),Object.keys(g).length&&(m.data=g),ct(m),h},h=>{throw f&&(ho(f,500),f.end()),h}).then(...r))}}),Ko(e.prototype.then))}function Gg(e){for(const t of fd)Xo(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return N&&_.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),qg(i),s}}),Ko(e.prototype[t]))}const Vg=e=>{if(!e){N&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;zg(t),jg(e)},Jg="Supabase",Yg=(e=>({setupOnce(){Vg(e)},name:Jg})),c1=e=>Yg(e.supabaseClient),Kg=10,Xg="ZodErrors";function Qg(e){return kt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function Zg(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function e_(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function t_(e){const t=new Set;for(const r of e.issues){const o=e_(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Rl(n.join(", "),100)}`}function n_(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!Qg(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Zg);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:t_(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
17
- ${o.stack}`:"unknown"}}}}}const r_=((e={})=>{const t=e.limit??Kg;return{name:Xg,processEvent(n,r){return n_(t,e.saveZodIssuesAsAttachment,n,r)}}}),u1=r_,l1=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Xt(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(cd(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;ad(r,n)})},processEvent(t){const n=o_(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](s=>!s.some(i=>e.filterKeys.includes(i)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function o_(e){const t=Ks(e);if(t)return t.filter(n=>!!n.filename&&(n.lineno??n.colno)!=null).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Fc)).map(r=>r.slice(Fc.length)):[])}const Fc="_sentryBundlerPluginAppKey:",s_=100,i_=10,Mr="flag.evaluation.";function Pn(e){const n=J().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Qt(e,t,n=s_){const r=J().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;a_(o,e,t,n)}function a_(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){N&&_.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Zt(e,t,n=i_){if(typeof t!="boolean")return;const r=ge();if(!r)return;const o=B(r).data;if(`${Mr}${e}`in o){r.setAttribute(`${Mr}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(Mr)).length<n&&r.setAttribute(`${Mr}${e}`,t)}const d1=()=>({name:"FeatureFlags",processEvent(e,t,n){return Pn(e)},addFeatureFlag(e,t){Qt(e,t),Zt(e,t)}}),c_=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Re(t,"isOn",$c),typeof t.getFeatureValue=="function"&&Re(t,"getFeatureValue",$c)},processEvent(t,n,r){return Pn(t)}});function $c(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(Qt(n,r),Zt(n,r)),r}}function u_(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Ke()&&t(i);if(e.endTimestamp&&a){const f=e.fetchData.__span;if(!f)return;const h=r[f];h&&(f_(h,e),l_(h,e,o),delete r[f]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},d=!!ge(),l=a&&d?Ze(h_(i,s,c)):new gt;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const f=e.args[0],h=e.args[1]||{},m=d_(f,h,Ke()&&d?l:void 0,u);m&&(e.args[1]=h,h.headers=m)}const p=P();if(p){const f={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",l,f)}return l}function l_(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function d_(e,t,n,r){const o=sd({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(Cl(e)?e.headers:void 0);if(c)if(p_(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?Nr(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(Array.isArray(c)){const u=[...c];c.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!c.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&Nr(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(m=>Nr(m)):Nr(l));i&&!f&&p.push(i);const h={...c,"sentry-trace":u??s,baggage:p.length>0?p.join(","):void 0};return r&&a&&!d&&(h.traceparent=a),h}else return{...o}}function f_(e,t){if(t.response){ho(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Ce,message:"internal_error"});e.end()}function Nr(e){return e.split(",").some(t=>t.trim().startsWith(ah))}function p_(e){return typeof Headers<"u"&&fo(e,Headers)}function h_(e,t,n){const r=Ji(e);return{name:r?`${t} ${qm(r)}`:t,attributes:m_(e,r,t,n)}}function m_(e,t,n,r){const o={url:e,type:"fetch","http.method":n,[K]:r,[ve]:"http.client"};return t&&(Vi(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function g_(e,t={},n=J()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||P();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Ln(e,t,n,r,o){bo({level:e,message:t,attributes:n,severityNumber:o},r)}function __(e,t,{scope:n}={}){Ln("trace",e,t,n)}function y_(e,t,{scope:n}={}){Ln("debug",e,t,n)}function S_(e,t,{scope:n}={}){Ln("info",e,t,n)}function b_(e,t,{scope:n}={}){Ln("warn",e,t,n)}function E_(e,t,{scope:n}={}){Ln("error",e,t,n)}function v_(e,t,{scope:n}={}){Ln("fatal",e,t,n)}const f1=Object.freeze(Object.defineProperty({__proto__:null,debug:y_,error:E_,fatal:v_,fmt:Ym,info:S_,trace:__,warn:b_},Symbol.toStringTag,{value:"Module"}));function ei(e,t,n){return"util"in Y&&typeof Y.util.format=="function"?Y.util.format(...e):T_(e,t,n)}function T_(e,t,n){return e.map(r=>Ot(r)?String(r):JSON.stringify(ir(r,t,n))).join(" ")}function w_(e){return/%[sdifocO]/.test(e)}function I_(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const k_="ConsoleLogs",Bc={[K]:"auto.log.console"},R_=((e={})=>{const t=e.levels||$i;return{name:k_,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){N&&_.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Yi(({args:i,level:a})=>{if(P()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const f=u.length>0?`Assertion failed: ${ei(u,o,s)}`:"Assertion failed";bo({level:"error",message:f,attributes:Bc})}return}const d=a==="log",l=i.length>1&&typeof i[0]=="string"&&!w_(i[0]),p={...Bc,...l?I_(c,u):{}};bo({level:d?"info":a,message:ei(i,o,s),severityNumber:d?10:void 0,attributes:p})})}}}),p1=R_;function Xi(e,t,n,r){Tm({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function C_(e,t=1,n){Xi("counter",e,t,n)}function A_(e,t,n){Xi("gauge",e,t,n)}function x_(e,t,n){Xi("distribution",e,t,n)}const h1=Object.freeze(Object.defineProperty({__proto__:null,count:C_,distribution:x_,gauge:A_},Symbol.toStringTag,{value:"Module"})),M_=["trace","debug","info","warn","error","fatal"];function m1(e={}){const t=new Set(e.levels??M_),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...d}=r,l=n||P();if(!l)return;const p=P_(o,s);if(!t.has(p))return;const{normalizeDepth:f=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m=[];i&&m.push(i),a&&a.length>0&&m.push(ei(a,f,h));const g=m.join(" ");d["sentry.origin"]="auto.log.consola",c&&(d["consola.tag"]=c),o&&(d["consola.type"]=o),s!=null&&typeof s=="number"&&(d["consola.level"]=s),bo({level:p,message:g,attributes:d})}}}const N_={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},O_={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function P_(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=N_[e];if(n)return n}if(typeof t=="number"){const n=O_[t];if(n)return n}return"info"}const L_="gen_ai.prompt",Qi="gen_ai.system",et="gen_ai.request.model",pd="gen_ai.request.stream",Zi="gen_ai.request.temperature",hd="gen_ai.request.max_tokens",ea="gen_ai.request.frequency_penalty",md="gen_ai.request.presence_penalty",ta="gen_ai.request.top_p",gd="gen_ai.request.top_k",Dn="gen_ai.response.finish_reasons",fr="gen_ai.response.model",pr="gen_ai.response.id",Qo="gen_ai.usage.input_tokens",Zo="gen_ai.usage.output_tokens",es="gen_ai.usage.total_tokens",na="gen_ai.operation.name",Jt="gen_ai.request.messages",it="gen_ai.response.text",ra="gen_ai.request.available_tools",ts="gen_ai.response.streaming",Bt="gen_ai.response.tool_calls",D_="openai.response.id",F_="openai.response.model",$_="openai.response.timestamp",B_="openai.usage.completion_tokens",U_="openai.usage.prompt_tokens",Uc={CHAT:"chat",RESPONSES:"responses"},Hc="anthropic.response.timestamp",H_=2e4,vo=e=>new TextEncoder().encode(e).length,To=e=>vo(JSON.stringify(e));function _d(e,t){if(vo(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const s=Math.floor((n+r)/2),i=e.slice(0,s);vo(i)<=t?(o=i,n=s+1):r=s-1}return o}function W_(e){return typeof e=="string"?e:e.text}function Wc(e,t){return typeof e=="string"?t:{...e,text:t}}function j_(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function z_(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function q_(e,t){const n={...e,content:""},r=To(n),o=t-r;if(o<=0)return[];const s=_d(e.content,o);return[{...e,content:s}]}function G_(e,t){const{parts:n}=e,r=n.map(a=>Wc(a,"")),o=To({...e,parts:r});let s=t-o;if(s<=0)return[];const i=[];for(const a of n){const c=W_(a),u=vo(c);if(u<=s)i.push(a),s-=u;else if(i.length===0){const d=_d(c,s);d&&i.push(Wc(a,d));break}else break}return i.length>0?[{...e,parts:i}]:[]}function V_(e,t){return!e||typeof e!="object"?[]:j_(e)?q_(e,t):z_(e)?G_(e,t):[]}function J_(e,t){if(!Array.isArray(e)||e.length===0||To(e)<=t)return e;const r=e.map(To);let o=0,s=e.length;for(let i=e.length-1;i>=0;i--){const a=r[i];if(a&&o+a>t)break;a&&(o+=a),s=i}if(s===e.length){const i=e[e.length-1];return V_(i,t)}return e.slice(s)}function Y_(e){return J_(e,H_)}function hr(e){return e.includes("messages")?"messages":e.includes("completions")?"completions":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function wo(e){return`gen_ai.${hr(e)}`}function yd(e,t){return e?`${e}.${t}`:t}function oa(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[Qo]:t}),n!==void 0&&e.setAttributes({[Zo]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const s=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[es]:s})}}function Yt(e){if(typeof e=="string")return e;if(Array.isArray(e)){const t=Y_(e);return JSON.stringify(t)}return JSON.stringify(e)}const K_="OpenAI",X_=["responses.create","chat.completions.create"],Q_=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],Z_=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...Q_];function sa(e){return e.includes("chat.completions")?Uc.CHAT:e.includes("responses")?Uc.RESPONSES:e.split(".").pop()||"unknown"}function jc(e){return`gen_ai.${sa(e)}`}function ey(e){return X_.includes(e)}function ty(e,t){return e?`${e}.${t}`:t}function ny(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function ry(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function oy(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function sy(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function ia(e,t,n,r){t!==void 0&&e.setAttributes({[U_]:t,[Qo]:t}),n!==void 0&&e.setAttributes({[B_]:n,[Zo]:n}),r!==void 0&&e.setAttributes({[es]:r})}function aa(e,t,n,r){e.setAttributes({[D_]:t,[pr]:t}),e.setAttributes({[F_]:n,[fr]:n}),e.setAttributes({[$_]:new Date(r*1e3).toISOString()})}function iy(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function ay(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&iy(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function cy(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:Ce,message:"internal_error"}),we(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!Z_.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:s}=o;t.responseId=s.id??t.responseId,t.responseModel=s.model??t.responseModel,t.responseTimestamp=s.created_at??t.responseTimestamp,s.usage&&(t.promptTokens=s.usage.input_tokens,t.completionTokens=s.usage.output_tokens,t.totalTokens=s.usage.total_tokens),s.status&&t.finishReasons.push(s.status),n&&s.output_text&&t.responseTexts.push(s.output_text)}}async function*uy(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)sy(o)?ay(o,r,n):oy(o)&&cy(o,r,n,t),yield o}finally{aa(t,r.responseId,r.responseModel,r.responseTimestamp),ia(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[ts]:!0}),r.finishReasons.length&&t.setAttributes({[Dn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[it]:r.responseTexts.join("")});const s=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];s.length>0&&t.setAttributes({[Bt]:JSON.stringify(s)}),t.end()}}function ly(e,t){const n={[Qi]:"openai",[na]:sa(t),[K]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=Array.isArray(r.tools)?r.tools:[],i=r.web_search_options&&typeof r.web_search_options=="object"?[{type:"web_search_options",...r.web_search_options}]:[],a=[...o,...i];a.length>0&&(n[ra]=JSON.stringify(a))}if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];n[et]=r.model??"unknown","temperature"in r&&(n[Zi]=r.temperature),"top_p"in r&&(n[ta]=r.top_p),"frequency_penalty"in r&&(n[ea]=r.frequency_penalty),"presence_penalty"in r&&(n[md]=r.presence_penalty),"stream"in r&&(n[pd]=r.stream)}else n[et]="unknown";return n}function dy(e,t,n){if(aa(e,t.id,t.model,t.created),t.usage&&ia(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){const r=t.choices.map(o=>o.finish_reason).filter(o=>o!==null);if(r.length>0&&e.setAttributes({[Dn]:JSON.stringify(r)}),n){const o=t.choices.map(s=>s.message?.tool_calls).filter(s=>Array.isArray(s)&&s.length>0).flat();o.length>0&&e.setAttributes({[Bt]:JSON.stringify(o)})}}}function fy(e,t,n){if(aa(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[Dn]:JSON.stringify([t.status])}),t.usage&&ia(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n){const r=t;if(Array.isArray(r.output)&&r.output.length>0){const o=r.output.filter(s=>typeof s=="object"&&s!==null&&s.type==="function_call");o.length>0&&e.setAttributes({[Bt]:JSON.stringify(o)})}}}function py(e,t,n){if(!t||typeof t!="object")return;const r=t;if(ny(r)){if(dy(e,r,n),n&&r.choices?.length){const o=r.choices.map(s=>s.message?.content||"");e.setAttributes({[it]:JSON.stringify(o)})}}else ry(r)&&(fy(e,r,n),n&&r.output_text&&e.setAttributes({[it]:r.output_text}))}function zc(e,t){if("messages"in t){const n=Yt(t.messages);e.setAttributes({[Jt]:n})}if("input"in t){const n=Yt(t.input);e.setAttributes({[Jt]:n})}}function hy(){const t=J().getClient(),n=t?.getIntegrationByName(K_),r=n?!!t?.getOptions().sendDefaultPii:!1;return{recordInputs:n?.options?.recordInputs??r,recordOutputs:n?.options?.recordOutputs??r}}function my(e,t,n,r){return async function(...s){const i=r||hy(),a=ly(s,t),c=a[et]||"unknown",u=sa(t),d=s[0];return d&&typeof d=="object"&&d.stream===!0?So({name:`${u} ${c} stream-response`,op:jc(t),attributes:a},async p=>{try{i.recordInputs&&s[0]&&typeof s[0]=="object"&&zc(p,s[0]);const f=await e.apply(n,s);return uy(f,p,i.recordOutputs??!1)}catch(f){throw p.setStatus({code:Ce,message:"internal_error"}),we(f,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),p.end(),f}}):On({name:`${u} ${c}`,op:jc(t),attributes:a},async p=>{try{i.recordInputs&&s[0]&&typeof s[0]=="object"&&zc(p,s[0]);const f=await e.apply(n,s);return py(p,f,i.recordOutputs),f}catch(f){throw we(f,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),f}})}}function Sd(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=ty(t,String(o));return typeof s=="function"&&ey(i)?my(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Sd(s,i,n):s}})}function g1(e,t){return Sd(e,"",t)}function gy(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:Ce,message:e.error?.type??"internal_error"}),we(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function _y(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function yy(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function Sy(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function by(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function bd(e,t,n,r){!(e&&typeof e=="object")||gy(e,r)||(_y(e,t),yy(e,t),Sy(e,t,n),by(e,t))}function Ey(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[pr]:e.responseId}),e.responseModel&&t.setAttributes({[fr]:e.responseModel}),oa(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[ts]:!0}),e.finishReasons.length>0&&t.setAttributes({[Dn]:JSON.stringify(e.finishReasons)}),n&&e.responseTexts.length>0&&t.setAttributes({[it]:e.responseTexts.join("")}),n&&e.toolCalls.length>0&&t.setAttributes({[Bt]:JSON.stringify(e.toolCalls)}),t.end())}async function*vy(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)bd(o,r,n,t),yield o}finally{r.responseId&&t.setAttributes({[pr]:r.responseId}),r.responseModel&&t.setAttributes({[fr]:r.responseModel}),oa(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[ts]:!0}),r.finishReasons.length>0&&t.setAttributes({[Dn]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[it]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[Bt]:JSON.stringify(r.toolCalls)}),t.end()}}function Ty(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{bd(o,r,n,t)}),e.on("message",()=>{Ey(r,t,n)}),e.on("error",o=>{we(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:Ce,message:"stream_error"}),t.end())}),e}const wy=["messages.create","messages.stream","messages.countTokens","models.get","completions.create","models.retrieve","beta.messages.create"];function Iy(e){return wy.includes(e)}function ky(e,t){t.error&&(e.setStatus({code:Ce,message:t.error.type||"internal_error"}),we(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function Ry(e,t){const n={[Qi]:"anthropic",[na]:hr(t),[K]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0];r.tools&&Array.isArray(r.tools)&&(n[ra]=JSON.stringify(r.tools)),n[et]=r.model??"unknown","temperature"in r&&(n[Zi]=r.temperature),"top_p"in r&&(n[ta]=r.top_p),"stream"in r&&(n[pd]=r.stream),"top_k"in r&&(n[gd]=r.top_k),"frequency_penalty"in r&&(n[ea]=r.frequency_penalty),"max_tokens"in r&&(n[hd]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[et]=e[0]:n[et]="unknown";return n}function ti(e,t){if("messages"in t){const n=Yt(t.messages);e.setAttributes({[Jt]:n})}if("input"in t){const n=Yt(t.input);e.setAttributes({[Jt]:n})}"prompt"in t&&e.setAttributes({[L_]:JSON.stringify(t.prompt)})}function Cy(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[it]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[Bt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[it]:t.completion}),"input_tokens"in t&&e.setAttributes({[it]:JSON.stringify(t.input_tokens)})}function Ay(e,t){"id"in t&&"model"in t&&(e.setAttributes({[pr]:t.id,[fr]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[Hc]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[Hc]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&oa(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function xy(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){ky(e,t);return}n&&Cy(e,t),Ay(e,t)}}function qc(e,t,n){throw we(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:Ce,message:"internal_error"}),t.end()),e}function My(e,t,n,r,o,s,i,a,c,u,d){const l=o[et]??"unknown",p={name:`${s} ${l} stream-response`,op:wo(i),attributes:o};return u&&!d?So(p,async f=>{try{c.recordInputs&&a&&ti(f,a);const h=await e.apply(n,r);return vy(h,f,c.recordOutputs??!1)}catch(h){return qc(h,f,i)}}):So(p,f=>{try{c.recordInputs&&a&&ti(f,a);const h=t.apply(n,r);return Ty(h,f,c.recordOutputs??!1)}catch(h){return qc(h,f,i)}})}function Ny(e,t,n,r){return new Proxy(e,{apply(o,s,i){const a=Ry(i,t),c=a[et]??"unknown",u=hr(t),d=typeof i[0]=="object"?i[0]:void 0,l=!!d?.stream,p=t==="messages.stream";return l||p?My(e,o,n,i,a,u,t,d,r,l,p):On({name:`${u} ${c}`,op:wo(t),attributes:a},f=>(r.recordInputs&&d&&ti(f,d),Yo(()=>o.apply(n,i),h=>{we(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>xy(f,h,r.recordOutputs))))}})}function Ed(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=yd(t,String(o));return typeof s=="function"&&Iy(i)?Ny(s,i,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Ed(s,i,n):s}})}function _1(e,t){const n=!!P()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return Ed(e,"",r)}const Gc=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],Oy="google_genai",vd="chats.create",Py="chat";function Ly(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:Ce,message:`Content blocked: ${r}`}),we(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function Dy(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function Fy(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function $y(e,t,n,r){!e||Ly(e,r)||(Dy(e,t),Fy(e,t,n))}async function*By(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)$y(o,r,n,t),yield o}finally{const o={[ts]:!0};r.responseId&&(o[pr]=r.responseId),r.responseModel&&(o[fr]=r.responseModel),r.promptTokens!==void 0&&(o[Qo]=r.promptTokens),r.completionTokens!==void 0&&(o[Zo]=r.completionTokens),r.totalTokens!==void 0&&(o[es]=r.totalTokens),r.finishReasons.length&&(o[Dn]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(o[it]=r.responseTexts.join("")),n&&r.toolCalls.length&&(o[Bt]=JSON.stringify(r.toolCalls)),t.setAttributes(o),t.end()}}function Uy(e){if(Gc.includes(e))return!0;const t=e.split(".").pop();return Gc.includes(t)}function Hy(e){return e.includes("Stream")||e.endsWith("generateContentStream")||e.endsWith("sendMessageStream")}function Vc(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function Wy(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Zi]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ta]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[gd]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[hd]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[ea]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[md]=e.presencePenalty),t}function jy(e,t,n){const r={[Qi]:Oy,[na]:hr(e),[K]:"auto.ai.google_genai"};if(t){if(r[et]=Vc(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,Wy(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.map(i=>i.functionDeclarations);r[ra]=JSON.stringify(s)}}}else r[et]=Vc({},n);return r}function Jc(e,t){if("contents"in t){const n=t.contents,r=Yt(n);e.setAttributes({[Jt]:r})}if("message"in t){const n=t.message,r=Yt(n);e.setAttributes({[Jt]:r})}if("history"in t){const n=t.history,r=Yt(n);e.setAttributes({[Jt]:r})}}function zy(e,t,n){if(!(!t||typeof t!="object")){if(t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Qo]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Zo]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[es]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(s=>typeof s.text=="string"?s.text:"").filter(s=>s.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[it]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[Bt]:JSON.stringify(r)})}}}function Yc(e,t,n,r){const o=t===vd;return new Proxy(e,{apply(s,i,a){const c=a[0],u=jy(t,c,n),d=u[et]??"unknown",l=hr(t);return Hy(t)?So({name:`${l} ${d} stream-response`,op:wo(t),attributes:u},async p=>{try{r.recordInputs&&c&&Jc(p,c);const f=await s.apply(n,a);return By(f,p,!!r.recordOutputs)}catch(f){throw p.setStatus({code:Ce,message:"internal_error"}),we(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),f}}):On({name:o?`${l} ${d} create`:`${l} ${d}`,op:wo(t),attributes:u},p=>(r.recordInputs&&c&&Jc(p,c),Yo(()=>s.apply(n,a),f=>{we(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},f=>{o||zy(p,f,r.recordOutputs)})))}})}function ni(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=yd(t,String(o));if(typeof i=="function"&&Uy(a)){if(a===vd){const c=Yc(i,a,r,n);return function(...d){const l=c(...d);return l&&typeof l=="object"?ni(l,Py,n):l}}return Yc(i,a,r,n)}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?ni(i,a,n):i}})}function y1(e,t){const n=!!P()?.getOptions().sendDefaultPii,r={recordInputs:n,recordOutputs:n,...t};return ni(e,"",r)}function Td(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const vn=Y;function qy(){return"history"in vn&&!!vn.history}function Gy(){if(!("fetch"in vn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ri(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function wd(){if(typeof EdgeRuntime=="string")return!0;if(!Gy())return!1;if(ri(vn.fetch))return!0;let e=!1;const t=vn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ri(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){N&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Vy(){return"ReportingObserver"in vn}function ca(e,t){const n="fetch";Ft(n,e),$t(n,()=>Id(void 0,t))}function Jy(e){const t="fetch-body-resolved";Ft(t,e),$t(t,()=>Id(Ky))}function Id(e,t=!1){t&&!wd()||Re(Y,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=Xy(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:me()*1e3,virtualError:o,headers:Qy(r)};return e||qe("fetch",{...a}),n.apply(Y,r).then(async c=>(e?e(c):qe("fetch",{...a,endTimestamp:me()*1e3,response:c}),c),c=>{if(qe("fetch",{...a,endTimestamp:me()*1e3,error:c}),kt(c)&&c.stack===void 0&&(c.stack=o.stack,at(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function Yy(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function Ky(e){let t;try{t=e.clone()}catch{return}Yy(t,()=>{qe("fetch-body-resolved",{endTimestamp:me()*1e3,response:e})})}function oi(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Kc(e){return typeof e=="string"?e:e?oi(e,"url")?e.url:e.toString?e.toString():"":""}function Xy(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Kc(n),method:oi(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Kc(t),method:oi(t,"method")?String(t.method).toUpperCase():"GET"}}function Qy(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Cl(t))return new Headers(t.headers)}catch{}}function Zy(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function eS(){return"npm"}function tS(){return!Zy()&&Object.prototype.toString.call(typeof Ya<"u"?Ya:0)==="[object process]"}function Io(){return typeof window<"u"&&(!tS()||nS())}function nS(){return Y.process?.type==="renderer"}const Ye=Y,ie=Ye.document,jn=Ye.navigator,kd="Report a Bug",rS="Cancel",oS="Send Bug Report",sS="Confirm",iS="Report a Bug",aS="your.email@example.org",cS="Email",uS="What's the bug? What did you expect?",lS="Description",dS="Your Name",fS="Name",pS="Thank you for your report!",hS="(required)",mS="Add a screenshot",gS="Remove screenshot",_S="Highlight",yS="Hide",SS="Remove",bS="widget",ES="api",vS=5e3,TS=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=P();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&J().setTags(e.tags);const r=g_({source:ES,url:nn(),...e},t);return new Promise((o,s)=>{const i=setTimeout(()=>s("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(i),a(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?o(r):u?.statusCode===403?s("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):s("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},Zr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wS(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(jn.userAgent)||/Macintosh/i.test(jn.userAgent)&&jn.maxTouchPoints&&jn.maxTouchPoints>1||!isSecureContext)}function Or(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function IS(e){const t=ie.createElement("style");return t.textContent=`
18
- .widget__actor {
19
- position: fixed;
20
- z-index: var(--z-index);
21
- margin: var(--page-margin);
22
- inset: var(--actor-inset);
23
-
24
- display: flex;
25
- align-items: center;
26
- gap: 8px;
27
- padding: 16px;
28
-
29
- font-family: inherit;
30
- font-size: var(--font-size);
31
- font-weight: 600;
32
- line-height: 1.14em;
33
- text-decoration: none;
34
-
35
- background: var(--actor-background, var(--background));
36
- border-radius: var(--actor-border-radius, 1.7em/50%);
37
- border: var(--actor-border, var(--border));
38
- box-shadow: var(--actor-box-shadow, var(--box-shadow));
39
- color: var(--actor-color, var(--foreground));
40
- fill: var(--actor-color, var(--foreground));
41
- cursor: pointer;
42
- opacity: 1;
43
- transition: transform 0.2s ease-in-out;
44
- transform: translate(0, 0) scale(1);
45
- }
46
- .widget__actor[aria-hidden="true"] {
47
- opacity: 0;
48
- pointer-events: none;
49
- visibility: hidden;
50
- transform: translate(0, 16px) scale(0.98);
51
- }
52
-
53
- .widget__actor:hover {
54
- background: var(--actor-hover-background, var(--background));
55
- filter: var(--interactive-filter);
56
- }
57
-
58
- .widget__actor svg {
59
- width: 1.14em;
60
- height: 1.14em;
61
- }
62
-
63
- @media (max-width: 600px) {
64
- .widget__actor span {
65
- display: none;
66
- }
67
- }
68
- `,e&&t.setAttribute("nonce",e),t}function Ue(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const sn=20,kS="http://www.w3.org/2000/svg";function RS(){const e=a=>Ye.document.createElementNS(kS,a),t=Ue(e("svg"),{width:`${sn}`,height:`${sn}`,viewBox:`0 0 ${sn} ${sn}`,fill:"var(--actor-color, var(--foreground))"}),n=Ue(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ue(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Ue(e("clipPath"),{id:"clip0_57_80"}),i=Ue(e("rect"),{width:`${sn}`,height:`${sn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function CS({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=ie.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||kd,o.appendChild(RS()),e){const i=ie.createElement("span");i.appendChild(ie.createTextNode(e)),o.appendChild(i)}const s=IS(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Rd="rgba(88, 74, 192, 1)",AS={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Rd,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Xc={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Rd,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Qc(e){return`
69
- --foreground: ${e.foreground};
70
- --background: ${e.background};
71
- --accent-foreground: ${e.accentForeground};
72
- --accent-background: ${e.accentBackground};
73
- --success-color: ${e.successColor};
74
- --error-color: ${e.errorColor};
75
- --border: ${e.border};
76
- --box-shadow: ${e.boxShadow};
77
- --outline: ${e.outline};
78
- --interactive-filter: ${e.interactiveFilter};
79
- `}function xS({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=ie.createElement("style");return o.textContent=`
80
- :host {
81
- --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
82
- --font-size: 14px;
83
- --z-index: 100000;
84
-
85
- --page-margin: 16px;
86
- --inset: auto 0 0 auto;
87
- --actor-inset: var(--inset);
88
-
89
- font-family: var(--font-family);
90
- font-size: var(--font-size);
91
-
92
- ${e!=="system"?"color-scheme: only light;":""}
93
-
94
- ${Qc(e==="dark"?{...Xc,...t}:{...AS,...n})}
95
- }
96
-
97
- ${e==="system"?`
98
- @media (prefers-color-scheme: dark) {
99
- :host {
100
- ${Qc({...Xc,...t})}
101
- }
102
- }`:""}
103
- }
104
- `,r&&o.setAttribute("nonce",r),o}const Cd=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:b={},addScreenshotButtonLabel:I=mS,cancelButtonLabel:v=rS,confirmButtonLabel:S=sS,emailLabel:w=cS,emailPlaceholder:E=aS,formTitle:k=iS,isRequiredLabel:T=hS,messageLabel:C=lS,messagePlaceholder:F=uS,nameLabel:R=fS,namePlaceholder:x=dS,removeScreenshotButtonLabel:z=gS,submitButtonLabel:X=oS,successMessageText:Q=pS,triggerLabel:$=kd,triggerAriaLabel:L="",highlightToolText:D=_S,hideToolText:M=yS,removeHighlightText:V=SS,onFormOpen:se,onFormClose:de,onSubmitSuccess:Se,onSubmitError:Ne,onFormSubmitted:St}={})=>{const Oe={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:b,themeLight:y,triggerLabel:$,triggerAriaLabel:L,cancelButtonLabel:v,submitButtonLabel:X,confirmButtonLabel:S,formTitle:k,emailLabel:w,emailPlaceholder:E,messageLabel:C,messagePlaceholder:F,nameLabel:R,namePlaceholder:x,successMessageText:Q,isRequiredLabel:T,addScreenshotButtonLabel:I,removeScreenshotButtonLabel:z,highlightToolText:D,hideToolText:M,removeHighlightText:V,onFormClose:de,onFormOpen:se,onSubmitError:Ne,onSubmitSuccess:Se,onFormSubmitted:St};let De=null,nt=[];const bt=oe=>{if(!De){const pe=ie.createElement("div");pe.id=String(oe.id),ie.body.appendChild(pe),De=pe.attachShadow({mode:"open"}),De.appendChild(xS(oe))}return De},Bn=async oe=>{const pe=oe.enableScreenshot&&wS();let je,Ie;try{je=(t?t():await e("feedbackModalIntegration",m))(),Sc(je)}catch{throw Zr&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const rt=pe?n?n():await e("feedbackScreenshotIntegration",m):void 0;rt&&(Ie=rt(),Sc(Ie))}catch{Zr&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Ae=je.createDialog({options:{...oe,onFormClose:()=>{Ae?.close(),oe.onFormClose?.()},onFormSubmitted:()=>{Ae?.close(),oe.onFormSubmitted?.()}},screenshotIntegration:Ie,sendFeedback:TS,shadow:bt(oe)});return Ae},xr=(oe,pe={})=>{const je=Or(Oe,pe),Ie=typeof oe=="string"?ie.querySelector(oe):typeof oe.addEventListener=="function"?oe:null;if(!Ie)throw Zr&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Ae=null;const rt=async()=>{Ae||(Ae=await Bn({...je,onFormSubmitted:()=>{Ae?.removeFromDom(),je.onFormSubmitted?.()}})),Ae.appendToDom(),Ae.open()};Ie.addEventListener("click",rt);const Z=()=>{nt=nt.filter($e=>$e!==Z),Ae?.removeFromDom(),Ae=null,Ie.removeEventListener("click",rt)};return nt.push(Z),Z},Un=(oe={})=>{const pe=Or(Oe,oe),je=bt(pe),Ie=CS({triggerLabel:pe.triggerLabel,triggerAriaLabel:pe.triggerAriaLabel,shadow:je,styleNonce:h});return xr(Ie.el,{...pe,onFormOpen(){Ie.hide()},onFormClose(){Ie.show()},onFormSubmitted(){Ie.show()}}),Ie};return{name:"Feedback",setupOnce(){!Io()||!Oe.autoInject||(ie.readyState==="loading"?ie.addEventListener("DOMContentLoaded",()=>Un().appendToDom()):Un().appendToDom())},attachTo:xr,createWidget(oe={}){const pe=Un(Or(Oe,oe));return pe.appendToDom(),pe},async createForm(oe={}){return Bn(Or(Oe,oe))},remove(){De&&(De.parentElement?.remove(),De=null),nt.forEach(oe=>oe()),nt=[]}}});function S1(){return P()?.getIntegrationByName("Feedback")}var ns,ce,Ad,Wt,Zc,xd,si,er={},ua=[],MS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,la=Array.isArray;function wt(e,t){for(var n in t)e[n]=t[n];return e}function Md(e){var t=e.parentNode;t&&t.removeChild(e)}function G(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?ns.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return eo(e,i,r,o,null)}function eo(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Ad,__i:-1,__u:0};return o==null&&ce.vnode!=null&&ce.vnode(s),s}function mr(e){return e.children}function to(e,t){this.props=e,this.context=t}function Tn(e,t){if(t==null)return e.__?Tn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Tn(e):null}function NS(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=wt({},o)).__v=o.__v+1,ce.vnode&&ce.vnode(r),da(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??Tn(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Nd(r),r}function Nd(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Nd(e)}}function eu(e){(!e.__d&&(e.__d=!0)&&Wt.push(e)&&!ko.__r++||Zc!==ce.debounceRendering)&&((Zc=ce.debounceRendering)||xd)(ko)}function ko(){var e,t,n,r=[],o=[];for(Wt.sort(si);e=Wt.shift();)e.__d&&(n=Wt.length,t=NS(e,r,o)||t,n===0||Wt.length>n?(ii(r,t,o),o.length=r.length=0,t=void 0,Wt.sort(si)):t&&ce.__c&&ce.__c(t,ua));t&&ii(r,t,o),ko.__r=0}function Od(e,t,n,r,o,s,i,a,c,u,d){var l,p,f,h,m,g=r&&r.__k||ua,y=t.length;for(n.__d=c,OS(n,t,g),c=n.__d,l=0;l<y;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?er:g[f.__i]||er,f.__i=l,da(e,f,p,o,s,i,a,c,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&fa(p.ref,null,f),d.push(f.ref,f.__c||h,f)),m==null&&h!=null&&(m=h),65536&f.__u||p.__k===f.__k?c=Pd(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=m}function OS(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?eo(null,o,null,null,o):la(o)?eo(mr,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?eo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=PS(o,n,i=r+l,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=Tn(s)),ai(s,s,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Tn(s)),ai(s,s))}function Pd(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Pd(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function PS(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return a;a++}}return-1}function tu(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||MS.test(t)?n:n+"px"}function Pr(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||tu(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tu(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?ru:nu,s)):e.removeEventListener(t,s?ru:nu,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function nu(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(ce.event?ce.event(e):e)}}function ru(e){if(this.l)return this.l[e.type+!0](ce.event?ce.event(e):e)}function da(e,t,n,r,o,s,i,a,c,u){var d,l,p,f,h,m,g,y,b,I,v,S,w,E,k,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=ce.__b)&&d(t);e:if(typeof T=="function")try{if(y=t.props,b=(d=T.contextType)&&r[d.__c],I=d?b?b.props.value:d.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:("prototype"in T&&T.prototype.render?t.__c=l=new T(y,I):(t.__c=l=new to(y,I),l.constructor=T,l.render=DS),b&&b.sub(l),l.props=y,l.state||(l.state={}),l.context=I,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),T.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=wt({},l.__s)),wt(l.__s,T.getDerivedStateFromProps(y,l.__s))),f=l.props,h=l.state,l.__v=t,p)T.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(T.getDerivedStateFromProps==null&&y!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,I),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,I)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(C){C&&(C.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,I),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,m)})}if(l.context=I,l.props=y,l.__P=e,l.__e=!1,S=ce.__r,w=0,"prototype"in T&&T.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++w<25);l.state=l.__s,l.getChildContext!=null&&(r=wt(wt({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(f,h)),Od(e,la(k=d!=null&&d.type===mr&&d.key==null?d.props.children:d)?k:[k],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(C){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ce.__e(C,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=LS(n.__e,t,n,r,o,s,i,c,u);(d=ce.diffed)&&d(t)}function ii(e,t,n){for(var r=0;r<n.length;r++)fa(n[r],n[++r],n[++r]);ce.__c&&ce.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){ce.__e(s,o.__v)}})}function LS(e,t,n,r,o,s,i,a,c){var u,d,l,p,f,h,m,g=n.props,y=t.props,b=t.type;if(b==="svg"&&(o=!0),s!=null){for(u=0;u<s.length;u++)if((f=s[u])&&"setAttribute"in f==!!b&&(b?f.localName===b:f.nodeType===3)){e=f,s[u]=null;break}}if(e==null){if(b===null)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),s=null,a=!1}if(b===null)g===y||a&&e.data===y||(e.data=y);else{if(s=s&&ns.call(e.childNodes),g=n.props||er,!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(f=e.attributes[u]).name]=f.value;for(u in g)f=g[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=f:u==="key"||u in y||Pr(e,u,null,f,o));for(u in y)f=y[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?h=f:u=="checked"?m=f:u==="key"||a&&typeof f!="function"||g[u]===f||Pr(e,u,f,g[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Od(e,la(p)?p:[p],t,n,r,o&&b!=="foreignObject",s,i,s?s[0]:n.__k&&Tn(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&Md(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||b==="progress"&&!h||b==="option"&&h!==g[u])&&Pr(e,u,h,g[u],!1),u="checked",m!==void 0&&m!==e[u]&&Pr(e,u,m,g[u],!1))}return e}function fa(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ce.__e(r,n)}}function ai(e,t,n){var r,o;if(ce.unmount&&ce.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||fa(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){ce.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ai(r[o],t,n||typeof e.type!="function");n||e.__e==null||Md(e.__e),e.__=e.__e=e.__d=void 0}function DS(e,t,n){return this.constructor(e,n)}function FS(e,t,n){var r,o,s,i;ce.__&&ce.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],da(t,e=t.__k=G(mr,null,[e]),o||er,er,t.ownerSVGElement!==void 0,o?null:t.firstChild?ns.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,ii(s,e,i)}ns=ua.slice,ce={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Ad=0,to.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=wt({},this.state),typeof e=="function"&&(e=e(wt({},n),this.props)),e&&wt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),eu(this))},to.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),eu(this))},to.prototype.render=mr,Wt=[],xd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,si=function(e,t){return e.__v.__b-t.__v.__b},ko.__r=0;var _t,ae,Rs,ou,wn=0,Ld=[],no=[],he=ce,su=he.__b,iu=he.__r,au=he.diffed,cu=he.__c,uu=he.unmount,lu=he.__;function rn(e,t){he.__h&&he.__h(ae,e,wn||t),wn=0;var n=ae.__H||(ae.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:no}),n.__[e]}function jt(e){return wn=1,Dd($d,e)}function Dd(e,t,n){var r=rn(_t++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$d(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ae,!ae.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};ae.u=!0;var s=ae.shouldComponentUpdate,i=ae.componentWillUpdate;ae.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,o(a,c,u),s=d}i&&i.call(this,a,c,u)},ae.shouldComponentUpdate=o}return r.__N||r.__}function $S(e,t){var n=rn(_t++,3);!he.__s&&pa(n.__H,t)&&(n.__=e,n.i=t,ae.__H.__h.push(n))}function Fd(e,t){var n=rn(_t++,4);!he.__s&&pa(n.__H,t)&&(n.__=e,n.i=t,ae.__h.push(n))}function BS(e){return wn=5,gr(function(){return{current:e}},[])}function US(e,t,n){wn=6,Fd(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function gr(e,t){var n=rn(_t++,7);return pa(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function yn(e,t){return wn=8,gr(function(){return e},t)}function HS(e){var t=ae.context[e.__c],n=rn(_t++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ae)),t.props.value):e.__}function WS(e,t){he.useDebugValue&&he.useDebugValue(t?t(e):e)}function jS(e){var t=rn(_t++,10),n=jt();return t.__=e,ae.componentDidCatch||(ae.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function zS(){var e=rn(_t++,11);if(!e.__){for(var t=ae.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function qS(){for(var e;e=Ld.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ro),e.__H.__h.forEach(ci),e.__H.__h=[]}catch(t){e.__H.__h=[],he.__e(t,e.__v)}}he.__b=function(e){ae=null,su&&su(e)},he.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),lu&&lu(e,t)},he.__r=function(e){iu&&iu(e),_t=0;var t=(ae=e.__c).__H;t&&(Rs===ae?(t.__h=[],ae.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=no,n.__N=n.i=void 0})):(t.__h.forEach(ro),t.__h.forEach(ci),t.__h=[],_t=0)),Rs=ae},he.diffed=function(e){au&&au(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ld.push(t)!==1&&ou===he.requestAnimationFrame||((ou=he.requestAnimationFrame)||GS)(qS)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==no&&(n.__=n.__V),n.i=void 0,n.__V=no})),Rs=ae=null},he.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ro),n.__h=n.__h.filter(function(r){return!r.__||ci(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],he.__e(r,n.__v)}}),cu&&cu(e,t)},he.unmount=function(e){uu&&uu(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ro(r)}catch(o){t=o}}),n.__H=void 0,t&&he.__e(t,n.__v))};var du=typeof requestAnimationFrame=="function";function GS(e){var t,n=function(){clearTimeout(r),du&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);du&&(t=requestAnimationFrame(n))}function ro(e){var t=ae,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ae=t}function ci(e){var t=ae;e.__c=e.__(),ae=t}function pa(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function $d(e,t){return typeof t=="function"?t(e):t}const VS=Object.defineProperty({__proto__:null,useCallback:yn,useContext:HS,useDebugValue:WS,useEffect:$S,useErrorBoundary:jS,useId:zS,useImperativeHandle:US,useLayoutEffect:Fd,useMemo:gr,useReducer:Dd,useRef:BS,useState:jt},Symbol.toStringTag,{value:"Module"}),JS="http://www.w3.org/2000/svg";function YS(){const e=r=>ie.createElementNS(JS,r),t=Ue(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ue(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function KS({options:e}){const t=gr(()=>({__html:YS().outerHTML}),[]);return G("h2",{class:"dialog__header"},G("span",{class:"dialog__title"},e.formTitle),e.showBranding?G("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function XS(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Cs(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function QS({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:b,messagePlaceholder:I,nameLabel:v,namePlaceholder:S,submitButtonLabel:w,isRequiredLabel:E}=e,[k,T]=jt(!1),[C,F]=jt(null),[R,x]=jt(!1),z=u?.input,[X,Q]=jt(null),$=yn(M=>{Q(M),x(!1)},[]),L=yn(M=>{const V=XS(M,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:b,nameLabel:v});return V.length>0?F(`Please enter in the following required fields: ${V.join(", ")}`):F(null),V.length===0},[h,g,y,b,v]),D=yn(async M=>{T(!0);try{if(M.preventDefault(),!(M.target instanceof HTMLFormElement))return;const V=new FormData(M.target),se=await(u&&R?u.value():void 0),de={name:Cs(V,"name"),email:Cs(V,"email"),message:Cs(V,"message"),attachments:se?[se]:void 0};if(!L(de))return;try{const Se=await o({name:de.name,email:de.email,message:de.message,source:bS,tags:d},{attachments:de.attachments});s(de,Se)}catch(Se){Zr&&_.error(Se),F(Se),i(Se)}}finally{T(!1)}},[u&&R,s,i]);return G("form",{class:"form",onSubmit:D},z&&R?G(z,{onError:$}):null,G("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:k},G("div",{class:"form__top"},C?G("div",{class:"form__error-container"},C):null,c?G("label",{for:"name",class:"form__label"},G(As,{label:v,isRequiredLabel:E,isRequired:y}),G("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:S,required:y,type:"text"})):G("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?G("label",{for:"email",class:"form__label"},G(As,{label:h,isRequiredLabel:E,isRequired:g}),G("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):G("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),G("label",{for:"message",class:"form__label"},G(As,{label:b,isRequiredLabel:E,isRequired:!0}),G("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:I,required:!0,rows:5})),z?G("label",{for:"screenshot",class:"form__label"},G("button",{class:"btn btn--default",disabled:k,type:"button",onClick:()=>{Q(null),x(M=>!M)}},R?p:l),X?G("div",{class:"form__error-container"},X.message):null):null),G("div",{class:"btn-group"},G("button",{class:"btn btn--primary",disabled:k,type:"submit"},w),G("button",{class:"btn btn--default",disabled:k,type:"button",onClick:r},f))))}function As({label:e,isRequired:t,isRequiredLabel:n}){return G("span",{class:"form__label__text"},e,t&&G("span",{class:"form__label__text--required"},n))}const Lr=16,fu=17,ZS="http://www.w3.org/2000/svg";function eb(){const e=c=>Ye.document.createElementNS(ZS,c),t=Ue(e("svg"),{width:`${Lr}`,height:`${fu}`,viewBox:`0 0 ${Lr} ${fu}`,fill:"inherit"}),n=Ue(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ue(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ue(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Ue(e("clipPath"),{id:"clip0_57_156"}),a=Ue(e("rect"),{width:`${Lr}`,height:`${Lr}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function tb({open:e,onFormSubmitted:t,...n}){const r=n.options,o=gr(()=>({__html:eb().outerHTML}),[]),[s,i]=jt(null),a=yn(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=yn((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},vS))},[t]);return G(mr,null,s?G("div",{class:"success__position",onClick:a},G("div",{class:"success__content"},r.successMessageText,G("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):G("dialog",{class:"dialog",onClick:r.onFormClose,open:e},G("div",{class:"dialog__position"},G("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},G(KS,{options:r}),G(QS,{...n,onSubmitSuccess:c})))))}const nb=`
105
- .dialog {
106
- position: fixed;
107
- z-index: var(--z-index);
108
- margin: 0;
109
- inset: 0;
110
-
111
- display: flex;
112
- align-items: center;
113
- justify-content: center;
114
- padding: 0;
115
- height: 100vh;
116
- width: 100vw;
117
-
118
- color: var(--dialog-color, var(--foreground));
119
- fill: var(--dialog-color, var(--foreground));
120
- line-height: 1.75em;
121
-
122
- background-color: rgba(0, 0, 0, 0.05);
123
- border: none;
124
- inset: 0;
125
- opacity: 1;
126
- transition: opacity 0.2s ease-in-out;
127
- }
128
-
129
- .dialog__position {
130
- position: fixed;
131
- z-index: var(--z-index);
132
- inset: var(--dialog-inset);
133
- padding: var(--page-margin);
134
- display: flex;
135
- max-height: calc(100vh - (2 * var(--page-margin)));
136
- }
137
- @media (max-width: 600px) {
138
- .dialog__position {
139
- inset: var(--page-margin);
140
- padding: 0;
141
- }
142
- }
143
-
144
- .dialog__position:has(.editor) {
145
- inset: var(--page-margin);
146
- padding: 0;
147
- }
148
-
149
- .dialog:not([open]) {
150
- opacity: 0;
151
- pointer-events: none;
152
- visibility: hidden;
153
- }
154
- .dialog:not([open]) .dialog__content {
155
- transform: translate(0, -16px) scale(0.98);
156
- }
157
-
158
- .dialog__content {
159
- display: flex;
160
- flex-direction: column;
161
- gap: 16px;
162
- padding: var(--dialog-padding, 24px);
163
- max-width: 100%;
164
- width: 100%;
165
- max-height: 100%;
166
- overflow: auto;
167
-
168
- background: var(--dialog-background, var(--background));
169
- border-radius: var(--dialog-border-radius, 20px);
170
- border: var(--dialog-border, var(--border));
171
- box-shadow: var(--dialog-box-shadow, var(--box-shadow));
172
- transform: translate(0, 0) scale(1);
173
- transition: transform 0.2s ease-in-out;
174
- }
175
-
176
- `,rb=`
177
- .dialog__header {
178
- display: flex;
179
- gap: 4px;
180
- justify-content: space-between;
181
- font-weight: var(--dialog-header-weight, 600);
182
- margin: 0;
183
- }
184
- .dialog__title {
185
- align-self: center;
186
- width: var(--form-width, 272px);
187
- }
188
-
189
- @media (max-width: 600px) {
190
- .dialog__title {
191
- width: auto;
192
- }
193
- }
194
-
195
- .dialog__position:has(.editor) .dialog__title {
196
- width: auto;
197
- }
198
-
199
-
200
- .brand-link {
201
- display: inline-flex;
202
- }
203
- .brand-link:focus-visible {
204
- outline: var(--outline);
205
- }
206
- `,ob=`
207
- .form {
208
- display: flex;
209
- overflow: auto;
210
- flex-direction: row;
211
- gap: 16px;
212
- flex: 1 0;
213
- }
214
-
215
- .form fieldset {
216
- border: none;
217
- margin: 0;
218
- padding: 0;
219
- }
220
-
221
- .form__right {
222
- flex: 0 0 auto;
223
- display: flex;
224
- overflow: auto;
225
- flex-direction: column;
226
- justify-content: space-between;
227
- gap: 20px;
228
- width: var(--form-width, 100%);
229
- }
230
-
231
- .dialog__position:has(.editor) .form__right {
232
- width: var(--form-width, 272px);
233
- }
234
-
235
- .form__top {
236
- display: flex;
237
- flex-direction: column;
238
- gap: 8px;
239
- }
240
-
241
- .form__error-container {
242
- color: var(--error-color);
243
- fill: var(--error-color);
244
- }
245
-
246
- .form__label {
247
- display: flex;
248
- flex-direction: column;
249
- gap: 4px;
250
- margin: 0px;
251
- }
252
-
253
- .form__label__text {
254
- display: flex;
255
- gap: 4px;
256
- align-items: center;
257
- }
258
-
259
- .form__label__text--required {
260
- font-size: 0.85em;
261
- }
262
-
263
- .form__input {
264
- font-family: inherit;
265
- line-height: inherit;
266
- background: transparent;
267
- box-sizing: border-box;
268
- border: var(--input-border, var(--border));
269
- border-radius: var(--input-border-radius, 6px);
270
- color: var(--input-color, inherit);
271
- fill: var(--input-color, inherit);
272
- font-size: var(--input-font-size, inherit);
273
- font-weight: var(--input-font-weight, 500);
274
- padding: 6px 12px;
275
- }
276
-
277
- .form__input::placeholder {
278
- opacity: 0.65;
279
- color: var(--input-placeholder-color, inherit);
280
- filter: var(--interactive-filter);
281
- }
282
-
283
- .form__input:focus-visible {
284
- outline: var(--input-focus-outline, var(--outline));
285
- }
286
-
287
- .form__input--textarea {
288
- font-family: inherit;
289
- resize: vertical;
290
- }
291
-
292
- .error {
293
- color: var(--error-color);
294
- fill: var(--error-color);
295
- }
296
- `,sb=`
297
- .btn-group {
298
- display: grid;
299
- gap: 8px;
300
- }
301
-
302
- .btn {
303
- line-height: inherit;
304
- border: var(--button-border, var(--border));
305
- border-radius: var(--button-border-radius, 6px);
306
- cursor: pointer;
307
- font-family: inherit;
308
- font-size: var(--button-font-size, inherit);
309
- font-weight: var(--button-font-weight, 600);
310
- padding: var(--button-padding, 6px 16px);
311
- }
312
- .btn[disabled] {
313
- opacity: 0.6;
314
- pointer-events: none;
315
- }
316
-
317
- .btn--primary {
318
- color: var(--button-primary-color, var(--accent-foreground));
319
- fill: var(--button-primary-color, var(--accent-foreground));
320
- background: var(--button-primary-background, var(--accent-background));
321
- border: var(--button-primary-border, var(--border));
322
- border-radius: var(--button-primary-border-radius, 6px);
323
- font-weight: var(--button-primary-font-weight, 500);
324
- }
325
- .btn--primary:hover {
326
- color: var(--button-primary-hover-color, var(--accent-foreground));
327
- fill: var(--button-primary-hover-color, var(--accent-foreground));
328
- background: var(--button-primary-hover-background, var(--accent-background));
329
- filter: var(--interactive-filter);
330
- }
331
- .btn--primary:focus-visible {
332
- background: var(--button-primary-hover-background, var(--accent-background));
333
- filter: var(--interactive-filter);
334
- outline: var(--button-primary-focus-outline, var(--outline));
335
- }
336
-
337
- .btn--default {
338
- color: var(--button-color, var(--foreground));
339
- fill: var(--button-color, var(--foreground));
340
- background: var(--button-background, var(--background));
341
- border: var(--button-border, var(--border));
342
- border-radius: var(--button-border-radius, 6px);
343
- font-weight: var(--button-font-weight, 500);
344
- }
345
- .btn--default:hover {
346
- color: var(--button-color, var(--foreground));
347
- fill: var(--button-color, var(--foreground));
348
- background: var(--button-hover-background, var(--background));
349
- filter: var(--interactive-filter);
350
- }
351
- .btn--default:focus-visible {
352
- background: var(--button-hover-background, var(--background));
353
- filter: var(--interactive-filter);
354
- outline: var(--button-focus-outline, var(--outline));
355
- }
356
- `,ib=`
357
- .success__position {
358
- position: fixed;
359
- inset: var(--dialog-inset);
360
- padding: var(--page-margin);
361
- z-index: var(--z-index);
362
- }
363
- .success__content {
364
- background: var(--success-background, var(--background));
365
- border: var(--success-border, var(--border));
366
- border-radius: var(--success-border-radius, 1.7em/50%);
367
- box-shadow: var(--success-box-shadow, var(--box-shadow));
368
- font-weight: var(--success-font-weight, 600);
369
- color: var(--success-color);
370
- fill: var(--success-color);
371
- padding: 12px 24px;
372
- line-height: 1.75em;
373
-
374
- display: grid;
375
- align-items: center;
376
- grid-auto-flow: column;
377
- gap: 6px;
378
- cursor: default;
379
- }
380
-
381
- .success__icon {
382
- display: flex;
383
- }
384
- `;function ab(e){const t=ie.createElement("style");return t.textContent=`
385
- :host {
386
- --dialog-inset: var(--inset);
387
- }
388
-
389
- ${nb}
390
- ${rb}
391
- ${ob}
392
- ${sb}
393
- ${ib}
394
- `,e&&t.setAttribute("nonce",e),t}function cb(){const e=J().getUser(),t=Dt().getUser(),n=bn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const ub=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=cb(),a=ie.createElement("div"),c=ab(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ie.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),P()?.emit("openFeedbackWidget"),u=ie.body.style.overflow,ie.body.style.overflow="hidden"},close(){p(!1),ie.body.style.overflow=u}},l=t?.createInput({h:G,hooks:VS,dialog:d,options:e}),p=f=>{FS(G(tb,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:s&&i?.[s.name]||"",defaultEmail:s&&i?.[s.email]||"",onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{p(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:f}),a)};return d}}));function lb({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function db(e){const t=ie.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
395
- .editor {
396
- display: flex;
397
- flex-grow: 1;
398
- flex-direction: column;
399
- }
400
-
401
- .editor__image-container {
402
- justify-items: center;
403
- padding: 15px;
404
- position: relative;
405
- height: 100%;
406
- border-radius: var(--menu-border-radius, 6px);
407
-
408
- background-color: ${n};
409
- background-image: repeating-linear-gradient(
410
- -145deg,
411
- transparent,
412
- transparent 8px,
413
- ${n} 8px,
414
- ${n} 11px
415
- ),
416
- repeating-linear-gradient(
417
- -45deg,
418
- transparent,
419
- transparent 15px,
420
- ${r} 15px,
421
- ${r} 16px
422
- );
423
- }
424
-
425
- .editor__canvas-container {
426
- width: 100%;
427
- height: 100%;
428
- position: relative;
429
- display: flex;
430
- align-items: center;
431
- justify-content: center;
432
- }
433
-
434
- .editor__canvas-container > * {
435
- object-fit: contain;
436
- position: absolute;
437
- }
438
-
439
- .editor__tool-container {
440
- padding-top: 8px;
441
- display: flex;
442
- justify-content: center;
443
- }
444
-
445
- .editor__tool-bar {
446
- display: flex;
447
- gap: 8px;
448
- }
449
-
450
- .editor__tool {
451
- display: flex;
452
- padding: 8px 12px;
453
- justify-content: center;
454
- align-items: center;
455
- border: var(--button-border, var(--border));
456
- border-radius: var(--button-border-radius, 6px);
457
- background: var(--button-background, var(--background));
458
- color: var(--button-color, var(--foreground));
459
- }
460
-
461
- .editor__tool--active {
462
- background: var(--button-primary-background, var(--accent-background));
463
- color: var(--button-primary-color, var(--accent-foreground));
464
- }
465
-
466
- .editor__rect {
467
- position: absolute;
468
- z-index: 2;
469
- }
470
-
471
- .editor__rect button {
472
- opacity: 0;
473
- position: absolute;
474
- top: -12px;
475
- right: -12px;
476
- cursor: pointer;
477
- padding: 0;
478
- z-index: 3;
479
- border: none;
480
- background: none;
481
- }
482
-
483
- .editor__rect:hover button {
484
- opacity: 1;
485
- }
486
- `,e&&t.setAttribute("nonce",e),t}function fb({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function pb({hooks:e}){function t(){const[n,r]=e.useState(Ye.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(Ye.devicePixelRatio)},s=matchMedia(`(resolution: ${Ye.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await jn.mediaDevices.getDisplayMedia({video:{width:Ye.innerWidth*a,height:Ye.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=ie.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(f=>f.stop()),l()},d.play().catch(p)}),s()})().catch(i)},[])}}function hb(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Et(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function xs(e,t){Et(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Ms(e,t,n){Et(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{hb(s,o,t)})})}function mb({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=pb({hooks:t}),i=fb({h:e}),a=lb({h:e}),c={__html:db(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=t.useState("highlight"),[h,m]=t.useState([]),g=t.useRef(null),y=t.useRef(null),b=t.useRef(null),I=t.useRef(null),[v,S]=t.useState(1),w=t.useMemo(()=>{const R=ie.getElementById(o.id);if(!R)return"white";const x=getComputedStyle(R);return x.getPropertyValue("--button-primary-background")||x.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const R=()=>{const x=g.current;x&&(Et(l.canvas,{alpha:!1},z=>{const X=Math.min(x.clientWidth/z.width,x.clientHeight/z.height);S(X)}),(x.clientHeight===0||x.clientWidth===0)&&setTimeout(R,0))};return R(),Ye.addEventListener("resize",R),()=>{Ye.removeEventListener("resize",R)}},[l]);const E=t.useCallback((R,x)=>{Et(R,{alpha:!0},(z,X)=>{X.scale(x,x),z.width=l.canvas.width,z.height=l.canvas.height})},[l]);t.useEffect(()=>{E(y.current,l.dpi),xs(y.current,l.canvas)},[l]),t.useEffect(()=>{E(b.current,l.dpi),Et(b.current,{alpha:!0},(R,x)=>{x.clearRect(0,0,R.width,R.height)}),Ms(b.current,w,h)},[h,w]),t.useEffect(()=>{E(n,l.dpi),xs(n,l.canvas),Et(ie.createElement("canvas"),{alpha:!0},(R,x)=>{x.scale(l.dpi,l.dpi),R.width=l.canvas.width,R.height=l.canvas.height,Ms(R,w,h),xs(n,R)})},[h,l,w]);const k=R=>{if(!p||!I.current)return;const x=I.current.getBoundingClientRect(),z={type:p,x:R.offsetX/v,y:R.offsetY/v},X=(L,D)=>{const M=(D.clientX-x.x)/v,V=(D.clientY-x.y)/v;return{type:L.type,x:Math.min(L.x,M),y:Math.min(L.y,V),w:Math.abs(M-L.x),h:Math.abs(V-L.y)}},Q=L=>{Et(b.current,{alpha:!0},(D,M)=>{M.clearRect(0,0,D.width,D.height)}),Ms(b.current,w,[...h,X(z,L)])},$=L=>{const D=X(z,L);D.w*v>=1&&D.h*v>=1&&m(M=>[...M,D]),ie.removeEventListener("mousemove",Q),ie.removeEventListener("mouseup",$)};ie.addEventListener("mousemove",Q),ie.addEventListener("mouseup",$)},T=t.useCallback(R=>x=>{x.preventDefault(),x.stopPropagation(),m(z=>{const X=[...z];return X.splice(R,1),X})},[]),C={width:`${l.canvas.width*v}px`,height:`${l.canvas.height*v}px`},F=R=>{R.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:y,id:"background",style:C}),e("canvas",{ref:b,id:"foreground",style:C}),e("div",{ref:I,onMouseDown:k,style:C},h.map((R,x)=>e("div",{key:x,class:"editor__rect",style:{top:`${R.y*v}px`,left:`${R.x*v}px`,width:`${R.w*v}px`,height:`${R.h*v}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:T(x),onMouseDown:F,onMouseUp:F,type:"button"},e(a,null))))))),e(i,{options:o,action:p,setAction:f}))};return function({onError:p}){const[f,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,g)=>{Et(ie.createElement("canvas"),{alpha:!1},(y,b)=>{b.scale(g,g),y.width=m.videoWidth,y.height=m.videoHeight,b.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:g})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",p(m)},[])}),f?e(d,{screenshot:f}):e("div",null)}}const gb=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ie.createElement("canvas");return{input:mb({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),O=Y;let ui=0;function Bd(){return ui>0}function _b(){ui++,setTimeout(()=>{ui--})}function In(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Fi(e))return e}catch{return e}const r=function(...o){try{const s=o.map(i=>In(i,t));return e.apply(this,s)}catch(s){throw _b(),We(i=>{i.addEventProcessor(a=>(t.mechanism&&(Xs(a,void 0),Pt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),we(s)}),s}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}ch(r,e),at(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ha(){const e=nn(),{referrer:t}=O.document||{},{userAgent:n}=O.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const yb={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient"},pu=O;async function Sb(e,t){const n=yb[e],r=pu.Sentry=pu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=bb(n),i=O.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),c=O.document.currentScript,u=O.document.body||O.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function bb(e){const n=P()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Js}/${e}.min.js`,n).toString()}const b1=Cd({lazyLoadIntegration:Sb}),E1=Cd({getModalIntegration:()=>ub,getScreenshotIntegration:()=>gb});function ma(e,t){const n=ga(e,t),r={type:Ib(t),value:kb(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Eb(e,t,n,r){const s=P()?.getOptions().normalizeDepth,i=Mb(t),a={__serialized__:lh(t,s)};if(i)return{exception:{values:[ma(e,i)]},extra:a};const c={exception:{values:[{type:Bi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ab(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=ga(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Ns(e,t){return{exception:{values:[ma(e,t)]}}}function ga(e,t){const n=t.stacktrace||t.stack||"",r=Tb(t),o=wb(t);try{return e(n,r,o)}catch{}return[]}const vb=/Minified React error #\d+;/i;function Tb(e){return e&&vb.test(e.message)?1:0}function wb(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ud(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ib(e){const t=e?.name;return!t&&Ud(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function kb(e){const t=e?.message;return Ud(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Rb(e,t,n,r){const o=n?.syntheticException||void 0,s=rs(e,t,o,r);return Pt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Di(s)}function Cb(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=li(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Di(i)}function rs(e,t,n,r,o){let s;if(Al(t)&&t.error)return Ns(e,t.error);if(tc(t)||uh(t)){const i=t;if("stack"in t)s=Ns(e,t);else{const a=i.name||(tc(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=li(e,c,n,r),Xs(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return kt(t)?Ns(e,t):It(t)||Bi(t)?(s=Eb(e,t,n,o),Pt(s,{synthetic:!0}),s):(s=li(e,t,n,r),Xs(s,`${t}`),Pt(s,{synthetic:!0}),s)}function li(e,t,n,r){const o={};if(r&&n){const s=ga(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),Pt(o,{synthetic:!0})}if(Li(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function Ab(e,{isUnhandledRejection:t}){const n=dh(e),r=t?"promise rejection":"exception";return Al(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Bi(e)?`Event \`${xb(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function xb(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Mb(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class Nb extends Am{constructor(t){const n=Ob(t),r=O.SENTRY_SDK_SOURCE||eS();od(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:o,sendClientReports:s,enableLogs:i,_experiments:a}=this._options;O.document&&(s||i||a?.enableMetrics)&&O.document.addEventListener("visibilitychange",()=>{O.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),i&&ji(this),a?.enableMetrics&&qi(this))}),o&&this.on("beforeSendSession",Km)}eventFromException(t,n){return Rb(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Cb(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function Ob(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:O.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const en=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,j=Y,Pb=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",_r=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=Pb(t.value,n),e(t)))}},Lb=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,yr=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Fn=()=>yr()?.activationStart??0,Sr=(e,t=-1)=>{const n=yr();let r="navigate";return n&&(j.document?.prerendering||Fn()>0?r="prerender":j.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:Lb(),navigationType:r}},Os=new WeakMap;function _a(e,t){return Os.get(e)||Os.set(e,new t),Os.get(e)}class Ro{constructor(){Ro.prototype.__init.call(this),Ro.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const $n=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},ya=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Gn=-1;const Db=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,Co=e=>{j.document.visibilityState==="hidden"&&Gn>-1&&(Gn=e.type==="visibilitychange"?e.timeStamp:0,$b())},Fb=()=>{addEventListener("visibilitychange",Co,!0),addEventListener("prerenderingchange",Co,!0)},$b=()=>{removeEventListener("visibilitychange",Co,!0),removeEventListener("prerenderingchange",Co,!0)},Sa=()=>{if(j.document&&Gn<0){const e=Fn();Gn=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??Db(),Fb()}return{get firstHiddenTime(){return Gn}}},os=e=>{j.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Bb=[1800,3e3],Ub=(e,t={})=>{os(()=>{const n=Sa(),r=Sr("FCP");let o;const i=$n("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Fn(),0),r.entries.push(c),o(!0)))});i&&(o=_r(e,r,Bb,t.reportAllChanges))})},Hb=[.1,.25],Wb=(e,t={})=>{Ub(ya(()=>{const n=Sr("CLS",0);let r;const o=_a(t,Ro),s=a=>{for(const c of a)o._processEntry(c);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},i=$n("layout-shift",s);i&&(r=_r(e,n,Hb,t.reportAllChanges),j.document?.addEventListener("visibilitychange",()=>{j.document?.visibilityState==="hidden"&&(s(i.takeRecords()),r(!0))}),j?.setTimeout?.(r))}))};let Hd=0,Ps=1/0,Dr=0;const jb=e=>{e.forEach(t=>{t.interactionId&&(Ps=Math.min(Ps,t.interactionId),Dr=Math.max(Dr,t.interactionId),Hd=Dr?(Dr-Ps)/7+1:0)})};let di;const Wd=()=>di?Hd:performance.interactionCount||0,zb=()=>{"interactionCount"in performance||di||(di=$n("event",jb,{type:"event",buffered:!0,durationThreshold:0}))},Ls=10;let jd=0;const qb=()=>Wd()-jd;class Ao{constructor(){Ao.prototype.__init.call(this),Ao.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){jd=Wd(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(qb()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Ls||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>Ls){const o=this._longestInteractionList.splice(Ls);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const ba=e=>{const t=n=>{(n.type==="pagehide"||j.document?.visibilityState==="hidden")&&e(n)};j.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},zd=e=>{const t=j.requestIdleCallback||j.setTimeout;j.document?.visibilityState==="hidden"?e():(e=ya(e),t(e),ba(e))},Gb=[200,500],Vb=40,Jb=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&os(()=>{zb();const n=Sr("INP");let r;const o=_a(t,Ao),s=a=>{zd(()=>{for(const u of a)o._processEntry(u);const c=o._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=$n("event",s,{durationThreshold:t.durationThreshold??Vb});r=_r(e,n,Gb,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),ba(()=>{s(i.takeRecords()),r(!0)}))})};class Yb{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const Kb=[2500,4e3],Xb=(e,t={})=>{os(()=>{const n=Sa(),r=Sr("LCP");let o;const s=_a(t,Yb),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Fn(),0),r.entries=[u],o())},a=$n("largest-contentful-paint",i);if(a){o=_r(e,r,Kb,t.reportAllChanges);const c=ya(()=>{i(a.takeRecords()),a.disconnect(),o(!0)});for(const u of["keydown","click","visibilitychange"])j.document&&addEventListener(u,()=>zd(c),{capture:!0,once:!0})}})},Qb=[800,1800],fi=e=>{j.document?.prerendering?os(()=>fi(e)):j.document?.readyState!=="complete"?addEventListener("load",()=>fi(e),!0):setTimeout(e)},Zb=(e,t={})=>{const n=Sr("TTFB"),r=_r(e,n,Qb,t.reportAllChanges);fi(()=>{const o=yr();o&&(n.value=Math.max(o.responseStart-Fn(),0),n.entries=[o],r(!0))})},Vn={},xo={};let qd,Gd,Vd,Jd;function Ea(e,t=!1){return ss("cls",e,tE,qd,t)}function va(e,t=!1){return ss("lcp",e,nE,Gd,t)}function eE(e){return ss("ttfb",e,rE,Vd)}function Yd(e){return ss("inp",e,oE,Jd)}function tn(e,t){return Kd(e,t),xo[e]||(sE(e),xo[e]=!0),Xd(e,t)}function br(e,t){const n=Vn[e];if(n?.length)for(const r of n)try{r(t)}catch(o){en&&_.error(`Error while triggering instrumentation handler.
487
- Type: ${e}
488
- Name: ${Nt(r)}
489
- Error:`,o)}}function tE(){return Wb(e=>{br("cls",{metric:e}),qd=e},{reportAllChanges:!0})}function nE(){return Xb(e=>{br("lcp",{metric:e}),Gd=e},{reportAllChanges:!0})}function rE(){return Zb(e=>{br("ttfb",{metric:e}),Vd=e})}function oE(){return Jb(e=>{br("inp",{metric:e}),Jd=e})}function ss(e,t,n,r,o=!1){Kd(e,t);let s;return xo[e]||(s=n(),xo[e]=!0),r&&t({metric:r}),Xd(e,t,o?s:void 0)}function sE(e){const t={};e==="event"&&(t.durationThreshold=0),$n(e,n=>{br(e,{entries:n})},t)}function Kd(e,t){Vn[e]=Vn[e]||[],Vn[e].push(t)}function Xd(e,t,n){return()=>{n&&n();const r=Vn[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function iE(e){return"duration"in e}function Ds(e){return typeof e=="number"&&isFinite(e)}function Lt(e,t,n,{...r}){const o=B(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),En(e,()=>{const s=Ze({startTime:t,...r});return s&&s.end(n),s})}function Ta(e){const t=P();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=J(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:i,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":j.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Ze({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function Er(){return j.addEventListener&&j.performance}function ye(e){return e/1e3}function aE(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Qd(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Zd(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}ba(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,i()})}function cE(e){let t=0,n;if(!Qd("layout-shift"))return;const r=Ea(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Zd(e,(o,s)=>{uE(t,n,s,o),r()})}function uE(e,t,n,r){en&&_.log(`Sending CLS span (${e})`);const o=t?ye((Me()||0)+t.startTime):me(),s=J().getScopeData().transactionName,i=t?He(t.sources[0]?.node):"Layout shift",a={[K]:"auto.http.browser.cls",[ve]:"ui.webvital.cls",[Nn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=He(u.node)});const c=Ta({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[ar]:"",[cr]:e}),c.end(o))}function lE(e){let t=0,n;if(!Qd("largest-contentful-paint"))return;const r=va(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Zd(e,(o,s)=>{dE(t,n,s,o),r()})}function dE(e,t,n,r){en&&_.log(`Sending LCP span (${e})`);const o=ye((Me()||0)+(t?.startTime||0)),s=J().getScopeData().transactionName,i=t?He(t.element):"Largest contentful paint",a={[K]:"auto.http.browser.lcp",[ve]:"ui.webvital.lcp",[Nn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=He(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Ta({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[ar]:"millisecond",[cr]:e}),c.end(o))}function ze(e){return e&&((Me()||performance.timeOrigin)+e)/1e3}function ef(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=aE(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Me()||Er()?.timeOrigin?fE({...t,"http.request.redirect_start":ze(e.redirectStart),"http.request.redirect_end":ze(e.redirectEnd),"http.request.worker_start":ze(e.workerStart),"http.request.fetch_start":ze(e.fetchStart),"http.request.domain_lookup_start":ze(e.domainLookupStart),"http.request.domain_lookup_end":ze(e.domainLookupEnd),"http.request.connect_start":ze(e.connectStart),"http.request.secure_connection_start":ze(e.secureConnectionStart),"http.request.connection_end":ze(e.connectEnd),"http.request.request_start":ze(e.requestStart),"http.request.response_start":ze(e.responseStart),"http.request.response_end":ze(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function fE(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const pE=2147483647;let hu=0,Je={},Fe,Mo;function hE({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Er();if(r&&Me()){r.mark&&j.performance.mark("sentry-tracing-init");const o=t?lE(n):SE(),s=bE(),i=e?cE(n):yE();return()=>{o?.(),s(),i?.()}}return()=>{}}function mE(){tn("longtask",({entries:e})=>{const t=ge();if(!t)return;const{op:n,start_timestamp:r}=B(t);for(const o of e){const s=ye(Me()+o.startTime),i=ye(o.duration);n==="navigation"&&r&&s<r||Lt(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[K]:"auto.ui.browser.metrics"}})}})}function gE(){new PerformanceObserver(t=>{const n=ge();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=ye(Me()+r.startTime),{start_timestamp:s,op:i}=B(n);if(i==="navigation"&&s&&o<s)continue;const a=ye(r.duration),c={[K]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),f&&(c["code.function"]=f),h!==-1&&(c["browser.script.source_char_position"]=h),Lt(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function _E(){tn("event",({entries:e})=>{const t=ge();if(t){for(const n of e)if(n.name==="click"){const r=ye(Me()+n.startTime),o=ye(n.duration),s={name:He(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[K]:"auto.ui.browser.metrics"}},i=xl(n.target);i&&(s.attributes["ui.component_name"]=i),Lt(t,r,r+o,s)}}})}function yE(){return Ea(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Je.cls={value:e.value,unit:""},Mo=t)},!0)}function SE(){return va(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Je.lcp={value:e.value,unit:"millisecond"},Fe=t)},!0)}function bE(){return eE(({metric:e})=>{e.entries[e.entries.length-1]&&(Je.ttfb={value:e.value,unit:"millisecond"})})}function EE(e,t){const n=Er(),r=Me();if(!n?.getEntries||!r)return;const o=ye(r),s=n.getEntries(),{op:i,start_timestamp:a}=B(e);s.slice(hu).forEach(c=>{const u=ye(c.startTime),d=ye(Math.max(0,c.duration));if(!(i==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{IE(e,c,o);break}case"mark":case"paint":case"measure":{TE(e,c,u,d,o,t.ignorePerformanceApiSpans);const l=Sa(),p=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&p&&(Je.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&p&&(Je.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{CE(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),hu=Math.max(s.length-1,0),AE(e),i==="pageload"&&(NE(Je),t.recordClsOnPageloadSpan||delete Je.cls,t.recordLcpOnPageloadSpan||delete Je.lcp,Object.entries(Je).forEach(([c,u])=>{qh(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Fn()),xE(e,t)),Fe=void 0,Mo=void 0,Je={}}function vE(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function TE(e,t,n,r,o,s){if(vE(t)||["mark","measure"].includes(t.entryType)&&Qe(t.name,s))return;const i=yr(!1),a=ye(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[K]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),wE(l,t),c<=d&&Lt(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function wE(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Ot(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Ot(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function IE(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Fr(e,t,r,n)}),Fr(e,t,"secureConnection",n,"TLS/SSL"),Fr(e,t,"fetch",n,"cache"),Fr(e,t,"domainLookup",n,"DNS"),RE(e,t,n)}function Fr(e,t,n,r,o=n){const s=kE(n),i=t[s],a=t[`${n}Start`];!a||!i||Lt(e,r+ye(a),r+ye(i),{op:`browser.${o}`,name:t.name,attributes:{[K]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function kE(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function RE(e,t,n){const r=n+ye(t.requestStart),o=n+ye(t.responseEnd),s=n+ye(t.responseStart);t.responseEnd&&(Lt(e,r,o,{op:"browser.request",name:t.name,attributes:{[K]:"auto.ui.browser.metrics"}}),Lt(e,s,o,{op:"browser.response",name:t.name,attributes:{[K]:"auto.ui.browser.metrics"}}))}function CE(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[K]:"auto.resource.browser.metrics"},u=Vt(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(j.location.origin),ME(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const d={...c,...ef(t)},l=s+r,p=l+o;Lt(e,l,p,{name:n.replace(j.location.origin,""),op:a,attributes:d})}function AE(e){const t=j.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Ds(n.rtt)&&(Je["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ds(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Ds(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function xE(e,t){Fe&&t.recordLcpOnPageloadSpan&&(Fe.element&&e.setAttribute("lcp.element",He(Fe.element)),Fe.id&&e.setAttribute("lcp.id",Fe.id),Fe.url&&e.setAttribute("lcp.url",Fe.url.trim().slice(0,200)),Fe.loadTime!=null&&e.setAttribute("lcp.loadTime",Fe.loadTime),Fe.renderTime!=null&&e.setAttribute("lcp.renderTime",Fe.renderTime),e.setAttribute("lcp.size",Fe.size)),Mo?.sources&&t.recordClsOnPageloadSpan&&Mo.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,He(n.node)))}function ME(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<pE||typeof s=="string")&&(t[o]=s)})}function NE(e){const t=yr(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function OE(){return Er()&&Me()?tn("element",PE):()=>{}}const PE=({entries:e})=>{const t=ge(),n=t?Ee(t):void 0,r=n?B(n).description:J().getScopeData().transactionName;e.forEach(o=>{const s=o;if(!s.identifier)return;const i=s.name,a=s.renderTime,c=s.loadTime,[u,d]=c?[ye(c),"load-time"]:a?[ye(a),"render-time"]:[me(),"entry-emission"],l=i==="image-paint"?ye(Math.max(0,(a??0)-(c??0))):0,p={[K]:"auto.ui.browser.elementtiming",[ve]:"ui.elementtiming",[fe]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":s.id,"element.type":s.element?.tagName?.toLowerCase()||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":s.url||void 0,"element.identifier":s.identifier,"element.paint_type":i};On({name:`element[${s.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},f=>{f.end(u+l)})})},LE=1e3;let mu,pi,hi;function tf(e){Ft("dom",e),$t("dom",DE)}function DE(){if(!j.document)return;const e=qe.bind(null,"dom"),t=gu(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=j[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Re(o,"addEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=gu(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),Re(o,"removeEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function FE(e){if(e.type!==pi)return!1;try{if(!e.target||e.target._sentryId!==hi)return!1}catch{}return!0}function $E(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function gu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=BE(n);if($E(n.type,r))return;at(n,"_sentryCaptured",!0),r&&!r._sentryId&&at(r,"_sentryId",Xe());const o=n.type==="keypress"?"input":n.type;FE(n)||(e({event:n,name:o,global:t}),pi=n.type,hi=r?r._sentryId:void 0),clearTimeout(mu),mu=j.setTimeout(()=>{hi=void 0,pi=void 0},LE)}}function BE(e){try{return e.target}catch{return null}}let $r;function is(e){const t="history";Ft(t,e),$t(t,UE)}function UE(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=$r;if($r=t,n===t)return;qe("history",{from:n,to:t})}),!qy())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=$r,s=HE(String(r));if($r=s,o===s)return t.apply(this,n);qe("history",{from:o,to:s})}return t.apply(this,n)}}Re(j.history,"pushState",e),Re(j.history,"replaceState",e)}function HE(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const oo={};function wa(e){const t=oo[e];if(t)return t;let n=j[e];if(ri(n))return oo[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){en&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(oo[e]=n.bind(j))}function WE(e){oo[e]=void 0}function vr(...e){return wa("setTimeout")(...e)}const ft="__sentry_xhr_v3__";function Ia(e){Ft("xhr",e),$t("xhr",jE)}function jE(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=me()*1e3,i=Gt(r[0])?r[0].toUpperCase():void 0,a=zE(r[1]);if(!i||!a)return t.apply(n,r);n[ft]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[ft];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:me()*1e3,startTimestamp:s,xhr:n,virtualError:o};qe("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[ft];return h&&Gt(p)&&Gt(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[ft];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:me()*1e3,xhr:n};return qe("xhr",s),t.apply(n,r)}})}function zE(e){if(Gt(e))return e;try{return e.toString()}catch{}}function nf(e){return new URLSearchParams(e).toString()}function No(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[nf(e)];if(!e)return[void 0]}catch(n){return en&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return en&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ka(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function rf(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return en&&_.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
490
- `).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}const Fs=[],so=new Map,an=new Map,qE=60;function GE(){if(Er()&&Me()){const t=VE();return()=>{t()}}return()=>{}}const mi={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function VE(){return Yd(JE)}const JE=({metric:e})=>{if(e.value==null)return;const t=ye(e.value);if(t>qE)return;const n=e.entries.find(h=>h.duration===e.value&&mi[h.name]);if(!n)return;const{interactionId:r}=n,o=mi[n.name],s=ye(Me()+n.startTime),i=ge(),a=i?Ee(i):void 0,c=r!=null?so.get(r):void 0,u=c?.span||a,d=u?B(u).description:J().getScopeData().transactionName,l=c?.elementName||He(n.target),p={[K]:"auto.http.browser.inp",[ve]:`ui.interaction.${o}`,[Nn]:n.duration},f=Ta({name:l,transaction:d,attributes:p,startTime:s});f&&(f.addEvent("inp",{[ar]:"millisecond",[cr]:e.value}),f.end(s+t))};function YE(){const e=Object.keys(mi);Io()&&e.forEach(o=>{j.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=He(s),a=Math.round(o.timeStamp);if(an.set(a,i),an.size>50){const c=an.keys().next().value;c!==void 0&&an.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=an.get(s);if(!i)for(let a=-5;a<=5;a++){const c=an.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=ge(),i=s&&Ee(s);o.forEach(a=>{if(!iE(a))return;const c=a.interactionId;if(c==null||so.has(c))return;const u=a.target?He(a.target):n(a);if(Fs.length>10){const d=Fs.shift();so.delete(d)}Fs.push(c),so.set(c,{span:i,elementName:u})})};tn("event",r),tn("first-input",r)}const KE=40;function of(e,t=wa("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw WE("fetch"),c}finally{n-=i,r--}}return Bm(e,o,Xl(e.bufferSize||KE))}const XE=10,QE=20,ZE=30,ev=40,tv=50;function kn(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?mt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const nv=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,rv=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ov=/\((\S*)(?::(\d+))(?::(\d+))\)/,sv=/at (.+?) ?\(data:(.+?),/,iv=e=>{const t=e.match(sv);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=nv.exec(e);if(n){const[,o,s,i]=n;return kn(o,mt,+s,+i)}const r=rv.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=ov.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=sf(r[1]||mt,r[2]);return kn(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},av=[ZE,iv],cv=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,uv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lv=e=>{const t=cv.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=uv.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||mt;return[o,r]=sf(o,r),kn(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},dv=[tv,lv],fv=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,pv=e=>{const t=fv.exec(e);return t?kn(t[2],t[1]||mt,+t[3],t[4]?+t[4]:void 0):void 0},v1=[ev,pv],hv=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,mv=e=>{const t=hv.exec(e);return t?kn(t[2],t[3]||mt,+t[1]):void 0},T1=[XE,mv],gv=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,_v=e=>{const t=gv.exec(e);return t?kn(t[5],t[3]||t[4]||mt,+t[1],+t[2]):void 0},w1=[QE,_v],yv=[av,dv],Sv=fh(...yv),sf=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:mt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function I1(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:yt(r)}},s=bv(e);return tt(o,[s])}function bv(e){return[{type:"user_report"},e]}const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Br=1024,Ev="Breadcrumbs",vv=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Ev,setup(n){t.console&&Yi(kv(n)),t.dom&&tf(Iv(n,t.dom)),t.xhr&&Ia(Rv(n)),t.fetch&&ca(Cv(n)),t.history&&is(Av(n)),t.sentry&&n.on("beforeSendEvent",wv(n))}}}),Tv=vv;function wv(e){return function(n){P()===e&&ct({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ht(n)},{event:n})}}function Iv(e,t){return function(r){if(P()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Br&&(A&&_.warn(`\`dom.maxStringLength\` cannot exceed ${Br}, but a value of ${a} was configured. Sentry will use ${Br} instead.`),a=Br),typeof i=="string"&&(i=[i]);try{const u=r.event,d=xv(u)?u.target:u;o=He(d,{keyAttrs:i,maxStringLength:a}),s=xl(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),ct(c,{event:r.event,name:r.name,global:r.global})}}function kv(e){return function(n){if(P()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ki(n.level),message:po(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${po(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ct(r,{input:n.args,level:n.level})}}function Rv(e){return function(n){if(P()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[ft];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:Td(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),ct(p,l)}}function Cv(e){return function(n){if(P()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),ct(a,i)}else{const s=n.response,i={...n.fetchData,status_code:s?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s?.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Td(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),ct(c,a)}}}function Av(e){return function(n){if(P()!==e)return;let r=n.from,o=n.to;const s=Vt(O.location.href);let i=r?Vt(r):void 0;const a=Vt(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),ct({category:"navigation",data:{from:r,to:o}})}}function xv(e){return!!e&&!!e.target}const Mv=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Nv="BrowserApiErrors",Ov=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Nv,setupOnce(){t.setTimeout&&Re(O,"setTimeout",_u),t.setInterval&&Re(O,"setInterval",_u),t.requestAnimationFrame&&Re(O,"requestAnimationFrame",Lv),t.XMLHttpRequest&&"XMLHttpRequest"in O&&Re(XMLHttpRequest.prototype,"send",Dv);const n=t.eventTarget;n&&(Array.isArray(n)?n:Mv).forEach(o=>Fv(o,t))}}}),Pv=Ov;function _u(e){return function(...t){const n=t[0];return t[0]=In(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Nt(e)}`}}),e.apply(this,t)}}function Lv(e){return function(t){return e.apply(this,[In(t,{mechanism:{data:{handler:Nt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Dv(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Re(n,o,function(s){const i={mechanism:{data:{handler:Nt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Fi(s);return a&&(i.mechanism.data.handler=Nt(a)),In(s,i)})}),e.apply(this,t)}}function Fv(e,t){const r=O[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Re(r,"addEventListener",function(o){return function(s,i,a){try{$v(i)&&(i.handleEvent=In(i.handleEvent,{mechanism:{data:{handler:Nt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Bv(this,s,i),o.apply(this,[s,In(i,{mechanism:{data:{handler:Nt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Re(r,"removeEventListener",function(o){return function(s,i,a){try{const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}catch{}return o.call(this,s,i,a)}}))}function $v(e){return typeof e.handleEvent=="function"}function Bv(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Uv=()=>({name:"BrowserSession",setupOnce(){if(typeof O.document>"u"){A&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}nc({ignoreDuration:!0}),rc(),is(({from:e,to:t})=>{e!==void 0&&e!==t&&(nc({ignoreDuration:!0}),rc())})}}),Hv="GlobalHandlers",Wv=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Hv,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(zv(n),yu("onerror")),t.onunhandledrejection&&(qv(n),yu("onunhandledrejection"))}}}),jv=Wv;function zv(e){Pl(t=>{const{stackParser:n,attachStacktrace:r}=uf();if(P()!==e||Bd())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Gv(rs(n,c||o,void 0,r,!1),s,i,a);u.level="error",lr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function qv(e){Ll(t=>{const{stackParser:n,attachStacktrace:r}=uf();if(P()!==e||Bd())return;const o=af(t),s=Ot(o)?cf(o):rs(n,o,void 0,r,!0);s.level="error",lr(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function af(e){if(Ot(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function cf(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Gv(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=Vv(t)??nn();return c.length===0&&c.push({colno:u,filename:l,function:mt,in_app:!0,lineno:d}),e}function yu(e){A&&_.log(`Global Handler attached: ${e}`)}function uf(){return P()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Vv(e){if(!(!Gt(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e.slice(0,1024)}}const Jv=()=>({name:"HttpContext",preprocessEvent(e){if(!O.navigator&&!O.location&&!O.document)return;const t=ha(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),Yv="cause",Kv=5,Xv="LinkedErrors",Qv=((e={})=>{const t=e.limit||Kv,n=e.key||Yv;return{name:Xv,preprocessEvent(r,o,s){const i=s.getOptions();mg(ma,i.stackParser,n,t,r,o)}}}),Zv=Qv;function eT(){return tT()?(A&&ur(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function tT(){if(typeof O.window>"u")return!1;const e=O;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=nn(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(O===O.top&&r.some(s=>n.startsWith(`${s}://`)))}function nT(e){return[ag(),rg(),Pv(),Tv(),jv(),Zv(),wg(),Jv(),Uv()]}function rT(e={}){const t=!e.skipBrowserExtensionCheck&&eT(),n={...e,enabled:t?!1:e.enabled,stackParser:ph(e.stackParser||Sv),integrations:um({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?nT():e.defaultIntegrations}),transport:e.transport||of};return Pm(Nb,n)}function k1(){}function R1(e){e()}function Su(e={}){const t=O.document,n=t?.head||t?.body;if(!n){A&&_.error("[showReportDialog] Global document not defined");return}const r=J(),s=P()?.getDsn();if(!s){A&&_.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||hh()},a=O.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=am(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{O.removeEventListener("message",d)}};O.addEventListener("message",d)}n.appendChild(a)}const oT=Y,sT="ReportingObserver",bu=new WeakMap,iT=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(bu.has(P()))for(const o of r)We(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}Ys(`${i}: ${a}`)})}return{name:sT,setupOnce(){if(!Vy())return;new oT.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){bu.set(r,!0)}}}),C1=iT,aT="HttpClient",cT=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:aT,setup(n){gT(n,t),_T(n,t)}}}),A1=cT;function uT(e,t,n,r,o){if(df(e,n.status,n.url)){const s=yT(t,r);let i,a,c,u;pf()&&([i,c]=Eu("Cookie",s),[a,u]=Eu("Set-Cookie",n));const d=ff({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});lr(d)}}function Eu(e,t){const n=fT(t.headers);let r;try{const o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=lf(o))}catch{}return[n,r]}function lT(e,t,n,r,o){if(df(e,t.status,t.responseURL)){let s,i,a;if(pf()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(i=lf(u))}catch{}try{a=pT(t)}catch{}s=r}const c=ff({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});lr(c)}}function dT(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function lf(e){return e.split("; ").reduce((t,n)=>{const[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function fT(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function pT(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
491
- `).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function hT(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function mT(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function gT(e,t){wd()&&ca(n=>{if(P()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&uT(t,a,r,c,s||i)},!1)}function _T(e,t){"XMLHttpRequest"in Y&&Ia(n=>{if(P()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[ft];if(!i)return;const{method:a,request_headers:c}=i;try{lT(t,s,a,c,r||o)}catch(u){A&&_.warn("Error while extracting response event form XHR response",u)}})}function df(e,t,n){return mT(e.failedRequestStatusCodes,t)&&hT(e.failedRequestTargets,n)&&!rd(n,P())}function ff(e){const t=P(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:dT(e.responseHeaders)}}};return Pt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function yT(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function pf(){const e=P();return e?!!e.getOptions().sendDefaultPii:!1}const $s=Y,ST=7,bT="ContextLines",ET=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:ST;return{name:bT,processEvent(n){return vT(n,t)}}}),x1=ET;function vT(e,t){const n=$s.document,r=$s.location&&nd($s.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(`
492
- `),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>TT(u,i,r,t)))}),e}function TT(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||mh(t,e,r),e}const wT="GraphQLClient",IT=(e=>({name:wT,setup(t){kT(t,e),RT(t,e)}}));function kT(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=B(n).data||{};if(!(s[ve]==="http.client"))return;const c=s[gh]||s["http.url"],u=s[_h]||s["http.method"];if(!Gt(c)||!Gt(u))return;const{endpoints:d}=t,l=Qe(c,d),p=mf(r);if(l&&p){const f=gf(p);if(f){const h=hf(f);n.updateName(`${u} ${c} (${h})`),n.setAttribute("graphql.document",p)}}})}function RT(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const d=i?.url,{endpoints:l}=t,p=Qe(d,l),f=mf(r);if(p&&i&&f){const h=gf(f);if(!i.graphql&&h){const m=hf(h);i["graphql.document"]=h.query,i["graphql.operation"]=m}}}})}function hf(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=CT(t);return r?`${o} ${r}`:`${o}`}function mf(e){const t="xhr"in e;let n;if(t){const r=e.xhr[ft];n=r&&No(r.body)[0]}else{const r=ka(e.input);n=No(r)[0]}return n}function CT(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function gf(e){let t;try{const n=JSON.parse(e);n.query&&(t=n)}finally{return t}}const M1=IT,le=Y,Ra="sentryReplaySession",AT="replay_event",Ca="Unable to send Replay",xT=3e5,MT=9e5,NT=5e3,OT=5500,PT=6e4,LT=5e3,DT=3,vu=15e4,Ur=5e3,FT=3e3,$T=300,Aa=2e7,BT=4999,UT=15e3,Tu=36e5;var HT=Object.defineProperty,WT=(e,t,n)=>t in e?HT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wu=(e,t,n)=>WT(e,typeof t!="symbol"?t+"":t,n),be=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(be||{});function jT(e){return e.nodeType===e.ELEMENT_NODE}function Jn(e){return e?.host?.shadowRoot===e}function Yn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function zT(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function qT(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Oo(e){try{const t=e.rules||e.cssRules;return t?zT(Array.from(t,_f).join("")):null}catch{return null}}function GT(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function _f(e){let t;if(JT(e))try{t=Oo(e.styleSheet)||qT(e)}catch{}else if(YT(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=GT(e)),r&&(n=VT(n)),r||o)return n}return t||e.cssText}function VT(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function JT(e){return"styleSheet"in e}function YT(e){return"selectorText"in e}let yf=class{constructor(){wu(this,"idNodeMap",new Map),wu(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function KT(){return new yf}function as({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function tr({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Rn(e){return e.toLowerCase()}function gi(e){return e.toUpperCase()}const Iu="__rrweb_original__";function XT(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=Iu in s?s[Iu]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function xa(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Rn(t):null}function Po(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Sf(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const ku={};function bf(e){const t=ku[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return ku[e]=r.bind(window)}function _i(...e){return bf("setTimeout")(...e)}function Ef(...e){return bf("clearTimeout")(...e)}function vf(e){try{return e.contentDocument}catch{}}let QT=1;const ZT=new RegExp("[^a-z0-9-_:]"),nr=-2;function Ma(){return QT++}function e0(e){if(e instanceof HTMLFormElement)return"form";const t=Rn(e.tagName);return ZT.test(t)?"div":t}function t0(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let cn,Ru;const n0=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,r0=/^(?:[a-z+]+:)?\/\//i,o0=/^www\..*/i,s0=/^(data:)([^,]*),(.*)/i;function Lo(e,t){return(e||"").replace(n0,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(r0.test(c)||o0.test(c))return`url(${u}${c}${u})`;if(s0.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${t0(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const i0=/^[^ \t\n\r\u000c]+/,a0=/^[, \t\n\r\u000c]+/;function c0(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(a0),!(n>=t.length);){let s=r(i0);if(s.slice(-1)===",")s=fn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=fn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const Cu=new WeakMap;function fn(e,t){return!t||t.trim()===""?t:cs(e,t)}function u0(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function cs(e,t){let n=Cu.get(e);if(n||(n=e.createElement("a"),Cu.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Tf(e,t,n,r,o,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?fn(e,r):n==="srcset"?c0(e,r):n==="style"?Lo(r,cs(e)):t==="object"&&n==="data"?fn(e,r):typeof s=="function"?s(n,r,o):r)}function wf(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function l0(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function d0(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function zt(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:zt(e.parentNode,t,n,r+1)}function pn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(d0(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Cn(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=zt(i,pn(r,o)),c<0)return!0;a=zt(i,pn(t,n),c>=0?c:1/0)}else{if(a=zt(i,pn(t,n)),a<0)return!1;c=zt(i,pn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function f0(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=_i(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Ef(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return _i(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function p0(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=_i(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ef(s),r=!0,t()})}function h0(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:I,keepIframeSrcFn:v,newlyAddedElement:S=!1}=t,w=m0(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:be.Document,childNodes:[],compatMode:e.compatMode}:{type:be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return _0(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:I,keepIframeSrcFn:v,newlyAddedElement:S,rootId:w,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case e.TEXT_NODE:return g0(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:w});case e.CDATA_SECTION_NODE:return{type:be.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:be.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function m0(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function g0(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Oo(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=Lo(p,cs(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const g=Cn(e,r,s,o,i,n);if(!f&&!h&&!m&&p&&g&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||g)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const y=as({type:null,tagName:l,maskInputOptions:c});p=tr({isMasked:Cn(e,r,s,o,i,y),element:e,value:p,maskInputFn:u})}return{type:be.Text,textContent:p||"",isStyle:f,rootId:d}}function _0(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:I}=t,v=l0(e,r,o,s),S=e0(e);let w={};const E=e.attributes.length;for(let T=0;T<E;T++){const C=e.attributes[T];C.name&&!wf(S,C.name,C.value)&&(w[C.name]=Tf(n,S,Rn(C.name),C.value,e,c))}if(S==="link"&&i){const T=Array.from(n.styleSheets).find(F=>F.href===e.href);let C=null;T&&(C=Oo(T)),C&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=Lo(C,T.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const T=Oo(e.sheet);T&&(w._cssText=Lo(T,cs(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const T=e,C=xa(T),F=Po(T,gi(S),C),R=T.checked;if(C!=="submit"&&C!=="button"&&F){const x=Cn(T,g,b,y,I,as({type:C,tagName:gi(S),maskInputOptions:a}));w.value=tr({isMasked:x,element:T,value:F,maskInputFn:u})}R&&(w.checked=R)}if(S==="option"&&(e.selected&&!a.select?w.selected=!0:delete w.selected),S==="canvas"&&p){if(e.__context==="2d")XT(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const T=e.toDataURL(d.type,d.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const F=C.toDataURL(d.type,d.quality);T!==F&&(w.rr_dataURL=T)}}if(S==="img"&&l){cn||(cn=n.createElement("canvas"),Ru=cn.getContext("2d"));const T=e,C=T.currentSrc||T.getAttribute("src")||"<unknown-src>",F=T.crossOrigin,R=()=>{T.removeEventListener("load",R);try{cn.width=T.naturalWidth,cn.height=T.naturalHeight,Ru.drawImage(T,0,0),w.rr_dataURL=cn.toDataURL(d.type,d.quality)}catch(x){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?R():T.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${x}`)}T.crossOrigin==="anonymous"&&(F?w.crossOrigin=F:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?R():T.addEventListener("load",R)}if((S==="audio"||S==="video")&&(w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),v){const{width:T,height:C}=e.getBoundingClientRect();w={class:w.class,rr_width:`${T}px`,rr_height:`${C}px`}}S==="iframe"&&!f(w.src)&&(!v&&!vf(e)&&(w.rr_src=w.src),delete w.src);let k;try{customElements.get(S)&&(k=!0)}catch{}return{type:be.Element,tagName:S,attributes:w,childNodes:[],isSVG:u0(e)||void 0,needBlock:v,rootId:m,isCustom:k}}function ue(e){return e==null?"":e.toLowerCase()}function y0(e,t){if(t.comment&&e.type===be.Comment)return!0;if(e.type===be.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Sf(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ue(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ue(e.attributes.name)==="application-name"||ue(e.attributes.rel)==="icon"||ue(e.attributes.rel)==="apple-touch-icon"||ue(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ue(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ue(e.attributes.property).match(/^(og|twitter|fb):/)||ue(e.attributes.name).match(/^(og|twitter):/)||ue(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ue(e.attributes.name)==="robots"||ue(e.attributes.name)==="googlebot"||ue(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ue(e.attributes.name)==="author"||ue(e.attributes.name)==="generator"||ue(e.attributes.name)==="framework"||ue(e.attributes.name)==="publisher"||ue(e.attributes.name)==="progid"||ue(e.attributes.property).match(/^article:/)||ue(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ue(e.attributes.name)==="google-site-verification"||ue(e.attributes.name)==="yandex-verification"||ue(e.attributes.name)==="csrf-token"||ue(e.attributes.name)==="p:domain_verify"||ue(e.attributes.name)==="verify-v1"||ue(e.attributes.name)==="verification"||ue(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function hn(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:I={},inlineImages:v=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:k=5e3,onBlockedImageLoad:T,onStylesheetLoad:C,stylesheetLoadTimeout:F=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:x=!1}=t;let{preserveWhiteSpace:z=!0}=t;const X=h0(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:I,inlineImages:v,recordCanvas:S,keepIframeSrcFn:R,newlyAddedElement:x});if(!X)return console.warn(e,"not serialized"),null;let Q;r.hasNode(e)?Q=r.getId(e):y0(X,b)||!z&&X.type===be.Text&&!X.isStyle&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?Q=nr:Q=Ma();const $=Object.assign(X,{id:Q});if(r.add(e,$),Q===nr)return null;w&&w(e);let L=!p;if($.type===be.Element){L=L&&!$.needBlock;const D=e.shadowRoot;D&&Yn(D)&&($.isShadowHost=!0)}if(($.type===be.Document||$.type===be.Element)&&L){b.headWhitespace&&$.type===be.Element&&$.tagName==="head"&&(z=!1);const D={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:I,inlineImages:v,recordCanvas:S,preserveWhiteSpace:z,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:k,onBlockedImageLoad:T,onStylesheetLoad:C,stylesheetLoadTimeout:F,keepIframeSrcFn:R},M=e.childNodes?Array.from(e.childNodes):[];for(const V of M){const se=hn(V,D);se&&$.childNodes.push(se)}if(jT(e)&&e.shadowRoot)for(const V of Array.from(e.shadowRoot.childNodes)){const se=hn(V,D);se&&(Yn(e.shadowRoot)&&(se.isShadow=!0),$.childNodes.push(se))}}if(e.parentNode&&Jn(e.parentNode)&&Yn(e.parentNode)&&($.isShadow=!0),$.type===be.Element&&$.tagName==="iframe"&&!$.needBlock&&f0(e,()=>{const D=vf(e);if(D&&E){const M=hn(D,{doc:D,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:I,inlineImages:v,recordCanvas:S,preserveWhiteSpace:z,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:C,stylesheetLoadTimeout:F,keepIframeSrcFn:R});M&&E(e,M)}},k),$.type===be.Element&&$.tagName==="img"&&!e.complete&&$.needBlock){const D=e,M=()=>{if(D.isConnected&&!D.complete&&T)try{const V=D.getBoundingClientRect();V.width>0&&V.height>0&&T(D,$,V)}catch{}D.removeEventListener("load",M)};D.isConnected&&D.addEventListener("load",M)}return $.type===be.Element&&$.tagName==="link"&&typeof $.attributes.rel=="string"&&($.attributes.rel==="stylesheet"||$.attributes.rel==="preload"&&typeof $.attributes.href=="string"&&Sf($.attributes.href)==="css")&&p0(e,()=>{if(C){const D=hn(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:I,inlineImages:v,recordCanvas:S,preserveWhiteSpace:z,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:C,stylesheetLoadTimeout:F,keepIframeSrcFn:R});D&&C(e,D)}},F),$.type===be.Element&&delete $.needBlock,$}function S0(e,t){const{mirror:n=new yf,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:b=!1,dataURLOptions:I,preserveWhiteSpace:v,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E,onBlockedImageLoad:k,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:F=()=>!1}=t||{};return hn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:I,inlineImages:p,recordCanvas:f,preserveWhiteSpace:v,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E,onBlockedImageLoad:k,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:F,newlyAddedElement:!1})}function Le(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const un=`Please stop import mirror directly. Instead of that,\r
493
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
494
- or you can use record.mirror to access the mirror instance during recording.`;let Au={map:{},getId(){return console.error(un),-1},getNode(){return console.error(un),null},removeNodeFromMap(){console.error(un)},has(){return console.error(un),!1},reset(){console.error(un)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Au=new Proxy(Au,{get(e,t,n){return t==="map"&&console.error(un),Reflect.get(e,t,n)}}));function rr(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(k0(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=us(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function If(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){us(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>If(e,t,s||{},!0)}function Na(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let Do=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Do=()=>new Date().getTime());function kf(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Rf(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Cf(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Af(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Be(e,t,n,r,o){if(!e)return!1;const s=Af(e);if(!s)return!1;const i=pn(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=zt(s,i);let c=-1;return a<0?!1:(r&&(c=zt(s,pn(null,r))),a>-1&&c<0?!0:a<c)}function b0(e,t){return t.getId(e)!==-1}function Bs(e,t){return t.getId(e)===nr}function xf(e,t){if(Jn(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?xf(e.parentNode,t):!0:!0}function yi(e){return!!e.changedTouches}function E0(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Mf(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Nf(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Si(e){return!!e?.shadowRoot}class v0{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Of(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function T0(e){let t=e,n;for(;n=Of(t);)t=n;return t}function w0(e){const t=e.ownerDocument;if(!t)return!1;const n=T0(e);return t.contains(n)}function Pf(e){const t=e.ownerDocument;return t?t.contains(e)||w0(e):!1}const xu={};function Oa(e){const t=xu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return xu[e]=r.bind(window)}function I0(...e){return Oa("requestAnimationFrame")(...e)}function us(...e){return Oa("setTimeout")(...e)}function k0(...e){return Oa("clearTimeout")(...e)}var q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(q||{}),W=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(W||{}),Pe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Pe||{}),dt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(dt||{}),ln=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(ln||{});function Pa(e){try{return e.contentDocument}catch{}}function R0(e){try{return e.contentWindow}catch{}}function Mu(e){return"__ln"in e}class C0{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Mu(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Mu(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Nu=(e,t)=>`${e}@${t}`;class A0{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new C0,o=c=>{let u=c,d=nr;for(;d===nr;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!Pf(c))return;const u=Jn(c.parentNode)?this.mirror.getId(Of(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=hn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Mf(p,this.mirror)&&!Be(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),Nf(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Si(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{Be(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,f),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Ou(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!Pu(this.droppedSet,c)&&!Ou(this.removes,c,this.mirror)||Pu(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Bs(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Cn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Af(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=xa(n),a=n.tagName;o=Po(n,a,i);const c=as({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Cn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=tr({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!Pa(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!wf(n.tagName,r)&&(s.attributes[r]=Tf(this.doc,Rn(n.tagName),Rn(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==i.style.getPropertyValue(a)||u!==i.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Jn(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Be(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Bs(n,this.mirror)||!b0(n,this.mirror)||(this.addedSet.has(n)?(bi(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||xf(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Nu(r,o)]?bi(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Jn(t.target)&&Yn(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Bs(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Nu(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Be(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Si(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function bi(e,t){e.delete(t),t.childNodes?.forEach(n=>bi(e,n))}function Ou(e,t,n){return e.length===0?!1:x0(e,t,n)}function x0(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function Pu(e,t){return e.size===0?!1:Lf(e,t)}function Lf(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Lf(e,n):!1}let Kn;function M0(e){Kn=e}function N0(){Kn=void 0}const te=e=>Kn?(...n)=>{try{return e(...n)}catch(r){if(Kn&&Kn(r)===!0)return()=>{};throw r}}:e,mn=[];function Tr(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Df(e,t){const n=new A0;mn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(te(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function O0({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=rr(te(l=>{const p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),l),i=[],a=null}),s),u=te(rr(te(l=>{const p=Tr(l),{clientX:f,clientY:h}=yi(l)?l.changedTouches[0]:l;a||(a=Do()),i.push({x:f,y:h,id:r.getId(p),timeOffset:Do()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?W.Drag:l instanceof MouseEvent?W.MouseMove:W.TouchMove)}),o,{trailing:!1})),d=[Le("mousemove",u,n),Le("touchmove",u,n),Le("drag",u,n)];return te(()=>{d.forEach(l=>l())})}function P0({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>p=>{const f=Tr(p);if(Be(f,r,o,s,!0))return;let h=null,m=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=dt.Mouse;break;case"touch":h=dt.Touch;break;case"pen":h=dt.Pen;break}h===dt.Touch?Pe[l]===Pe.MouseDown?m="TouchStart":Pe[l]===Pe.MouseUp&&(m="TouchEnd"):dt.Pen}else yi(p)&&(h=dt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===dt.Touch||m.startsWith("Mouse")&&h===dt.Mouse)&&(h=null)):Pe[l]===Pe.Click&&(h=u,u=null);const g=yi(p)?p.changedTouches[0]:p;if(!g)return;const y=n.getId(f),{clientX:b,clientY:I}=g;te(e)({type:Pe[m],id:y,x:b,y:I,...h!==null&&{pointerType:h}})};return Object.keys(Pe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=Rn(l);const f=d(l);if(window.PointerEvent)switch(Pe[l]){case Pe.MouseDown:case Pe.MouseUp:p=p.replace("mouse","pointer");break;case Pe.TouchStart:case Pe.TouchEnd:return}c.push(Le(p,f,t))}),te(()=>{c.forEach(l=>l())})}function Ff({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=te(rr(te(c=>{const u=Tr(c);if(!u||Be(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=kf(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Le("scroll",a,t)}function L0({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=te(rr(te(()=>{const s=Rf(),i=Cf();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return Le("resize",o,t)}const D0=["INPUT","TEXTAREA","SELECT"],Lu=new WeakMap;function F0({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function g(E){let k=Tr(E);const T=E.isTrusted,C=k&&gi(k.tagName);if(C==="OPTION"&&(k=k.parentElement),!k||!C||D0.indexOf(C)<0||Be(k,r,o,s,!0))return;const F=k;if(F.classList.contains(i)||a&&F.matches(a))return;const R=xa(k);let x=Po(F,C,R),z=!1;const X=as({maskInputOptions:c,tagName:C,type:R}),Q=Cn(k,p,h,f,m,X);(R==="radio"||R==="checkbox")&&(z=k.checked),x=tr({isMasked:Q,element:k,value:x,maskInputFn:u}),y(k,l?{text:x,isChecked:z,userTriggered:T}:{text:x,isChecked:z});const $=k.name;R==="radio"&&$&&z&&t.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(L=>{if(L!==k){const D=tr({isMasked:Q,element:L,value:Po(L,C,R),maskInputFn:u});y(L,l?{text:D,isChecked:!z,userTriggered:!1}:{text:D,isChecked:!z})}})}function y(E,k){const T=Lu.get(E);if(!T||T.text!==k.text||T.isChecked!==k.isChecked){Lu.set(E,k);const C=n.getId(E);te(e)({...k,id:C})}}const I=(d.input==="last"?["change"]:["input","change"]).map(E=>Le(E,te(g),t)),v=t.defaultView;if(!v)return()=>{I.forEach(E=>E())};const S=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),w=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&I.push(...w.map(E=>If(E[0],E[1],{set(){te(g)({target:this,isTrusted:!1})}},!1,v))),te(()=>{I.forEach(E=>E())})}function Fo(e){const t=[];function n(r,o){if(Hr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Hr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Hr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Hr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function vt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function $0({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:te((d,l,p)=>{const[f,h]=p,{id:m,styleId:g}=vt(l,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:te((d,l,p)=>{const[f]=p,{id:h,styleId:m}=vt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:f}]}),d.apply(l,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:te((d,l,p)=>{const[f]=p,{id:h,styleId:m}=vt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:f}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:te((d,l,p)=>{const[f]=p,{id:h,styleId:m}=vt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:f}),d.apply(l,p)})}));const c={};Wr("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Wr("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Wr("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Wr("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:te((p,f,h)=>{const[m,g]=h,{id:y,styleId:b}=vt(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||b&&b!==-1)&&e({id:y,styleId:b,adds:[{rule:m,index:[...Fo(f),g||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:te((p,f,h)=>{const[m]=h,{id:g,styleId:y}=vt(f.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...Fo(f),m]}]}),p.apply(f,h)})})}),te(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function $f({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),te(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function B0({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:te((a,c,u)=>{const[d,l,p]=u;if(n.has(d))return s.apply(c,[d,l,p]);const{id:f,styleId:h}=vt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:l,priority:p},index:Fo(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:te((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:p}=vt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:Fo(c.parentRule)}),a.apply(c,u)})}),te(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function U0({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=te(u=>rr(te(d=>{const l=Tr(d);if(!l||Be(l,t,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:p,volume:f,muted:h,playbackRate:m})}),s.media||500)),c=[Le("play",a(ln.Play),i),Le("pause",a(ln.Pause),i),Le("seeked",a(ln.Seeked),i),Le("volumechange",a(ln.VolumeChange),i),Le("ratechange",a(ln.RateChange),i)];return te(()=>{c.forEach(u=>u())})}function H0({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){const l=new s(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Na(t.fonts,"add",function(a){return function(c){return us(te(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),te(()=>{r.forEach(a=>a())})}function W0(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=te(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:m,endContainer:g,endOffset:y}=f;Be(h,r,o,s,!0)||Be(g,r,o,s,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(g),endOffset:y})}i({ranges:d})});return c(),Le("selectionchange",c)}function j0({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Na(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function z0(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Df(e,e.doc));const o=O0(e),s=P0(e),i=Ff(e),a=L0(e,{win:n}),c=F0(e),u=U0(e);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=$0(e,{win:n}),l=$f(e,e.doc),p=B0(e,{win:n}),e.collectFonts&&(f=H0(e)));const h=W0(e),m=j0(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return te(()=>{mn.forEach(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),p(),f(),h(),m(),g.forEach(y=>y())})}function Hr(e){return typeof window[e]<"u"}function Wr(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ei{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class q0{constructor(){this.crossOriginIframeMirror=new Ei(Ma),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class G0{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ei(Ma),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ei(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Pa(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:q.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return n;case q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case q.IncrementalSnapshot:switch(n.data.source){case W.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.Drag:case W.TouchMove:case W.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(n.data,t,["id"]),n;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case W.Font:return n;case W.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case W.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==be.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class V0{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class J0{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Yn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Df({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ff({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),us(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push($f({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Pa(t),r=R0(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Na(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&Pf(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Y0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var jr=0;jr<Du.length;jr++)Y0[Du.charCodeAt(jr)]=jr;class Fu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class K0{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new v0,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:_f(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class X0{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,I0(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let _e,$o;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ve=KT();function pt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:I,maskTextFn:v,maxCanvasSize:S=null,packFn:w,sampling:E={},dataURLOptions:k={},mousemoveWait:T,recordDOM:C=!0,recordCanvas:F=!1,recordCrossOriginIframes:R=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:z=!1,collectFonts:X=!1,inlineImages:Q=!1,plugins:$,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:M,onMutation:V,getCanvasManager:se}=e;M0(M);const de=R?window.parent===window:!0;let Se=!1;if(!de)try{window.parent.document&&(Se=!1)}catch{Se=!0}if(de&&!t)throw new Error("emit function is required");if(!de&&!Se)return()=>{};T!==void 0&&E.mousemove===void 0&&(E.mousemove=T),Ve.reset();const Ne=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},St=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};E0();let Oe,De=0;const nt=Z=>{for(const $e of $||[])$e.eventProcessor&&(Z=$e.eventProcessor(Z));return w&&!Se&&(Z=w(Z)),Z};_e=(Z,$e)=>{const ee=Z;if(ee.timestamp=Do(),mn[0]?.isFrozen()&&ee.type!==q.FullSnapshot&&!(ee.type===q.IncrementalSnapshot&&ee.data.source===W.Mutation)&&mn.forEach(ke=>ke.unfreeze()),de)t?.(nt(ee),$e);else if(Se){const ke={type:"rrweb",event:nt(ee),origin:window.location.origin,isCheckout:$e};window.parent.postMessage(ke,"*")}if(ee.type===q.FullSnapshot)Oe=ee,De=0;else if(ee.type===q.IncrementalSnapshot){if(ee.data.source===W.Mutation&&ee.data.isAttachIframe)return;De++;const ke=r&&De>=r,ne=n&&Oe&&ee.timestamp-Oe.timestamp>n;(ke||ne)&&rt(!0)}};const bt=Z=>{_e({type:q.IncrementalSnapshot,data:{source:W.Mutation,...Z}})},Bn=Z=>_e({type:q.IncrementalSnapshot,data:{source:W.Scroll,...Z}}),xr=Z=>_e({type:q.IncrementalSnapshot,data:{source:W.CanvasMutation,...Z}}),Un=Z=>_e({type:q.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...Z}}),oe=new K0({mutationCb:bt,adoptedStyleSheetCb:Un}),pe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new q0:new G0({mirror:Ve,mutationCb:bt,stylesheetManager:oe,recordCrossOriginIframes:R,wrappedEmit:_e});for(const Z of $||[])Z.getMirror&&Z.getMirror({nodeMirror:Ve,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror});const je=new X0,Ie=Z0(se,{mirror:Ve,win:window,mutationCb:Z=>_e({type:q.IncrementalSnapshot,data:{source:W.CanvasMutation,...Z}}),recordCanvas:F,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:E.canvas,dataURLOptions:k,errorHandler:M}),Ae=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new V0:new J0({mutationCb:bt,scrollCb:Bn,bypassOptions:{onMutation:V,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:Ne,dataURLOptions:k,maskAttributeFn:b,maskTextFn:v,maskInputFn:I,recordCanvas:F,inlineImages:Q,sampling:E,slimDOMOptions:St,iframeManager:pe,stylesheetManager:oe,canvasManager:Ie,keepIframeSrcFn:L,processedNodeManager:je},mirror:Ve}),rt=(Z=!1)=>{if(!C)return;_e({type:q.Meta,data:{href:window.location.href,width:Cf(),height:Rf()}},Z),oe.reset(),Ae.init(),mn.forEach(ee=>ee.lock());const $e=S0(document,{mirror:Ve,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:Ne,maskAttributeFn:b,maskInputFn:I,maskTextFn:v,slimDOM:St,dataURLOptions:k,recordCanvas:F,inlineImages:Q,onSerialize:ee=>{Mf(ee,Ve)&&pe.addIframe(ee),Nf(ee,Ve)&&oe.trackLinkElement(ee),Si(ee)&&Ae.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,ke)=>{pe.attachIframe(ee,ke),ee.contentWindow&&Ie.addWindow(ee.contentWindow),Ae.observeAttachShadow(ee)},onStylesheetLoad:(ee,ke)=>{oe.attachLinkElement(ee,ke)},onBlockedImageLoad:(ee,ke,{width:ne,height:Hn})=>{bt({adds:[],removes:[],texts:[],attributes:[{id:ke.id,attributes:{style:{width:`${ne}px`,height:`${Hn}px`}}}]})},keepIframeSrcFn:L});if(!$e)return console.warn("Failed to snapshot the document");_e({type:q.FullSnapshot,data:{node:$e,initialOffset:kf(window)}}),mn.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&oe.adoptStyleSheets(document.adoptedStyleSheets,Ve.getId(document))};$o=rt;try{const Z=[],$e=ke=>te(z0)({onMutation:V,mutationCb:bt,mousemoveCb:(ne,Hn)=>_e({type:q.IncrementalSnapshot,data:{source:Hn,positions:ne}}),mouseInteractionCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.MouseInteraction,...ne}}),scrollCb:Bn,viewportResizeCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.ViewportResize,...ne}}),inputCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.Input,...ne}}),mediaInteractionCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.MediaInteraction,...ne}}),styleSheetRuleCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.StyleSheetRule,...ne}}),styleDeclarationCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.StyleDeclaration,...ne}}),canvasMutationCb:xr,fontCb:ne=>_e({type:q.IncrementalSnapshot,data:{source:W.Font,...ne}}),selectionCb:ne=>{_e({type:q.IncrementalSnapshot,data:{source:W.Selection,...ne}})},customElementCb:ne=>{_e({type:q.IncrementalSnapshot,data:{source:W.CustomElement,...ne}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:Ne,inlineStylesheet:h,sampling:E,recordDOM:C,recordCanvas:F,inlineImages:Q,userTriggeredOnInput:z,collectFonts:X,doc:ke,maskAttributeFn:b,maskInputFn:I,maskTextFn:v,keepIframeSrcFn:L,blockSelector:s,unblockSelector:i,slimDOMOptions:St,dataURLOptions:k,mirror:Ve,iframeManager:pe,stylesheetManager:oe,shadowDomManager:Ae,processedNodeManager:je,canvasManager:Ie,ignoreCSSAttributes:D,plugins:$?.filter(ne=>ne.observer)?.map(ne=>({observer:ne.observer,options:ne.options,callback:Hn=>_e({type:q.Plugin,data:{plugin:ne.name,payload:Hn}})}))||[]},{});pe.addLoadListener(ke=>{try{Z.push($e(ke.contentDocument))}catch(ne){console.warn(ne)}});const ee=()=>{rt(),Z.push($e(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(Z.push(Le("DOMContentLoaded",()=>{_e({type:q.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&ee()})),Z.push(Le("load",()=>{_e({type:q.Load,data:{}}),x==="load"&&ee()},window))),()=>{Z.forEach(ke=>ke()),je.destroy(),$o=void 0,N0()}}catch(Z){console.warn(Z)}}function Q0(e){if(!$o)throw new Error("please take full snapshot after start recording");$o(e)}pt.mirror=Ve;pt.takeFullSnapshot=Q0;function Z0(e,t){try{return e?e(t):new Fu}catch{return console.warn("Unable to initialize CanvasManager"),new Fu}}var $u;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})($u||($u={}));const ew=3,tw=5;function La(e){return e>9999999999?e:e*1e3}function Us(e){return e>9999999999?e/1e3:e}function wr(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ir(t,10,1e3)}}),t.category==="console")))}const nw="button,a";function Bf(e){return e.closest(nw)||e}function Uf(e){const t=Hf(e);return!t||!(t instanceof Element)?t:Bf(t)}function Hf(e){return rw(e)?e.target:e}function rw(e){return typeof e=="object"&&!!e&&"target"in e}let Tt;function ow(e){return Tt||(Tt=[],sw()),Tt.push(e),()=>{const t=Tt?Tt.indexOf(e):-1;t>-1&&Tt.splice(t,1)}}function sw(){Re(le,"open",function(e){return function(...t){if(Tt)try{Tt.forEach(n=>n())}catch{}return e.apply(le,t)}})}const iw=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function aw(e,t,n){e.handleClick(t,n)}class cw{constructor(t,n,r=wr){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=ow(()=>{this._lastMutation=Bu()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(lw(n,this._ignoreSelector)||!dw(t))return;const r={timestamp:Us(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Us(t)}registerScroll(t=Date.now()){this._lastScroll=Us(t)}registerClick(t){const n=Bf(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Bu();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:le.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:le.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=vr(()=>this._checkClicks(),1e3)}}const uw=["A","BUTTON","INPUT"];function lw(e,t){return!!(!uw.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function dw(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Bu(){return Date.now()/1e3}function fw(e,t){try{if(!pw(t))return;const{source:n}=t.data;if(iw.has(n)&&e.registerMutation(t.timestamp),n===W.Scroll&&e.registerScroll(t.timestamp),hw(t)){const{type:r,id:o}=t.data,s=pt.mirror.getNode(o);s instanceof HTMLElement&&r===Pe.Click&&e.registerClick(s)}}catch{}}function pw(e){return e.type===ew}function hw(e){return e.data.source===W.MouseInteraction}function st(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Da=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Da||{});const mw=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function gw(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(mw.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const _w=e=>t=>{if(!e.isEnabled())return;const n=yw(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&aw(e.clickDetector,n,Uf(t.event)),wr(e,n)};function Wf(e,t){const n=pt.mirror.getId(e),r=n&&pt.mirror.getNode(n),o=r&&pt.mirror.getMeta(r),s=o&&bw(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===Da.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:gw(s.attributes)}}:{}}}function yw(e){const{target:t,message:n}=Sw(e);return st({category:`ui.${e.name}`,...Wf(t,n)})}function Sw(e){const t=e.name==="click";let n,r=null;try{r=t?Uf(e.event):Hf(e.event),n=He(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function bw(e){return e.type===Da.Element}function Ew(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=vw(t);n&&wr(e,n)}function vw(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||Tw(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=He(i,{maxStringLength:200})||"<unknown>",d=Wf(i,u);return st({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function Tw(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const ww={resource:Aw,paint:Rw,navigation:Cw};function Hs(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Iw(e){return e.map(kw).filter(Boolean)}function kw(e){const t=ww[e.entryType];return t?t(e):null}function An(e){return((Me()||le.performance.timeOrigin)+e)/1e3}function Rw(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=An(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function Cw(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:An(f),end:An(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:p}}}function Aw(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:An(s),end:An(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function xw(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Fa(e,"largest-contentful-paint",n)}function Mw(e){return e.sources!==void 0}function Nw(e){const t=[],n=[];for(const r of e.entries)if(Mw(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=pt.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Fa(e,"cumulative-layout-shift",n,t)}function Ow(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Fa(e,"interaction-to-next-paint",n)}function Fa(e,t,n,r){const o=e.value,s=e.rating,i=An(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>pt.mirror.getId(a)):void 0,attributions:r}}}function Pw(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(tn(o,n))}),r.push(va(Hs(xw,e)),Ea(Hs(Nw,e)),Yd(Hs(Ow,e))),()=>{r.forEach(o=>o())}}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Lw='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Dw(){const e=new Blob([Lw]);return URL.createObjectURL(e)}const Uu=["log","warn","error"],io="[Replay] ";function Ws(e,t="info"){ct({category:"console",data:{logger:"replay"},level:t,message:`${io}${e}`},{level:t})}function Fw(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return U?(Uu.forEach(r=>{n[r]=(...o)=>{_[r](io,...o),t&&Ws(o.join(""),Ki(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(io,r),e?we(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Ws(r,"error")},n.infoTick=(...r)=>{_.log(io,...r),t&&setTimeout(()=>Ws(r[0]),0)}):Uu.forEach(r=>{n[r]=()=>{}}),n}const H=Fw();class $a extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Aa}.`)}}class jf{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Aa)throw new $a;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?La(t):null}}class $w{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){U&&H.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{const i=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",i),!c.success){U&&H.error("Error in compression worker: ",c.response),s(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Bw{constructor(t){this._worker=new $w(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=La(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Aa?Promise.reject(new $a):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{U&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Uw{constructor(t){this._fallback=new jf,this._compression=new Bw(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){U&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){U&&H.exception(s,"Failed to add events when switching buffers.")}}}function Hw({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ww(t);if(n)return n}return U&&H.log("Using simple buffer"),new jf}function Ww(e){try{const t=e||jw();if(!t)return;U&&H.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Uw(n)}catch(t){U&&H.exception(t,"Failed to create compression worker")}}function jw(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Dw():""}function Ba(){try{return"sessionStorage"in le&&!!le.sessionStorage}catch{return!1}}function zw(e){qw(),e.session=void 0}function qw(){if(Ba())try{le.sessionStorage.removeItem(Ra)}catch{}}function zf(e){return e===void 0?!1:Math.random()<e}function ls(e){if(Ba())try{le.sessionStorage.setItem(Ra,JSON.stringify(e))}catch{}}function qf(e){const t=Date.now(),n=e.id||Xe(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function Gw(e,t){return zf(e)?"session":t?"buffer":!1}function Hu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=Gw(e,t),s=qf({sampled:o,previousSessionId:r});return n&&ls(s),s}function Vw(){if(!Ba())return null;try{const e=le.sessionStorage.getItem(Ra);if(!e)return null;const t=JSON.parse(e);return U&&H.infoTick("Loading existing session"),qf(t)}catch{return null}}function vi(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Gf(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return vi(e.started,t,r)||vi(e.lastActivity,n,r)}function Vf(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Gf(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function js({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&Vw();return o?Vf(o,{sessionIdleExpire:e,maxReplayDuration:t})?(U&&H.infoTick("Session in sessionStorage is expired, creating new one..."),Hu(r,{previousSessionId:o.id})):o:(U&&H.infoTick("Creating new session"),Hu(r,{previousSessionId:n}))}function Jw(e){return e.type===q.Custom}function Ua(e,t,n){return Yf(e,t)?(Jf(e,t,n),!0):!1}function Yw(e,t,n){return Yf(e,t)?Jf(e,t,n):Promise.resolve(null)}async function Jf(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=Kw(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){const i=s&&s instanceof $a,a=i?"addEventSizeExceeded":"addEvent",c=P();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}function Yf(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=La(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(U&&H.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Kw(e,t){try{if(typeof t=="function"&&Jw(e))return t(e)}catch(n){return U&&H.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ha(e){return!e.type}function Ti(e){return e.type==="transaction"}function Xw(e){return e.type==="replay_event"}function Wu(e){return e.type==="feedback"}function Qw(e){return(t,n)=>{if(!e.isEnabled()||!Ha(t)&&!Ti(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ti(t)){Zw(e,t);return}eI(e,t)}}}function Zw(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function eI(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||vr(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function tI(e){return t=>{!e.isEnabled()||!Ha(t)||nI(e,t)}}function nI(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=st({category:"replay.hydrate-error",data:{url:nn()}});wr(e,r)}}function rI(e){const t=P();t&&t.on("beforeAddBreadcrumb",n=>oI(e,n))}function oI(e,t){if(!e.isEnabled()||!Kf(t))return;const n=sI(t);n&&wr(e,n)}function sI(e){return!Kf(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?iI(e):st(e)}function iI(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return st(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Ur?(n=!0,`${o.slice(0,Ur)}…`):o;if(typeof o=="object")try{const s=ir(o,7);return JSON.stringify(s).length>Ur?(n=!0,`${JSON.stringify(s,null,2).slice(0,Ur)}…`):s}catch{}return o});return st({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Kf(e){return!!e.category}function aI(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Xf(){const e=J().getPropagationContext().dsc;e&&delete e.replay_id;const t=ge();if(t){const n=ht(t);delete n.replay_id}}function cI(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:q.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function uI(e,t){return e.recordingMode!=="buffer"||t.message===Ca||!t.exception||t.type?!1:zf(e.getOptions().errorSampleRate)}function lI(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(Xw(t))return delete t.breadcrumbs,t;if(!Ha(t)&&!Ti(t)&&!Wu(t))return t;if(!e.checkAndHandleExpiredSession())return Xf(),t;if(Wu(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),cI(e,t),t;if(aI(t,n)&&!e.getOptions()._experiments.captureExceptions)return U&&H.log("Ignoring error from rrweb internals",t),null;const o=uI(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&ls(i)}return t},{id:"Replay"})}function ds(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:q.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function dI(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function fI(e){return t=>{if(!e.isEnabled())return;const n=dI(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ds(e,[n]),!1)))}}function pI(e,t){return U&&e.getOptions()._experiments.traceInternals?!1:rd(t,P())}function Qf(e,t){e.isEnabled()&&t!==null&&(pI(e,t.name)||e.addUpdate(()=>(ds(e,[t]),!0)))}function fs(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=nf(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Zf(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Bo(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function ep(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function or(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Rt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=hI(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function wi(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function hI(e){if(!e||typeof e!="string")return{body:e};const t=e.length>vu,n=mI(e);if(t){const r=e.slice(0,vu);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function mI(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Uo(e,t){const n=gI(e);return Qe(n,t)}function gI(e,t=le.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(le.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function _I(e,t,n){try{const r=await SI(e,t,n),o=ep("resource.fetch",r);Qf(n.replay,o)}catch(r){U&&H.exception(r,"Failed to capture fetch breadcrumb")}}function yI(e,t){const{input:n,response:r}=t,o=n?ka(n):void 0,s=fs(o),i=r?Zf(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function SI(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Uo(i,n.networkDetailAllowUrls)&&!Uo(i,n.networkDetailDenyUrls),p=l?bI(n,t.input,u):or(u),f=await EI(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:f}}function bI({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?wI(n,t):{};if(!e)return Rt(o,r,void 0);const s=ka(n),[i,a]=No(s,H),c=Rt(o,r,i);return a?Bo(c,a):c}async function EI(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return or(o);const s=r?tp(r.headers,n):{};if(!r||!t&&o!==void 0)return Rt(s,o,void 0);const[i,a]=await TI(r),c=vI(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Bo(c,a):c}function vI(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?fs(e):n;return r?t?Rt(o,s,e):Rt(o,s,void 0):or(s)}catch(s){return U&&H.exception(s,"Failed to serialize response body"),Rt(o,n,void 0)}}async function TI(e){const t=II(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await kI(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(U&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(U&&H.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function tp(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function wI(e,t){return e.length===1&&typeof e[0]!="string"?ju(e[0],t):e.length===2?ju(e[1],t):{}}function ju(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?tp(n,t):Array.isArray(n)?{}:wi(n,t):{}}function II(e){try{return e.clone()}catch(t){U&&H.exception(t,"Failed to clone response body")}}function kI(e){return new Promise((t,n)=>{const r=vr(()=>n(new Error("Timeout while trying to read response body")),500);RI(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function RI(e){return await e.text()}async function CI(e,t,n){try{const r=xI(e,t,n),o=ep("resource.xhr",r);Qf(n.replay,o)}catch(r){U&&H.exception(r,"Failed to capture xhr breadcrumb")}}function AI(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=fs(r),s=n.getResponseHeader("content-length")?Zf(n.getResponseHeader("content-length")):OI(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function xI(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Uo(c,n.networkDetailAllowUrls)||Uo(c,n.networkDetailDenyUrls)){const w=or(l),E=or(p);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:w,response:E}}const f=a[ft],h=f?wi(f.request_headers,n.networkRequestHeaders):{},m=wi(rf(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?No(i,H):[void 0],[b,I]=n.networkCaptureBodies?MI(a):[void 0],v=Rt(h,l,g),S=Rt(m,p,b);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:y?Bo(v,y):v,response:I?Bo(S,I):S}}function MI(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return NI(e.response,e.responseType)}catch(n){t.push(n)}return U&&H.warn("Failed to get xhr response body",...t),[void 0]}function NI(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return U&&H.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return U&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function OI(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return fs(n)}catch{return}}function PI(e){const t=P();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>LI(a,c,u))}catch{}}function LI(e,t,n){if(t.data)try{DI(t)&&$I(n)&&(AI(t,n),CI(t,n,e)),FI(t)&&BI(n)&&(yI(t,n),_I(t,n,e))}catch(r){U&&H.exception(r,"Error when enriching network breadcrumb")}}function DI(e){return e.category==="xhr"}function FI(e){return e.category==="fetch"}function $I(e){return e?.xhr}function BI(e){return e?.response}function UI(e){const t=P();tf(_w(e)),is(fI(e)),rI(e),PI(e);const n=lI(e);yh(n),t&&(t.on("beforeSendEvent",tI(e)),t.on("afterSendEvent",Qw(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const s=e.getSessionId();o?.includeReplay&&e.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function HI(e){try{return Promise.all(ds(e,[WI(le.performance.memory)]))}catch{return[]}}function WI(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function jI(e,t,n){return Zm(e,t,{...n,setTimeoutImpl:vr})}const zr=Y.navigator;function zI(){return/iPhone|iPad|iPod/i.test(zr?.userAgent??"")||/Macintosh/i.test(zr?.userAgent??"")&&zr?.maxTouchPoints&&zr?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function qI(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){U&&H.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,e.clickDetector&&fw(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Ua(e,n,o))return!0;if(!o)return!1;const s=e.session;if(VI(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(U&&H.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&ls(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function GI(e){const t=e.getOptions();return{type:q.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function VI(e,t){!t||!e.session||e.session.segmentId!==0||Ua(e,GI(e),!1)}function JI(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function YI(e,t,n,r){return tt(Dl(e,Vo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function KI({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
495
- `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function XI({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await Il(e.getOptions(),r,s,t,e,Dt());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function QI({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=KI({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=P(),p=J(),f=l?.getTransport(),h=l?.getDsn();if(!l||!f||!h||!s.sampled)return Promise.resolve({});const m={type:AT,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await XI({scope:p,client:l,replayId:t,event:m});if(!g)return l.recordDroppedEvent("event_processor","replay"),U&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const y=YI(g,i,h,l.getOptions().tunnel);let b;try{b=await f.send(y)}catch(v){const S=new Error(Ca);try{S.cause=v}catch{}throw S}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new np(b.statusCode);const I=ed({},b);if(Zl(I,"replay"))throw new Wa(I);return b}class np extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Wa extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function rp(e,t={count:0,interval:LT}){const{recordingData:n,onError:r}=e;if(n.length)try{return await QI(e),!0}catch(o){if(o instanceof np||o instanceof Wa)throw o;if(Ml("Replays",{_retryCount:t.count}),r&&r(o),t.count>=DT){const s=new Error(`${Ca} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{vr(async()=>{try{await rp(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const op="__THROTTLED",ZI="__SKIPPED";function ek(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const d=i;return i=!0,d?ZI:op}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class tk{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:xT,sessionIdleExpire:MT},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=jI(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ek((i,a)=>Yw(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(FT,r),timeout:r,scrollTimeout:$T,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new cw(this,s)),U){const i=t._experiments;H.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{le.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=st({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=st({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{Ew(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){U&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){U&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",U&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){U&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=js({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){U&&H.log("Buffering is in progress, call `flush()` to save the replay");return}U&&H.infoTick("Starting replay in buffer mode");const t=js({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=pt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:PT}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:qI(this),...zI(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{U&&H.log(`Stopping Replay${n?` triggered by ${n}`:""}`),Xf(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,zw(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),U&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),U&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();U&&H.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&vi(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${le.location.pathname}${le.location.hash}${le.location.search}`,n=`${le.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===op){const o=st({category:"replay.throttled"});this.addUpdate(()=>!Ua(this,{type:tw,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||ge(),n=t&&Ee(t),o=(n&&B(n).data||{})[fe];if(!(!n||!o||!["route","custom"].includes(o)))return B(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Hw({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=js({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Vf(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{le.document.addEventListener("visibilitychange",this._handleVisibilityChange),le.addEventListener("blur",this._handleWindowBlur),le.addEventListener("focus",this._handleWindowFocus),le.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(UI(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Pw(this)}_removeListeners(){try{le.document.removeEventListener("visibilitychange",this._handleVisibilityChange),le.removeEventListener("blur",this._handleWindowBlur),le.removeEventListener("focus",this._handleWindowFocus),le.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Gf(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){U&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Iw(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ds(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){U&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await HI(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await rp({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=P();if(r){const o=n instanceof Wa?"ratelimit_backoff":"send_error";r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){U&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){U&&H.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&U&&H.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ls(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=JI(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=st({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Wn(e,t){return[...e,...t].join(",")}function nk({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=Wn(e,[".sentry-mask","[data-sentry-mask]"]),a=Wn(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:Wn(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Wn(r,[]),ignoreSelector:Wn(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function rk({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const zu='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',ok=["content-length","content-type","accept"];let qu=!1;const O1=(e=>new sk(e));class sk{constructor({flushMinDelay:t=NT,flushMaxDelay:n=OT,minReplayDuration:r=BT,maxReplayDuration:o=Tu,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:b=!0,networkRequestHeaders:I=[],networkResponseHeaders:v=[],mask:S=[],maskAttributes:w=["title","placeholder","aria-label"],unmask:E=[],block:k=[],unblock:T=[],ignore:C=[],maskFn:F,beforeAddRecordingEvent:R,beforeErrorSampling:x,onError:z}={}){this.name="Replay";const X=nk({mask:S,unmask:E,block:k,unblock:T,ignore:C});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:F,maskInputFn:F,maskAttributeFn:(Q,$,L)=>rk({maskAttributes:w,maskAllText:u,privacyOptions:X,key:Q,value:$,el:L}),...X,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Q=>{try{Q.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,UT),maxReplayDuration:Math.min(o,Tu),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:b,networkRequestHeaders:Gu(I),networkResponseHeaders:Gu(v),beforeAddRecordingEvent:R,beforeErrorSampling:x,onError:z,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${zu}`:zu),this._isInitialized&&Io())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return qu}set _isInitialized(t){qu=t}afterAllSetup(t){!Io()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=ik(this._initialOptions,t);this._replay=new tk({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function ik(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=Qn(n.replaysSessionSampleRate),s=Qn(n.replaysOnErrorSampleRate);return o==null&&s==null&&ur(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function Gu(e){return[...ok,...e.map(t=>t.toLowerCase())]}function P1(){return P()?.getIntegrationByName("Replay")}var ak=Object.defineProperty,ck=(e,t,n)=>t in e?ak(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vu=(e,t,n)=>ck(e,typeof t!="symbol"?t+"":t,n);class uk{constructor(){Vu(this,"idNodeMap",new Map),Vu(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function lk(){return new uk}function dk(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ii(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ii(e.parentNode,t,n,r+1)}function Ju(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(dk(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const dn=`Please stop import mirror directly. Instead of that,\r
496
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
497
- or you can use record.mirror to access the mirror instance during recording.`;let Yu={map:{},getId(){return console.error(dn),-1},getNode(){return console.error(dn),null},removeNodeFromMap(){console.error(dn)},has(){return console.error(dn),!1},reset(){console.error(dn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Yu=new Proxy(Yu,{get(e,t,n){return t==="map"&&console.error(dn),Reflect.get(e,t,n)}}));function ja(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){ip(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>ja(e,t,s||{},!0)}function za(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function fk(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ps(e,t,n,r,o){if(!e)return!1;const s=fk(e);if(!s)return!1;const i=Ju(t,n),a=Ii(s,i);let c=-1;return a<0?!1:(r&&(c=Ii(s,Ju(null,r))),a>-1&&c<0?!0:a<c)}const Ku={};function sp(e){const t=Ku[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Ku[e]=r.bind(window)}function Ut(...e){return sp("requestAnimationFrame")(...e)}function ip(...e){return sp("setTimeout")(...e)}var xn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(xn||{});let ao;function pk(e){ao=e}const zs=e=>ao?(...n)=>{try{return e(...n)}catch(r){if(ao&&ao(r)===!0)return()=>{};throw r}}:e;var gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hk=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var qr=0;qr<gn.length;qr++)hk[gn.charCodeAt(qr)]=qr;var mk=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=gn[t[n]>>2],o+=gn[(t[n]&3)<<4|t[n+1]>>4],o+=gn[(t[n+1]&15)<<2|t[n+2]>>6],o+=gn[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Xu=new Map;function gk(e,t){let n=Xu.get(e);return n||(n=new Map,Xu.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const ap=(e,t,n)=>{if(!e||!(up(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=gk(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function co(e,t,n){if(e instanceof Array)return e.map(r=>co(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=mk(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[co(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[co(e.data,t,n),e.width,e.height]};if(up(e,t)||typeof e=="object"){const r=e.constructor.name,o=ap(e,t,n);return{rr_type:r,index:o}}}}return e}const cp=(e,t,n)=>e.map(r=>co(r,t,n)),up=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function _k(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=za(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return ps(this.canvas,n,r,o,!0)||ip(()=>{const l=cp(d,t,this);e(this.canvas,{type:xn["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=ja(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:xn["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function yk(e){return e==="experimental-webgl"?"webgl":e}function Qu(e,t,n,r,o){const s=[];try{const i=za(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!ps(this,t,n,r,!0)){const d=yk(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Zu(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=za(e,d,function(p){return function(...f){const h=p.apply(this,f);if(ap(h,a,this),"tagName"in this.canvas&&!ps(this.canvas,r,o,s,!0)){const m=cp(f,a,this),g={type:t,property:d,args:m};n(this.canvas,g)}return h}});c.push(l)}catch{const l=ja(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function Sk(e,t,n,r,o,s){const i=[];return i.push(...Zu(t.WebGLRenderingContext.prototype,xn.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Zu(t.WebGL2RenderingContext.prototype,xn.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const bk='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Ek(){const e=new Blob([bk]);return URL.createObjectURL(e)}class vk{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&pk(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&zs(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}zs(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Qu(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Ut(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(Ek());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:xn["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Ut(n)};t=Ut(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Qu(t,n,r,o,!1),i=_k(this.processMutation.bind(this),t,n,r,o),a=Sk(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{ps(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:s,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(s,i,a)).forEach(h=>{const m=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(m))){if(this.snapshotInProgressMap.set(m,!0),!n&&["webgl","webgl2"].includes(h.__context)){const g=h.getContext(h.__context);g?.getContextAttributes()?.preserveDrawingBuffer===!1&&g.clear(g.COLOR_BUFFER_BIT)}createImageBitmap(h).then(g=>{this.worker?.postMessage({id:m,bitmap:g,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[g])}).catch(g=>{zs(()=>{throw this.snapshotInProgressMap.delete(m),g})()})}}),!0)}startPendingCanvasMutationFlusher(){Ut(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Ut(t)};Ut(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ut(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}lk();var el;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(el||(el={}));const tl={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},Tk="ReplayCanvas",Gr=1280,wk=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Gr):Gr,n?Math.min(n,Gr):Gr]};let o;const s=new Promise(i=>o=i);return{name:Tk,getOptions(){const{quality:i,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const d=new vk({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return o(d),d},...tl[i]||tl.medium}},async snapshot(i,a){(await s).snapshot(i,a)}}}),L1=wk;function Ik(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function lp(e){try{return new URL(e,O.location.origin).href}catch{return}}function kk(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function dp(e){try{return new Headers(e)}catch{return}}const nl=new WeakMap,qs=new Map,fp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Rk(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...fp,...t},d=typeof s=="function"?s:h=>!0,l=h=>Ck(h,a),p={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(m=>{if(m.op==="http.client"){const g=qs.get(m.span_id);g&&(m.timestamp=g/1e3,qs.delete(m.span_id))}}),h)),o&&Jy(h=>{if(h.response){const m=nl.get(h.response);m&&h.endTimestamp&&qs.set(m,h.endTimestamp)}}),ca(h=>{const m=u_(h,d,l,p,{propagateTraceparent:f,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&nl.set(h.response,h.fetchData.__span),m){const g=lp(h.fetchData.url),y=g?Vt(g).host:void 0;m.setAttributes({"http.url":g,"server.address":y}),i&&rl(m),c?.(m,{headers:h.headers})}})),r&&Ia(h=>{const m=Ak(h,d,l,p,f,u);m&&(i&&rl(m),c?.(m,{headers:dp(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function rl(e){const{url:t}=B(e).data;if(!t||typeof t!="string")return;const n=tn("resource",({entries:r})=>{r.forEach(o=>{kk(o)&&o.name.endsWith(t)&&(e.setAttributes(ef(o)),setTimeout(n))})})}function Ck(e,t){const n=nn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?Qe(r.toString(),t)||s&&Qe(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?Qe(e,t):r}}function Ak(e,t,n,r,o,s){const i=e.xhr,a=i?.[ft];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=Ke()&&t(c);if(e.endTimestamp&&d){const y=i.__sentry_xhr_span_id__;if(!y)return;const b=r[y];b&&a.status_code!==void 0&&(ho(b,a.status_code),b.end(),s?.(b,{headers:dp(rf(i)),error:e.error}),delete r[y]);return}const l=lp(c),p=Vt(l||c),f=nd(c),h=!!ge(),m=d&&h?Ze({name:`${u} ${f}`,attributes:{url:c,type:"xhr","http.method":u,"http.url":l,"server.address":p?.host,[K]:"auto.http.browser",[ve]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new gt;i.__sentry_xhr_span_id__=m.spanContext().spanId,r[i.__sentry_xhr_span_id__]=m,n(c)&&xk(i,Ke()&&h?m:void 0,o);const g=P();return g&&g.emit("beforeOutgoingRequestSpan",m,e),m}function xk(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=sd({span:t,propagateTraceparent:n});r&&Mk(e,r,o,s)}function Mk(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!Ik(s))&&e.setRequestHeader("baggage",n)}}catch{}}function Nk(){O.document?O.document.addEventListener("visibilitychange",()=>{const e=ge();if(!e)return;const t=Ee(e);if(O.document.hidden&&t){const n="cancelled",{op:r,status:o}=B(t);A&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:Ce,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):A&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Ok=3600,pp="sentry_previous_trace",Pk="sentry.previous_trace";function Lk(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?$k():void 0;e.on("spanStart",i=>{if(Ee(i)!==i)return;const a=J().getPropagationContext();o=Dk(o,i,a),r&&Fk(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=J(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(ki(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=ki(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Sh]:o.sampleRate}})}function Dk(e,t,n){const r=B(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Sl])}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Ok&&(A&&_.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[bh]:"previous_trace"}}),t.setAttribute(Pk,`${i.traceId}-${i.spanId}-${ki(i)?1:0}`)),s)}function Fk(e){try{O.sessionStorage.setItem(pp,JSON.stringify(e))}catch(t){A&&_.warn("Could not store previous trace in sessionStorage",t)}}function $k(){try{const e=O.sessionStorage?.getItem(pp);return JSON.parse(e)}catch{return}}function ki(e){return e.traceFlags===1}const Bk="BrowserTracing",Uk={...Xr,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...fp},Ir=((e={})=>{const t={name:void 0,source:void 0},n=O.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:f,markBackgroundSpan:h,traceFetch:m,traceXHR:g,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:b,enableHTTPTimings:I,ignoreResourceSpans:v,ignorePerformanceApiSpans:S,instrumentPageLoad:w,instrumentNavigation:E,detectRedirects:k,linkPreviousTrace:T,consistentTraceSampling:C,enableReportPageLoaded:F,onRequestSpanStart:R,onRequestSpanEnd:x}={...Uk,...e};let z,X,Q;function $(L,D,M=!0){const V=D.op==="pageload",se=D.name,de=d?d(D):D,Se=de.attributes||{};if(se!==de.name&&(Se[fe]="custom",de.attributes=Se),!M){const Oe=Go();Ze({...de,startTime:Oe}).end(Oe);return}t.name=de.name,t.source=Se[fe];const Ne=$l(de,{idleTimeout:l,finalTimeout:p,childSpanTimeout:f,disableAutoFinish:V,beforeSpanEnd:Oe=>{z?.(),EE(Oe,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:v,ignorePerformanceApiSpans:S}),sl(L,void 0);const De=J(),nt=De.getPropagationContext();De.setPropagationContext({...nt,traceId:Ne.spanContext().traceId,sampled:qo(Ne),dsc:ht(Oe)}),V&&(Q=void 0)},trimIdleSpanEndTimestamp:!F});V&&F&&(Q=Ne),sl(L,Ne);function St(){n&&["interactive","complete"].includes(n.readyState)&&L.emit("idleSpanEnableAutoFinish",Ne)}V&&!F&&n&&(n.addEventListener("readystatechange",()=>{St()}),St())}return{name:Bk,setup(L){if(Ah(),z=hE({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:L}),r&&GE(),o&&OE(),i&&Y.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?gE():s&&mE(),a&&_E(),k&&n){const M=()=>{X=me()};addEventListener("click",M,{capture:!0}),addEventListener("keydown",M,{capture:!0,passive:!0})}function D(){const M=sr(L);M&&!B(M).timestamp&&(A&&_.log(`[Tracing] Finishing current active span with op: ${B(M).op}`),M.setAttribute(Zn,"cancelled"),M.end())}L.on("startNavigationSpan",(M,V)=>{if(P()!==L)return;if(V?.isRedirect){A&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),$(L,{op:"navigation.redirect",...M},!1);return}X=void 0,D(),Dt().setPropagationContext({traceId:Xn(),sampleRand:Math.random(),propagationSpanId:Ke()?void 0:zn()});const se=J();se.setPropagationContext({traceId:Xn(),sampleRand:Math.random(),propagationSpanId:Ke()?void 0:zn()}),se.setSDKProcessingMetadata({normalizedRequest:void 0}),$(L,{op:"navigation",...M,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(M,V={})=>{if(P()!==L)return;D();const se=V.sentryTrace||ol("sentry-trace"),de=V.baggage||ol("baggage"),Se=bl(se,de),Ne=J();Ne.setPropagationContext(Se),Ke()||(Ne.getPropagationContext().propagationSpanId=zn()),Ne.setSDKProcessingMetadata({normalizedRequest:ha()}),$(L,{op:"pageload",...M})}),L.on("endPageloadSpan",()=>{F&&Q&&(Q.setAttribute(Zn,"reportPageLoaded"),Q.end())})},afterAllSetup(L){let D=nn();if(T!=="off"&&Lk(L,{linkPreviousTrace:T,consistentTraceSampling:C}),O.location){if(w){const M=Me();kr(L,{name:O.location.pathname,startTime:M?M/1e3:void 0,attributes:{[fe]:"url",[K]:"auto.pageload.browser"}})}E&&is(({to:M,from:V})=>{if(V===void 0&&D?.indexOf(M)!==-1){D=void 0;return}D=void 0;const se=Ji(M),de=sr(L),Se=de&&k&&Wk(de,X);Rr(L,{name:se?.pathname||O.location.pathname,attributes:{[fe]:"url",[K]:"auto.navigation.browser"}},{url:M,isRedirect:Se})})}h&&Nk(),a&&Hk(L,l,p,f,t),r&&YE(),Rk(L,{traceFetch:m,traceXHR:g,trackFetchStreamPerformance:y,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:I,onRequestSpanStart:R,onRequestSpanEnd:x})}}});function kr(e,t,n){e.emit("startPageLoadSpan",t,n),J().setTransactionName(t.name);const r=sr(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Rr(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=J();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...ha(),url:r}}),sr(e)}function ol(e){return O.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Hk(e,t,n,r,o){const s=O.document;let i;const a=()=>{const c="ui.action.click",u=sr(e);if(u){const d=B(u).op;if(["navigation","pageload"].includes(d)){A&&_.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Zn,"interactionInterrupted"),i.end(),i=void 0),!o.name){A&&_.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=$l({name:o.name,op:c,attributes:{[fe]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const hp="_sentry_idleSpan";function sr(e){return e[hp]}function sl(e,t){at(e,hp,t)}const il=1.5;function Wk(e,t){const n=B(e),r=Go(),o=n.start_timestamp;return!(r-o>il||t&&r-t<=il)}function D1(e=P()){e?.emit("endPageloadSpan")}function F1(e){const t=ge();if(t===e)return;const n=J();e.end=new Proxy(e.end,{apply(r,o,s){return Kt(n,t),Reflect.apply(r,o,s)}}),Kt(n,e)}function Mn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function jk(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Mn(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function qa(e){return Mn(e.getAllKeys())}function zk(e,t,n){return e(r=>qa(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Mn(r.transaction)}))}function qk(e,t,n){return e(r=>qa(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Mn(r.transaction)}))}function Gk(e){return e(t=>qa(t).then(n=>{const r=n[0];if(r!=null)return Mn(t.get(r)).then(o=>(t.delete(r),Mn(t.transaction).then(()=>o)))}))}function Vk(e){let t;function n(){return t==null&&(t=jk(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=await _o(r);await zk(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=await _o(r);await qk(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await Gk(n());if(r)return Lh(r)}catch{}}}}function Jk(e){return t=>{const n=e({...t,createStore:Vk});return O.addEventListener("online",async r=>{await n.flush()}),n}}function $1(e=of){return Jk(Hm(e))}const al=1e6,Yk="window"in Y&&Y.window===Y&&typeof importScripts>"u",Ct=String(0),Ho=Yk?"main":"worker",Wo=O.navigator;let mp="",gp="",_p="",Ri=Wo?.userAgent||"",yp="";const Kk=Wo?.language||Wo?.languages?.[0]||"";function Xk(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const cl=Wo?.userAgentData;Xk(cl)&&cl.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(mp=e.platform||"",_p=e.architecture||"",yp=e.model||"",gp=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Ri=`${t.brand} ${t.version}`}}).catch(e=>{});function Qk(e){return!("thread_metadata"in e)}function Zk(e){return Qk(e)?sR(e):e}function eR(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&A&&_.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function tR(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const o=eR(r),s=Zk(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:me()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:me()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||wl,runtime:{name:"javascript",version:O.navigator.userAgent},os:{name:mp,version:gp,build_number:Ri},device:{locale:Kk,model:yp,manufacturer:Ri,architecture:_p,is_emulator:!1},debug_meta:{images:bp(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Xe(),trace_id:o,active_thread_id:Ct,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function nR(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=oR(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:Xe(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||Xe(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:bp(e.resources)},profile:r}}function rR(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function oR(e){const t=[];for(let a=0;a<e.frames.length;a++){const c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=Me(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=o-(r||o),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(o+(c.timestamp-s))/1e3;i[a]={stack_id:c.stackId??0,thread_id:Ct,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Ct]:{name:Ho}}}}function Sp(e){return B(e).op==="pageload"}function sR(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Ct]:{name:Ho}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=Me(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-s)*al).toFixed(0),stack_id:t,thread_id:Ct};return}let l=e.stacks[u.stackId];const p=[];for(;l;){p.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const f={elapsed_since_start_ns:((u.timestamp+c-s)*al).toFixed(0),stack_id:n,thread_id:Ct};r.stacks[n]=p,r.samples[d]=f,n++}),r}function iR(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function aR(e){const t=[];return Xt(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function bp(e){const r=P()?.getOptions()?.stackParser;return r?Eh(r,e):[]}function Ep(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(A&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(A&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cR(e){return e.samples.length<2?(A&&_.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(A&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Ga=!1;const vp=3e4;function uR(e){return typeof e=="function"}function Tp(){const e=O.Profiler;if(!uR(e)){A&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(vp/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{A&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),Ga=!0}}function ul(e){if(Ga)return A&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return A&&_.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=P()?.getOptions();if(!n)return A&&_.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Ep(r)?r?(r===!0?!0:Math.random()<r)?!0:(A&&_.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(A&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(A&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function lR(e){if(Ga)return A&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(e.profileLifecycle!=="trace")return!1;const t=e.profileSessionSampleRate;return Ep(t)?t?Math.random()<=t:(A&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(A&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Vr(e){return typeof e.profilesSampleRate<"u"}function dR(e,t,n,r){return cR(n)?tR(e,t,n,r):null}const qt=new Map;function fR(){return qt.size}function pR(e){const t=qt.get(e);return t&&qt.delete(e),t}function hR(e,t){if(qt.set(e,t),qt.size>30){const n=qt.keys().next().value;n!==void 0&&qt.delete(n)}}function mR(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Ct,"thread.name":Ho}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Ct,"thread.name":Ho}})),e}const gR=6e4,_R=3e5;class yR{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1}initialize(t,n){this._profilerId=Xe(),A&&_.log("[Profiling] Initializing profiler (lifecycle='trace')."),this._client=t,this._sessionSampled=n,t.on("spanStart",r=>{if(!this._sessionSampled){A&&_.log("[Profiling] Session not sampled because of negative sampling decision.");return}if(r!==Ee(r))return;if(!r.isRecording()){A&&_.log("[Profiling] Discarding profile because root span was not sampled.");return}bn().setContext("profile",{profiler_id:this._profilerId});const o=r.spanContext().spanId;if(!o||this._activeRootSpanIds.has(o))return;this._activeRootSpanIds.add(o);const s=this._activeRootSpanIds.size,i=setTimeout(()=>{this._onRootSpanTimeout(o)},_R);this._rootSpanTimeouts.set(o,i),s===1&&(A&&_.log(`[Profiling] Root span with ID ${o} started. Will continue profiling for as long as there are active root spans (currently: ${s}).`),this.start())}),t.on("spanEnd",r=>{if(!this._sessionSampled)return;const o=r.spanContext().spanId;if(!o||!this._activeRootSpanIds.has(o))return;this._activeRootSpanIds.delete(o);const s=this._activeRootSpanIds.size;A&&_.log(`[Profiling] Root span with ID ${o} ended. Will continue profiling for as long as there are active root spans (currently: ${s}).`),s===0&&(this._collectCurrentChunk().catch(i=>{A&&_.error("[Profiling] Failed to collect current profile chunk on `spanEnd`:",i)}),this.stop())})}notifyRootSpanActive(t){if(!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._activeRootSpanIds.add(n);const r=this._activeRootSpanIds.size;r===1&&(A&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this.start())}start(){if(!this._isRunning){if(this._isRunning=!0,A&&_.log("[Profiling] Started profiling with profile ID:",this._profilerId),this._startProfilerInstance(),!this._profiler){A&&_.log("[Profiling] Stopping trace lifecycle profiling."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}stop(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{A&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}))}_resetProfilerInfo(){this._isRunning=!1,bn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Tp();if(!t){A&&_.log("[Profiling] Failed to start JS Profiler in trace lifecycle.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{A&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},gR))}_onRootSpanTimeout(t){if(!this._rootSpanTimeouts.has(t)||(this._rootSpanTimeouts.delete(t),!this._activeRootSpanIds.has(t)))return;A&&_.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this.stop()}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=nR(n,this._client,this._profilerId),o=rR(r);if("reason"in o){A&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),A&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){A&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=Vo(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=tt({event_id:Xe(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:yt(o)}},[[{type:"profile_chunk"},t]]);n.sendEnvelope(i).then(null,a=>{A&&_.error("Error while sending profile chunk envelope:",a)})}}function ll(e){let t;Sp(e)&&(t=me()*1e3);const n=Tp();if(!n)return;A&&_.log(`[Profiling] started profiling span: ${B(e).description}`);const r=Xe();let o=null;J().setContext("profile",{profile_id:r,start_timestamp:t});async function s(){if(e&&n){if(o){A&&_.log("[Profiling] profile for:",B(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(O.clearTimeout(i),i=void 0),A&&_.log(`[Profiling] stopped profiling of span: ${B(e).description}`),!u){A&&_.log(`[Profiling] profiler returned null profile for: ${B(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,hR(r,u)}).catch(u=>{A&&_.log("[Profiling] error while stopping profiler:",u)})}}let i=O.setTimeout(()=>{A&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",B(e).description),s()},vp);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const SR="BrowserProfiling",bR=(()=>({name:SR,setup(e){const t=e.getOptions();if(!Vr(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Vr(t)&&!t.profilesSampleRate){A&&_.log("[Profiling] Profiling disabled, no profiling options found.");return}const n=ge(),r=n&&Ee(n);if(Vr(t)&&t.profileSessionSampleRate!==void 0&&A&&_.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Vr(t))r&&Sp(r)&&ul(r)&&ll(r),e.on("spanStart",o=>{o===Ee(o)&&ul(o)&&ll(o)}),e.on("beforeEnvelope",o=>{if(!fR())return;const s=aR(o);if(!s.length)return;const i=[];for(const a of s){const c=a?.contexts,u=c?.profile?.profile_id,d=c?.profile?.start_timestamp;if(typeof u!="string"){A&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){A&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}c?.profile&&delete c.profile;const l=pR(u);if(!l){A&&_.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}const p=dR(u,d,l,a);p&&i.push(p)}iR(o,i)});else{const o=lR(t);if(o||A&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),t.profileLifecycle==="trace"){if(!Ke(t)){A&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}const i=new yR;i.initialize(e,o),r&&i.notifyRootSpanActive(r),O.setTimeout(()=>{const a=ge(),c=a&&Ee(a);c&&i.notifyRootSpanActive(c)},0)}}},processEvent(e){return mR(e)}})),B1=bR,ER="SpotlightBrowser",vR=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:ER,setup:()=>{A&&_.log("Using Sidecar URL",t)},processEvent:n=>wR(n)?null:n,afterAllSetup:n=>{TR(n,t)}}});function TR(e,t){const n=wa("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:_o(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const U1=vR;function wR(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const H1=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Pn(e)}});function W1(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Qt(e,t.value),Zt(e,t.value)}}}const j1=()=>({name:"OpenFeature",processEvent(e,t,n){return Pn(e)}});class z1{after(t,n){Qt(n.flagKey,n.value),Zt(n.flagKey,n.value)}error(t,n,r){Qt(t.flagKey,t.defaultValue),Zt(t.flagKey,t.defaultValue)}}const q1=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Re(t,"isEnabled",IR)},processEvent(t,n,r){return Pn(t)}});function IR(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Qt(n,r),Zt(n,r)):A&&_.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const G1=(({growthbookClass:e})=>c_({growthbookClass:e})),V1=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Qt(n.gate.name,n.gate.value),Zt(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Pn(t)}});async function J1(){const e=P();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await Kh(()=>fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const kR="WebWorker",Y1=({worker:e})=>({name:kR,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>dl(t))},addWorker:t=>dl(t)});function dl(e){e.addEventListener("message",t=>{CR(t.data)&&(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(A&&_.log("Sentry debugId web worker message received",t.data),O._sentryDebugIds={...t.data._sentryDebugIds,...O._sentryDebugIds}),t.data._sentryWorkerError&&(A&&_.log("Sentry worker rejection message received",t.data._sentryWorkerError),RR(t.data._sentryWorkerError)))})}function RR(e){const t=P();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=Ot(o)?cf(o):rs(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),lr(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),A&&_.log("Captured worker unhandled rejection",o)}function K1({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:af(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),A&&_.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),A&&_.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function CR(e){if(!It(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryWorkerError"in e;return!(!t&&!n||t&&!(It(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!It(e._sentryWorkerError))}function X1(e){const t={...e};return od(t,"react"),Ml("react",{version:Te.version}),rT(t)}function AR(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function xR(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function wp(e,{componentStack:t},n){if(AR(Te.version)&&kt(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,xR(e,r)}return We(r=>(r.setContext("react",{componentStack:t}),we(e,n)))}function Q1(e){return(t,n)=>{const r=!!e,o=wp(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const Ip="ui.react.render",MR="ui.react.update",kp="ui.react.mount",hs=Ol||kh,NR="unknown";class Rp extends Te.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Ze({name:`<${n}>`,onlyIfParent:!0,op:kp,attributes:{[K]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=me();this._updateSpan=En(this._mountSpan,()=>Ze({name:`<${this.props.name}>`,onlyIfParent:!0,op:MR,startTime:o,attributes:{[K]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=me(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=B(this._mountSpan).timestamp;En(this._mountSpan,()=>{const s=Ze({onlyIfParent:!0,name:`<${n}>`,op:Ip,startTime:o,attributes:{[K]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(Rp,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function Z1(e,t){const n=t?.name||e.displayName||e.name||NR,r=o=>Te.createElement(Rp,{...t,name:n,updateProps:o},Te.createElement(e,{...o}));return r.displayName=`profiler(${n})`,hs(r,e),r}function eC(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=Te.useState(()=>{if(!t?.disabled)return Ze({name:`<${e}>`,onlyIfParent:!0,op:kp,attributes:{[K]:"auto.ui.react.profiler","ui.component_name":e}})});Te.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=B(n).timestamp,o=me(),s=Ze({name:`<${e}>`,onlyIfParent:!0,op:Ip,startTime:r,attributes:{[K]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const on=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,OR="unknown",Gs={componentStack:null,error:null,eventId:null};class PR extends Te.Component{constructor(t){super(t),this.state=Gs,this._openFallbackReportDialog=!0;const n=P();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Su({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;We(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=wp(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&Su({...a,eventId:d})),this.setState({error:t,componentStack:r,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===Gs?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(Gs)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?Te.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Te.isValidElement(o)?o:(t&&on&&_.warn("fallback did not produce a valid ReactElement"),null)}}function tC(e,t){const n=e.displayName||e.name||OR,r=Te.memo(o=>Te.createElement(PR,{...t},Te.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,hs(r,e),r}const LR="redux.action",DR="info",FR={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function nC(e){const t={...FR,...e};return n=>(r,o)=>{t.attachReduxState&&bn().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const d=a(c,u),l=J(),p=t.actionTransformer(u);typeof p<"u"&&p!==null&&ct({category:LR,data:p,type:DR});const f=t.stateTransformer(d);if(typeof f<"u"&&f!==null){const y=P()?.getOptions()?.normalizeDepth||3,b={state:{type:"redux",value:f}};at(b,"__sentry_override_normalization_depth__",3+y),l.setContext("state",b)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,d),d}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function rC(e){const t=Ir({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&O.location&&fl(r,O.location,o,(c,u="url")=>{kr(a,{name:c,attributes:{[ve]:"pageload",[K]:"auto.pageload.react.reactrouter_v3",[fe]:u}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&fl(r,c,o,(u,d="url")=>{Rr(a,{name:u,attributes:{[ve]:"navigation",[K]:"auto.navigation.react.reactrouter_v3",[fe]:d}})})})}}}function fl(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=$R(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function $R(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function oC(e,t={}){const n=e,r=Ir({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=O.location;if(o&&a){const c=n.matchRoutes(a.pathname,n.options.parseSearch(a.search),{preload:!1,throwOnError:!1}),u=c[c.length-1];kr(i,{name:u?u.routeId:a.pathname,attributes:{[ve]:"pageload",[K]:"auto.pageload.react.tanstack_router",[fe]:u?"route":"url",...pl(u)}})}s&&n.subscribe("onBeforeNavigate",c=>{if(c.toLocation.state===c.fromLocation?.state)return;const u=n.matchRoutes(c.toLocation.pathname,c.toLocation.search,{preload:!1,throwOnError:!1}),d=u[u.length-1],l=O.location,p=Rr(i,{name:d?d.routeId:l.pathname,attributes:{[ve]:"navigation",[K]:"auto.navigation.react.tanstack_router",[fe]:d?"route":"url"}}),f=n.subscribe("onResolved",h=>{if(f(),p){const m=n.matchRoutes(h.toLocation.pathname,h.toLocation.search,{preload:!1,throwOnError:!1}),g=m[m.length-1];g&&(p.updateName(g.routeId),p.setAttribute(fe,"route"),p.setAttributes(pl(g)))}})})}}}function pl(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`url.path.parameter.${n}`]=r,t[`params.${n}`]=r}),t}function sC(e){const t=Ir({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),Cp(a,s,i,n,"reactrouter_v4",r,o)}}}function iC(e){const t=Ir({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),Cp(a,s,i,n,"reactrouter_v5",r,o)}}}function Cp(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(O.location)return O.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const d=Ap(s,u,i);for(const l of d)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[d,l]=c(u);kr(e,{name:d,attributes:{[ve]:"pageload",[K]:`auto.pageload.react.${o}`,[fe]:l}})}}n&&r.listen&&r.listen((u,d)=>{if(d&&(d==="PUSH"||d==="POP")){const[l,p]=c(u.pathname);Rr(e,{name:l,attributes:{[ve]:"navigation",[K]:`auto.navigation.react.${o}`,[fe]:p}})}})}function Ap(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:BR(t);return s&&(r.push({route:o,match:s}),o.routes&&Ap(o.routes,t,n,r)),!!s}),r}function BR(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function aC(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=UR();J().setTransactionName(o),s&&(s.updateName(o),s.setAttribute(fe,"route"))}return Te.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,hs(n,e),n}function UR(){const e=ge(),t=e&&Ee(e);if(!t)return;const n=B(t).op;return n==="navigation"||n==="pageload"?t:void 0}function HR(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=s.apply(i,a);return WR(c,t,n,r),c}});return at(o,"__sentry_proxied__",!0),o}function WR(e,t,n,r){xi(e)?e.then(o=>{Array.isArray(o)&&r(o,t)}).catch(o=>{on&&_.warn(`Error resolving async handler '${n}' for route`,t,o)}):Array.isArray(e)&&r(e,t)}function ms(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=HR(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)ms(n,t)}let Va,_n=!1;function jR(e,t=!1){Va=e,_n=t}function zR(e){return GR(e.route.path||"")}function qR(e){return e.params["*"]||""}function GR(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function Sn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function xp(e){return e.endsWith("*")}function hl(e,t){return xp(e)&&!!t.route.children?.length||!1}function VR(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function JR(e,t,n){const r=e&&e.length>0?e:_n?jo(t,n):t;let o=r.slice(-2)==="/*"?r.slice(0,-2):r;return o.length>1&&o[o.length-1]==="/"&&(o=o.slice(0,-1)),[o,"route"]}function ml(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function jo(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}function zo(e){return e[0]==="/"?e:`/${e}`}function Mp(e,t){const n=Va(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=zR(r),s=jo(t.pathname,zo(r.pathnameBase));return t.pathname===s?Sn(s):Sn(Sn(o||"")+zo(Mp(e.filter(i=>i!==r.route),{pathname:s})))}return""}function YR(e,t){const n=Va(t,e);if(n){for(const r of n)if(VR(r.route)&&qR(r))return!0}return!1}function KR(e,t,n,r=""){if(!e||e.length===0)return[_n?jo(t.pathname,r):t.pathname,"url"];let o="";if(n)for(const i of n){const a=i.route;if(a){if(a.index)return JR(o,i.pathname,r);const c=a.path;if(c&&!hl(c,i)){const u=c[0]==="/"||o[o.length-1]==="/"?c:`/${c}`;if(o=Sn(o)+zo(u),Sn(t.pathname)===Sn(r+i.pathname))return ml(o)!==ml(i.pathname)&&!xp(o)?[(_n?"":r)+u,"route"]:(hl(o,i)&&(o=o.slice(0,-1)),[(_n?"":r)+o,"route"])}}}return[_n?jo(t.pathname,r):t.pathname||"","url"]}function gs(e,t,n,r,o=""){let s,i="url";const a=YR(e,n);return a&&(s=zo(Mp(n,e)),i="route"),(!a||!s)&&([s,i]=KR(t,e,r,o)),[s||e.pathname,i]}let At,xt,Mt,uo,Ge,_s=!1;const Np=new WeakSet;function XR(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}const xe=new Set;function Ja(e,t,n=null){e.forEach(o=>{xe.add(o),_s&&ms(o,Ja)}),t&&XR(e,t);const r=ut();if(r){const o=B(r).op;let s=n;if(!s&&typeof O<"u"){const i=O.location;i&&(s={pathname:i.pathname})}s&&(o==="pageload"?Ar({activeRootSpan:r,location:{pathname:s.pathname},routes:Array.from(xe),allRoutes:Array.from(xe)}):o==="navigation"&&Ci(r,s,Array.from(xe),!1,Ge))}}function Ci(e,t,n,r=!1,o){if(!(!r&&e?.__sentry_navigation_name_set__)){const i=o(n,t),[a,c]=gs(t,n,n,i||[],""),u=B(e);a&&!u.timestamp&&(e.updateName(a),e.setAttribute(fe,c),at(e,"__sentry_navigation_name_set__",!0))}}function Op(e,t){return!At||!xt||!Mt||!Ge?(on&&_.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(Cr(n),_s)for(const l of n)ms(l,Ja);const o=Fp(r),s=e(n,o),i=r?.basename,a=ut();let c=!1,u=!!a&&B(a).op==="pageload",d=!1;return s.state.historyAction==="POP"&&a&&Ar({activeRootSpan:a,location:s.state.location,routes:n,basename:i,allRoutes:Array.from(xe)}),s.subscribe(l=>{if(!c){const f=ut();f&&B(f).op==="pageload"?u=!0:u&&(l.historyAction==="POP"&&!d?d=!0:c=!0)}if(l.historyAction==="PUSH"||l.historyAction==="POP"&&c){const f=()=>{ys({location:l.location,routes:n,navigationType:l.historyAction,version:t,basename:i,allRoutes:Array.from(xe)})};l.navigation.state!=="idle"?requestAnimationFrame(f):f()}}),s}}function Pp(e,t){return!At||!xt||!Mt||!Ge?(on&&_.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(Cr(n),_s)for(const y of n)ms(y,Ja);const o=Fp(r,!0),s=e(n,o),i=r?.basename;let a;const c=r?.initialEntries,u=r?.initialIndex,d=c&&c.length===1,l=u!==void 0&&c&&c[u];a=d?c[0]:l?c[u]:void 0;const p=a?typeof a=="string"?{pathname:a}:a:s.state.location,f=ut();s.state.historyAction==="POP"&&f&&Ar({activeRootSpan:f,location:p,routes:n,basename:i,allRoutes:Array.from(xe)});let h=!1,m=!!f&&B(f).op==="pageload",g=!1;return s.subscribe(y=>{if(!h){const v=ut();v&&B(v).op==="pageload"?m=!0:m&&(y.historyAction==="POP"&&!g?g=!0:h=!0)}const b=y.location;if(y.historyAction==="PUSH"||y.historyAction==="POP"&&h){const v=()=>{ys({location:b,routes:n,navigationType:y.historyAction,version:t,basename:i,allRoutes:Array.from(xe)})};y.navigation.state!=="idle"?requestAnimationFrame(v):v()}}),s}}function Lp(e,t){const n=Ir({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:d=!0,instrumentNavigation:l=!0}=e;return{...n,setup(p){n.setup(p),At=r,xt=o,Mt=s,Ge=a,uo=i,_s=u,jR(a,c||!1)},afterAllSetup(p){n.afterAllSetup(p);const f=O.location?.pathname;d&&f&&kr(p,{name:f,attributes:{[fe]:"url",[ve]:"pageload",[K]:`auto.pageload.react.reactrouter_v${t}`}}),l&&Np.add(p)}}}function Dp(e,t){if(!At||!xt||!Mt||!Ge)return on&&_.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=Te.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=xt(),u=Mt(),d=typeof i=="string"||i?.pathname?i:c;return At(()=>{const l=typeof d=="string"?{pathname:d}:d;o.current?(Cr(s),Ar({activeRootSpan:ut(),location:l,routes:s,allRoutes:Array.from(xe)}),o.current=!1):ys({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(xe)})},[u,d]),a};return(r,o)=>Te.createElement(n,{routes:r,locationArg:o})}function Fp(e,t=!1){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const n=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async r=>{const o=r?.path;if(!t){const a=r?.patch;a&&(r.patch=(c,u)=>{Cr(u);const d=ut();return d&&B(d).op==="navigation"&&Ci(d,{pathname:o,search:"",hash:"",state:null,key:"default"},Array.from(xe),!0,Ge),a(c,u)})}const s=await n(r),i=ut();if(i&&B(i).op==="navigation"){let a;t?a=o:a=o||O.location?.pathname,a&&Ci(i,{pathname:a,search:"",hash:"",state:null,key:"default"},Array.from(xe),!1,Ge)}return s}}}function ys(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:Ge(n,t,i),u=P();if(!u||!Np.has(u))return;const d=ut();if(!(d&&B(d).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,p]=gs(t,n,a||n,c,i),f=ge();if(!((f&&B(f))?.op==="navigation")){const g=Rr(u,{name:l,attributes:{[fe]:p,[ve]:"navigation",[K]:`auto.navigation.react.reactrouter_v${o}`}});g&&ZR(g,t,n,i,a)}}}function Cr(e){e.forEach(t=>{$p(t).forEach(r=>{xe.add(r)})})}function $p(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{$p(n,t).forEach(o=>{t.add(o)})})),t}function Ar({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:Ge(s||n,t,o);if(i){const[a,c]=gs(t,n,s||n,i,o);J().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(fe,c),QR(e,t,n,o,s))}}function Bp(e,t,n,r,o,s){const i=`__sentry_${s}_end_patched__`;if(e?.[i]||!e.end)return;const c=e.end.bind(e);e.end=function(...d){try{const l=B(e);if(l.data?.[fe]!=="route"){const f=Array.from(xe),h=Ge(f.length>0?f:n,t,r);if(h){const[m,g]=gs(t,n,f.length>0?f:n,h,r);m&&(s==="pageload"||!l.timestamp)&&(e.updateName(m),e.setAttribute(fe,g))}}}catch(l){on&&_.warn(`Error updating span details before ending: ${l}`)}return c(...d)},at(e,i,!0)}function QR(e,t,n,r,o){Bp(e,t,n,r,o,"pageload")}function ZR(e,t,n,r,o){Bp(e,t,n,r,o,"navigation")}function Up(e,t){if(!At||!xt||!Mt||!uo||!Ge)return on&&_.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
498
- useEffect: ${At}. useLocation: ${xt}. useNavigationType: ${Mt}.
499
- createRoutesFromChildren: ${uo}. matchRoutes: ${Ge}.`),e;const n=r=>{const o=Te.useRef(!0),s=xt(),i=Mt();return At(()=>{const a=uo(r.children);o.current?(Cr(a),Ar({activeRootSpan:ut(),location:s,routes:a,allRoutes:Array.from(xe)}),o.current=!1):ys({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(xe)})},[s,i]),Te.createElement(e,{...r})};return hs(n,e),n}function ut(){const e=ge(),t=e?Ee(e):void 0;if(!t)return;const n=B(t).op;return n==="navigation"||n==="pageload"?t:void 0}function cC(e){return Lp(e,"6")}function uC(e){return Dp(e,"6")}function lC(e){return Op(e,"6")}function dC(e){return Pp(e,"6")}function fC(e){return Up(e,"6")}function pC(e){return Lp(e,"7")}function hC(e){return Up(e,"7")}function mC(e){return Op(e,"7")}function gC(e){return Pp(e,"7")}function _C(e){return Dp(e,"7")}export{Nb as BrowserClient,PR as ErrorBoundary,z1 as OpenFeatureIntegrationHook,Rp as Profiler,Js as SDK_VERSION,ve as SEMANTIC_ATTRIBUTE_SENTRY_OP,K as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Sl as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,fe as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,bC as Scope,O as WINDOW,ct as addBreadcrumb,yh as addEventProcessor,Sc as addIntegration,Tv as breadcrumbsIntegration,Pv as browserApiErrorsIntegration,B1 as browserProfilingIntegration,Uv as browserSessionIntegration,Ir as browserTracingIntegration,W1 as buildLaunchDarklyFlagUsedHandler,s1 as captureConsoleIntegration,lr as captureEvent,we as captureException,g_ as captureFeedback,Ys as captureMessage,wp as captureReactException,rc as captureSession,av as chromeStackLineParser,EC as close,p1 as consoleLoggingIntegration,x1 as contextLinesIntegration,n1 as continueTrace,m1 as createConsolaReporter,nC as createReduxEnhancer,Bm as createTransport,I1 as createUserFeedbackEnvelope,wg as dedupeIntegration,fp as defaultRequestInstrumentationOptions,yv as defaultStackLineParsers,Sv as defaultStackParser,J1 as diagnoseSdkConnectivity,vC as endSession,ig as eventFiltersIntegration,Rb as eventFromException,Cb as eventFromMessage,ma as exceptionFromError,i1 as extraErrorDataIntegration,d1 as featureFlagsIntegration,b1 as feedbackAsyncIntegration,E1 as feedbackIntegration,E1 as feedbackSyncIntegration,TC as flush,k1 as forceLoad,rg as functionToStringIntegration,dv as geckoStackLineParser,ge as getActiveSpan,P as getClient,J as getCurrentScope,nT as getDefaultIntegrations,S1 as getFeedback,bn as getGlobalScope,Dt as getIsolationScope,P1 as getReplay,Ee as getRootSpan,Jr as getSpanDescendants,wC as getSpanStatusFromHttpCode,sd as getTraceData,jv as globalHandlersIntegration,M1 as graphqlClientIntegration,G1 as growthbookIntegration,A1 as httpClientIntegration,Jv as httpContextIntegration,ag as inboundFiltersIntegration,X1 as init,_1 as instrumentAnthropicAiClient,y1 as instrumentGoogleGenAIClient,g1 as instrumentOpenAiClient,Rk as instrumentOutgoingRequests,Vg as instrumentSupabaseClient,Zp as isEnabled,IC as isInitialized,hh as lastEventId,H1 as launchDarklyIntegration,Sb as lazyLoadIntegration,Zv as linkedErrorsIntegration,f1 as logger,$1 as makeBrowserOfflineTransport,of as makeFetchTransport,r1 as makeMultiplexedTransport,h1 as metrics,o1 as moduleMetadataIntegration,R1 as onLoad,j1 as openFeatureIntegration,T1 as opera10StackLineParser,w1 as opera11StackLineParser,Jm as parameterize,Q1 as reactErrorHandler,rC as reactRouterV3BrowserTracingIntegration,sC as reactRouterV4BrowserTracingIntegration,iC as reactRouterV5BrowserTracingIntegration,cC as reactRouterV6BrowserTracingIntegration,pC as reactRouterV7BrowserTracingIntegration,Ah as registerSpanErrorInstrumentation,K1 as registerWebWorker,L1 as replayCanvasIntegration,O1 as replayIntegration,D1 as reportPageLoaded,C1 as reportingObserverIntegration,a1 as rewriteFramesIntegration,TS as sendFeedback,F1 as setActiveSpanInBrowser,Ml as setContext,Lm as setCurrentClient,kC as setExtra,RC as setExtras,ho as setHttpStatus,qh as setMeasurement,CC as setTag,AC as setTags,xC as setUser,Su as showReportDialog,MC as spanToBaggageHeader,B as spanToJSON,eh as spanToTraceHeader,U1 as spotlightBrowserIntegration,Rr as startBrowserTracingNavigationSpan,kr as startBrowserTracingPageLoadSpan,Ze as startInactiveSpan,Xh as startNewTrace,nc as startSession,On as startSpan,So as startSpanManual,V1 as statsigIntegration,c1 as supabaseIntegration,Kh as suppressTracing,oC as tanstackRouterBrowserTracingIntegration,l1 as thirdPartyErrorFilterIntegration,q1 as unleashIntegration,NC as updateSpanName,eC as useProfiler,Y1 as webWorkerIntegration,v1 as winjsStackLineParser,En as withActiveSpan,tC as withErrorBoundary,OC as withIsolationScope,Z1 as withProfiler,We as withScope,fC as withSentryReactRouterV6Routing,hC as withSentryReactRouterV7Routing,aC as withSentryRouting,lC as wrapCreateBrowserRouterV6,mC as wrapCreateBrowserRouterV7,dC as wrapCreateMemoryRouterV6,gC as wrapCreateMemoryRouterV7,uC as wrapUseRoutesV6,_C as wrapUseRoutesV7,u1 as zodErrorsIntegration};
500
- //# sourceMappingURL=index-DrlXpV0G.js.map