db-studio 1.16.2 → 1.18.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 (165) hide show
  1. package/dist/index.js +165 -102
  2. package/dist/index.js.map +1 -1
  3. package/dist/web-dist/assets/_pathlessLayout-D83hYFIC.js +1 -0
  4. package/dist/web-dist/assets/_pathlessLayout-DYRsUfs6.js +2 -0
  5. package/dist/web-dist/assets/_queryId-DmyRcSX-.js +1 -0
  6. package/dist/web-dist/assets/_table-CXzhHR9S.js +1 -0
  7. package/dist/web-dist/assets/_table-Cwy7lxKk.js +1 -0
  8. package/dist/web-dist/assets/_table-DaqO5XGq.js +1 -0
  9. package/dist/web-dist/assets/abap-Ds2wIDQc.js +1 -0
  10. package/dist/web-dist/assets/apex-DfqBN11z.js +1 -0
  11. package/dist/web-dist/assets/azcli-COqL1c-b.js +1 -0
  12. package/dist/web-dist/assets/badge-Ckwkbv_3.js +1 -0
  13. package/dist/web-dist/assets/bat-Nrlrgwbn.js +1 -0
  14. package/dist/web-dist/assets/bicep-DMqb4xTm.js +2 -0
  15. package/dist/web-dist/assets/browser-dcbfhXDu.js +1 -0
  16. package/dist/web-dist/assets/{bundle-mjs-g0oakdN9.js → bundle-mjs-DfrVkH8G.js} +1 -1
  17. package/dist/web-dist/assets/cameligo-DQX1RguE.js +1 -0
  18. package/dist/web-dist/assets/chat-sidebar-p9xpAAXQ.js +132 -0
  19. package/dist/web-dist/assets/clojure-CmnlCds-.js +1 -0
  20. package/dist/web-dist/assets/{code-editor-CTRHqZru.js → code-editor-DsRAUGQh.js} +2 -2
  21. package/dist/web-dist/assets/coffee-CgcM3HWm.js +1 -0
  22. package/dist/web-dist/assets/cpp-BnqpxZdA.js +1 -0
  23. package/dist/web-dist/assets/csharp-B8V_ECLX.js +1 -0
  24. package/dist/web-dist/assets/csp-Dzh7GjET.js +1 -0
  25. package/dist/web-dist/assets/css-BY0zxVqM.js +3 -0
  26. package/dist/web-dist/assets/cssMode-D_jEABO9.js +1 -0
  27. package/dist/web-dist/assets/cypher-D9AVJPko.js +1 -0
  28. package/dist/web-dist/assets/dart-vuJN5abD.js +1 -0
  29. package/dist/web-dist/assets/database.store-C0jTx_DA.js +57 -0
  30. package/dist/web-dist/assets/{dist-DlZR7Oow.js → dist-DmSgBrHs.js} +1 -1
  31. package/dist/web-dist/assets/dockerfile-Du-akT44.js +1 -0
  32. package/dist/web-dist/assets/ecl-C3XWQlLZ.js +1 -0
  33. package/dist/web-dist/assets/editor-1FQrmyyI.css +1 -0
  34. package/dist/web-dist/assets/editor.api-VeMVvGYa.js +865 -0
  35. package/dist/web-dist/assets/elixir-BzsCBGJ0.js +1 -0
  36. package/dist/web-dist/assets/esm-D_bQ4AdP.js +501 -0
  37. package/dist/web-dist/assets/flow9-z5gBTD0L.js +1 -0
  38. package/dist/web-dist/assets/freemarker2-B9XmkS8x.js +3 -0
  39. package/dist/web-dist/assets/fsharp-CMq6tChx.js +1 -0
  40. package/dist/web-dist/assets/go-ClPsEbRK.js +1 -0
  41. package/dist/web-dist/assets/graphql-7BvkEJ5O.js +1 -0
  42. package/dist/web-dist/assets/handlebars-sf8CVwlq.js +1 -0
  43. package/dist/web-dist/assets/hcl-DN6aCTHV.js +1 -0
  44. package/dist/web-dist/assets/highlighted-body-OFNGDK62-BU0nMuYA.js +1 -0
  45. package/dist/web-dist/assets/html-DI5TL_8H.js +1 -0
  46. package/dist/web-dist/assets/htmlMode-D_4DT2Lu.js +1 -0
  47. package/dist/web-dist/assets/{icons-wNdPUgHM.js → icons-BEkcNqUd.js} +1 -1
  48. package/dist/web-dist/assets/index-CK2sj4Xy.css +2 -0
  49. package/dist/web-dist/assets/index-b6Apx1z7.js +39 -0
  50. package/dist/web-dist/assets/indexes-Cv0o_HTj.js +1 -0
  51. package/dist/web-dist/assets/ini-Ba74TRs3.js +1 -0
  52. package/dist/web-dist/assets/java-B1OFDleH.js +1 -0
  53. package/dist/web-dist/assets/javascript-Cf3sZaZX.js +1 -0
  54. package/dist/web-dist/assets/json-editor-C9dFqjTV.js +1 -0
  55. package/dist/web-dist/assets/jsonMode-CQjwhzT5.js +7 -0
  56. package/dist/web-dist/assets/julia-CMywvhYA.js +1 -0
  57. package/dist/web-dist/assets/keys-o03XLuW4.js +1 -0
  58. package/dist/web-dist/assets/kotlin-BD6_sIY9.js +1 -0
  59. package/dist/web-dist/assets/less-BxdK-Aa1.js +2 -0
  60. package/dist/web-dist/assets/lexon-DCaYyeqi.js +1 -0
  61. package/dist/web-dist/assets/liquid-D7tk2apZ.js +1 -0
  62. package/dist/web-dist/assets/{logs-BnjjoFbl.js → logs-Ncb6EFEi.js} +1 -1
  63. package/dist/web-dist/assets/lspLanguageFeatures-DHxnBjVJ.js +4 -0
  64. package/dist/web-dist/assets/lua-DYwtBF6d.js +1 -0
  65. package/dist/web-dist/assets/m3-CogUFTfR.js +1 -0
  66. package/dist/web-dist/assets/markdown-COKMRj9K.js +1 -0
  67. package/dist/web-dist/assets/mdx-H6YCl9d8.js +1 -0
  68. package/dist/web-dist/assets/mermaid-GHXKKRXX-D3S70ynC.js +1 -0
  69. package/dist/web-dist/assets/{middleware-Bet3mw2T.js → middleware-CEqbkwLH.js} +1 -1
  70. package/dist/web-dist/assets/mips-BDOMMsh0.js +1 -0
  71. package/dist/web-dist/assets/module-CYndhtxW.js +2 -0
  72. package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +1 -0
  73. package/dist/web-dist/assets/monaco-theme-CyGd7xOU.js +64 -0
  74. package/dist/web-dist/assets/msdax-Bt2yooL5.js +1 -0
  75. package/dist/web-dist/assets/mysql-Bs8-d6RT.js +1 -0
  76. package/dist/web-dist/assets/objective-c-DZGYv99U.js +1 -0
  77. package/dist/web-dist/assets/pascal-FvUHIAld.js +1 -0
  78. package/dist/web-dist/assets/pascaligo-DEr9uXJO.js +1 -0
  79. package/dist/web-dist/assets/perl-DfX9jvgM.js +1 -0
  80. package/dist/web-dist/assets/personal-preferences.store-BIcu6qr5.js +1 -0
  81. package/dist/web-dist/assets/pgsql-B12f-wRt.js +1 -0
  82. package/dist/web-dist/assets/php-MynGtmh0.js +1 -0
  83. package/dist/web-dist/assets/pla-BSfIEgVT.js +1 -0
  84. package/dist/web-dist/assets/postiats-wriGJNMc.js +1 -0
  85. package/dist/web-dist/assets/powerquery-qTNF5irm.js +1 -0
  86. package/dist/web-dist/assets/powershell-Cr0AiP2J.js +1 -0
  87. package/dist/web-dist/assets/preload-helper-DICoZAvL.js +1 -0
  88. package/dist/web-dist/assets/protobuf-B5pCjOfx.js +2 -0
  89. package/dist/web-dist/assets/pug-BnGzsuEw.js +1 -0
  90. package/dist/web-dist/assets/python-Bd-J5HMt.js +1 -0
  91. package/dist/web-dist/assets/qsharp-C-Z8Szjm.js +1 -0
  92. package/dist/web-dist/assets/{queries.store-BlC7QGq6.js → queries.store-BbUkkWy1.js} +1 -1
  93. package/dist/web-dist/assets/{query-runner-CQWHEby5.js → query-runner-DBIufzsZ.js} +5 -5
  94. package/dist/web-dist/assets/r-lFEgLDol.js +1 -0
  95. package/dist/web-dist/assets/radix-ui-Bp71_UWp.js +51 -0
  96. package/dist/web-dist/assets/razor-BL-2JJuP.js +1 -0
  97. package/dist/web-dist/assets/react-BziCK5DU.js +1 -0
  98. package/dist/web-dist/assets/{react-dom-CnDfVSZQ.js → react-dom-ctQEFzyp.js} +5 -5
  99. package/dist/web-dist/assets/redis-CJPiZ1dc.js +1 -0
  100. package/dist/web-dist/assets/redis-value-rbj0L_ie.js +1 -0
  101. package/dist/web-dist/assets/redshift-D1FKNo6F.js +1 -0
  102. package/dist/web-dist/assets/restructuredtext-BdtNntNZ.js +1 -0
  103. package/dist/web-dist/assets/{rolldown-runtime-Y-txFyxk.js → rolldown-runtime-Ba77kUFP.js} +1 -1
  104. package/dist/web-dist/assets/ruby-C2uUAsPh.js +1 -0
  105. package/dist/web-dist/assets/runner-WhyDqbco.js +1 -0
  106. package/dist/web-dist/assets/rust-B22jVKPi.js +1 -0
  107. package/dist/web-dist/assets/sb-H5-MsoWu.js +1 -0
  108. package/dist/web-dist/assets/scala-JHuRLUuq.js +1 -0
  109. package/dist/web-dist/assets/{schema-C27u7buH.js → schema-DdnQO20v.js} +1 -1
  110. package/dist/web-dist/assets/scheme-CqKe-_5y.js +1 -0
  111. package/dist/web-dist/assets/scss-C9ckl5Lm.js +3 -0
  112. package/dist/web-dist/assets/select-Cg3fBZqb.js +1 -0
  113. package/dist/web-dist/assets/separator-B2Ii4cjw.js +1 -0
  114. package/dist/web-dist/assets/sheet-sidebar-D8BG4Pf9.js +1 -0
  115. package/dist/web-dist/assets/shell-C9lIrU5P.js +1 -0
  116. package/dist/web-dist/assets/solidity-BdsCByFb.js +1 -0
  117. package/dist/web-dist/assets/sophia-BiYQOR15.js +1 -0
  118. package/dist/web-dist/assets/sparql-CZhOhni4.js +1 -0
  119. package/dist/web-dist/assets/spinner-gvrX8mkL.js +1 -0
  120. package/dist/web-dist/assets/sql-DGoEI4nz.js +1 -0
  121. package/dist/web-dist/assets/st-DUBBkXkg.js +1 -0
  122. package/dist/web-dist/assets/swift-D_36y0eN.js +1 -0
  123. package/dist/web-dist/assets/systemverilog-BAtlR_WK.js +1 -0
  124. package/dist/web-dist/assets/{table-B1OYFDnr.js → table-Gq1Nd4WJ.js} +1 -1
  125. package/dist/web-dist/assets/tanstack-HxB2LyLp.js +8 -0
  126. package/dist/web-dist/assets/tcl-D05MO8B_.js +1 -0
  127. package/dist/web-dist/assets/tooltip-CIAbgIn7.js +12 -0
  128. package/dist/web-dist/assets/tsMode-4FmdP9_o.js +11 -0
  129. package/dist/web-dist/assets/twig-CPq3SV5E.js +1 -0
  130. package/dist/web-dist/assets/typescript-CEcdsK9n.js +1 -0
  131. package/dist/web-dist/assets/typespec-I6aAHcEc.js +1 -0
  132. package/dist/web-dist/assets/utils-CNXzeC6_.js +1 -0
  133. package/dist/web-dist/assets/vb-C6fWMOt8.js +1 -0
  134. package/dist/web-dist/assets/{visualizer-CITcnwJh.js → visualizer-Cxu0_nai.js} +1 -1
  135. package/dist/web-dist/assets/wgsl-CsswhpkD.js +298 -0
  136. package/dist/web-dist/assets/workers-CH8V5wKq.js +1 -0
  137. package/dist/web-dist/assets/xml-Clh3WxEv.js +1 -0
  138. package/dist/web-dist/assets/yaml--Kwp2ruw.js +1 -0
  139. package/dist/web-dist/index.html +22 -20
  140. package/package.json +8 -5
  141. package/dist/web-dist/assets/_pathlessLayout-C0MMCDcm.js +0 -1
  142. package/dist/web-dist/assets/_pathlessLayout-XjSpVK5x.js +0 -132
  143. package/dist/web-dist/assets/_queryId-OFkn9Oa-.js +0 -1
  144. package/dist/web-dist/assets/_table-DWUmdgY6.js +0 -1
  145. package/dist/web-dist/assets/_table-jJR4Ocv2.js +0 -1
  146. package/dist/web-dist/assets/badge-Bd7hbykP.js +0 -1
  147. package/dist/web-dist/assets/browser-B8_CLARX.js +0 -1
  148. package/dist/web-dist/assets/database.store-DJ10NZng.js +0 -57
  149. package/dist/web-dist/assets/format-cell-value-ClBO-Y4U.js +0 -1
  150. package/dist/web-dist/assets/highlighted-body-OFNGDK62-jkW4Egvm.js +0 -1
  151. package/dist/web-dist/assets/index-BANk_UGi.js +0 -36
  152. package/dist/web-dist/assets/index-Ir-8O5kw.css +0 -2
  153. package/dist/web-dist/assets/indexes-hgIGRB__.js +0 -1
  154. package/dist/web-dist/assets/mermaid-GHXKKRXX-BUBXMhKa.js +0 -1
  155. package/dist/web-dist/assets/monaco-editor-DxDiR4f3.js +0 -1252
  156. package/dist/web-dist/assets/monaco-editor-IL9D_L0g.css +0 -1
  157. package/dist/web-dist/assets/monitoring-DXY00d-N.js +0 -22
  158. package/dist/web-dist/assets/overlay.store-DzkuYBKd.js +0 -11
  159. package/dist/web-dist/assets/radix-ui-D3kd-zkB.js +0 -51
  160. package/dist/web-dist/assets/react-1w3eYWHr.js +0 -1
  161. package/dist/web-dist/assets/redis-value-D7lbyO7s.js +0 -1
  162. package/dist/web-dist/assets/runner-BqitD-mp.js +0 -1
  163. package/dist/web-dist/assets/schema-C8mAjJOp.js +0 -1
  164. package/dist/web-dist/assets/tanstack-BvmgSO8H.js +0 -11
  165. package/dist/web-dist/assets/use-database-engine-wK2YTpfJ.js +0 -1
@@ -0,0 +1,501 @@
1
+ import{n as Ld,r as a_}from"./rolldown-runtime-Ba77kUFP.js";import{wt as c_}from"./icons-BEkcNqUd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.18.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222632db-575d-46f8-b73e-5f5319e9b168",e._sentryDebugIdIdentifier="sentry-dbid-222632db-575d-46f8-b73e-5f5319e9b168")}catch{}})();var w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,F=globalThis,Zr="10.52.0";function Ft(){return di(F),F}function di(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.52.0",t[Zr]=t["10.52.0"]||{}}function kr(e,t,n=F){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Zr]=r["10.52.0"]||{};return i[e]||(i[e]=t())}var Sc=["debug","info","warn","error","log","assert","trace"],u_="Sentry Logger ",Mo={};function Bt(e){if(!("console"in F))return e();const t=F.console,n={},r=Object.keys(Mo);r.forEach(i=>{const o=Mo[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function l_(){Ec().enabled=!0}function f_(){Ec().enabled=!1}function Dd(){return Ec().enabled}function d_(...e){bc("log",...e)}function p_(...e){bc("warn",...e)}function h_(...e){bc("error",...e)}function bc(e,...t){w&&Dd()&&Bt(()=>{F.console[e](`${u_}[${e}]:`,...t)})}function Ec(){return w?kr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var g={enable:l_,disable:f_,isEnabled:Dd,log:d_,warn:p_,error:h_},$d=50;var Bu=/\(error: (.*)\)/,Uu=/captureMessage|captureException/;function Fd(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
2
+ `);for(let a=r;a<s.length;a++){let c=s[a];c.length>1024&&(c=c.slice(0,1024));const u=Bu.test(c)?c.replace(Bu,"$1"):c;if(!u.includes("Error: ")){for(const f of t){const l=f(u);if(l){o.push(l);break}}if(o.length>=$d+i)break}}return g_(o.slice(i))}}function m_(e){return Array.isArray(e)?Fd(...e):e}function g_(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Gi(t).function||"")&&t.pop(),t.reverse(),Uu.test(Gi(t).function||"")&&(t.pop(),Uu.test(Gi(t).function||"")&&t.pop()),t.slice(0,$d).map(n=>({...n,filename:n.filename||Gi(t).filename,function:n.function||"?"}))}function Gi(e){return e[e.length-1]||{}}var Ys="<anonymous>";function xt(e){try{return!e||typeof e!="function"?Ys:e.name||Ys}catch{return Ys}}function Aa(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Bd(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function __(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var jr={},Hu={};function an(e,t){return jr[e]=jr[e]||[],jr[e].push(t),()=>{const n=jr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function cn(e,t){if(!Hu[e]){Hu[e]=!0;try{t()}catch(n){w&&g.error(`Error while instrumenting ${e}`,n)}}}function Xe(e,t){const n=e&&jr[e];if(n)for(const r of n)try{r(t)}catch(i){w&&g.error(`Error while triggering instrumentation handler.
3
+ Type: ${e}
4
+ Name: ${xt(r)}
5
+ Error:`,i)}}var Ks=null;function Ud(e){const t="error";an(t,e),cn(t,y_)}function y_(){Ks=F.onerror,F.onerror=function(e,t,n,r,i){return Xe("error",{column:r,error:i,line:n,msg:e,url:t}),Ks?Ks.apply(this,arguments):!1},F.onerror.__SENTRY_INSTRUMENTED__=!0}var Js=null;function Hd(e){const t="unhandledrejection";an(t,e),cn(t,v_)}function v_(){Js=F.onunhandledrejection,F.onunhandledrejection=function(e){return Xe("unhandledrejection",e),Js?Js.apply(this,arguments):!0},F.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Wd=Object.prototype.toString;function gt(e){switch(Wd.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Pt(e,Error)}}function Ar(e,t){return Wd.call(e)===`[object ${t}]`}function jd(e){return Ar(e,"ErrorEvent")}function Wu(e){return Ar(e,"DOMError")}function S_(e){return Ar(e,"DOMException")}function at(e){return Ar(e,"String")}function ps(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ot(e){return e===null||ps(e)||typeof e!="object"&&typeof e!="function"}function Fe(e){return Ar(e,"Object")}function hs(e){return typeof Event<"u"&&Pt(e,Event)}function b_(e){return typeof Element<"u"&&Pt(e,Element)}function E_(e){return Ar(e,"RegExp")}function un(e){return!!(e?.then&&typeof e.then=="function")}function T_(e){return Fe(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Pt(e,t){try{return e instanceof t}catch{return!1}}function zd(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Tc(e){return typeof Request<"u"&&Pt(e,Request)}var Ic=F,I_=80;function ke(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=3;let u;const f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||I_;for(;n&&o++<r&&(u=w_(n,f),!(u==="html"||o>1&&s+i.length*c+u.length>=l));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function w_(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Ic.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i?.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&at(o)){const s=o.split(/\s+/);for(const a of s)r.push(`.${a}`)}}for(const o of["aria-label","type","name","title","alt"]){const s=n.getAttribute(o);s&&r.push(`[${o}="${s}"]`)}return r.join("")}function Bn(){try{return Ic.document.location.href}catch{return""}}function wc(e,t=5){if(!Ic.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function xe(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&qd(i,r);try{e[t]=i}catch{w&&g.log(`Failed to replace method "${t}" in object`,e)}}function ve(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{w&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function qd(e,t){try{e.prototype=t.prototype=t.prototype||{},ve(e,"__sentry_original__",t)}catch{}}function Rc(e){return e.__sentry_original__}function Gd(e){if(gt(e))return{message:e.message,name:e.name,stack:e.stack,...zu(e)};if(hs(e)){const t={type:e.type,target:ju(e.target),currentTarget:ju(e.currentTarget),...zu(e)};return typeof CustomEvent<"u"&&Pt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ju(e){try{return b_(e)?ke(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function zu(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function R_(e){const t=Object.keys(Gd(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var Vn;function pi(e){if(Vn!==void 0)return Vn?Vn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=F;return t in n&&typeof n[t]=="function"?(Vn=n[t],Vn(e)):(Vn=null,e())}function At(){return pi(()=>Math.random())}function hi(){return pi(()=>Date.now())}function ei(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Xs(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function No(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{zd(i)?n.push(Bd(i)):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Gr(e,t,n=!1){return at(e)?E_(t)?t.test(e):at(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function ct(e,t=[],n=!1){return t.some(r=>Gr(e,r,n))}function k_(){const e=F;return e.crypto||e.msCrypto}var Qs;function A_(){return At()*16}function we(e=k_()){try{if(e?.randomUUID)return pi(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Qs||(Qs="10000000100040008000100000000000"),Qs.replace(/[018]/g,t=>(t^(A_()&15)>>t/4).toString(16))}function Vd(e){return e.exception?.values?.[0]}function yn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Vd(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ca(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Lt(e,t){const n=Vd(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function C_(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>Xs(s,0));const o=Math.min(r-1,i);t.context_line=Xs(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>Xs(s,0))}function qu(e){if(M_(e))return!0;try{ve(e,"__sentry_captured__",!0)}catch{}return!1}function M_(e){try{return e.__sentry_captured__}catch{}}var Yd=1e3;function Un(){return hi()/Yd}function N_(){const{performance:e}=F;if(!e?.now||!e.timeOrigin)return Un;const t=e.timeOrigin;return()=>(t+pi(()=>e.now()))/Yd}var Gu;function de(){return(Gu??(Gu=N_()))()}var Zs=null;function x_(){const{performance:e}=F;if(!e?.now)return;const t=3e5,n=pi(()=>e.now()),r=hi(),i=e.timeOrigin;if(typeof i=="number"&&Math.abs(i+n-r)<t)return i;const o=e.timing?.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<t?o:r-n}function Ie(){return Zs===null&&(Zs=x_()),Zs}function O_(e){const t=de(),n={sid:we(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>L_(n)};return e&&dr(n,e),n}function dr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||de(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:we()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function P_(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),dr(e,n)}function L_(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function mi(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=mi(r[i],t[i],n-1));return r}function _t(){return we()}function Ct(){return we().substring(16)}var Ma="_sentrySpan";function yt(e,t){t?ve(e,Ma,t):delete e[Ma]}function pr(e){return e[Ma]}var D_=100,An=class Na{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:_t(),sampleRand:At()}}clone(){const t=new Na;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,yt(t,pr(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&dr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,{tags:r,attributes:i,extra:o,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:f,conversationId:l}=(n instanceof Na?n.getScopeData():Fe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),f&&(this._propagationContext=f),l&&(this._conversationId=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,yt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:_t(),sampleRand:At()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:D_;if(r<=0)return this;const i={timestamp:Un(),...t,message:t.message?ei(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:pr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=mi(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||we();if(!this._client)return w&&g.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||we();if(!this._client)return w&&g.warn("No client configured on scope - will not capture message!"),i;const o=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=t.event_id||n?.event_id||we();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(w&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function $_(){return kr("defaultCurrentScope",()=>new An)}function F_(){return kr("defaultIsolationScope",()=>new An)}var Vu=e=>e instanceof Promise&&!e[Kd],Kd=Symbol("chained PromiseLike"),Jd=(e,t,n)=>{const r=e.then(i=>(t(i),i),i=>{throw n(i),i});return Vu(r)&&Vu(e)?r:B_(e,r)},B_=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];typeof i=="function"?Object.defineProperty(t,r,{value:(...o)=>i.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Kd]:!0}),t},U_=class{constructor(e,t){let n;e?n=e:n=new An;let r;t?r=t:r=new An,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(r){throw this._popScope(),r}return un(n)?Jd(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function hr(){const e=Ft(),t=di(e);return t.stack=t.stack||new U_($_(),F_())}function H_(e){return hr().withScope(e)}function W_(e,t){const n=hr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Yu(e){return hr().withScope(()=>e(hr().getIsolationScope()))}function j_(){return{withIsolationScope:Yu,withScope:H_,withSetScope:W_,withSetIsolationScope:(e,t)=>Yu(t),getCurrentScope:()=>hr().getScope(),getIsolationScope:()=>hr().getIsolationScope()}}function ln(e){const t=di(e);return t.acs?t.acs:j_()}function z_(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function q_(e,t){const{value:n,unit:r}=z_(e)?e:{value:e,unit:void 0},i=G_(n),o=r&&typeof r=="string"?{unit:r}:{};if(i)return{...i,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...o}}function mr(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const o=q_(i,t);o&&(n[r]=o)}return n}function Ku(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const i=r.value;Array.isArray(i)?t+=Ju(i[0])*i.length:Ot(i)?t+=Ju(i):t+=100}return t}function Ju(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function G_(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var Xd;function V_(){return Xd?.()}function Y_(){return Xd!==void 0}function j(){const e=Ft();return ln(e).getCurrentScope()}function Ee(){const e=Ft();return ln(e).getIsolationScope()}function ar(){return kr("globalScope",()=>new An)}function Ge(...e){const t=Ft(),n=ln(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function _O(...e){const t=Ft(),n=ln(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function R(){return j().getClient()}function Qd(e){const t=V_();if(t)return{trace_id:t.traceId,span_id:t.spanId};const{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),o={trace_id:n,span_id:i||Ct()};return r&&(o.parent_span_id=r),o}var ce="sentry.source",K_="sentry.sample_rate",J_="sentry.previous_trace_sample_rate",ie="sentry.op",q="sentry.origin",xo="sentry.idle_span_finish_reason",gi="sentry.measurement_unit",_i="sentry.measurement_value",X_="sentry.release",Q_="sentry.environment",Z_="sentry.segment.name",ey="sentry.segment.id",ty="sentry.sdk.name",ny="sentry.sdk.version",ry="user.id",iy="user.email",oy="user.ip_address",sy="user.name",ti="sentry.custom_span_name",Zd="sentry.profile_id",Hn="sentry.exclusive_time";var ay="sentry.link.type",cy="gen_ai.conversation.id";function uy(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function Oo(e,t){e.setAttribute("http.response.status_code",t);const n=uy(t);n.message!=="unknown_error"&&e.setStatus(n)}function ly(e){try{const t=F.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function fy(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var ep="_sentryScope",tp="_sentryIsolationScope";function dy(e,t,n){e&&(ve(e,tp,ly(n)),ve(e,ep,t))}function ni(e){const t=e;return{scope:t[ep],isolationScope:fy(t[tp])}}var np="sentry-";function kc(e){const t=py(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.startsWith("sentry-")){const s=i.slice(7);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function rp(e){if(e)return hy(Object.entries(e).reduce((t,[n,r])=>(r&&(t[`${np}${n}`]=r),t),{}))}function py(e){if(!(!e||!at(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Xu(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):Xu(e)}function Xu(e){return e.split(",").map(t=>{const n=t.indexOf("=");return n===-1?[]:[t.slice(0,n),t.slice(n+1)].map(r=>{try{return decodeURIComponent(r.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function hy(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>8192?(w&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var my=/^o(\d+)\./,gy=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function _y(e){return e==="http"||e==="https"}function bt(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function ip(e){const t=gy.exec(e);if(!t){Bt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return op({host:o,pass:i,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function op(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function yy(e){if(!w)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?_y(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function vy(e){return e.match(my)?.[1]}function sp(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=vy(n)),r}function ap(e){const t=typeof e=="string"?ip(e):op(e);if(!(!t||!yy(t)))return t}function Cn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var cp=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Sy(e){if(!e)return;const t=e.match(cp);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function up(e,t){const n=Sy(e),r=kc(t);if(!n?.traceId)return{traceId:_t(),sampleRand:At()};const i=by(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function lp(e=_t(),t=Ct(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function fp(e=_t(),t=Ct(),n){return`00-${e}-${t}-${n?"01":"00"}`}function by(e,t){const n=Cn(t?.sample_rand);if(n!==void 0)return n;const r=Cn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?At()*r:r+At()*(1-r):At()}function Ey(e,t){const n=sp(e);return t&&n&&t!==n?(g.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(g.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var Qu=!1;function Ty(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:c}=L(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:c}}function dp(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:L(e).parent_span_id,o=ni(e).scope;return{parent_span_id:i,span_id:r?o?.getPropagationContext().propagationSpanId||Ct():t,trace_id:n}}function Iy(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ut(e);return lp(t,n,r)}function wy(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ut(e);return fp(t,n,r)}function pp(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===1,attributes:o,...i}))}function hp(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:i})=>({span_id:t,trace_id:n,sampled:r===1,attributes:i}))}function Mt(e){return typeof e=="number"?Zu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Zu(e.getTime()):de()}function Zu(e){return e>9999999999?e/1e3:e}function L(e){if(_p(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(gp(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:mp(e),start_timestamp:Mt(i),timestamp:Mt(s)||void 0,status:yp(a),op:r[ie],origin:r[q],links:pp(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Po(e){if(_p(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(gp(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:mp(e),start_timestamp:Mt(i),end_timestamp:Mt(s),is_segment:e===Lo(e),status:vp(a),attributes:r,links:hp(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Lo(e)}}function mp(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Ry(e){return{...e,attributes:mr(e.attributes),links:e.links?.map(t=>({...t,attributes:mr(t.attributes)}))}}function gp(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _p(e){return typeof e.getSpanJSON=="function"}function Ut(e){const{traceFlags:t}=e.spanContext();return t===1}function yp(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function vp(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var wn="_sentryChildSpans",xa="_sentryRootSpan";function Sp(e,t){const n=e[xa]||e;ve(t,xa,n),e[wn]?e[wn].add(t):ve(e,wn,new Set([t]))}function ky(e,t){e[wn]&&e[wn].delete(t)}function lo(e){const t=new Set;function n(r){if(!t.has(r)&&Ut(r)){t.add(r);const i=r[wn]?Array.from(r[wn]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}var ye=Lo;function Lo(e){return e[xa]||e}function Se(){const e=Ft(),t=ln(e);return t.getActiveSpan?t.getActiveSpan():pr(j())}function Do(){Qu||(Bt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Qu=!0)}function yO(e,t){e.updateName(t),e.setAttributes({[ce]:"custom",[ti]:t})}var el=!1;function Ay(){if(el)return;function e(){const t=Se(),n=t&&ye(t);if(n){const r="internal_error";w&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",el=!0,Ud(e),Hd(e)}function Qe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||R()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function tl(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ri(e,t){if(!t?.length)return!1;for(const n of t){if(Ny(n)){if(e.description&&Gr(e.description,n))return w&&tl(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const i=n.name?e.description&&Gr(e.description,n.name):!0,o=n.op?e.op&&Gr(e.op,n.op):!0,s=n.attributes?Object.entries(n.attributes).every(([a,c])=>Cy(e.attributes?.[a],c)):!0;if(i&&o&&s)return w&&tl(e),!0}return!1}function Cy(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Gr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function My(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function Ny(e){return typeof e=="string"||e instanceof RegExp}var xy="production",bp="_frozenDsc";function fo(e,t){ve(e,bp,t)}function Ep(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||"production",release:n.release,public_key:r,trace_id:e,org_id:sp(t)};return t.emit("createDsc",i),i}function Ac(e,t){const n=t.getPropagationContext();return n.dsc||Ep(n.traceId,e)}function qe(e){const t=R();if(!t)return{};const n=ye(e),r=L(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}const c=n[bp];if(c)return a(c);const u=o?.get("sentry.dsc"),f=u&&kc(u);if(f)return a(f);const l=Ep(e.spanContext().traceId,t),d=i["sentry.source"]??i["sentry.span.source"],p=r.description;return d!=="url"&&p&&(l.transaction=p),Qe()&&(l.sampled=String(Ut(n)),l.sample_rand=o?.get("sentry.sample_rand")??ni(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function vO(e){const t=qe(e);return rp(t)}var ze=class{constructor(e={}){this._traceId=e.traceId||_t(),this._spanId=e.spanId||Ct(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function SO(e){return ve(e,"_streamed",!0),e}function ms(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}var Tp=Symbol.for("sentry.skipNormalization"),Ip=Symbol.for("sentry.overrideNormalizationDepth");function Oy(e){ve(e,Tp,!0)}function Py(e,t){ve(e,Ip,t)}function Ly(e){return!!e[Tp]}function Dy(e){const t=e[Ip];return typeof t=="number"?t:void 0}function Ne(e,t=100,n=1/0){try{return Oa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wp(e,t=3,n=102400){const r=Ne(e,t);return Uy(r)>n?wp(e,t-1,n):r}function Oa(e,t,n=1/0,r=1/0,i=Hy()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=$y(e,t);if(!a.startsWith("[object "))return a;if(Ly(t))return t;const c=Dy(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const f=t;if(f&&typeof f.toJSON=="function")try{return Oa("",f.toJSON(),u-1,r,i)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=Gd(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const m=p[h];l[h]=Oa(h,m,u-1,r,i),d++}return s(t),l}function $y(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(zd(t))return Bd(t);if(T_(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${xt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Fy(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Fy(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function By(e){return~-encodeURI(e).split(/%..|./).length}function Uy(e){return By(JSON.stringify(e))}function Hy(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function rt(e,t=[]){return[e,t]}function Wy(e,t){const[n,r]=e;return[n,[...r,t]]}function Mn(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function Pa(e,t){return Mn(e,(n,r)=>t.includes(r))}function $o(e){const t=di(F);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function jy(e){const t=di(F);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Fo(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[$o(r),o]:r.push(typeof o=="string"?$o(o):o)}for(const o of n){const[s,a]=o;if(i(`
6
+ ${JSON.stringify(s)}
7
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ne(a))}i(c)}}return typeof r=="string"?r:zy(r)}function zy(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function qy(e){let t=typeof e=="string"?$o(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(jy(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function Gy(e){return[{type:"span"},e]}function Vy(e){const t=typeof e.data=="string"?$o(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Rp={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function Yy(e){return e in Rp}function nl(e){return Yy(e)?Rp[e]:e}function yi(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function kp(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bt(r)},...i&&{trace:i}}}function Ky(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 Jy(e,t,n,r){const i=yi(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bt(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return rt(o,[s])}function Xy(e,t,n,r){const i=yi(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Ky(e,n?.sdk);const s=kp(e,i,r,t);return delete e.sdkProcessingMetadata,rt(s,[[{type:o},e]])}function Qy(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=qe(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:bt(i)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(p=>{const h=L(p);return!ri({description:h.description,op:h.op,attributes:h.data},c)}):e,f=e.length-u.length;f&&t?.recordDroppedEvent("before_send","span",f);const l=a?p=>{const h=L(p),m=ms(a)?h:a(h);return m||(Do(),h)}:L,d=[];for(const p of u){const h=l(p);h&&d.push(Gy(h))}return rt(s,d)}function Zy(e){if(!w)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=L(e),{spanId:i}=e.spanContext(),o=Ut(e),s=ye(e),a=s===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:f,description:l}=L(s);u.push(`root ID: ${s.spanContext().spanId}`),f&&u.push(`root op: ${f}`),l&&u.push(`root description: ${l}`)}g.log(`${c}
8
+ ${u.join(`
9
+ `)}`)}function ev(e){if(!w)return;const{description:t="< unknown name >",op:n="< unknown op >"}=L(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${ye(e)===e?"root ":""}span "${t}" with ID ${r}`;g.log(i)}function tv(e,t,n,r=Se()){const i=r&&ye(r);i&&(w&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[_i]:t,[gi]:n}))}function rl(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[gi],o=r[_i];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}function ft(e){return e.getOptions().traceLifecycle==="stream"}var il=1e3,gs=class{constructor(e={}){this._traceId=e.traceId||_t(),this._spanId=e.spanId||Ct(),this._startTime=e.startTimestamp||de(),this._links=e.links,this._attributes={},this.setAttributes({[q]:"manual",[ie]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Mt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(ce,"custom"),this}end(e){this._endTime||(this._endTime=Mt(e),ev(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ie],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:yp(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[q],profile_id:this._attributes[Zd],exclusive_time:this._attributes[Hn],measurements:rl(this._events),is_segment:this._isStandaloneSpan&&ye(this)===this||void 0,segment_id:this._isStandaloneSpan?ye(this).spanContext().spanId:void 0,links:pp(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===ye(this),status:vp(this._status),attributes:this._attributes,links:hp(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){w&&g.log("[Tracing] Adding an event to span:",e);const r=ol(t)?t:n||de(),i=ol(t)?{}:t||{},o={name:e,time:Mt(r),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=R();if(e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===ye(this)))return;if(this._isStandaloneSpan){this._sampled?rv(Qy([this],e)):(w&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}else if(e&&ft(e)){e.emit("afterSegmentSpanEnd",this);return}const t=this._convertSpanToTransaction();t&&(ni(this).scope||j()).captureEvent(t)}_convertSpanToTransaction(){if(!sl(L(this)))return;this._name||(w&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=ni(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const r=lo(this).filter(a=>a!==this&&!nv(a)).map(a=>L(a)).filter(sl),i=this._attributes[ce];delete this._attributes[ti],r.forEach(a=>{delete a.data[ti]});const o={contexts:{trace:Ty(this)},spans:r.length>il?r.sort((a,c)=>a.start_timestamp-c.start_timestamp).slice(0,il):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:qe(this)},request:n,...i&&{transaction_info:{source:i}}},s=rl(this._events);return s&&Object.keys(s).length&&(w&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(s,void 0,2)),o.measurements=s),o}};function ol(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function sl(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function nv(e){return e instanceof gs&&e.isStandaloneSpan()}function rv(e){const t=R();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Cc(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(o){throw t(o),n(),o}return iv(i,t,n,r)}function iv(e,t,n,r){return un(e)?Jd(e,i=>{n(),r(i)},i=>{t(i),n()}):(n(),r(e),e)}function ov(e,t,n){if(!Qe(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=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?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=Cn(i);if(o===void 0)return w&&g.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return w&&g.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,o,r];const s=n<o;return s||w&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}var La="__SENTRY_SUPPRESS_TRACING__";function Ht(e,t){const n=Cr();if(n.startSpan)return n.startSpan(e,t);const r=Nc(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Ge(a,()=>Ap(o)(()=>{const c=j(),u=xc(c,o),f=R(),l=e.onlyIfParent&&!u,d=l?new ze:Mc({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return l&&f?.recordDroppedEvent("no_parent_span","span"),(!Cp(d)||!u)&&yt(c,d),Cc(()=>t(d),()=>{const{status:p}=L(d);d.isRecording()&&(!p||p==="ok")&&d.setStatus({code:2,message:"internal_error"})},()=>{d.end()})}))}function Gt(e,t){const n=Cr();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Nc(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Ge(a,()=>Ap(o)(()=>{const c=j(),u=xc(c,o),f=e.onlyIfParent&&!u,l=f?new ze:Mc({parentSpan:u,spanArguments:r,forceTransaction:i,scope:c});return f&&R()?.recordDroppedEvent("no_parent_span","span"),(!Cp(l)||!u)&&yt(c,l),Cc(()=>t(l,()=>l.end()),()=>{const{status:d}=L(l);l.isRecording()&&(!d||d==="ok")&&l.setStatus({code:2,message:"internal_error"})})}))}function Ze(e){const t=Cr();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Nc(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?o=>Ge(e.scope,o):i!==void 0?o=>gr(i,o):o=>o())(()=>{const o=j(),s=xc(o,i),a=R();return e.onlyIfParent&&!s?(a?.recordDroppedEvent("no_parent_span","span"),new ze):Mc({parentSpan:s,spanArguments:n,forceTransaction:r,scope:o})})}var bO=(e,t)=>{const n=Ft(),r=ln(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e,s=R(),a=kc(o);return s&&!Ey(s,a?.org_id)?av(t):Ge(c=>{const u=up(i,o);return c.setPropagationContext(u),yt(c,void 0),t()})};function gr(e,t){const n=Cr();return n.withActiveSpan?n.withActiveSpan(e,t):Ge(r=>(yt(r,e||void 0),t(r)))}function sv(e){const t=Cr();return t.suppressTracing?t.suppressTracing(e):Ge(n=>{n.setSDKProcessingMetadata({[La]:!0});const r=e();return n.setSDKProcessingMetadata({[La]:void 0}),r})}function av(e){const t=Cr();return t.startNewTrace?t.startNewTrace(e):Ge(n=>(n.setPropagationContext({traceId:_t(),sampleRand:At()}),w&&g.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),gr(null,e)))}function Mc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Qe()){const a=new ze;if(n||!e){const c={sampled:"false",sample_rate:"0",transaction:t.name,...qe(a)};fo(a,c)}return a}const i=R();if(uv(i,t))return Oc(r)||i?.recordDroppedEvent("ignored","span"),new ze({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});const o=Ee();let s;if(e&&!n)s=cv(e,r,t),Sp(e,s);else if(e){const a=qe(e),{traceId:c,spanId:u}=e.spanContext(),f=Ut(e);s=al({traceId:c,parentSpanId:u,...t},r,f),fo(s,a)}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:f}={...o.getPropagationContext(),...r.getPropagationContext()};s=al({traceId:a,parentSpanId:u,...t},r,f),c&&fo(s,c)}return Zy(s),dy(s,r,o),s}function Nc(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=Mt(e.startTime),delete n.startTime,n}return t}function Cr(){const e=Ft();return ln(e)}function al(e,t,n){const r=R(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),f=Oc(t),[l,d,p]=f?[!1]:ov(i,{name:o,parentSampled:a,attributes:c,parentSampleRate:Cn(u.dsc?.sample_rate)},u.sampleRand),h=new gs({...e,attributes:{[ce]:"custom",[K_]:d!==void 0&&p?d:void 0,...c},sampled:l});return!l&&r&&!f&&(w&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",ft(r)?"span":"transaction")),r&&r.emit("spanStart",h),h}function cv(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=Oc(t),s=o?!1:Ut(e),a=s?new gs({...n,parentSpanId:r,traceId:i,sampled:s}):new ze({traceId:i});Sp(e,a);const c=R();return c&&(ft(c)&&a instanceof ze&&(e instanceof ze&&e.dropReason?(a.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,"span")):o||(a.dropReason="sample_rate",c.recordDroppedEvent("sample_rate","span"))),c.emit("spanStart",a),n.endTimestamp&&(c.emit("spanEnd",a),c.emit("afterSpanEnd",a))),a}function xc(e,t){if(t)return t;if(t===null)return;const n=pr(e);if(!n)return;const r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ye(n):n}function Ap(e){return e!==void 0?t=>gr(e,t):t=>t()}function uv(e,t){const n=e?.getOptions().ignoreSpans;return!e||!ft(e)||!n?.length?!1:ri({description:t.name||"",op:t.attributes?.["sentry.op"]||t.op,attributes:t.attributes},n)}function Cp(e){return e instanceof ze&&e.dropReason==="ignored"}function Oc(e){return e.getScopeData().sdkProcessingMetadata[La]===!0}var po={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},lv="heartbeatFailed",fv="idleTimeout",dv="finalTimeout",pv="externalFinish";function Mp(e,t={}){const n=new Map;let r=!1,i,o=pv,s=!t.disableAutoFinish;const a=[],{idleTimeout:c=po.idleTimeout,finalTimeout:u=po.finalTimeout,childSpanTimeout:f=po.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:d=!0}=t,p=R();if(!p||!Qe()){const S=new ze,D={sample_rate:"0",sampled:"false",...qe(S)};return fo(S,D),S}const h=j(),m=Se(),_=hv(e);_.end=new Proxy(_.end,{apply(S,D,$){if(l&&l(_),D instanceof ze)return;const[E,...x]=$,M=E||de(),C=Mt(M),Y=lo(_).filter(P=>P!==_),Z=L(_);if(!Y.length||!d)return A(C),Reflect.apply(S,D,[C,...x]);const ee=p.getOptions().ignoreSpans,oe=Y?.reduce((P,K)=>{const te=L(K);return!te.timestamp||ee&&ri({description:te.description,op:te.op,attributes:te.data},ee)?P:P?Math.max(P,te.timestamp):te.timestamp},void 0),T=Z.start_timestamp,H=Math.min(T?T+u/1e3:1/0,Math.max(T||-1/0,Math.min(C,oe||1/0)));return A(H),Reflect.apply(S,D,[H,...x])}});function y(){i&&(clearTimeout(i),i=void 0)}function v(S){y(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=fv,_.end(S))},c)}function b(S){i=setTimeout(()=>{!r&&s&&(o=lv,_.end(S))},f)}function N(S){y(),n.set(S,!0),b(de()+f/1e3)}function W(S){n.has(S)&&n.delete(S),n.size===0&&v(de()+c/1e3)}function A(S){r=!0,n.clear(),a.forEach(C=>C()),yt(h,m);const D=L(_),{start_timestamp:$}=D;if(!$)return;D.data["sentry.idle_span_finish_reason"]||_.setAttribute(xo,o);const E=D.status;(!E||E==="unknown")&&_.setStatus({code:1}),g.log(`[Tracing] Idle span "${D.op}" finished`);const x=lo(_).filter(C=>C!==_);let M=0;x.forEach(C=>{C.isRecording()&&(C.setStatus({code:2,message:"cancelled"}),C.end(S),w&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(C,void 0,2)));const{timestamp:Y=0,start_timestamp:Z=0}=L(C),ee=Z<=S,oe=(u+c)/1e3,T=Y-Z<=oe;if(w){const H=JSON.stringify(C,void 0,2);ee?T||g.log("[Tracing] Discarding span since it finished after idle span final timeout",H):g.log("[Tracing] Discarding span since it happened after idle span was finished",H)}(!T||!ee)&&(ky(_,C),M++)}),M>0&&_.setAttribute("sentry.idle_span_discarded_spans",M)}return a.push(p.on("spanStart",S=>{r||S===_||L(S).timestamp||S instanceof gs&&S.isStandaloneSpan()||lo(_).includes(S)&&N(S.spanContext().spanId)})),a.push(p.on("spanEnd",S=>{r||W(S.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",S=>{S===_&&(s=!0,v(),n.size&&b())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(_.setStatus({code:2,message:"deadline_exceeded"}),o=dv,_.end())},u),_}function hv(e){const t=Ze(e);return yt(j(),t),w&&g.log("[Tracing] Started span is an idle span"),t}function mv(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;gv(e,t),r&&vv(e,r),Sv(e,n),_v(e,i),yv(e,o)}function cl(e,t){const{extra:n,tags:r,attributes:i,user:o,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:m}=t;Br(e,"extra",n),Br(e,"tags",r),Br(e,"attributes",i),Br(e,"user",o),Br(e,"contexts",s),e.sdkProcessingMetadata=mi(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Br(e,t,n){e[t]=mi(e[t],n,1)}function vi(e,t){const n=ar().getScopeData();return e&&cl(n,e.getScopeData()),t&&cl(n,t.getScopeData()),n}function gv(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function _v(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function yv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function vv(e,t){e.contexts={trace:dp(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qe(t),...e.sdkProcessingMetadata};const n=ye(t),r=L(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Sv(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var bv="thismessage:/";function Pc(e){return"isRelative"in e}function Lc(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?bv:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function Ev(e){if(Pc(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 Yt(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 Bo(e){return e.split(/[?#]/,1)[0]}function Tv(e){const{protocol:t,host:n,path:r}=e,i=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${i}${r}`}function Kt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),o=e.indexOf(",");let s="";if(t&&o!==-1){const a=e.slice(o+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}function Iv(e,t){const n=Po(e),r=Lo(e),i=Po(r),{isolationScope:o,scope:s}=ni(e);wv(n,i,t,vi(o,s));const a=e.kind;kv(n,a),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);const{beforeSendSpan:c}=t.getOptions(),u=c&&ms(c)?Rv(n,c):n,f=u.attributes?.[ce];return f&&et(u,{"sentry.span.source":f}),{...Ry(u),_segmentSpan:r}}function et(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,i])=>{i!=null&&!(r in n)&&(n[r]=i)})}function wv(e,t,n,r){const i=n.getSdkMetadata(),{release:o,environment:s,sendDefaultPii:a}=n.getOptions();et(e,{[X_]:o,[Q_]:s,[Z_]:t.name,[ey]:t.span_id,[ty]:i?.sdk?.name,[ny]:i?.sdk?.version,...a?{[ry]:r.user?.id,[iy]:r.user?.email,[oy]:r.user?.ip_address,[sy]:r.user?.username}:{},...r.attributes})}function Rv(e,t){const n=t(e);return n||(Do(),e)}var Da=1,ul=2;function kv(e,t){const n=e.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r){Av(e,n,t,r);return}const i=n["db.system.name"]||n["db.system"],o=typeof n["sentry.op"]=="string"&&`${n["sentry.op"]}`.startsWith("cache.");if(i&&!o){Mv(e,n);return}if(n["rpc.service"]){et(e,{[ie]:"rpc"});return}if(n["messaging.system"]){et(e,{[ie]:"message"});return}const s=n["faas.trigger"];s&&et(e,{[ie]:`${s}`})}function Av(e,t,n,r){const i=["http"];n===ul?i.push("client"):n===Da&&i.push("server"),t["sentry.http.prefetch"]&&i.push("prefetch"),et(e,{[ie]:i.join(".")});const o=t[ti];if(typeof o=="string"){e.name=o;return}if(t["sentry.source"]==="custom")return;const s=t["http.route"];if(typeof s=="string")e.name=`${r} ${s}`,et(e,{[ce]:"route"});else{if(n===ul||n===Da){const a=Cv(t,n);a&&(e.name=`${r} ${a}`)}et(e,{[ce]:"url"})}}function Cv(e,t){const n=e["http.url"]||e["url.full"],r=e["http.target"],i=typeof n=="string"?Yt(n):void 0,o=i?Tv(i):void 0;if(t===Da&&typeof r=="string")return Bo(r);if(o)return o;if(typeof r=="string")return Bo(r)}function Mv(e,t){et(e,{[ie]:"db"});const n=t[ti];if(typeof n=="string"){e.name=n;return}if(t["sentry.source"]==="custom")return;const r=t["db.statement"];r&&(e.name=`${r}`,et(e,{[ce]:"task"}))}var ea=0,ll=1,fl=2;function Si(e){return new Np(t=>{t(e)})}function Dc(e){return new Np((t,n)=>{n(e)})}var Np=class $a{constructor(t){this._state=ea,this._handlers=[],this._runExecutor(t)}then(t,n){return new $a((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new $a((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===ea)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===ll&&n[1](this._value),this._state===fl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===ea){if(un(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(ll,o)},i=o=>{n(fl,o)};try{t(r,i)}catch(o){i(o)}}};function Nv(e,t,n,r=0){try{const i=Fa(t,n,e,r);return un(i)?i:Si(i)}catch(i){return Dc(i)}}function Fa(e,t,n,r){const i=n[r];if(!e||!i)return e;const o=i({...e},t);return w&&o===null&&g.log(`Event processor "${i.id||"?"}" dropped event`),un(o)?o.then(s=>Fa(s,t,n,r+1)):Fa(o,t,n,r+1)}var gn,dl,pl,Wt;function xp(e){const t=F._sentryDebugIds,n=F._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Wt&&r.length===dl&&i.length===pl)return Wt;dl=r.length,pl=i.length,Wt={},gn||(gn={});const o=(s,a)=>{for(const c of s){const u=a[c],f=gn?.[c];if(f&&Wt&&u)Wt[f[0]]=u,gn&&(gn[c]=[f[0],u]);else if(u){const l=e(c);for(let d=l.length-1;d>=0;d--){const p=l[d]?.filename;if(p&&Wt&&gn){Wt[p]=u,gn[c]=[p,u];break}}}}};return t&&o(r,t),n&&o(i,n),Wt}function xv(e,t){const n=xp(e);if(!n)return[];const r=[];for(const i of t){const o=__(i);o&&n[o]&&r.push({type:"sourcemap",code_file:i,debug_id:n[o]})}return r}function Op(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||we(),timestamp:t.timestamp||Un()},u=n.integrations||e.integrations.map(m=>m.name);Ov(c,e),Dv(c,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&Pv(c,e.stackParser);const f=Fv(r,n.captureContext);n.mechanism&&Lt(c,n.mechanism);const l=i?i.getEventProcessors():[],d=vi(o,f),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),mv(c,d);const h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?Si(c):Nv(h,c,n)).then(m=>(m&&Lv(m),typeof s=="number"&&s>0?$v(m,s,a):m))}function Ov(e,t){const{environment:n,release:r,dist:i,maxValueLength:o}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&o&&(s.url=ei(s.url,o)),o&&e.exception?.values?.forEach(a=>{a.value&&(a.value=ei(a.value,o))})}function Pv(e,t){const n=xp(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Lv(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function Dv(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function $v(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ne(i.data,t,n)}}))},...e.user&&{user:Ne(e.user,t,n)},...e.contexts&&{contexts:Ne(e.contexts,t,n)},...e.extra&&{extra:Ne(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ne(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ne(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ne(e.contexts.flags,3,n)),r}function Fv(e,t){if(!t)return e;const n=e?e.clone():new An;return n.update(t),n}function Bv(e){if(e)return Uv(e)?{captureContext:e}:Wv(e)?{captureContext:e}:e}function Uv(e){return e instanceof An||typeof e=="function"}var Hv=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Wv(e){return Object.keys(e).some(t=>Hv.includes(t))}function me(e,t){return j().captureException(e,Bv(t))}function jv(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return j().captureMessage(e,n,r)}function bi(e,t){return j().captureEvent(e,t)}function Pp(e,t){Ee().setContext(e,t)}function EO(e){Ee().setExtras(e)}function TO(e,t){Ee().setExtra(e,t)}function IO(e){Ee().setTags(e)}function wO(e,t){Ee().setTag(e,t)}function RO(e){Ee().setUser(e)}function kO(e){Ee().setConversationId(e)}function zv(){return Ee().lastEventId()}async function AO(e){const t=R();return t?t.flush(e):(w&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function CO(e){const t=R();return t?t.close(e):(w&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function MO(){return!!R()}function qv(){const e=R();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Gv(e){Ee().addEventProcessor(e)}function hl(e){const t=Ee(),{user:n}=vi(t,j()),{userAgent:r}=F.navigator||{},i=O_({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&dr(o,{status:"exited"}),Lp(),t.setSession(i),i}function Lp(){const e=Ee(),t=j().getSession()||e.getSession();t&&P_(t),Dp(),e.setSession()}function Dp(){const e=Ee(),t=R(),n=e.getSession();n&&t&&t.captureSession(n)}function ta(e=!1){if(e){Lp();return}Dp()}function $p(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Vv(e){return`${$p(e)}${e.projectId}/envelope/`}function Yv(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Fp(e,t,n){return t||`${Vv(e)}?${Yv(e,n)}`}function Kv(e,t){const n=ap(e);if(!n)return"";const r=`${$p(n)}embed/error-page/`;let i=`dsn=${bt(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}var ml=[];function Jv(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Xv(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return Jv(r)}function Qv(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Bp(e,r,n)}),n}function gl(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Bp(e,t,n){if(n[t.name]){w&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ml.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ml.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",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}["processSpan","processSegmentSpan"].forEach(r=>{const i=t[r];typeof i=="function"&&e.on(r,o=>i.call(t,o,e))}),w&&g.log(`Integration installed: ${t.name}`)}function _l(e){const t=R();if(!t){w&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}var Zv="sentry.timestamp.sequence",na=0,ra;function Up(e){const t=Math.floor(e*1e3);ra!==void 0&&t!==ra&&(na=0);const n=na;return na++,ra=t,{key:Zv,value:{value:n,type:"integer"}}}function Hp(e,t){return t?Ge(t,()=>{const n=Se(),r=n?dp(n):Qd(t);return[n?qe(n):Ac(e,t),r]}):[void 0,void 0]}var eS={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function tS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function nS(){return"npm"}function rS(){return!tS()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Nn(){return typeof window<"u"&&(!rS()||iS())}function iS(){return F.process?.type==="renderer"}function oS(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Nn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function sS(e,t,n,r,i){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=bt(r)),rt(o,[oS(e,i)])}var aS=100;function ht(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function cS(e,t){const n=$c(),r=Wp(e);r===void 0?n.set(e,[t]):r.length>=aS?(Ho(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Uo(e,t=j(),n=cS){const r=t?.getClient()??R();if(!r){w&&g.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s=!1,beforeSendLog:a}=r.getOptions();if(!s){w&&g.warn("logging option not enabled, log will not be captured.");return}const[,c]=Hp(r,t),u={...e.attributes},{user:{id:f,email:l,username:d},attributes:p={}}=vi(Ee(),t);ht(u,"user.id",f,!1),ht(u,"user.email",l,!1),ht(u,"user.name",d,!1),ht(u,"sentry.release",i),ht(u,"sentry.environment",o);const{name:h,version:m}=r.getSdkMetadata()?.sdk??{};ht(u,"sentry.sdk.name",h),ht(u,"sentry.sdk.version",m);const _=r.getIntegrationByName("Replay"),y=_?.getReplayId(!0);ht(u,"sentry.replay_id",y),y&&_?.getRecordingMode()==="buffer"&&ht(u,"sentry._internal.replay_is_buffering",!0);const v=e.message;if(ps(v)){const{__sentry_template_string__:x,__sentry_template_values__:M=[]}=v;M?.length&&(u["sentry.message.template"]=x),M.forEach((C,Y)=>{u[`sentry.message.parameter.${Y}`]=C})}ht(u,"sentry.trace.parent_span_id",pr(t)?.spanContext().spanId);const b={...e,attributes:u};r.emit("beforeCaptureLog",b);const N=a?Bt(()=>a(b)):b;if(!N){r.recordDroppedEvent("before_send","log_item",1),w&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:W,message:A,attributes:S={},severityNumber:D}=N,$=de(),E=Up($);n(r,{timestamp:$,level:W,body:A,trace_id:c?.trace_id,severity_number:D??eS[W],attributes:{...mr(p),...mr(S,!0),[E.key]:E.value}}),r.emit("afterCaptureLog",N)}function Ho(e,t){const n=t??Wp(e)??[];if(n.length===0)return;const r=e.getOptions(),i=sS(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);$c().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function Wp(e){return $c().get(e)}function $c(){return kr("clientToLogBufferMap",()=>new WeakMap)}function uS(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Nn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function lS(e,t,n,r,i){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=bt(r)),rt(o,[uS(e,i)])}var fS=1e3;function wt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function dS(e,t){const n=Bc(),r=jp(e);r===void 0?n.set(e,[t]):r.length>=fS?(Fc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function pS(e,t,n){const{release:r,environment:i}=t.getOptions(),o={...e.attributes};wt(o,"user.id",n.id,!1),wt(o,"user.email",n.email,!1),wt(o,"user.name",n.username,!1),wt(o,"sentry.release",r),wt(o,"sentry.environment",i);const{name:s,version:a}=t.getSdkMetadata()?.sdk??{};wt(o,"sentry.sdk.name",s),wt(o,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return wt(o,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&wt(o,"sentry._internal.replay_is_buffering",!0),{...e,attributes:o}}function hS(e,t,n,r){const[,i]=Hp(t,n),o=pr(n),s=o?o.spanContext().traceId:i?.trace_id,a=o?o.spanContext().spanId:void 0,c=de(),u=Up(c);return{timestamp:c,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...mr(r),...mr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function mS(e,t){const n=t?.scope??j(),r=t?.captureSerializedMetric??dS,i=n?.getClient()??R();if(!i){w&&g.warn("No client available to capture metric.");return}const{_experiments:o,enableMetrics:s,beforeSendMetric:a}=i.getOptions();if(!(s??o?.enableMetrics??!0)){w&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:c,attributes:u}=vi(Ee(),n),f=pS(e,i,c);i.emit("processMetric",f);const l=a||o?.beforeSendMetric,d=l?l(f):f;if(!d){w&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const p=hS(d,i,n,u);w&&g.log("[Metric]",p),r(i,p),i.emit("afterCaptureMetric",d)}function Fc(e,t){const n=t??jp(e)??[];if(n.length===0)return;const r=e.getOptions(),i=lS(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);Bc().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function jp(e){return Bc().get(e)}function Bc(){return kr("clientToMetricBufferMap",()=>new WeakMap)}function _s(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var Uc=Symbol.for("SentryBufferFullError");function Hc(e=100){const t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function i(s){if(!n())return Dc(Uc);const a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(s){if(!t.size)return Si(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;const c=[a,new Promise(u=>_s(setTimeout(()=>u(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:i,drain:o}}var gS=6e4;function zp(e,t=hi()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?gS:r-t}function _S(e,t){return e[t]||e.all||0}function qp(e,t,n=hi()){return _S(e,t)>n}function Gp(e,{statusCode:t,headers:n},r=hi()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)i.all=r+d;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(i[p]=r+d):i[p]=r+d}else s?i.all=r+zp(s,r):t===429&&(i.all=r+6e4);return i}function yS(e,t,n=Hc(e.bufferSize||64)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(Mn(s,(l,d)=>{const p=nl(d);qp(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return Promise.resolve({});const c=rt(s[0],a),u=l=>{if(Pa(c,["client_report"])){w&&g.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Mn(c,(d,p)=>{e.recordDroppedEvent(l,nl(p))})},f=()=>t({body:Fo(c)}).then(l=>l.statusCode===413?(w&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(w&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Gp(r,l),l),l=>{throw u("network_error"),w&&g.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===Uc)return w&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:o,flush:i}}function vS(e,t,n){const r=[{type:"client_report"},{timestamp:n||Un(),discarded_events:e}];return rt(t?{dsn:t}:{},[r])}function Vp(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 SS(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[Zd],exclusive_time:s?.[Hn],measurements:e.measurements,is_segment:!0}}function bS(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&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var yl="Not capturing exception because it's already been captured.",vl="Discarded session because of missing or non-string release",Yp=Symbol.for("SentryInternalError"),Kp=Symbol.for("SentryDoNotSendEventError"),ES=5e3;function ho(e){return{message:e,[Yp]:!0}}function ia(e){return{message:e,[Kp]:!0}}function Sl(e){return!!e&&typeof e=="object"&&Yp in e}function bl(e){return!!e&&typeof e=="object"&&Kp in e}function El(e,t,n,r,i){let o=0,s,a=!1;e.on(n,()=>{o=0,clearTimeout(s),a=!1}),e.on(t,c=>{o+=r(c),o>=8e5?i(e):a||(a=!0,s=_s(setTimeout(()=>{i(e)},ES)))}),e.on("flush",()=>{i(e)})}var TS=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Hc(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=ap(e.dsn):w&&g.warn("No DSN provided, client will not send events."),this._dsn){const t=Fp(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&El(this,"afterCaptureLog","flushLogs",kS,Ho),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&El(this,"afterCaptureMetric","flushMetrics",RS,Fc)}captureException(e,t,n){const r=we();if(qu(e))return w&&g.log(yl),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(o=>this._captureEvent(o,i,n)).then(o=>o),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:we(),...n},o=ps(e)?e:String(e),s=Ot(e),a=s?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(()=>a.then(c=>this._captureEvent(c,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=we();if(t?.originalException&&qu(t.originalException))return w&&g.log(yl),r;const i={event_id:r,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,a=o.capturedSpanIsolationScope,c=Tl(e.type);return this._process(()=>this._captureEvent(e,i,s||n,a),c),i.event_id}captureSession(e){this.sendSession(e),dr(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Ho(this);const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Bp(this,e,this._integrations),t||gl(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Xy(e,this._dsn,this._options._metadata,this._options.tunnel);for(const r of t.attachments||[])n=Wy(n,Vy(r));this.sendEnvelope(n).then(r=>this.emit("afterSendEvent",e,r))}sendSession(e){const{release:t,environment:n=xy}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!t){w&&g.warn(vl);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){w&&g.warn(vl);return}e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=Jy(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;w&&g.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...i)=>t(...i);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(r=>r(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return w&&g.error("Error while sending envelope:",t),{}}return w&&g.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Qv(this,e),gl(this,e)}_updateSessionFromEvent(e,t){let n=t.level==="fatal",r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const s of i)if(s.mechanism?.handled===!1){n=!0;break}}const o=e.status==="ok";(o&&e.errors===0||o&&n)&&(dr(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(n=>setTimeout(n,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o?.length&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Op(i,e,t,n,this,r).then(s=>(s===null||(this.emit("postprocessEvent",s,t),s.contexts={trace:{...s.contexts?.trace,...Qd(n)},...s.contexts},s.sdkProcessingMetadata={dynamicSamplingContext:Ac(this,n),...s.sdkProcessingMetadata}),s))}_captureEvent(e,t={},n=j(),r=Ee()){return w&&Ba(e)&&g.log(`Captured error event \`${Vp(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(i=>i.event_id,i=>{w&&(bl(i)?g.log(i.message):Sl(i)?g.warn(i.message):g.warn(i))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:o}=i,s=Jp(e),a=Ba(e),c=`before send for type \`${e.type||"error"}\``,u=typeof o>"u"?void 0:Cn(o);if(a&&typeof u=="number"&&At()>u)return this.recordDroppedEvent("sample_rate","error"),Dc(ia(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=Tl(e.type);return this._prepareEvent(e,t,n,r).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",f),ia("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?l:IS(wS(this,i,l,t),c)}).then(l=>{if(l===null){if(this.recordDroppedEvent("before_send",f),s){const h=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",h)}throw ia(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,l),s){const h=(l.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(l.spans?l.spans.length:0);h>0&&this.recordDroppedEvent("before_send","span",h)}const p=l.transaction_info;if(s&&p&&l.transaction!==e.transaction){const h="custom";l.transaction_info={...p,source:h}}return this.sendEvent(l,t),l}).then(null,l=>{throw bl(l)||Sl(l)?l:(this.captureException(l,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:l}),ho(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${l}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===Uc&&this.recordDroppedEvent("queue_overflow",t),n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{const[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}_flushOutcomes(){w&&g.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){w&&g.log("No outcomes to send");return}if(!this._dsn){w&&g.log("No dsn provided, will not send outcomes");return}w&&g.log("Sending outcomes:",e);const t=vS(e,this._options.tunnel&&bt(this._dsn));this.sendEnvelope(t)}};function Tl(e){return e==="replay_event"?"replay":e||"error"}function IS(e,t){const n=`${t} must return \`null\` or a valid event.`;if(un(e))return e.then(r=>{if(!Fe(r)&&r!==null)throw ho(n);return r},r=>{throw ho(`${t} rejected with ${r}`)});if(!Fe(e)&&e!==null)throw ho(n);return e}function wS(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,ignoreSpans:s}=t,a=!ms(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(Ba(c)&&i)return i(c,r);if(Jp(c)){if(a||s){const u=SS(c);if(s?.length&&ri({description:u.description,op:u.op,attributes:u.data},s))return null;if(a){const f=a(u);f?c=mi(n,bS(f)):Do()}if(c.spans){const f=[],l=c.spans;for(const p of l){if(s?.length&&ri({description:p.description,op:p.op,attributes:p.data},s)){My(l,p);continue}if(a){const h=a(p);h?f.push(h):(Do(),f.push(p))}else f.push(p)}const d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(o){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(c,r)}}return c}function Ba(e){return e.type===void 0}function Jp(e){return e.type==="transaction"}function RS(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Xp(e.attributes)}function kS(e){let t=0;return e.message&&(t+=e.message.length*2),t+Xp(e.attributes)}function Xp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Il(n[0]):Ot(n)?t+=Il(n):t+=100}),t}function Il(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function AS(e){return gt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function wl(e){return AS(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function CS(e,t){t.debug===!0&&(w?g.enable():Bt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),j().update(t.initialScope);const n=new e(t);return MS(n),n.init(),n}function MS(e){j().setClient(e)}var oa=5e3,NS=36e5;function xS(e){function t(...n){w&&g.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=oa,s;function a(l,d,p){return Pa(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,d,p):!0}function c(l){s&&clearTimeout(s),s=_s(setTimeout(async()=>{s=void 0;const d=await i.shift();d&&(t("Attempting to send previously queued event"),d[0].sent_at=new Date().toISOString(),f(d,!0).catch(p=>{t("Failed to retry sending",p)}))},l))}function u(){s||(c(o),o=Math.min(o*2,NS))}async function f(l,d=!1){if(!d&&Pa(l,["replay_event","replay_recording"]))return await i.push(l),c(100),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const p=await r.send(l);let h=100;if(p){if(p.headers?.["retry-after"])h=zp(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),o=oa,p}catch(p){if(await a(l,p,o))return d?await i.unshift(l):await i.push(l),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:f,flush:l=>(l===void 0&&(o=oa,c(100)),r.flush(l))}}}var NO="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Qp(e,t){let n;return Mn(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function OS(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=Qp(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function PS(e,t){return rt(t?{...e[0],dsn:t}:e[0],e[1])}function xO(e,t){return n=>{const r=e(n),i=new Map,o=t||(u=>{const f=u.getEvent();return f?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(f.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?f.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function s(u,f){const l=f?`${u}:${f}`:u;let d=i.get(l);if(!d){const p=ip(u);if(!p)return;const h=Fp(p,n.tunnel);d=f?OS(e,f)({...n,url:h}):e({...n,url:h}),i.set(l,d)}return[u,d]}async function a(u){function f(p){return Qp(u,p?.length?p:["event"])}const l=o({envelope:u,getEvent:f}).map(p=>typeof p=="string"?s(p,void 0):s(p.dsn,p.release)).filter(p=>!!p),d=l.length?l:[["",r]];return(await Promise.all(d.map(([p,h])=>h.send(PS(u,p)))))[0]}async function c(u){const f=[...i.values(),r];return(await Promise.all(f.map(l=>l.flush(u)))).every(l=>l)}return{send:a,flush:c}}}function Zp(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return DS(e,n)||LS(e,r)}function LS(e,t){return t?Rl(e)===Rl(t):!1}function DS(e,t){const n=Lc(e);return!n||Pc(n)||!t?!1:$S(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function $S(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Rl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function FS(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}var BS=FS;function US(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 eh(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Zr})),i.version=Zr)}function th(e={}){const t=e.client||R();if(!qv()||!t)return{};const n=Ft(),r=ln(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||j(),o=e.span||Se();if(!o&&Y_())return{};const s=o?Iy(o):HS(i),a=o?qe(o):Ac(t,i),c=rp(a);if(!cp.test(s))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(u.traceparent=o?wy(o):WS(i)),u}function HS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return lp(t,r,n)}function WS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return fp(t,r,n)}function jS(e,t,n){let r,i,o;const s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function f(){return i!==void 0||o!==void 0?c():r}function l(){return i&&clearTimeout(i),i=a(c,t),s&&o===void 0&&(o=a(c,s)),r}return l.cancel=u,l.flush=f,l}var zS=100;function vt(e,t){const n=R(),r=Ee();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=zS}=n.getOptions();if(o<=0)return;const s={timestamp:Un(),...e},a=i?Bt(()=>i(s,t)):s;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}var kl,qS="FunctionToString",Al=new WeakMap,GS=(()=>({name:qS,setupOnce(){kl=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Rc(this),n=Al.has(R())&&t!==void 0?t:this;return kl.apply(n,e)}}catch{}},setup(e){Al.set(e,!0)}})),VS=GS,YS=[/^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/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],KS="EventFilters",JS=(e={})=>{let t;return{name:KS,setup(n){t=Cl(e,n.getOptions())},processEvent(n,r,i){return t||(t=Cl(e,i.getOptions())),QS(n,t)?null:n}}},XS=((e={})=>({...JS(e),name:"InboundFilters"}));function Cl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:YS],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function QS(e,t){if(e.type){if(e.type==="transaction"&&eb(e,t.ignoreTransactions))return w&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11
+ Event: ${yn(e)}`),!0}else{if(ZS(e,t.ignoreErrors))return w&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
+ Event: ${yn(e)}`),!0;if(ib(e))return w&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
+ Event: ${yn(e)}`),!0;if(tb(e,t.denyUrls))return w&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
+ Event: ${yn(e)}.
15
+ Url: ${Wo(e)}`),!0;if(!nb(e,t.allowUrls))return w&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
+ Event: ${yn(e)}.
17
+ Url: ${Wo(e)}`),!0}return!1}function ZS(e,t){return t?.length?Vp(e).some(n=>ct(n,t)):!1}function eb(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ct(n,t):!1}function tb(e,t){if(!t?.length)return!1;const n=Wo(e);return n?ct(n,t):!1}function nb(e,t){if(!t?.length)return!0;const n=Wo(e);return n?ct(n,t):!0}function rb(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 Wo(e){try{const t=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return t?rb(t):null}catch{return w&&g.error(`Cannot extract url for event ${yn(e)}`),null}}function ib(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function ob(e,t,n,r,i,o){if(!i.exception?.values||!o||!Pt(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Ua(e,t,r,o.originalException,n,i.exception.values,s,0))}function Ua(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(Pt(r[i],Error)){Ml(s,a,r);const u=e(t,r[i]),f=c.length;Nl(u,i,f,a),c=Ua(e,t,n,r[i],i,[u,...c],u,f)}return nh(r)&&r.errors.forEach((u,f)=>{if(Pt(u,Error)){Ml(s,a,r);const l=e(t,u),d=c.length;Nl(l,`errors[${f}]`,d,a),c=Ua(e,t,n,u,i,[l,...c],l,d)}}),c}function nh(e){return Array.isArray(e.errors)}function Ml(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...nh(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Nl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var rh=new Map,xl=new Set;function sb(e){if(F._sentryModuleMetadata)for(const t of Object.keys(F._sentryModuleMetadata)){const n=F._sentryModuleMetadata[t];if(xl.has(t))continue;xl.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){rh.set(i.filename,n);break}}}function ab(e,t){return sb(e),rh.get(t)}function ih(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const i=ab(e,r.filename);i&&(r.module_metadata=i)})})}function oh(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}var OO=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Mn(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(oh(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;ih(n,t)})}});function Wc(e){const t="console",n=an(t,e);return cn(t,cb),n}function cb(){"console"in F&&Sc.forEach(function(e){e in F.console&&xe(F.console,e,function(t){return Mo[e]=t,function(...n){Xe("console",{args:n,level:e}),Mo[e]?.apply(F.console,n)}})})}function jo(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var ub="CaptureConsole",lb=((e={})=>{const t=e.levels||Sc,n=e.handled??!0;return{name:ub,setup(r){"console"in F&&Wc(({args:i,level:o})=>{R()!==r||!t.includes(o)||fb(i,o,n)})}}}),PO=lb;function fb(e,t,n){const r=jo(t),i=new Error,o={level:jo(t),extra:{arguments:e}};Ge(s=>{if(s.addEventProcessor(u=>(u.logger="console",Lt(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${No(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(u,r,{captureContext:o,syntheticException:i})}return}const a=e.find(u=>u instanceof Error);if(a){me(a,o);return}const c=No(e," ");s.captureMessage(c,r,{captureContext:o,syntheticException:i})})}var db="Dedupe",pb=(()=>{let e;return{name:db,processEvent(t){if(t.type)return t;try{if(mb(t,e))return w&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),hb=pb;function mb(e,t){return t?!!(gb(e,t)||_b(e,t)):!1}function gb(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ah(e,t)||!sh(e,t))}function _b(e,t){const n=Ol(t),r=Ol(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ah(e,t)||!sh(e,t))}function sh(e,t){let n=Aa(e),r=Aa(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function ah(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 Ol(e){return e.exception?.values?.[0]}var yb="ExtraErrorData",vb=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:yb,processEvent(r,i,o){const{maxValueLength:s}=o.getOptions();return Sb(r,i,t,n,s)}}}),LO=vb;function Sb(e,t={},n,r,i){if(!t.originalException||!gt(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,s=ch(t.originalException,r,i);if(s){const a={...e.contexts},c=Ne(s,n);return Fe(c)&&(Oy(c),a[o]=c),{...e,contexts:a}}return e}function ch(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const s=e[o];i[o]=gt(s)||typeof s=="string"?n?ei(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0&&(gt(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:ch(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON=="function"){const o=e.toJSON();for(const s of Object.keys(o)){const a=o[s];i[s]=gt(a)?a.toString():a}}return i}catch(r){w&&g.error("Unable to extract extra data from the Error object:",r)}return null}function bb(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}var Eb=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Tb(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Eb.exec(t);return n?n.slice(1):[]}function Pl(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=bb(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Ll(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 Ib(e,t){e=Pl(e).slice(1),t=Pl(t).slice(1);const n=Ll(e.split("/")),r=Ll(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function wb(e,t){let n=Tb(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Rb="RewriteFrames",DO=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in F&&!!F.window,i=e.iteratee||kb({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>i(c))}}return{name:Rb,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function kb({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){const s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename;r.filename=`${n}${t?Ib(t,s):wb(s)}`}return r}}var Ab=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Cb=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Mb={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"},uh=["select","insert","upsert","update","delete"];function ys(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function vs(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function lh(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Nb(e,t){return lh(e,t)!==void 0}function xb(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 Ob(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 i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&Mb[n]||"filter",`${i}(${e}, ${r.join(".")})`}function Dl(e,t=!1){return new Proxy(e,{apply(n,r,i){return Ht({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[q]:"auto.db.supabase",[ie]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(o.setStatus({code:2}),me(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):o.setStatus({code:1}),o.end(),s)).catch(s=>{throw o.setStatus({code:2}),o.end(),me(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...i))}})}function Pb(e){const t=e.auth;if(!(!t||vs(e.auth))){for(const n of Ab){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Dl(r))}for(const n of Cb){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Dl(r,!0))}ys(e.auth)}}function Lb(e){vs(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const i=Reflect.apply(t,n,r),o=i.constructor;return $b(o),i}}),ys(e.prototype.from))}function Db(e){vs(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const i=uh,o=n,s=xb(o.method,o.headers);if(!i.includes(s)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[v,b]of o.url.searchParams.entries())u.push(Ob(v,b));const f=Object.create(null);if(Fe(o.body))for(const[v,b]of Object.entries(o.body))f[v]=b;const l=!!R()?.getOptions().sendDefaultPii,d=lh(o.body,f),p=s==="select"?"":`${s}${Nb(o.body,f)?"(...) ":""}`,h=l?u.join(" "):u.length>0?"[redacted]":"",m=[p.trimEnd(),h].filter(Boolean).join(" "),_=m?`${m} from(${c})`:`from(${c})`,y={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[q]:"auto.db.supabase",[ie]:"db"};return u.length&&l&&(y["db.query"]=u),d!==void 0&&l&&(y["db.body"]=d),Ht({name:_,attributes:y},v=>Reflect.apply(t,n,[]).then(b=>{if(v&&(b&&typeof b=="object"&&"status"in b&&Oo(v,b.status||500),v.end()),b?.error){const A=new Error(b.error.message);b.error.code&&(A.code=b.error.code),b.error.details&&(A.details=b.error.details);const S={};u.length&&l&&(S.query=u),d!==void 0&&l&&(S.body=d),me(A,D=>(D.addEventProcessor($=>(Lt($,{handled:!1,type:"auto.db.supabase.postgres"}),$)),D.setContext("supabase",S),D))}const N={type:"supabase",category:`db.${s}`,message:_},W={};return u.length&&l&&(W.query=u),d!==void 0&&l&&(W.body=d),Object.keys(W).length&&(N.data=W),vt(N),b},b=>{throw v&&(Oo(v,500),v.end()),b}).then(...r))}}),ys(e.prototype.then))}function $b(e){for(const t of uh)vs(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,i){const o=Reflect.apply(n,r,i),s=o.constructor;return w&&g.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),Db(s),o}}),ys(e.prototype[t]))}var Fb=e=>{if(!e){w&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}Lb(e.constructor===Function?e:e.constructor),Pb(e)},Bb="Supabase",Ub=(e=>({setupOnce(){Fb(e)},name:Bb})),$O=e=>Ub(e.supabaseClient),Hb=10,Wb="ZodErrors";function jb(e){return gt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function zb(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 qb(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function Gb(e){const t=new Set;for(const r of e.issues){const i=qb(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${ei(n.join(", "),100)}`}function Vb(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!jb(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(zb);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:Gb(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
18
+ ${i.stack}`:"unknown"}}}}}var Yb=((e={})=>{const t=e.limit??Hb;return{name:Wb,processEvent(n,r){return Vb(t,e.saveZodIssuesAsAttachment,n,r)}}}),FO=Yb,BO=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Mn(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(oh(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;ih(r,n)})},processEvent(t){const n=Jb(t,e.ignoreSentryInternalFrames);if(n&&n[e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every"](r=>!r.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 Kb(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(Qb))return!1;if(e.pre_context){const n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(Xb))return!0}return!1}function Jb(e,t){const n=Aa(e);if(n)return n.filter((r,i)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!Kb(r,i)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(i=>i.startsWith($l)).map(i=>i.slice($l.length)):[])}var $l="_sentryBundlerPluginAppKey:",Xb="Attempt to invoke user-land function",Qb="fn.apply(this, wrappedArguments)";var Vi="flag.evaluation.";function Mr(e){if(e.type)return e;const t=j().getScopeData().contexts.flags,n=t?t.values:[];return n.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]}),e}function xn(e,t,n=100){const r=j().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;Zb(i,e,t,n)}function Zb(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){w&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function On(e,t,n=10){if(typeof t!="boolean")return;const r=Se();if(!r)return;const i=L(r).data;if(`${Vi}${e}`in i){r.setAttribute(`${Vi}${e}`,t);return}Object.keys(i).filter(o=>o.startsWith(Vi)).length<n&&r.setAttribute(`${Vi}${e}`,t)}var UO=()=>({name:"FeatureFlags",processEvent(e,t,n){return Mr(e)},addFeatureFlag(e,t){xn(e,t),On(e,t)}}),eE=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&xe(t,"isOn",Fl),typeof t.getFeatureValue=="function"&&xe(t,"getFeatureValue",Fl)},processEvent(t,n,r){return Mr(t)}});function Fl(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(xn(n,r),On(n,r)),r}}var tE="ConversationId",nE=(()=>({name:tE,setup(e){e.on("spanStart",t=>{const n=j().getScopeData(),r=Ee().getScopeData(),i=n.conversationId||r.conversationId;if(i){const{op:o,data:s,description:a}=L(t);if(!o?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(cy,i)}})}})),rE=nE;function fh(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}function iE(e,t,n,r,i){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=Qe()&&t(s);if(e.endTimestamp){const p=e.fetchData.__span;if(!p)return;const h=r[p];h&&(a&&(aE(h,e),oE(h,e,i)),delete r[p]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof i=="object"?i:{spanOrigin:i},f=R(),l=!!Se()||!!f&&ft(f),d=a&&l?Ze(lE(s,o,c)):new ze;if(a&&!l&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const p=e.args[0],h={...e.args[1]||{}},m=sE(p,h,Qe()&&l?d:void 0,u);m&&(e.args[1]=h,h.headers=m)}if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,p)}return d}function oE(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function sE(e,t,n,r){const i=th({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;const c=t.headers||(Tc(e)?e.headers:void 0);if(c)if(cE(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",o),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),s){const f=u.get("baggage");f?Yi(f)||u.set("baggage",`${f},${s}`):u.set("baggage",s)}return u}else if(uE(c)){const u=[...c];u.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",o]),r&&a&&!u.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const f=c.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&Yi(l[1]));return s&&!f&&u.push(["baggage",s]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,d=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>Yi(m)):Yi(l));s&&!p&&d.push(s);const h=Object.assign({},c,{"sentry-trace":u??o,baggage:d.length>0?d.join(","):void 0});return r&&a&&!f&&(h.traceparent=a),h}else return{...i}}function aE(e,t){if(t.response){Oo(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:2,message:"internal_error"});e.end()}function Yi(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(np))}function cE(e){return typeof Headers<"u"&&Pt(e,Headers)}function uE(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function lE(e,t,n){if(e.startsWith("data:"))return{name:`${t} ${Kt(e)}`,attributes:Bl(e,void 0,t,n)};const r=Lc(e);return{name:`${t} ${r?Ev(r):e}`,attributes:Bl(e,r,t,n)}}function Bl(e,t,n,r){const i={url:Kt(e),type:"fetch","http.method":n,[q]:r,[ie]:"http.client"};return t&&(Pc(t)||(i["http.url"]=Kt(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function fE(e,t={},n=j()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:c,tags:u}=e,f={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||R();return l&&l.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}var HO=Ld({debug:()=>pE,error:()=>gE,fatal:()=>_E,fmt:()=>BS,info:()=>hE,trace:()=>dE,warn:()=>mE});function Nr(e,t,n,r,i){Uo({level:e,message:t,attributes:n,severityNumber:i},r)}function dE(e,t,{scope:n}={}){Nr("trace",e,t,n)}function pE(e,t,{scope:n}={}){Nr("debug",e,t,n)}function hE(e,t,{scope:n}={}){Nr("info",e,t,n)}function mE(e,t,{scope:n}={}){Nr("warn",e,t,n)}function gE(e,t,{scope:n}={}){Nr("error",e,t,n)}function _E(e,t,{scope:n}={}){Nr("fatal",e,t,n)}function zo(e,t,n){return"util"in F&&typeof F.util.format=="function"?F.util.format(...e):yE(e,t,n)}function yE(e,t,n){return e.map(r=>Ot(r)?String(r):JSON.stringify(Ne(r,t,n))).join(" ")}function dh(e){return/%[sdifocO]/.test(e)}function ph(e,t){const n={};return n["sentry.message.template"]=`${e} ${new Array(t.length).fill("{}").join(" ")}`,t.forEach((r,i)=>{n[`sentry.message.parameter.${i}`]=r}),n}var vE="ConsoleLogs",Ul={[q]:"auto.log.console"},SE=((e={})=>{const t=e.levels||Sc;return{name:vE,setup(n){const{enableLogs:r,normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){w&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const s=Wc(({args:a,level:c})=>{if(R()!==n||!t.includes(c))return;const u=a[0],f=a.slice(1);if(c==="assert"){if(!u){const h=f.length>0?`Assertion failed: ${zo(f,i,o)}`:"Assertion failed";Uo({level:"error",message:h,attributes:Ul})}return}const l=c==="log",d=a.length>1&&typeof a[0]=="string"&&!dh(a[0]),p={...Ul,...d?ph(u,f):{}};Uo({level:l?"info":c,message:zo(a,i,o),severityNumber:l?10:void 0,attributes:p})});n.registerCleanup(s)}}}),WO=SE,jO=Ld({count:()=>bE,distribution:()=>Ha,gauge:()=>EE});function jc(e,t,n,r){mS({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function bE(e,t=1,n){jc("counter",e,t,n)}function EE(e,t,n){jc("gauge",e,t,n)}function Ha(e,t,n){jc("distribution",e,t,n)}var TE=["trace","debug","info","warn","error","fatal"];function zO(e={}){const t=new Set(e.levels??TE),n=e.client;return{log(r){const{type:i,level:o,message:s,args:a,tag:c,date:u,...f}=r,l=n||R();if(!l)return;const d=RE(i,o);if(!t.has(d))return;const{normalizeDepth:p=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m={};for(const[y,v]of Object.entries(f))m[y]=Ne(v,p,h);m["sentry.origin"]="auto.log.consola",c&&(m["consola.tag"]=c),i&&(m["consola.type"]=i),o!=null&&typeof o=="number"&&(m["consola.level"]=o);const _=AE(kE(a,p,h),p,h);_?.attributes&&Object.assign(m,_.attributes),Uo({level:d,message:_?.message||s||a&&zo(a,p,h)||"",attributes:m})}}}var IE={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"},wE={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function RE(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=IE[e];if(n)return n}if(typeof t=="number"){const n=wE[t];if(n)return n}return"info"}function kE(e,t,n){if(!e?.length)return{message:""};const r=zo(e,t,n),i=e[0];if(Fe(i)){const o=typeof e[1]=="string"?2:1;return{message:r,attributes:i,messageParameters:e.slice(o)}}else{const o=e.slice(1),s=o.length>0&&typeof i=="string"&&!dh(i);return{message:r,messageTemplate:s?i:void 0,messageParameters:s?o:void 0}}}function AE(e,t,n){const{message:r,attributes:i,messageTemplate:o,messageParameters:s}=e,a={};if(o&&s){const c=ph(o,s);for(const[u,f]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Ne(f,t,n):f}else s&&s.length>0&&s.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=Ne(c,t,n)});return{message:r,attributes:{...Ne(i,t,n),...a}}}var CE="gen_ai.prompt",Ei="gen_ai.system",tt="gen_ai.request.model",zc="gen_ai.request.stream",Ss="gen_ai.request.temperature",qc="gen_ai.request.max_tokens",bs="gen_ai.request.frequency_penalty",Gc="gen_ai.request.presence_penalty",Es="gen_ai.request.top_p",hh="gen_ai.request.top_k",mh="gen_ai.request.encoding_format",gh="gen_ai.request.dimensions",ii="gen_ai.response.finish_reasons",xr="gen_ai.response.model",Ts="gen_ai.response.id",ME="gen_ai.response.stop_reason",Pn="gen_ai.usage.input_tokens",Ln="gen_ai.usage.output_tokens",rn="gen_ai.usage.total_tokens",ut="gen_ai.operation.name",Dn="sentry.sdk_meta.gen_ai.input.messages.original_length",Or="gen_ai.input.messages",Ti="gen_ai.system_instructions",Nt="gen_ai.response.text",Ii="gen_ai.request.available_tools",NE="gen_ai.response.streaming",$n="gen_ai.response.tool_calls",Is="gen_ai.agent.name",xE="gen_ai.pipeline.name",Vc="gen_ai.conversation.id",OE="gen_ai.usage.cache_creation_input_tokens",PE="gen_ai.usage.cache_read_input_tokens",LE="gen_ai.invoke_agent",Yc="gen_ai.embeddings.input",_h="gen_ai.embeddings",Hl="gen_ai.execute_tool",yh="gen_ai.tool.name",DE="gen_ai.tool.call.id",$E="gen_ai.tool.type",vh="gen_ai.tool.input",Sh="gen_ai.tool.output",FE="gen_ai.tool.description";function cr(e){return!e||typeof e!="object"?!1:UE(e)||Eh(e)||BE(e)||Th(e)||Ih(e)||HE(e)||WE(e)||jE(e)||zE(e)||qE(e)||GE(e)||VE(e)}function BE(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):bh(e):!1}function bh(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function UE(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&cr(e.source)}function Eh(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function Th(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function Ih(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function HE(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function WE(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function jE(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function zE(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function qE(e){return"b64_json"in e}function GE(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function VE(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}var Ur="[Blob substitute]",YE=["image_url","data","content","b64_json","result","uri","image"];function Vr(e){const t={...e};cr(t.source)&&(t.source=Vr(t.source)),Eh(e)&&(t.inlineData={...e.inlineData,data:Ur}),bh(e)&&(t.image_url={...e.image_url,url:Ur}),Th(e)&&(t.input_audio={...e.input_audio,data:Ur}),Ih(e)&&(t.file={...e.file,file_data:Ur});for(const n of YE)typeof t[n]=="string"&&(t[n]=Ur);return t}var wh=2e4,qo=e=>new TextEncoder().encode(e).length,Kc=e=>qo(JSON.stringify(e));function ws(e,t){if(qo(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){const o=Math.floor((n+r)/2),s=e.slice(0,o);qo(s)<=t?(i=s,n=o+1):r=o-1}return i}function KE(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function Wl(e,t){return typeof e=="string"?t:{...e,text:t}}function JE(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function Rh(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function kh(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function XE(e,t){const n={...e,content:""},r=t-Kc(n);if(r<=0)return[];const i=ws(e.content,r);return[{...e,content:i}]}function QE(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function ZE(e,t){const{key:n,items:r}=QE(e);if(n===null||r.length===0)return[];const i=r.map(a=>Wl(a,""));let o=t-Kc({...e,[n]:i});if(o<=0)return[];const s=[];for(const a of r){const c=KE(a),u=qo(c);if(u<=o)s.push(a),o-=u;else if(s.length===0){const f=ws(c,o);f&&s.push(Wl(a,f));break}else break}return s.length<=0?[]:[{...e,[n]:s}]}function eT(e,t){if(!e)return[];if(typeof e=="string"){const n=ws(e,t);return n?[n]:[]}return typeof e!="object"?[]:JE(e)?XE(e,t):Rh(e)||kh(e)?ZE(e,t):[]}function Wa(e){return e.map(t=>{let n;return t&&typeof t=="object"&&(Rh(t)?n={...t,content:Wa(t.content)}:"content"in t&&cr(t.content)&&(n={...t,content:Vr(t.content)}),kh(t)&&(n={...n??t,parts:Wa(t.parts)}),cr(n)?n=Vr(n):cr(t)&&(n=Vr(t))),n??t})}function tT(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],i=Wa([r]),o=i[0];return Kc(o)<=n?i:eT(o,n)}function nT(e){return tT(e,wh)}function rT(e){return ws(e,wh)}function Wn(e){const t=!!R()?.getOptions().sendDefaultPii;return{...e,recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t}}function Dt(e){const t=R();return e??!(t&&ft(t))}function Jc(e,t){return e?`${e}.${t}`:t}function iT(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[Pn]:t}),n!==void 0&&e.setAttributes({[Ln]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){const o=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[rn]:o})}}function Rs(e,t,n){if(!e.isRecording())return;const r={[NE]:!0};t.responseId&&(r[Ts]=t.responseId),t.responseModel&&(r[xr]=t.responseModel),t.promptTokens!==void 0&&(r[Pn]=t.promptTokens),t.completionTokens!==void 0&&(r[Ln]=t.completionTokens),t.totalTokens!==void 0?r[rn]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[rn]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[ii]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[Nt]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[$n]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function Pr(e){return typeof e=="string"?e:JSON.stringify(e)}function Lr(e){if(typeof e=="string")return rT(e);if(Array.isArray(e)){const t=nT(e);return JSON.stringify(t)}return JSON.stringify(e)}function wi(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(i=>i&&typeof i=="object"&&"role"in i&&i.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;return r?{systemInstructions:JSON.stringify([{type:"text",content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}async function oT(e,t,n){const r=e.catch(s=>{throw me(s,{mechanism:{handled:!1,type:n}}),s}),i=await t,o=await r;return o&&typeof o=="object"&&"data"in o?{...o,data:i}:i}function Go(e,t,n){return un(e)?new Proxy(e,{get(r,i){const o=i in Promise.prototype||i===Symbol.toStringTag?t:r,s=Reflect.get(o,i);return i==="withResponse"&&typeof s=="function"?function(){return oT(s.call(r),t,n)}:typeof s=="function"?s.bind(o):s}}):t}var sT={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},aT=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],cT=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...aT];function uT(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function lT(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function fT(e,t,n){if(!t||typeof t!="object")return;const r=t,i={};if(typeof r.id=="string"&&(i[Ts]=r.id),typeof r.model=="string"&&(i[xr]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(i[Vc]=r.id),r.usage&&typeof r.usage=="object"){const o=r.usage,s=o.prompt_tokens??o.input_tokens;typeof s=="number"&&(i[Pn]=s);const a=o.completion_tokens??o.output_tokens;typeof a=="number"&&(i[Ln]=a),typeof o.total_tokens=="number"&&(i[rn]=o.total_tokens)}if(Array.isArray(r.choices)){const o=r.choices,s=o.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(s.length>0&&(i[ii]=JSON.stringify(s)),n){const a=o.map(u=>u.message?.content||"");i[Nt]=JSON.stringify(a);const c=o.map(u=>u.message?.tool_calls).filter(u=>Array.isArray(u)&&u.length>0).flat();c.length>0&&(i[$n]=JSON.stringify(c))}}if(typeof r.status=="string"&&(i["gen_ai.response.finish_reasons"]||(i[ii]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!i["gen_ai.response.text"]&&(i[Nt]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i["gen_ai.response.tool_calls"])){const o=r.output.filter(s=>s?.type==="function_call");o.length>0&&(i[$n]=JSON.stringify(o))}e.setAttributes(i)}function dT(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function pT(e){const t={[tt]:e.model??"unknown"};"temperature"in e&&(t[Ss]=e.temperature),"top_p"in e&&(t[Es]=e.top_p),"frequency_penalty"in e&&(t[bs]=e.frequency_penalty),"presence_penalty"in e&&(t[Gc]=e.presence_penalty),"stream"in e&&(t[zc]=e.stream),"encoding_format"in e&&(t[mh]=e.encoding_format),"dimensions"in e&&(t[gh]=e.dimensions);const n=dT(e);return n&&(t[Vc]=n),t}function hT(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 i=t.chatCompletionToolCalls[r];n.function.arguments&&i?.function&&(i.function.arguments+=n.function.arguments)}}}function mT(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,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&&hT(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function gT(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:2,message:"internal_error"}),me(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const i=e;if(!cT.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type==="response.output_item.done"&&"item"in i&&t.responsesApiToolCalls.push(i.item),i.type==="response.output_text.delta"&&"delta"in i&&i.delta)){t.responseTexts.push(i.delta);return}if("response"in i){const{response:o}=i;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*_T(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const i of e)lT(i)?mT(i,r,n):uT(i)&&gT(i,r,n,t),yield i}finally{const i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];Rs(t,{...r,toolCalls:i},n)}}function yT(e){const t=Array.isArray(e.tools)?e.tools:[],n=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],r=[...t,...n];if(r.length!==0)try{return JSON.stringify(r)}catch(i){w&&g.error("Failed to serialize OpenAI tools:",i);return}}function vT(e,t){const n={[Ei]:"openai",[ut]:t,[q]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],i=yT(r);i&&(n[Ii]=i),Object.assign(n,pT(r))}else n[tt]="unknown";return n}function jl(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(Yc,typeof a=="string"?a:JSON.stringify(a));return}const i="input"in t?t.input:"messages"in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;const{systemInstructions:o,filteredMessages:s}=wi(i);o&&e.setAttribute(Ti,o),e.setAttribute(Or,r?Lr(s):Pr(s)),Array.isArray(s)?e.setAttribute(Dn,s.length):e.setAttribute(Dn,1)}function ST(e,t,n,r,i){return function(...s){const a=n.operation||"unknown",c=vT(s,a),u=c["gen_ai.request.model"]||"unknown",f=s[0],l=f&&typeof f=="object"&&f.stream===!0,d={name:`${a} ${u}`,op:`gen_ai.${a}`,attributes:c};if(l){let m;const _=Gt(d,y=>(m=e.apply(r,s),i.recordInputs&&f&&jl(y,f,a,Dt(i.enableTruncation)),(async()=>{try{const v=await m;return _T(v,y,i.recordOutputs??!1)}catch(v){throw y.setStatus({code:2,message:"internal_error"}),me(v,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),y.end(),v}})()));return Go(m,_,"auto.ai.openai")}let p;const h=Ht(d,m=>(p=e.apply(r,s),i.recordInputs&&f&&jl(m,f,a,Dt(i.enableTruncation)),p.then(_=>(fT(m,_,i.recordOutputs),_),_=>{throw me(_,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),_})));return Go(p,h,"auto.ai.openai")}}function Ah(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=Jc(t,String(i)),a=sT[s];return typeof o=="function"&&a?ST(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Ah(o,s,n):o}})}function qO(e,t){return Ah(e,"",Wn(t))}var bT={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function ET(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:i}=wi(t);r&&e.setAttributes({[Ti]:r});const o=Array.isArray(i)?i.length:1;e.setAttributes({[Or]:n?Lr(i):Pr(i),[Dn]:o})}var TT={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function Ch(e){return e&&TT[e]||"internal_error"}function IT(e,t){t.error&&(e.setStatus({code:2,message:Ch(t.error.type)}),me(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function wT(e){const{system:t,messages:n,input:r}=e,i=typeof t=="string"?[{role:"system",content:e.system}]:[],o=(Array.isArray(r)?r:r!=null?[r]:void 0)??(Array.isArray(n)?n:n!=null?[n]:[]);return[...i,...o]}function RT(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:2,message:Ch(e.error?.type)}),me(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function kT(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 AT(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 CT(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 MT(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 i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function Mh(e,t,n,r){e&&typeof e=="object"&&(RT(e,r)||(kT(e,t),AT(e,t),CT(e,t,n),MT(e,t)))}async function*NT(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 i of e)Mh(i,r,n,t),yield i}finally{Rs(t,r,n)}}function xT(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",i=>{Mh(i,r,n,t)}),e.on("message",()=>{Rs(t,r,n)}),e.on("error",i=>{me(i,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end())}),e}function OT(e,t,n){const r={[Ei]:"anthropic",[ut]:n,[q]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const i=e[0];i.tools&&Array.isArray(i.tools)&&(r[Ii]=JSON.stringify(i.tools)),r[tt]=i.model??"unknown","temperature"in i&&(r[Ss]=i.temperature),"top_p"in i&&(r[Es]=i.top_p),"stream"in i&&(r[zc]=i.stream),"top_k"in i&&(r[hh]=i.top_k),"frequency_penalty"in i&&(r[bs]=i.frequency_penalty),"max_tokens"in i&&(r[qc]=i.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[tt]=e[0]:r[tt]="unknown";return r}function ja(e,t,n){const r=wT(t);ET(e,r,n),"prompt"in t&&e.setAttributes({[CE]:JSON.stringify(t.prompt)})}function PT(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[Nt]: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({[$n]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[Nt]:t.completion}),"input_tokens"in t&&e.setAttributes({[Nt]:JSON.stringify(t.input_tokens)})}function LT(e,t){"id"in t&&"model"in t&&(e.setAttributes({[Ts]:t.id,[xr]:t.model}),"usage"in t&&t.usage&&iT(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function DT(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){IT(e,t);return}n&&PT(e,t),LT(e,t)}}function zl(e,t,n){throw me(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end()),e}function $T(e,t,n,r,i,o,s,a,c,u,f){const l={name:`${o} ${i["gen_ai.request.model"]??"unknown"}`,op:`gen_ai.${o}`,attributes:i};if(u&&!f){let d;const p=Gt(l,h=>(d=e.apply(n,r),c.recordInputs&&a&&ja(h,a,Dt(c.enableTruncation)),(async()=>{try{const m=await d;return NT(m,h,c.recordOutputs??!1)}catch(m){return zl(m,h,s)}})()));return Go(d,p,"auto.ai.anthropic")}else return Gt(l,d=>{try{c.recordInputs&&a&&ja(d,a,Dt(c.enableTruncation));const p=t.apply(n,r);return xT(p,d,c.recordOutputs??!1)}catch(p){return zl(p,d,s)}})}function FT(e,t,n,r,i){return new Proxy(e,{apply(o,s,a){const c=n.operation||"unknown",u=OT(a,t,c),f=u["gen_ai.request.model"]??"unknown",l=typeof a[0]=="object"?a[0]:void 0,d=!!l?.stream,p=n.streaming===!0;if(d||p)return $T(e,o,r,a,u,c,t,l,i,d,p);let h;const m=Ht({name:`${c} ${f}`,op:`gen_ai.${c}`,attributes:u},_=>(h=o.apply(r,a),i.recordInputs&&l&&ja(_,l,Dt(i.enableTruncation)),h.then(y=>(DT(_,y,i.recordOutputs),y),y=>{throw me(y,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),y})));return Go(h,m,"auto.ai.anthropic")}})}function Nh(e,t="",n){return new Proxy(e,{get(r,i){const o=r[i],s=Jc(t,String(i)),a=bT[s];return typeof o=="function"&&a?FT(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Nh(o,s,n):o}})}function GO(e,t){return Nh(e,"",Wn(t))}var BT={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},UT="google_genai";function HT(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:"internal_error"}),me(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function WT(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 jT(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 i of r?.content?.parts??[])n&&i.text&&t.responseTexts.push(i.text),i.functionCall&&t.toolCalls.push({type:"function",id:i.functionCall.id,name:i.functionCall.name,arguments:i.functionCall.args})}}function zT(e,t,n,r){!e||HT(e,r)||(WT(e,t),jT(e,t,n))}async function*qT(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const i of e)zT(i,r,n,t),yield i}finally{Rs(t,r,n)}}function zr(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>zr(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function ql(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 GT(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Ss]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Es]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[hh]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[qc]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[bs]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Gc]=e.presencePenalty),t}function VT(e,t,n){const r={[Ei]:UT,[ut]:e,[q]:"auto.ai.google_genai"};if(t){if(r[tt]=ql(t,n),"config"in t&&typeof t.config=="object"&&t.config){const i=t.config;if(Object.assign(r,GT(i)),"tools"in i&&Array.isArray(i.tools)){const o=i.tools.flatMap(s=>s.functionDeclarations);r[Ii]=JSON.stringify(o)}}}else r[tt]=ql({},n);return r}function Gl(e,t,n,r){if(n){const o=t.contents;o!=null&&e.setAttribute(Yc,typeof o=="string"?o:JSON.stringify(o));return}const i=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&i.push(...zr(t.config.systemInstruction,"system")),"history"in t&&i.push(...zr(t.history,"user")),"contents"in t&&i.push(...zr(t.contents,"user")),"message"in t&&i.push(...zr(t.message,"user")),Array.isArray(i)&&i.length){const{systemInstructions:o,filteredMessages:s}=wi(i);o&&e.setAttribute(Ti,o);const a=Array.isArray(s)?s.length:0;e.setAttributes({[Dn]:a,[Or]:r?Lr(s):Pr(s)})}}function YT(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(xr,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Pn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Ln]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[rn]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(i=>i.content?.parts&&Array.isArray(i.content.parts)?i.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(i=>i.length>0);r.length>0&&e.setAttributes({[Nt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[$n]:JSON.stringify(r)})}}}function KT(e,t,n,r,i){const o=n.operation==="embeddings";return new Proxy(e,{apply(s,a,c){const u=n.operation||"unknown",f=c[0],l=VT(u,f,r),d=l["gen_ai.request.model"]??"unknown";return n.streaming?Gt({name:`${u} ${d}`,op:`gen_ai.${u}`,attributes:l},async p=>{try{i.recordInputs&&f&&Gl(p,f,o,Dt(i.enableTruncation));const h=await s.apply(r,c);return qT(h,p,!!i.recordOutputs)}catch(h){throw p.setStatus({code:2,message:"internal_error"}),me(h,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),h}}):Ht({name:`${u} ${d}`,op:`gen_ai.${u}`,attributes:l},p=>(i.recordInputs&&f&&Gl(p,f,o,Dt(i.enableTruncation)),Cc(()=>s.apply(r,c),h=>{me(h,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},h=>{o||YT(p,h,i.recordOutputs)})))}})}function za(e,t="",n){return new Proxy(e,{get:(r,i,o)=>{const s=Reflect.get(r,i,o),a=Jc(t,String(i)),c=BT[a];if(typeof s=="function"&&c){const u=c.operation?KT(s,a,c,r,n):s.bind(r);return c.proxyResultPath?function(...f){const l=u(...f);return l&&typeof l=="object"?za(l,c.proxyResultPath,n):l}:u}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?za(s,a,n):s}})}function VO(e,t){return za(e,"",Wn(t))}var tr="auto.ai.langchain",JT={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Je=(e,t,n)=>{n!=null&&(e[t]=n)},He=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function Rn(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Yn(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&cr(n)?Vr(n):n);return JSON.stringify(t)}catch{return String(e)}return Rn(e)}function Hr(e){const t=e.toLowerCase();return JT[t]??t}function Vl(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function Yl(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Xc(e){return e.map(t=>{const n=t._getType;if(typeof n=="function")return{role:Hr(n.call(t)),content:Yn(t.content)};if(t.lc===1&&t.kwargs){const i=t.id,o=Array.isArray(i)&&i.length>0?i[i.length-1]:"";return{role:Hr(typeof o=="string"?Vl(o):"user"),content:Yn(t.kwargs?.content)}}if(t.type)return{role:Hr(String(t.type).toLowerCase()),content:Yn(t.content)};if(t.role)return{role:Hr(String(t.role)),content:Yn(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Hr(Vl(r)),content:Yn(t.content)}:{role:"user",content:Yn(t.content)}})}function XT(e,t,n){const r={},i="kwargs"in e?e.kwargs:void 0,o=t?.temperature??n?.ls_temperature??i?.temperature;He(r,Ss,o);const s=t?.max_tokens??n?.ls_max_tokens??i?.max_tokens;He(r,qc,s);const a=t?.top_p??i?.top_p;He(r,Es,a);const c=t?.frequency_penalty;He(r,bs,c);const u=t?.presence_penalty;return He(r,Gc,u),t&&"stream"in t&&Je(r,zc,!!t.stream),r}function xh(e,t,n,r,i){return{[Ei]:Rn(e??"langchain"),[ut]:"chat",[tt]:Rn(t),[q]:tr,...XT(n,r,i)}}function QT(e,t,n,r,i,o){const s=o?.ls_provider,a=xh(s,i?.model??o?.ls_model_name??"unknown",e,i,o);if(n&&Array.isArray(t)&&t.length>0){Je(a,Dn,t.length);const c=t.map(u=>({role:"user",content:u}));Je(a,Or,r?Lr(c):Pr(c))}return a}function ZT(e,t,n,r,i,o){const s=xh(o?.ls_provider??e.id?.[2],i?.model??o?.ls_model_name??"unknown",e,i,o);if(n&&Array.isArray(t)&&t.length>0){const a=Xc(t.flat()),{systemInstructions:c,filteredMessages:u}=wi(a);c&&Je(s,Ti,c);const f=Array.isArray(u)?u.length:0;Je(s,Dn,f),Je(s,Or,r?Lr(u):Pr(u))}return s}function eI(e,t){const n=[],r=e.flat();for(const i of r){const o=i.message?.tool_calls;if(Array.isArray(o)&&o.length>0)n.push(...o);else{const s=i.message?.content;if(Array.isArray(s))for(const a of s){const c=a;c.type==="tool_use"&&n.push(c)}}}n.length>0&&Je(t,$n,Rn(n))}function tI(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)He(t,Pn,n.promptTokens),He(t,Ln,n.completionTokens),He(t,rn,n.totalTokens);else if(r){He(t,Pn,r.input_tokens),He(t,Ln,r.output_tokens);const i=Number(r.input_tokens),o=Number(r.output_tokens),s=(Number.isNaN(i)?0:i)+(Number.isNaN(o)?0:o);s>0&&He(t,rn,s),r.cache_creation_input_tokens!==void 0&&He(t,OE,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&He(t,PE,r.cache_read_input_tokens)}}function nI(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const c=e.generations.flat().map(u=>u.generationInfo?.finish_reason?u.generationInfo.finish_reason:u.generation_info?.finish_reason?u.generation_info.finish_reason:null).filter(u=>typeof u=="string");if(c.length>0&&Je(n,ii,Rn(c)),eI(e.generations,n),t){const u=e.generations.flat().map(f=>f.text??f.message?.content).filter(f=>typeof f=="string");u.length>0&&Je(n,Nt,Rn(u))}}tI(e.llmOutput,n);const r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,o=r?.model_name??r?.model??i?.response_metadata?.model_name;o&&Je(n,xr,o);const s=r?.id??i?.id;s&&Je(n,Ts,s);const a=r?.stop_reason??i?.response_metadata?.finish_reason;return a&&Je(n,ME,Rn(a)),n}function sa(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[Is]=n),t}function rI(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const i=r.function;return{type:"function",name:r.name??i?.name??"",description:r.description??i?.description}});return JSON.stringify(n)}function Oh(e={}){const{recordInputs:t,recordOutputs:n}=Wn(e),r=Dt(e.enableTruncation),i=new Map,o=a=>{const c=i.get(a);c?.isRecording()&&(c.end(),i.delete(a))},s={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,c,u,f,l,d,p,h){const m=Yl(d),_=QT(a,c,t,r,m,p),y=_[tt],v=_[ut];Gt({name:`${v} ${y}`,op:"gen_ai.chat",attributes:{...sa(p),..._,[ie]:"gen_ai.chat"}},b=>(i.set(u,b),b))},handleChatModelStart(a,c,u,f,l,d,p,h){const m=Yl(d),_=ZT(a,c,t,r,m,p),y=rI(l);y&&(_[Ii]=y);const v=_[tt],b=_[ut];Gt({name:`${b} ${v}`,op:"gen_ai.chat",attributes:{...sa(p),..._,[ie]:"gen_ai.chat"}},N=>(i.set(u,N),N))},handleLLMEnd(a,c,u,f,l){const d=i.get(c);if(d?.isRecording()){const p=nI(a,n);p&&d.setAttributes(p),o(c)}},handleLLMError(a,c){const u=i.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),o(c)),me(a,{mechanism:{handled:!1,type:`${tr}.llm_error_handler`}})},handleChainStart(a,c,u,f,l,d,p,h){if(d?.__sentry_langgraph__)return;const m=h||a.name||"unknown_chain",_={[q]:"auto.ai.langchain","langchain.chain.name":m};t&&(_["langchain.chain.inputs"]=JSON.stringify(c)),Gt({name:`chain ${m}`,op:"gen_ai.invoke_agent",attributes:{..._,[ie]:"gen_ai.invoke_agent"}},y=>(i.set(u,y),y))},handleChainEnd(a,c){const u=i.get(c);u?.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),o(c))},handleChainError(a,c){const u=i.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),o(c)),me(a,{mechanism:{handled:!1,type:`${tr}.chain_error_handler`}})},handleToolStart(a,c,u,f,l,d,p){if(d?.__sentry_langgraph__)return;const h=p||a.name||"unknown_tool",m={...sa(d),[q]:tr,[ut]:"execute_tool",[yh]:h};t&&(m[vh]=c),Gt({name:`execute_tool ${h}`,op:"gen_ai.execute_tool",attributes:{...m,[ie]:"gen_ai.execute_tool"}},_=>(i.set(u,_),_))},handleToolEnd(a,c){const u=i.get(c);if(u?.isRecording()){if(n){const f=a,l=f&&typeof f=="object"&&"content"in f?f.content:a;u.setAttributes({[Sh]:typeof l=="string"?l:JSON.stringify(l)})}o(c)}},handleToolError(a,c){const u=i.get(c);u?.isRecording()&&(u.setStatus({code:2,message:"internal_error"}),o(c)),me(a,{mechanism:{handled:!1,type:`${tr}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}var Qc="auto.ai.langgraph";function iI(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function oI(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function sI(e,t,n){const r="__sentry_tool_wrapped__";for(const i of e){if(!i||typeof i!="object")continue;const o=i,s=o.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,r))continue;const a=typeof o.name=="string"?o.name:"unknown_tool",c=typeof o.description=="string"?o.description:void 0;o.invoke=new Proxy(s,{apply(u,f,l){const d={[q]:Qc,[ie]:Hl,[ut]:"execute_tool",[yh]:a,[$E]:"function"},p=l[1]?.metadata?.lc_agent_name??n;typeof p=="string"&&(d[Is]=p),c&&(d[FE]=c);const h=l[0];if(typeof h=="object"&&h&&("id"in h&&typeof h.id=="string"&&(d[DE]=h.id),t.recordInputs)){const m="args"in h&&typeof h.args=="object"?h.args:h;try{d[vh]=JSON.stringify(m)}catch{}}return Ht({op:Hl,name:`execute_tool ${a}`,attributes:d},async m=>{try{const _=await Reflect.apply(u,f,l);if(t.recordOutputs)try{const y=_,v=y&&typeof y=="object"&&"content"in y?y.content:_;m.setAttribute(Sh,typeof v=="string"?v:JSON.stringify(v))}catch{}return _}catch(_){throw m.setStatus({code:2,message:"internal_error"}),me(_,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),_}})}}),Object.defineProperty(o,r,{value:!0,enumerable:!1})}return e}function aI(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function cI(e){const t=e;let n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const o=t.usage_metadata;return typeof o.input_tokens=="number"&&(n=o.input_tokens),typeof o.output_tokens=="number"&&(r=o.output_tokens),typeof o.total_tokens=="number"&&(i=o.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata=="object"){const o=t.response_metadata;if(o.tokenUsage&&typeof o.tokenUsage=="object"){const s=o.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(i=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function uI(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(xr,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(ii,[r.finish_reason])}}function lI(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function fI(e,t,n){const r=n?.messages;if(!r||!Array.isArray(r))return;const i=t?.length??0,o=r.length>i?r.slice(i):[];if(o.length===0)return;const s=aI(o);s&&e.setAttribute($n,JSON.stringify(s));const a=Xc(o);e.setAttribute(Nt,JSON.stringify(a));let c=0,u=0,f=0;for(const l of o){const d=cI(l);c+=d.inputTokens,u+=d.outputTokens,f+=d.totalTokens,uI(e,l)}c>0&&e.setAttribute(Pn,c),u>0&&e.setAttribute(Ln,u),f>0&&e.setAttribute(rn,f)}function dI(e,t){if(!e)return[t];if(Array.isArray(e))return e.includes(t)?e:[...e,t];const n=e;return typeof n.addHandler=="function"&&(Array.isArray(n.handlers)&&n.handlers.includes(t)||n.addHandler(t)),e}var qa=!1,Vo="__sentry_patched__";function pI(e,t){if(Object.prototype.hasOwnProperty.call(e,Vo))return e;const n=Oh(t),r=new Proxy(e,{apply(i,o,s){return qa?Reflect.apply(i,o,s):Ht({op:"gen_ai.create_agent",name:"create_agent",attributes:{[q]:Qc,[ie]:"gen_ai.create_agent",[ut]:"create_agent"}},a=>{try{const c=Reflect.apply(i,o,s),u=s.length>0?s[0]:{};u?.name&&typeof u.name=="string"&&(a.setAttribute(Is,u.name),a.updateName(`create_agent ${u.name}`));const f=c.invoke;return f&&typeof f=="function"&&(c.invoke=Ph(f.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:2,message:"internal_error"}),me(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(r,Vo,{value:!0,enumerable:!1}),r}function Ph(e,t,n,r,i,o){return new Proxy(e,{apply(s,a,c){const u=i?.modelName??i?.model;return Ht({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[q]:Qc,[ie]:LE,[ut]:"invoke_agent"}},async f=>{try{const l=n?.name;l&&typeof l=="string"&&(f.setAttribute(xE,l),f.setAttribute(Is,l),f.updateName(`invoke_agent ${l}`)),u&&f.setAttribute(tt,u);const d=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(d&&typeof d=="string"&&f.setAttribute(Vc,d),o){const v=c[1]??{};c[1]=v,v.metadata={...v.metadata??{},__sentry_langgraph__:!0,...typeof l=="string"?{lc_agent_name:l}:{}},v.callbacks=dI(v.callbacks,o)}const p=lI(t);p&&f.setAttribute(Ii,JSON.stringify(p));const h=r.recordInputs,m=r.recordOutputs,_=c.length>0?c[0]?.messages??[]:[];if(_&&h){const v=Xc(_),{systemInstructions:b,filteredMessages:N}=wi(v);b&&f.setAttribute(Ti,b);const W=Dt(r.enableTruncation),A=Array.isArray(N)?N.length:0;f.setAttributes({[Or]:W?Lr(N):Pr(N),[Dn]:A})}const y=await Reflect.apply(s,a,c);return m&&fI(f,_??null,y),y}catch(l){throw f.setStatus({code:2,message:"internal_error"}),me(l,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),l}})}})}function YO(e,t){if(Object.prototype.hasOwnProperty.call(e,Vo))return e;const n=Wn(t),r=Oh(n),i=new Proxy(e,{apply(o,s,a){const c=iI(a),u=oI(a),f=a[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&sI(f.tools,n,u??void 0),qa=!0;let l;try{l=Reflect.apply(o,s,a)}finally{qa=!1}const d=l.invoke;if(d&&typeof d=="function"){const p={};u&&(p.name=u),l.invoke=Ph(d.bind(l),l,p,n,c,r)}return l}});return Object.defineProperty(i,Vo,{value:!0,enumerable:!1}),i}function KO(e,t){return e.compile=pI(e.compile,Wn(t)),e}function hI(e,t,n){const r=n.getOptions(),i=n.getDsn(),o=r.tunnel,s=yi(r._metadata),a={sent_at:new Date().toISOString(),...mI(t)&&{trace:t},...s&&{sdk:s},...!!o&&i&&{dsn:bt(i)}},c=r.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Nn()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return rt(a,[u])}function mI(e){return!!e.trace_id&&!!e.public_key}function gI(e){let t=156;if(t+=e.name.length*2,t+=Ku(e.attributes),e.links&&e.links.length>0){const n=e.links[0]?.attributes,r=100+(n?Ku(n):0);t+=r*e.links.length}return t}var Kl=1e3,_I=5e6,yI=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;const{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=Kl?n:Kl,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:_I,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(o=>{clearTimeout(o.timeout)}),this._traceBuckets.clear()})}add(e){const t=e.trace_id;let n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:_s(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=gI(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(w&&g.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){const t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}const n=Array.from(t.spans),r=n[0]?._segmentSpan;if(!r){w&&g.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(e);return}const i=qe(r),o=n.map(a=>{const{_segmentSpan:c,...u}=a;return u}),s=hI(o,i,this._client);w&&g.log(`Sending span envelope for trace ${e} with ${o.length} spans`),this._client.sendEnvelope(s).then(null,a=>{w&&g.error("Error while sending streamed span envelope:",a)}),this._removeTrace(e)}_removeTrace(e){const t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}},_r=F;function vI(){return"history"in _r&&!!_r.history}function SI(){if(!("fetch"in _r))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Ga(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Lh(){if(typeof EdgeRuntime=="string")return!0;if(!SI())return!1;if(Ga(_r.fetch))return!0;let e=!1;const t=_r.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Ga(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){w&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function bI(){return"ReportingObserver"in _r}function Zc(e,t){const n="fetch",r=an(n,e);return cn(n,()=>Dh(void 0,t)),r}function EI(e){const t="fetch-body-resolved",n=an(t,e);return cn(t,()=>Dh(II)),n}function Dh(e,t=!1){t&&!Lh()||xe(F,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=wI(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:de()*1e3,virtualError:i,headers:RI(r)};return e||Xe("fetch",{...a}),n.apply(F,r).then(async c=>(e?e(c):Xe("fetch",{...a,endTimestamp:de()*1e3,response:c}),c),c=>{Xe("fetch",{...a,endTimestamp:de()*1e3,error:c}),gt(c)&&c.stack===void 0&&(c.stack=i.stack,ve(c,"framesToPop",1));const u=R()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(a.fetchData.url).host;u==="always"?c.message=`${c.message} (${f})`:ve(c,"__sentry_fetch_url_host__",f)}catch{}throw c})}})}async function TI(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function II(e){let t;try{t=e.clone()}catch{return}TI(t,()=>{Xe("fetch-body-resolved",{endTimestamp:de()*1e3,response:e})})}function mo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Jl(e){return typeof e=="string"?e:e?mo(e,"url")?e.url:e.toString?e.toString():"":""}function wI(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Jl(n),method:mo(r,"method")?String(r.method).toUpperCase():Tc(n)&&mo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Jl(t),method:mo(t,"method")?String(t.method).toUpperCase():"GET"}}function RI(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Tc(t))return new Headers(t.headers)}catch{}}function kI(e){const t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function AI(e){const t=e??{},n={[q]:tr,[ie]:_h,[ut]:"embeddings",[tt]:t.model??"unknown"};return n[Ei]=kI(t),"dimensions"in t&&(n[gh]=t.dimensions),"encodingFormat"in t&&(n[mh]=t.encodingFormat),n}function Xl(e,t={}){const{recordInputs:n}=Wn(t);return new Proxy(e,{apply(r,i,o){const s=AI(i),a=s["gen_ai.request.model"]||"unknown";if(n){const c=o[0];c!=null&&(s[Yc]=typeof c=="string"?c:JSON.stringify(c))}return Ht({name:`embeddings ${a}`,op:_h,attributes:s},()=>Reflect.apply(r,i,o).then(void 0,c=>{throw me(c,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),c}))}})}function JO(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Xl(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Xl(n.embedDocuments,t)),e}var st=F,ue=st.document,qr=st.navigator,$h="Report a Bug",CI="Cancel",MI="Send Bug Report",NI="Confirm",xI="Report a Bug",OI="your.email@example.org",PI="Email",LI="What's the bug? What did you expect?",DI="Description",$I="Your Name",FI="Name",BI="Thank you for your report!",UI="(required)",HI="Add a screenshot",WI="Remove screenshot",jI="Highlight",zI="Hide",qI="Remove",Fh="Unable to submit feedback with empty message",Bh="No client setup, cannot send feedback.",Uh="Unable to determine if Feedback was correctly sent.",Hh="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Wh="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",GI="widget",VI="api",YI=5e3,KI={ERROR_EMPTY_MESSAGE:Fh,ERROR_NO_CLIENT:Bh,ERROR_TIMEOUT:Uh,ERROR_FORBIDDEN:Hh,ERROR_GENERIC:Wh};function go(e,t){return t?.[e]??KI[e]}function Ql(e,t){return new Error(go(e,t))}var JI=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw Ql("ERROR_EMPTY_MESSAGE",n);const r=R();if(!r)throw Ql("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&j().setTags(e.tags);const i=fE({source:VI,url:Bn(),...e},t);return new Promise((o,s)=>{const a=setTimeout(()=>{c(),s(go("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,f)=>{if(u.event_id===i)return clearTimeout(a),c(),f?.statusCode&&f.statusCode>=200&&f.statusCode<300?o(i):f?.statusCode===403?s(go("ERROR_FORBIDDEN",n)):s(go("ERROR_GENERIC",n))})})},_o=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function XI(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(qr.userAgent)||/Macintosh/i.test(qr.userAgent)&&qr.maxTouchPoints&&qr.maxTouchPoints>1||!isSecureContext)}function Ki(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 QI(e){const t=ue.createElement("style");return t.textContent=`
19
+ .widget__actor {
20
+ position: fixed;
21
+ z-index: var(--z-index);
22
+ margin: var(--page-margin);
23
+ inset: var(--actor-inset);
24
+
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 8px;
28
+ padding: 16px;
29
+
30
+ font-family: inherit;
31
+ font-size: var(--font-size);
32
+ font-weight: 600;
33
+ line-height: 1.14em;
34
+ text-decoration: none;
35
+
36
+ background: var(--actor-background, var(--background));
37
+ border-radius: var(--actor-border-radius, 1.7em/50%);
38
+ border: var(--actor-border, var(--border));
39
+ box-shadow: var(--actor-box-shadow, var(--box-shadow));
40
+ color: var(--actor-color, var(--foreground));
41
+ fill: var(--actor-color, var(--foreground));
42
+ cursor: pointer;
43
+ opacity: 1;
44
+ transition: transform 0.2s ease-in-out;
45
+ transform: translate(0, 0) scale(1);
46
+ }
47
+ .widget__actor[aria-hidden="true"] {
48
+ opacity: 0;
49
+ pointer-events: none;
50
+ visibility: hidden;
51
+ transform: translate(0, 16px) scale(0.98);
52
+ }
53
+
54
+ .widget__actor:hover {
55
+ background: var(--actor-hover-background, var(--background));
56
+ filter: var(--interactive-filter);
57
+ }
58
+
59
+ .widget__actor svg {
60
+ width: 1.14em;
61
+ height: 1.14em;
62
+ }
63
+
64
+ @media (max-width: 600px) {
65
+ .widget__actor span {
66
+ display: none;
67
+ }
68
+ }
69
+ `,e&&t.setAttribute("nonce",e),t}function je(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var Kn=20,ZI="http://www.w3.org/2000/svg";function e0(){const e=a=>st.document.createElementNS(ZI,a),t=je(e("svg"),{width:`${Kn}`,height:`${Kn}`,viewBox:`0 0 ${Kn} ${Kn}`,fill:"var(--actor-color, var(--foreground))"}),n=je(e("g"),{clipPath:"url(#clip0_57_80)"}),r=je(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 i=e("defs"),o=je(e("clipPath"),{id:"clip0_57_80"}),s=je(e("rect"),{width:`${Kn}`,height:`${Kn}`,fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}function t0({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const i=ue.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||$h,i.appendChild(e0()),e){const s=ue.createElement("span");s.appendChild(ue.createTextNode(e)),i.appendChild(s)}const o=QI(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}var jh="rgba(88, 74, 192, 1)",n0={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:jh,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%)"},Zl={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:jh,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 ef(e){return`
70
+ --foreground: ${e.foreground};
71
+ --background: ${e.background};
72
+ --accent-foreground: ${e.accentForeground};
73
+ --accent-background: ${e.accentBackground};
74
+ --success-color: ${e.successColor};
75
+ --error-color: ${e.errorColor};
76
+ --border: ${e.border};
77
+ --box-shadow: ${e.boxShadow};
78
+ --outline: ${e.outline};
79
+ --interactive-filter: ${e.interactiveFilter};
80
+ `}function tf({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const i=ue.createElement("style");return i.textContent=`
81
+ :host {
82
+ --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
83
+ --font-size: 14px;
84
+ --z-index: 100000;
85
+
86
+ --page-margin: 16px;
87
+ --inset: auto 0 0 auto;
88
+ --actor-inset: var(--inset);
89
+
90
+ font-family: var(--font-family);
91
+ font-size: var(--font-size);
92
+
93
+ ${e!=="system"?`color-scheme: only ${e};`:""}
94
+
95
+ ${ef(e==="dark"?{...Zl,...t}:{...n0,...n})}
96
+ }
97
+
98
+ ${e==="system"?`
99
+ @media (prefers-color-scheme: dark) {
100
+ :host {
101
+ color-scheme: only dark;
102
+
103
+ ${ef({...Zl,...t})}
104
+ }
105
+ }`:""}
106
+ `,r&&i.setAttribute("nonce",r),i}var zh=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:i="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:f=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:_="system",themeLight:y={},themeDark:v={},addScreenshotButtonLabel:b=HI,cancelButtonLabel:N=CI,confirmButtonLabel:W=NI,emailLabel:A=PI,emailPlaceholder:S=OI,formTitle:D=xI,isRequiredLabel:$=UI,messageLabel:E=DI,messagePlaceholder:x=LI,nameLabel:M=FI,namePlaceholder:C=$I,removeScreenshotButtonLabel:Y=WI,submitButtonLabel:Z=MI,successMessageText:ee=BI,triggerLabel:oe=$h,triggerAriaLabel:T="",highlightToolText:H=jI,hideToolText:P=zI,removeHighlightText:K=qI,errorEmptyMessageText:te=Fh,errorNoClientText:re=Bh,errorTimeoutText:Ae=Uh,errorForbiddenText:Be=Hh,errorGenericText:Ve=Wh,onFormOpen:it,onFormClose:Et,onSubmitSuccess:dn,onSubmitError:Tt,onFormSubmitted:qi}={})=>{const It={id:i,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:f,enableScreenshot:l,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:m,colorScheme:_,themeDark:v,themeLight:y,triggerLabel:oe,triggerAriaLabel:T,cancelButtonLabel:N,submitButtonLabel:Z,confirmButtonLabel:W,formTitle:D,emailLabel:A,emailPlaceholder:S,messageLabel:E,messagePlaceholder:x,nameLabel:M,namePlaceholder:C,successMessageText:ee,isRequiredLabel:$,addScreenshotButtonLabel:b,removeScreenshotButtonLabel:Y,highlightToolText:H,hideToolText:P,removeHighlightText:K,errorEmptyMessageText:te,errorNoClientText:re,errorTimeoutText:Ae,errorForbiddenText:Be,errorGenericText:Ve,onFormClose:Et,onFormOpen:it,onSubmitError:Tt,onSubmitSuccess:dn,onFormSubmitted:qi};let Ye=null,De=null,Ue=[];const zn=O=>{if(!Ye){const se=ue.createElement("div");se.id=String(O.id),ue.body.appendChild(se),Ye=se.attachShadow({mode:"open"}),De=tf(O),Ye.appendChild(De)}return Ye},qn=async O=>{const se=O.enableScreenshot&&XI();let G,ae;try{G=(t?t():await e("feedbackModalIntegration",m))(),_l(G)}catch{throw _o&&g.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 Gn=se?n?n():await e("feedbackScreenshotIntegration",m):void 0;Gn&&(ae=Gn(),_l(ae))}catch{_o&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const J={ERROR_EMPTY_MESSAGE:O.errorEmptyMessageText,ERROR_NO_CLIENT:O.errorNoClientText,ERROR_TIMEOUT:O.errorTimeoutText,ERROR_FORBIDDEN:O.errorForbiddenText,ERROR_GENERIC:O.errorGenericText},pt=(Gn,s_)=>JI(Gn,{includeReplay:!0,...s_,errorMessages:J}),mn=G.createDialog({options:{...O,onFormClose:()=>{mn?.close(),O.onFormClose?.()},onFormSubmitted:()=>{mn?.close(),O.onFormSubmitted?.()}},screenshotIntegration:ae,sendFeedback:pt,shadow:zn(O)});return mn},pn=(O,se={})=>{const G=Ki(It,se),ae=typeof O=="string"?ue.querySelector(O):typeof O.addEventListener=="function"?O:null;if(!ae)throw _o&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let J=null;const pt=async()=>{J||(J=await qn({...G,onFormSubmitted:()=>{J?.removeFromDom(),G.onFormSubmitted?.()}})),J.appendToDom(),J.open()};ae.addEventListener("click",pt);const mn=()=>{Ue=Ue.filter(Gn=>Gn!==mn),J?.removeFromDom(),J=null,ae.removeEventListener("click",pt)};return Ue.push(mn),mn},hn=(O={})=>{const se=Ki(It,O),G=zn(se),ae=t0({triggerLabel:se.triggerLabel,triggerAriaLabel:se.triggerAriaLabel,shadow:G,styleNonce:h});return pn(ae.el,{...se,onFormOpen(){ae.hide()},onFormClose(){ae.show()},onFormSubmitted(){ae.show()}}),ae};return{name:"Feedback",setupOnce(){!Nn()||!It.autoInject||(ue.readyState==="loading"?ue.addEventListener("DOMContentLoaded",()=>hn().appendToDom()):hn().appendToDom())},attachTo:pn,createWidget(O={}){const se=hn(Ki(It,O));return se.appendToDom(),se},async createForm(O={}){return qn(Ki(It,O))},setTheme(O){if(It.colorScheme=O,Ye){const se=tf(It);De?Ye.replaceChild(se,De):Ye.prepend(se),De=se}},remove(){Ye&&(Ye.parentElement?.remove(),Ye=null,De=null),Ue.forEach(O=>O()),Ue=[]}}});function XO(){return R()?.getIntegrationByName("Feedback")}var ks,fe,qh,vn,nf,Gh,Va,oi={},eu=[],r0=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,tu=Array.isArray;function Vt(e,t){for(var n in t)e[n]=t[n];return e}function Vh(e){var t=e.parentNode;t&&t.removeChild(e)}function Q(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ks.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return yo(e,s,r,i,null)}function yo(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++qh,__i:-1,__u:0};return i==null&&fe.vnode!=null&&fe.vnode(o),o}function Ri(e){return e.children}function vo(e,t){this.props=e,this.context=t}function yr(e,t){if(t==null)return e.__?yr(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"?yr(e):null}function i0(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=Vt({},i)).__v=i.__v+1,fe.vnode&&fe.vnode(r),nu(s,r,i,e.__n,s.ownerSVGElement!==void 0,32&i.__u?[o]:null,t,o??yr(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&Yh(r),r}function Yh(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 Yh(e)}}function rf(e){(!e.__d&&(e.__d=!0)&&vn.push(e)&&!Yo.__r++||nf!==fe.debounceRendering)&&((nf=fe.debounceRendering)||Gh)(Yo)}function Yo(){var e,t,n,r=[],i=[];for(vn.sort(Va);e=vn.shift();)e.__d&&(n=vn.length,t=i0(e,r,i)||t,n===0||vn.length>n?(Ya(r,t,i),i.length=r.length=0,t=void 0,vn.sort(Va)):t&&fe.__c&&fe.__c(t,eu));t&&Ya(r,t,i),Yo.__r=0}function Kh(e,t,n,r,i,o,s,a,c,u,f){var l,d,p,h,m,_=r&&r.__k||eu,y=t.length;for(n.__d=c,o0(n,t,_),c=n.__d,l=0;l<y;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(d=p.__i===-1?oi:_[p.__i]||oi,p.__i=l,nu(e,p,d,i,o,s,a,c,u,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&ru(d.ref,null,p),f.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),65536&p.__u||d.__k===p.__k?c=Jh(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=m}function o0(e,t,n){var r,i,o,s,a,c=t.length,u=n.length,f=u,l=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?yo(null,i,null,null,i):tu(i)?yo(Ri,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?yo(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,a=s0(i,n,s=r+l,f),i.__i=a,o=null,a!==-1&&(f--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&l--,typeof i.type!="function"&&(i.__u|=65536)):a!==s&&(a===s+1?l++:a>s?f>c-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==r+l&&(i.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=yr(o)),Ka(o,o,!1),n[r]=null,f--);if(f)for(r=0;r<u;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=yr(o)),Ka(o,o))}function Jh(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Jh(r[i],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 s0(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&(131072&c.__u)==0&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&i==c.key&&o===c.type)return a;a++}}return-1}function of(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||r0.test(t)?n:n+"px"}function Ji(e,t,n,r,i){var o;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||of(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||of(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=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+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?af:sf,o)):e.removeEventListener(t,o?af:sf,o);else{if(i)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 sf(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(fe.event?fe.event(e):e)}}function af(e){if(this.l)return this.l[e.type+!0](fe.event?fe.event(e):e)}function nu(e,t,n,r,i,o,s,a,c,u){var f,l,d,p,h,m,_,y,v,b,N,W,A,S,D,$=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(f=fe.__b)&&f(t);e:if(typeof $=="function")try{if(y=t.props,v=(f=$.contextType)&&r[f.__c],b=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in $&&$.prototype.render?t.__c=l=new $(y,b):(t.__c=l=new vo(y,b),l.constructor=$,l.render=c0),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=b,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),l.__s??(l.__s=l.state),$.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Vt({},l.__s)),Vt(l.__s,$.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,d)$.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if($.getDerivedStateFromProps==null&&y!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,b),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,b)===!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(E){E&&(E.__=t)}),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,b),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,m)})}if(l.context=b,l.props=y,l.__P=e,l.__e=!1,W=fe.__r,A=0,"prototype"in $&&$.prototype.render){for(l.state=l.__s,l.__d=!1,W&&W(t),f=l.render(l.props,l.state,l.context),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[]}else do l.__d=!1,W&&W(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=Vt(Vt({},r),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,h)),Kh(e,tu(D=f!=null&&f.type===Ri&&f.key==null?f.props.children:f)?D:[D],t,n,r,i,o,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(E){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),fe.__e(E,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=a0(n.__e,t,n,r,i,o,s,c,u);(f=fe.diffed)&&f(t)}function Ya(e,t,n){for(var r=0;r<n.length;r++)ru(n[r],n[++r],n[++r]);fe.__c&&fe.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){fe.__e(o,i.__v)}})}function a0(e,t,n,r,i,o,s,a,c){var u,f,l,d,p,h,m,_=n.props,y=t.props,v=t.type;if(v==="svg"&&(i=!0),o!=null){for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,o[u]=null;break}}if(e==null){if(v===null)return document.createTextNode(y);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),o=null,a=!1}if(v===null)_===y||a&&e.data===y||(e.data=y);else{if(o=o&&ks.call(e.childNodes),_=n.props||oi,!a&&o!=null)for(_={},u=0;u<e.attributes.length;u++)_[(p=e.attributes[u]).name]=p.value;for(u in _)p=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in y||Ji(e,u,null,p,i));for(u in y)p=y[u],u=="children"?d=p:u=="dangerouslySetInnerHTML"?f=p:u=="value"?h=p:u=="checked"?m=p:u==="key"||a&&typeof p!="function"||_[u]===p||Ji(e,u,p,_[u],i);if(f)a||l&&(f.__html===l.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),Kh(e,tu(d)?d:[d],t,n,r,i&&v!=="foreignObject",o,s,o?o[0]:n.__k&&yr(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&Vh(o[u]);a||(u="value",h!==void 0&&(h!==e[u]||v==="progress"&&!h||v==="option"&&h!==_[u])&&Ji(e,u,h,_[u],!1),u="checked",m!==void 0&&m!==e[u]&&Ji(e,u,m,_[u],!1))}return e}function ru(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){fe.__e(r,n)}}function Ka(e,t,n){var r,i;if(fe.unmount&&fe.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ru(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){fe.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ka(r[i],t,n||typeof e.type!="function");n||e.__e==null||Vh(e.__e),e.__=e.__e=e.__d=void 0}function c0(e,t,n){return this.constructor(e,n)}function u0(e,t,n){var r,i,o,s;fe.__&&fe.__(e,t),i=(r=!1)?null:t.__k,o=[],s=[],nu(t,e=t.__k=Q(Ri,null,[e]),i||oi,oi,t.ownerSVGElement!==void 0,i?null:t.firstChild?ks.call(t.childNodes):null,o,i?i.__e:t.firstChild,r,s),e.__d=void 0,Ya(o,e,s)}ks=eu.slice,fe={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},qh=0,vo.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Vt({},this.state);typeof e=="function"&&(e=e(Vt({},n),this.props)),e&&Vt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),rf(this))},vo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rf(this))},vo.prototype.render=Ri,vn=[],Gh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Va=function(e,t){return e.__v.__b-t.__v.__b},Yo.__r=0;var $t,le,aa,cf,vr=0,Xh=[],So=[],_e=fe,uf=_e.__b,lf=_e.__r,ff=_e.diffed,df=_e.__c,pf=_e.unmount,hf=_e.__;function jn(e,t){_e.__h&&_e.__h(le,e,vr||t),vr=0;var n=le.__H||(le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:So}),n.__[e]}function bn(e){return vr=1,Qh(em,e)}function Qh(e,t,n){var r=jn($t++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):em(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=le,!le.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!o||o.call(this,a,c,u);var l=!1;return f.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};le.u=!0;var o=le.shouldComponentUpdate,s=le.componentWillUpdate;le.componentWillUpdate=function(a,c,u){if(this.__e){var f=o;o=void 0,i(a,c,u),o=f}s&&s.call(this,a,c,u)},le.shouldComponentUpdate=i}return r.__N||r.__}function l0(e,t){var n=jn($t++,3);!_e.__s&&iu(n.__H,t)&&(n.__=e,n.i=t,le.__H.__h.push(n))}function Zh(e,t){var n=jn($t++,4);!_e.__s&&iu(n.__H,t)&&(n.__=e,n.i=t,le.__h.push(n))}function f0(e){return vr=5,ki(function(){return{current:e}},[])}function d0(e,t,n){vr=6,Zh(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 ki(e,t){var n=jn($t++,7);return iu(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ur(e,t){return vr=8,ki(function(){return e},t)}function p0(e){var t=le.context[e.__c],n=jn($t++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(le)),t.props.value):e.__}function h0(e,t){_e.useDebugValue&&_e.useDebugValue(t?t(e):e)}function m0(e){var t=jn($t++,10),n=bn();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function g0(){var e=jn($t++,11);if(!e.__){for(var t=le.__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 _0(){for(var e;e=Xh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(bo),e.__H.__h.forEach(Ja),e.__H.__h=[]}catch(t){e.__H.__h=[],_e.__e(t,e.__v)}}_e.__b=function(e){le=null,uf&&uf(e)},_e.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),hf&&hf(e,t)},_e.__r=function(e){lf&&lf(e),$t=0;var t=(le=e.__c).__H;t&&(aa===le?(t.__h=[],le.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=So,n.__N=n.i=void 0})):(t.__h.forEach(bo),t.__h.forEach(Ja),t.__h=[],$t=0)),aa=le},_e.diffed=function(e){ff&&ff(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xh.push(t)!==1&&cf===_e.requestAnimationFrame||((cf=_e.requestAnimationFrame)||y0)(_0)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==So&&(n.__=n.__V),n.i=void 0,n.__V=So})),aa=le=null},_e.__c=function(e,t){t.some(function(n){try{n.__h.forEach(bo),n.__h=n.__h.filter(function(r){return!r.__||Ja(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],_e.__e(r,n.__v)}}),df&&df(e,t)},_e.unmount=function(e){pf&&pf(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{bo(r)}catch(i){t=i}}),n.__H=void 0,t&&_e.__e(t,n.__v))};var mf=typeof requestAnimationFrame=="function";function y0(e){var t,n=function(){clearTimeout(r),mf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);mf&&(t=requestAnimationFrame(n))}function bo(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function Ja(e){var t=le;e.__c=e.__(),le=t}function iu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function em(e,t){return typeof t=="function"?t(e):t}var v0=Object.defineProperty({__proto__:null,useCallback:ur,useContext:p0,useDebugValue:h0,useEffect:l0,useErrorBoundary:m0,useId:g0,useImperativeHandle:d0,useLayoutEffect:Zh,useMemo:ki,useReducer:Qh,useRef:f0,useState:bn},Symbol.toStringTag,{value:"Module"}),S0="http://www.w3.org/2000/svg";function b0(){const e=r=>ue.createElementNS(S0,r),t=je(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=je(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 E0({options:e}){const t=ki(()=>({__html:b0().outerHTML}),[]);return Q("h2",{class:"dialog__header"},Q("span",{class:"dialog__title"},e.formTitle),e.showBranding?Q("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function T0(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 ca(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function I0({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){const{tags:f,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:d,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:_,isNameRequired:y,messageLabel:v,messagePlaceholder:b,nameLabel:N,namePlaceholder:W,submitButtonLabel:A,isRequiredLabel:S}=e,[D,$]=bn(!1),[E,x]=bn(null),[M,C]=bn(!1),Y=u?.input,[Z,ee]=bn(null),oe=ur(H=>{ee(H),C(!1)},[]),T=ur(H=>{const P=T0(H,{emailLabel:h,isEmailRequired:_,isNameRequired:y,messageLabel:v,nameLabel:N});return P.length>0?x(`Please enter in the following required fields: ${P.join(", ")}`):x(null),P.length===0},[h,_,y,v,N]);return Q("form",{class:"form",onSubmit:ur(async H=>{$(!0);try{if(H.preventDefault(),!(H.target instanceof HTMLFormElement))return;const P=new FormData(H.target),K=await(u&&M?u.value():void 0),te={name:ca(P,"name"),email:ca(P,"email"),message:ca(P,"message"),attachments:K?[K]:void 0};if(!T(te))return;try{o(te,await i({name:te.name,email:te.email,message:te.message,source:GI,tags:f},{attachments:te.attachments}))}catch(re){_o&&g.error(re);const Ae=re instanceof Error?re:new Error(String(re));x(Ae.message),s(Ae)}}finally{$(!1)}},[u&&M,o,s])},Y&&M?Q(Y,{onError:oe}):null,Q("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:D},Q("div",{class:"form__top"},E?Q("div",{class:"form__error-container"},E):null,c?Q("label",{for:"name",class:"form__label"},Q(ua,{label:N,isRequiredLabel:S,isRequired:y}),Q("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:W,required:y,type:"text"})):Q("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Q("label",{for:"email",class:"form__label"},Q(ua,{label:h,isRequiredLabel:S,isRequired:_}),Q("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:_,type:"email"})):Q("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Q("label",{for:"message",class:"form__label"},Q(ua,{label:v,isRequiredLabel:S,isRequired:!0}),Q("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:b,required:!0,rows:5})),Y?Q("label",{for:"screenshot",class:"form__label"},Q("button",{class:"btn btn--default",disabled:D,type:"button",onClick:()=>{ee(null),C(H=>!H)}},M?d:l),Z?Q("div",{class:"form__error-container"},Z.message):null):null),Q("div",{class:"btn-group"},Q("button",{class:"btn btn--primary",disabled:D,type:"submit"},A),Q("button",{class:"btn btn--default",disabled:D,type:"button",onClick:r},p))))}function ua({label:e,isRequired:t,isRequiredLabel:n}){return Q("span",{class:"form__label__text"},e,t&&Q("span",{class:"form__label__text--required"},n))}var Xi=16,gf=17,w0="http://www.w3.org/2000/svg";function R0(){const e=c=>st.document.createElementNS(w0,c),t=je(e("svg"),{width:`${Xi}`,height:`${gf}`,viewBox:`0 0 ${Xi} ${gf}`,fill:"inherit"}),n=je(e("g"),{clipPath:"url(#clip0_57_156)"}),r=je(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"}),i=je(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(i,r);const o=e("defs"),s=je(e("clipPath"),{id:"clip0_57_156"}),a=je(e("rect"),{width:`${Xi}`,height:`${Xi}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}function k0({open:e,onFormSubmitted:t,...n}){const r=n.options,i=ki(()=>({__html:R0().outerHTML}),[]),[o,s]=bn(null),a=ur(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),c=ur((u,f)=>{n.onSubmitSuccess(u,f),s(setTimeout(()=>{t(),s(null)},YI))},[t]);return Q(Ri,null,o?Q("div",{class:"success__position",onClick:a},Q("div",{class:"success__content"},r.successMessageText,Q("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):Q("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Q("div",{class:"dialog__position"},Q("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},Q(E0,{options:r}),Q(I0,{...n,onSubmitSuccess:c})))))}var A0=`
107
+ .dialog {
108
+ position: fixed;
109
+ z-index: var(--z-index);
110
+ margin: 0;
111
+ inset: 0;
112
+
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ padding: 0;
117
+ height: 100vh;
118
+ width: 100vw;
119
+
120
+ color: var(--dialog-color, var(--foreground));
121
+ fill: var(--dialog-color, var(--foreground));
122
+ line-height: 1.75em;
123
+
124
+ background-color: rgba(0, 0, 0, 0.05);
125
+ border: none;
126
+ inset: 0;
127
+ opacity: 1;
128
+ transition: opacity 0.2s ease-in-out;
129
+ }
130
+
131
+ .dialog__position {
132
+ position: fixed;
133
+ z-index: var(--z-index);
134
+ inset: var(--dialog-inset);
135
+ padding: var(--page-margin);
136
+ display: flex;
137
+ max-height: calc(100vh - (2 * var(--page-margin)));
138
+ }
139
+ @media (max-width: 600px) {
140
+ .dialog__position {
141
+ inset: var(--page-margin);
142
+ padding: 0;
143
+ }
144
+ }
145
+
146
+ .dialog__position:has(.editor) {
147
+ inset: var(--page-margin);
148
+ padding: 0;
149
+ }
150
+
151
+ .dialog:not([open]) {
152
+ opacity: 0;
153
+ pointer-events: none;
154
+ visibility: hidden;
155
+ }
156
+ .dialog:not([open]) .dialog__content {
157
+ transform: translate(0, -16px) scale(0.98);
158
+ }
159
+
160
+ .dialog__content {
161
+ display: flex;
162
+ flex-direction: column;
163
+ gap: 16px;
164
+ padding: var(--dialog-padding, 24px);
165
+ max-width: 100%;
166
+ width: 100%;
167
+ max-height: 100%;
168
+ overflow: auto;
169
+
170
+ background: var(--dialog-background, var(--background));
171
+ border-radius: var(--dialog-border-radius, 20px);
172
+ border: var(--dialog-border, var(--border));
173
+ box-shadow: var(--dialog-box-shadow, var(--box-shadow));
174
+ transform: translate(0, 0) scale(1);
175
+ transition: transform 0.2s ease-in-out;
176
+ }
177
+
178
+ `,C0=`
179
+ .dialog__header {
180
+ display: flex;
181
+ gap: 4px;
182
+ justify-content: space-between;
183
+ font-weight: var(--dialog-header-weight, 600);
184
+ margin: 0;
185
+ }
186
+ .dialog__title {
187
+ align-self: center;
188
+ width: var(--form-width, 272px);
189
+ }
190
+
191
+ @media (max-width: 600px) {
192
+ .dialog__title {
193
+ width: auto;
194
+ }
195
+ }
196
+
197
+ .dialog__position:has(.editor) .dialog__title {
198
+ width: auto;
199
+ }
200
+
201
+
202
+ .brand-link {
203
+ display: inline-flex;
204
+ }
205
+ .brand-link:focus-visible {
206
+ outline: var(--outline);
207
+ }
208
+ `,M0=`
209
+ .form {
210
+ display: flex;
211
+ overflow: auto;
212
+ flex-direction: row;
213
+ gap: 16px;
214
+ flex: 1 0;
215
+ }
216
+
217
+ .form fieldset {
218
+ border: none;
219
+ margin: 0;
220
+ padding: 0;
221
+ }
222
+
223
+ .form__right {
224
+ flex: 0 0 auto;
225
+ display: flex;
226
+ overflow: auto;
227
+ flex-direction: column;
228
+ justify-content: space-between;
229
+ gap: 20px;
230
+ width: var(--form-width, 100%);
231
+ }
232
+
233
+ .dialog__position:has(.editor) .form__right {
234
+ width: var(--form-width, 272px);
235
+ }
236
+
237
+ .form__top {
238
+ display: flex;
239
+ flex-direction: column;
240
+ gap: 8px;
241
+ }
242
+
243
+ .form__error-container {
244
+ color: var(--error-color);
245
+ fill: var(--error-color);
246
+ }
247
+
248
+ .form__label {
249
+ display: flex;
250
+ flex-direction: column;
251
+ gap: 4px;
252
+ margin: 0px;
253
+ }
254
+
255
+ .form__label__text {
256
+ display: flex;
257
+ gap: 4px;
258
+ align-items: center;
259
+ }
260
+
261
+ .form__label__text--required {
262
+ font-size: 0.85em;
263
+ }
264
+
265
+ .form__input {
266
+ font-family: inherit;
267
+ line-height: inherit;
268
+ background: transparent;
269
+ box-sizing: border-box;
270
+ border: var(--input-border, var(--border));
271
+ border-radius: var(--input-border-radius, 6px);
272
+ color: var(--input-color, inherit);
273
+ fill: var(--input-color, inherit);
274
+ font-size: var(--input-font-size, inherit);
275
+ font-weight: var(--input-font-weight, 500);
276
+ padding: 6px 12px;
277
+ }
278
+
279
+ .form__input::placeholder {
280
+ opacity: 0.65;
281
+ color: var(--input-placeholder-color, inherit);
282
+ filter: var(--interactive-filter);
283
+ }
284
+
285
+ .form__input:focus-visible {
286
+ outline: var(--input-focus-outline, var(--outline));
287
+ }
288
+
289
+ .form__input--textarea {
290
+ font-family: inherit;
291
+ resize: vertical;
292
+ }
293
+
294
+ .error {
295
+ color: var(--error-color);
296
+ fill: var(--error-color);
297
+ }
298
+ `,N0=`
299
+ .btn-group {
300
+ display: grid;
301
+ gap: 8px;
302
+ }
303
+
304
+ .btn {
305
+ line-height: inherit;
306
+ border: var(--button-border, var(--border));
307
+ border-radius: var(--button-border-radius, 6px);
308
+ cursor: pointer;
309
+ font-family: inherit;
310
+ font-size: var(--button-font-size, inherit);
311
+ font-weight: var(--button-font-weight, 600);
312
+ padding: var(--button-padding, 6px 16px);
313
+ }
314
+ .btn[disabled] {
315
+ opacity: 0.6;
316
+ pointer-events: none;
317
+ }
318
+
319
+ .btn--primary {
320
+ color: var(--button-primary-color, var(--accent-foreground));
321
+ fill: var(--button-primary-color, var(--accent-foreground));
322
+ background: var(--button-primary-background, var(--accent-background));
323
+ border: var(--button-primary-border, var(--border));
324
+ border-radius: var(--button-primary-border-radius, 6px);
325
+ font-weight: var(--button-primary-font-weight, 500);
326
+ }
327
+ .btn--primary:hover {
328
+ color: var(--button-primary-hover-color, var(--accent-foreground));
329
+ fill: var(--button-primary-hover-color, var(--accent-foreground));
330
+ background: var(--button-primary-hover-background, var(--accent-background));
331
+ filter: var(--interactive-filter);
332
+ }
333
+ .btn--primary:focus-visible {
334
+ background: var(--button-primary-hover-background, var(--accent-background));
335
+ filter: var(--interactive-filter);
336
+ outline: var(--button-primary-focus-outline, var(--outline));
337
+ }
338
+
339
+ .btn--default {
340
+ color: var(--button-color, var(--foreground));
341
+ fill: var(--button-color, var(--foreground));
342
+ background: var(--button-background, var(--background));
343
+ border: var(--button-border, var(--border));
344
+ border-radius: var(--button-border-radius, 6px);
345
+ font-weight: var(--button-font-weight, 500);
346
+ }
347
+ .btn--default:hover {
348
+ color: var(--button-color, var(--foreground));
349
+ fill: var(--button-color, var(--foreground));
350
+ background: var(--button-hover-background, var(--background));
351
+ filter: var(--interactive-filter);
352
+ }
353
+ .btn--default:focus-visible {
354
+ background: var(--button-hover-background, var(--background));
355
+ filter: var(--interactive-filter);
356
+ outline: var(--button-focus-outline, var(--outline));
357
+ }
358
+ `,x0=`
359
+ .success__position {
360
+ position: fixed;
361
+ inset: var(--dialog-inset);
362
+ padding: var(--page-margin);
363
+ z-index: var(--z-index);
364
+ }
365
+ .success__content {
366
+ background: var(--success-background, var(--background));
367
+ border: var(--success-border, var(--border));
368
+ border-radius: var(--success-border-radius, 1.7em/50%);
369
+ box-shadow: var(--success-box-shadow, var(--box-shadow));
370
+ font-weight: var(--success-font-weight, 600);
371
+ color: var(--success-color);
372
+ fill: var(--success-color);
373
+ padding: 12px 24px;
374
+ line-height: 1.75em;
375
+
376
+ display: grid;
377
+ align-items: center;
378
+ grid-auto-flow: column;
379
+ gap: 6px;
380
+ cursor: default;
381
+ }
382
+
383
+ .success__icon {
384
+ display: flex;
385
+ }
386
+ `;function O0(e){const t=ue.createElement("style");return t.textContent=`
387
+ :host {
388
+ --dialog-inset: var(--inset);
389
+ }
390
+
391
+ ${A0}
392
+ ${C0}
393
+ ${M0}
394
+ ${N0}
395
+ ${x0}
396
+ `,e&&t.setAttribute("nonce",e),t}function P0(){const e=j().getUser(),t=Ee().getUser(),n=ar().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var L0=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const i=r,o=e.useSentryUser,s=P0(),a=ue.createElement("div"),c=O0(e.styleNonce);let u="";const f={get el(){return a},appendToDom(){!i.contains(c)&&!i.contains(a)&&(i.appendChild(c),i.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ue.body.style.overflow=u},open(){d(!0),e.onFormOpen?.(),R()?.emit("openFeedbackWidget"),u=ue.body.style.overflow,ue.body.style.overflow="hidden"},close(){d(!1),ue.body.style.overflow=u}},l=t?.createInput({h:Q,hooks:v0,dialog:f,options:e}),d=p=>{u0(Q(k0,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(o&&s?.[o.name]||""),defaultEmail:String(o&&s?.[o.email]||""),onFormClose:()=>{d(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{d(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return f}}));function D0({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 $0(e){const t=ue.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
397
+ .editor {
398
+ display: flex;
399
+ flex-grow: 1;
400
+ flex-direction: column;
401
+ }
402
+
403
+ .editor__image-container {
404
+ justify-items: center;
405
+ padding: 15px;
406
+ position: relative;
407
+ height: 100%;
408
+ border-radius: var(--menu-border-radius, 6px);
409
+
410
+ background-color: ${n};
411
+ background-image: repeating-linear-gradient(
412
+ -145deg,
413
+ transparent,
414
+ transparent 8px,
415
+ ${n} 8px,
416
+ ${n} 11px
417
+ ),
418
+ repeating-linear-gradient(
419
+ -45deg,
420
+ transparent,
421
+ transparent 15px,
422
+ ${r} 15px,
423
+ ${r} 16px
424
+ );
425
+ }
426
+
427
+ .editor__canvas-container {
428
+ width: 100%;
429
+ height: 100%;
430
+ position: relative;
431
+ display: flex;
432
+ align-items: center;
433
+ justify-content: center;
434
+ }
435
+
436
+ .editor__canvas-container > * {
437
+ object-fit: contain;
438
+ position: absolute;
439
+ }
440
+
441
+ .editor__tool-container {
442
+ padding-top: 8px;
443
+ display: flex;
444
+ justify-content: center;
445
+ }
446
+
447
+ .editor__tool-bar {
448
+ display: flex;
449
+ gap: 8px;
450
+ }
451
+
452
+ .editor__tool {
453
+ display: flex;
454
+ padding: 8px 12px;
455
+ justify-content: center;
456
+ align-items: center;
457
+ border: var(--button-border, var(--border));
458
+ border-radius: var(--button-border-radius, 6px);
459
+ background: var(--button-background, var(--background));
460
+ color: var(--button-color, var(--foreground));
461
+ }
462
+
463
+ .editor__tool--active {
464
+ background: var(--button-primary-background, var(--accent-background));
465
+ color: var(--button-primary-color, var(--accent-foreground));
466
+ }
467
+
468
+ .editor__rect {
469
+ position: absolute;
470
+ z-index: 2;
471
+ }
472
+
473
+ .editor__rect button {
474
+ opacity: 0;
475
+ position: absolute;
476
+ top: -12px;
477
+ right: -12px;
478
+ cursor: pointer;
479
+ padding: 0;
480
+ z-index: 3;
481
+ border: none;
482
+ background: none;
483
+ }
484
+
485
+ .editor__rect:hover button {
486
+ opacity: 1;
487
+ }
488
+ `,e&&t.setAttribute("nonce",e),t}function F0({h:e}){return function({action:n,setAction:r,options:i}){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")}},i.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},i.hideToolText)))}}function B0({hooks:e}){function t(){const[n,r]=e.useState(st.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(st.devicePixelRatio)},o=matchMedia(`(resolution: ${st.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await qr.mediaDevices.getDisplayMedia({video:{width:st.innerWidth*a,height:st.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=ue.createElement("video");await new Promise((l,d)=>{f.srcObject=u,f.onloadedmetadata=()=>{i(f,a),u.getTracks().forEach(p=>p.stop()),l()},f.play().catch(d)}),o()})().catch(s)},[])}}function U0(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)}}function jt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function la(e,t){jt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function fa(e,t,n){jt(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{U0(o,i,t)})})}function H0({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=B0({hooks:t}),s=F0({h:e}),a=D0({h:e}),c={__html:$0(i.styleNonce).innerText},u=r.el.style,f=({screenshot:l})=>{const[d,p]=t.useState("highlight"),[h,m]=t.useState([]),_=t.useRef(null),y=t.useRef(null),v=t.useRef(null),b=t.useRef(null),[N,W]=t.useState(1),A=t.useMemo(()=>{const M=ue.getElementById(i.id);if(!M)return"white";const C=getComputedStyle(M);return C.getPropertyValue("--button-primary-background")||C.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const M=()=>{const C=_.current;C&&(jt(l.canvas,{alpha:!1},Y=>{const Z=Math.min(C.clientWidth/Y.width,C.clientHeight/Y.height);W(Z)}),(C.clientHeight===0||C.clientWidth===0)&&setTimeout(M,0))};return M(),st.addEventListener("resize",M),()=>{st.removeEventListener("resize",M)}},[l]);const S=t.useCallback((M,C)=>{jt(M,{alpha:!0},(Y,Z)=>{Z.scale(C,C),Y.width=l.canvas.width,Y.height=l.canvas.height})},[l]);t.useEffect(()=>{S(y.current,l.dpi),la(y.current,l.canvas)},[l]),t.useEffect(()=>{S(v.current,l.dpi),jt(v.current,{alpha:!0},(M,C)=>{C.clearRect(0,0,M.width,M.height)}),fa(v.current,A,h)},[h,A]),t.useEffect(()=>{S(n,l.dpi),la(n,l.canvas),jt(ue.createElement("canvas"),{alpha:!0},(M,C)=>{C.scale(l.dpi,l.dpi),M.width=l.canvas.width,M.height=l.canvas.height,fa(M,A,h),la(n,M)})},[h,l,A]);const D=M=>{if(!d||!b.current)return;const C=b.current.getBoundingClientRect(),Y={type:d,x:M.offsetX/N,y:M.offsetY/N},Z=(T,H)=>{const P=(H.clientX-C.x)/N,K=(H.clientY-C.y)/N;return{type:T.type,x:Math.min(T.x,P),y:Math.min(T.y,K),w:Math.abs(P-T.x),h:Math.abs(K-T.y)}},ee=T=>{jt(v.current,{alpha:!0},(H,P)=>{P.clearRect(0,0,H.width,H.height)}),fa(v.current,A,[...h,Z(Y,T)])},oe=T=>{const H=Z(Y,T);H.w*N>=1&&H.h*N>=1&&m(P=>[...P,H]),ue.removeEventListener("mousemove",ee),ue.removeEventListener("mouseup",oe)};ue.addEventListener("mousemove",ee),ue.addEventListener("mouseup",oe)},$=t.useCallback(M=>C=>{C.preventDefault(),C.stopPropagation(),m(Y=>{const Z=[...Y];return Z.splice(M,1),Z})},[]),E={width:`${l.canvas.width*N}px`,height:`${l.canvas.height*N}px`},x=M=>{M.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:_},e("canvas",{ref:y,id:"background",style:E}),e("canvas",{ref:v,id:"foreground",style:E}),e("div",{ref:b,onMouseDown:D,style:E},h.map((M,C)=>e("div",{key:C,class:"editor__rect",style:{top:`${M.y*N}px`,left:`${M.x*N}px`,width:`${M.w*N}px`,height:`${M.h*N}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:$(C),onMouseDown:x,onMouseUp:x,type:"button"},e(a,null))))))),e(s,{options:i,action:d,setAction:p}))};return function({onError:d}){const[p,h]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,_)=>{jt(ue.createElement("canvas"),{alpha:!1},(y,v)=>{v.scale(_,_),y.width=m.videoWidth,y.height=m.videoHeight,v.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:_})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",d(m)},[])}),p?e(f,{screenshot:p}):e("div",null)}}var W0=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=ue.createElement("canvas");return{input:H0({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),k=F,Xa=0;function tm(){return Xa>0}function j0(){Xa++,setTimeout(()=>{Xa--})}function Sr(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Rc(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>Sr(s,t));return e.apply(this,o)}catch(o){throw j0(),Ge(s=>{s.addEventProcessor(a=>(t.mechanism&&(Ca(a,void 0,void 0),Lt(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),me(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}qd(r,e),ve(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ko(){const e=Bn(),{referrer:t}=k.document||{},{userAgent:n}=k.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var z0=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],q0={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function G0(e){return q0[e]||e.replace("Integration","").toLowerCase()}var _f=k;async function V0(e,t){const n=z0.includes(e)?G0(e):void 0,r=_f.Sentry=_f.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=Y0(n),s=k.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((l,d)=>{s.addEventListener("load",()=>l()),s.addEventListener("error",d)}),c=k.document.currentScript,u=k.document.body||k.document.head||c?.parentElement;if(u)u.appendChild(s);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 f=r[e];if(typeof f!="function")throw new Error(`Could not load integration: ${e}`);return f}function Y0(e){const t=R()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Zr}/${e}.min.js`,t).toString()}var QO=zh({lazyLoadIntegration:V0}),ZO=zh({getModalIntegration:()=>L0,getScreenshotIntegration:()=>W0});function ou(e,t){const n=su(e,t),r={type:Z0(t),value:ew(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function K0(e,t,n,r){const i=R()?.getOptions().normalizeDepth,o=ow(t),s={__serialized__:wp(t,i)};if(o)return{exception:{values:[ou(e,o)]},extra:s};const a={exception:{values:[{type:hs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:rw(t,{isUnhandledRejection:r})}]},extra:s};if(n){const c=su(e,n);c.length&&(a.exception.values[0].stacktrace={frames:c})}return a}function da(e,t){return{exception:{values:[ou(e,t)]}}}function su(e,t){const n=t.stacktrace||t.stack||"",r=X0(t),i=Q0(t);try{return e(n,r,i)}catch{}return[]}var J0=/Minified React error #\d+;/i;function X0(e){return e&&J0.test(e.message)?1:0}function Q0(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function nm(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Z0(e){const t=e?.name;return!t&&nm(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ew(e){const t=e?.message;return nm(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?wl(t.error):wl(e):"No error message"}function tw(e,t,n,r){const i=As(e,t,n?.syntheticException||void 0,r);return Lt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),Si(i)}function nw(e,t,n="info",r,i){const o=Qa(e,t,r?.syntheticException||void 0,i);return o.level=n,r?.event_id&&(o.event_id=r.event_id),Si(o)}function As(e,t,n,r,i){let o;if(jd(t)&&t.error)return da(e,t.error);if(Wu(t)||S_(t)){const s=t;if("stack"in t)o=da(e,t);else{const a=s.name||(Wu(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=Qa(e,c,n,r),Ca(o,c)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return gt(t)?da(e,t):Fe(t)||hs(t)?(o=K0(e,t,n,i),Lt(o,{synthetic:!0}),o):(o=Qa(e,t,n,r),Ca(o,`${t}`,void 0),Lt(o,{synthetic:!0}),o)}function Qa(e,t,n,r){const i={};if(r&&n){const o=su(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),Lt(i,{synthetic:!0})}if(ps(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function rw(e,{isUnhandledRejection:t}){const n=R_(e),r=t?"promise rejection":"exception";return jd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:hs(e)?`Event \`${iw(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function iw(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ow(e){return Object.values(e).find(t=>t instanceof Error)}var sw=class extends TS{constructor(e){const t=aw(e),n=k.SENTRY_SDK_SOURCE||nS();eh(t,"browser",["browser"],n),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);const{sendDefaultPii:r,sendClientReports:i,enableLogs:o,_experiments:s,enableMetrics:a}=this._options,c=a??s?.enableMetrics??!0;k.document&&(i||o||c)&&k.document.addEventListener("visibilitychange",()=>{k.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&Ho(this),c&&Fc(this))}),r&&this.on("beforeSendSession",US)}eventFromException(e,t){return tw(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return nw(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};function aw(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:k.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var dt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,V=F,cw=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ai=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=cw(t.value,n),e(t)))}},Ci=(e=!0)=>{const t=V.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Dr=()=>Ci()?.activationStart??0;function Jt(e,t,n){V.document&&V.addEventListener(e,t,n)}function Jo(e,t,n){V.document&&V.removeEventListener(e,t,n)}var lr=-1,rm=new Set,uw=()=>V.document?.visibilityState==="hidden"&&!V.document?.prerendering?0:1/0,Eo=e=>{if(lw(e)&&lr>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of rm)t();isFinite(lr)||(lr=e.type==="visibilitychange"?e.timeStamp:0,Jo("prerenderingchange",Eo,!0))}},Mi=()=>{if(V.document&&lr<0){const e=Dr();lr=(V.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>t.name==="hidden"&&t.startTime>e)[0]?.startTime)??uw(),Jt("visibilitychange",Eo,!0),Jt("pagehide",Eo,!0),Jt("prerenderingchange",Eo,!0)}return{get firstHiddenTime(){return lr},onHidden(e){rm.add(e)}}};function lw(e){return e.type==="pagehide"||V.document?.visibilityState==="hidden"}var fw=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Ni=(e,t=-1)=>{const n=Ci();let r="navigate";return n&&(V.document?.prerendering||Dr()>0?r="prerender":V.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:fw(),navigationType:r}},pa=new WeakMap;function au(e,t){try{return pa.get(e)||pa.set(e,new t),pa.get(e)}catch{return new t}}var dw=class Za{constructor(){Za.prototype.__init.call(this),Za.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)}},$r=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},cu=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Cs=e=>{V.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},pw=[1800,3e3],hw=(e,t={})=>{Cs(()=>{const n=Mi(),r=Ni("FCP");let i;const s=$r("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Dr(),0),r.entries.push(c),i(!0)))});s&&(i=Ai(e,r,pw,t.reportAllChanges))})},mw=[.1,.25],gw=(e,t={})=>{hw(cu(()=>{const n=Ni("CLS",0);let r;const i=Mi(),o=au(t,dw),s=c=>{for(const u of c)o._processEntry(u);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},a=$r("layout-shift",s);a&&(r=Ai(e,n,mw,t.reportAllChanges),i.onHidden(()=>{s(a.takeRecords()),r(!0)}),V?.setTimeout?.(r))}))},im=0,ha=1/0,Qi=0,_w=e=>{e.forEach(t=>{t.interactionId&&(ha=Math.min(ha,t.interactionId),Qi=Math.max(Qi,t.interactionId),im=Qi?(Qi-ha)/7+1:0)})},ec,om=()=>ec?im:performance.interactionCount||0,yw=()=>{"interactionCount"in performance||ec||(ec=$r("event",_w,{type:"event",buffered:!0,durationThreshold:0}))},ma=10,sm=0,vw=()=>om()-sm,Sw=class tc{constructor(){tc.prototype.__init.call(this),tc.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){sm=om(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(vw()/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<ma||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((i,o)=>o._latency-i._latency),this._longestInteractionList.length>ma){const i=this._longestInteractionList.splice(ma);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}},am=e=>{const t=V.requestIdleCallback||V.setTimeout;V.document?.visibilityState==="hidden"?e():(e=cu(e),Jt("visibilitychange",e,{once:!0,capture:!0}),Jt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Jo("visibilitychange",e,{capture:!0}),Jo("pagehide",e,{capture:!0})}))},bw=[200,500],Ew=40,Tw=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Mi();Cs(()=>{yw();const r=Ni("INP");let i;const o=au(t,Sw),s=c=>{am(()=>{for(const f of c)o._processEntry(f);const u=o._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,i())})},a=$r("event",s,{durationThreshold:t.durationThreshold??Ew});i=Ai(e,r,bw,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),i(!0)}))})},Iw=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},ww=[2500,4e3],Rw=(e,t={})=>{Cs(()=>{const n=Mi(),r=Ni("LCP");let i;const o=au(t,Iw),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Dr(),0),r.entries=[u],i())},a=$r("largest-contentful-paint",s);if(a){i=Ai(e,r,ww,t.reportAllChanges);const c=cu(()=>{s(a.takeRecords()),a.disconnect(),i(!0)}),u=f=>{f.isTrusted&&(am(c),Jo(f.type,u,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])Jt(f,u,{capture:!0})}})},kw=[800,1800],nc=e=>{V.document?.prerendering?Cs(()=>nc(e)):V.document?.readyState!=="complete"?addEventListener("load",()=>nc(e),!0):setTimeout(e)},Aw=(e,t={})=>{const n=Ni("TTFB"),r=Ai(e,n,kw,t.reportAllChanges);nc(()=>{const i=Ci();i&&(n.value=Math.max(i.responseStart-Dr(),0),n.entries=[i],r(!0))})},Yr={},Xo={},cm,um,lm,fm;function Ms(e,t=!1){return xs("cls",e,Mw,cm,t)}function Ns(e,t=!1){return xs("lcp",e,Nw,um,t)}function Cw(e){return xs("ttfb",e,xw,lm)}function uu(e){return xs("inp",e,Ow,fm)}function Fn(e,t){return dm(e,t),Xo[e]||(Pw(e),Xo[e]=!0),pm(e,t)}function xi(e,t){const n=Yr[e];if(n?.length)for(const r of n)try{r(t)}catch(i){dt&&g.error(`Error while triggering instrumentation handler.
489
+ Type: ${e}
490
+ Name: ${xt(r)}
491
+ Error:`,i)}}function Mw(){return gw(e=>{xi("cls",{metric:e}),cm=e},{reportAllChanges:!0})}function Nw(){return Rw(e=>{xi("lcp",{metric:e}),um=e},{reportAllChanges:!0})}function xw(){return Aw(e=>{xi("ttfb",{metric:e}),lm=e})}function Ow(){return Tw(e=>{xi("inp",{metric:e}),fm=e})}function xs(e,t,n,r,i=!1){dm(e,t);let o;return Xo[e]||(o=n(),Xo[e]=!0),r&&t({metric:r}),pm(e,t,i?o:void 0)}function Pw(e){const t={};e==="event"&&(t.durationThreshold=0),$r(e,n=>{xi(e,{entries:n})},t)}function dm(e,t){Yr[e]=Yr[e]||[],Yr[e].push(t)}function pm(e,t,n){return()=>{n&&n();const r=Yr[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Lw(e){return"duration"in e}var Dw=e=>{const t=n=>{(n.type==="pagehide"||V.document?.visibilityState==="hidden")&&e(n)};Jt("visibilitychange",t,{capture:!0,once:!0}),Jt("pagehide",t,{capture:!0,once:!0})};function ga(e){return typeof e=="number"&&isFinite(e)}function on(e,t,n,{...r}){const i=L(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),gr(e,()=>{const o=Ze({startTime:t,...r});return o&&o.end(n),o})}function lu(e){const t=R();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),f=j(),l=f.getUser(),d=l!==void 0?l.email||l.id||l.ip_address:void 0;let p;try{p=f.getScopeData().contexts.profile.profile_id}catch{}const h={release:s,environment:a,user:d||void 0,profile_id:p||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":V.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i};return Ze({name:n,attributes:h,startTime:o,experimental:{standalone:!0}})}function Fr(){return V.addEventListener&&V.performance}function ge(e){return e/1e3}function $w(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Os(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ps(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}Dw(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),o(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a,s()})}function Fw(e){let t=0,n;if(!Os("layout-shift"))return;const r=Ms(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);Ps(e,(i,o)=>{Bw(t,n,o,i),r()})}function Bw(e,t,n,r){dt&&g.log(`Sending CLS span (${e})`);const i=t?ge((Ie()||0)+t.startTime):de(),o=j().getScopeData().transactionName,s=t?ke(t.sources[0]?.node):"Layout shift",a={[q]:"auto.http.browser.cls",[ie]:"ui.webvital.cls",[Hn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,f)=>{a[`cls.source.${f+1}`]=ke(u.node)});const c=lu({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("cls",{[gi]:"",[_i]:e}),c.end(i))}function Oi(e){return e!=null&&e>0&&e<=6e4}function Uw(e){let t=0,n;if(!Os("largest-contentful-paint"))return;const r=Ns(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Oi(i.value)||(t=i.value,n=o)},!0);Ps(e,(i,o)=>{Hw(t,n,o,i),r()})}function Hw(e,t,n,r){if(!Oi(e))return;dt&&g.log(`Sending LCP span (${e})`);const i=ge((Ie()||0)+(t?.startTime||0)),o=j().getScopeData().transactionName,s=t?ke(t.element):"Largest contentful paint",a={[q]:"auto.http.browser.lcp",[ie]:"ui.webvital.lcp",[Hn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=ke(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),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=lu({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[gi]:"millisecond",[_i]:e}),c.end(i))}function Ke(e){return e&&((Ie()||performance.timeOrigin)+e)/1e3}function hm(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=$w(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ie()||Fr()?.timeOrigin?Ww({...t,"http.request.redirect_start":Ke(e.redirectStart),"http.request.redirect_end":Ke(e.redirectEnd),"http.request.worker_start":Ke(e.workerStart),"http.request.fetch_start":Ke(e.fetchStart),"http.request.domain_lookup_start":Ke(e.domainLookupStart),"http.request.domain_lookup_end":Ke(e.domainLookupEnd),"http.request.connect_start":Ke(e.connectStart),"http.request.secure_connection_start":Ke(e.secureConnectionStart),"http.request.connection_end":Ke(e.connectEnd),"http.request.request_start":Ke(e.requestStart),"http.request.response_start":Ke(e.responseStart),"http.request.response_end":Ke(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Ww(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var jw=2147483647,yf=0,Pe={},$e,Qo;function zw({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Fr();if(r&&Ie()){r.mark&&V.performance.mark("sentry-tracing-init");const i=t?Uw(n):t===!1?Kw():void 0,o=e?Fw(n):e===!1?Yw():void 0,s=Jw();return()=>{s(),i?.(),o?.()}}return()=>{}}function qw(){Fn("longtask",({entries:e})=>{const t=Se();if(!t)return;const{op:n,start_timestamp:r}=L(t);for(const i of e){const o=ge(Ie()+i.startTime),s=ge(i.duration);n==="navigation"&&r&&o<r||on(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[q]:"auto.ui.browser.metrics"}})}})}function Gw(){new PerformanceObserver(e=>{const t=Se();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const r=ge(Ie()+n.startTime),{start_timestamp:i,op:o}=L(t);if(o==="navigation"&&i&&r<i)continue;const s=ge(n.duration),a={[q]:"auto.ui.browser.metrics"},{invoker:c,invokerType:u,sourceURL:f,sourceFunctionName:l,sourceCharPosition:d}=n.scripts[0];a["browser.script.invoker"]=c,a["browser.script.invoker_type"]=u,f&&(a["code.filepath"]=f),l&&(a["code.function"]=l),d!==-1&&(a["browser.script.source_char_position"]=d),on(t,r,r+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function Vw(){Fn("event",({entries:e})=>{const t=Se();if(t){for(const n of e)if(n.name==="click"){const r=ge(Ie()+n.startTime),i=ge(n.duration),o={name:ke(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[q]:"auto.ui.browser.metrics"}},s=wc(n.target);s&&(o.attributes["ui.component_name"]=s),on(t,r,r+i,o)}}})}function Yw(){return Ms(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Pe.cls={value:e.value,unit:""},Qo=t)},!0)}function Kw(){return Ns(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Oi(e.value)||(Pe.lcp={value:e.value,unit:"millisecond"},$e=t)},!0)}function Jw(){return Cw(({metric:e})=>{e.entries[e.entries.length-1]&&(Pe.ttfb={value:e.value,unit:"millisecond"})})}function Xw(e,t){const n=Fr(),r=Ie();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:i,ignorePerformanceApiSpans:o,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:c}=t,u=ge(r),f=n.getEntries(),{op:l,start_timestamp:d}=L(e);if(f.slice(yf).forEach(p=>{const h=ge(p.startTime),m=ge(Math.max(0,p.duration));if(!(l==="navigation"&&d&&u+h<d))switch(p.entryType){case"navigation":tR(e,p,u);break;case"mark":case"paint":case"measure":{Zw(e,p,h,m,u,o);const _=Mi(),y=p.startTime<_.firstHiddenTime;p.name==="first-paint"&&y&&(Pe.fp={value:p.startTime,unit:"millisecond"}),p.name==="first-contentful-paint"&&y&&(Pe.fcp={value:p.startTime,unit:"millisecond"});break}case"resource":iR(e,p,p.name,h,m,u,s)}}),yf=Math.max(f.length-1,0),oR(e,i),l==="pageload"){if(cR(Pe),i){const p=(h,m,_)=>{const y=_??`browser.web_vital.${h}.value`;e.setAttribute(y,m),dt&&g.log("Setting web vital attribute",{[y]:m},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{Pe[h]&&p(h,Pe[h].value)}),Pe["ttfb.requestTime"]&&p("ttfb.requestTime",Pe["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete Pe.cls,c||delete Pe.lcp,Object.entries(Pe).forEach(([p,h])=>{tv(p,h.value,h.unit)}),sR(e,t);e.setAttribute(i?"browser.performance.time_origin":"performance.timeOrigin",u),e.setAttribute(i?"browser.performance.navigation.activation_start":"performance.activationStart",Dr())}$e=void 0,Qo=void 0,Pe={}}function Qw(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Zw(e,t,n,r,i,o){if(Qw(t)||["mark","measure"].includes(t.entryType)&&ct(t.name,o))return;const s=Ci(!1),a=ge(s?s.requestStart:0),c=i+Math.max(n,a),u=i+n,f=u+r,l={[q]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),eR(l,t),c<=f&&on(e,c,f,{name:t.name,op:t.entryType,attributes:l})}function eR(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&Ot(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Ot(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function tR(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Zi(e,t,r,n)}),Zi(e,t,"secureConnection",n,"TLS/SSL"),Zi(e,t,"fetch",n,"cache"),Zi(e,t,"domainLookup",n,"DNS"),rR(e,t,n)}function Zi(e,t,n,r,i=n){const o=t[nR(n)],s=t[`${n}Start`];!s||!o||on(e,r+ge(s),r+ge(o),{op:`browser.${i}`,name:t.name,attributes:{[q]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function nR(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function rR(e,t,n){const r=n+ge(t.requestStart),i=n+ge(t.responseEnd),o=n+ge(t.responseStart);t.responseEnd&&(on(e,r,i,{op:"browser.request",name:t.name,attributes:{[q]:"auto.ui.browser.metrics"}}),on(e,o,i,{op:"browser.response",name:t.name,attributes:{[q]:"auto.ui.browser.metrics"}}))}function iR(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const c={[q]:"auto.resource.browser.metrics"},u=Yt(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(V.location.origin),aR(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 f={...c,...hm(t)},l=o+r,d=l+i;on(e,l,d,{name:n.replace(V.location.origin,""),op:a,attributes:f})}function oR(e,t){const n=V.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),ga(r.rtt)&&(Pe["connection.rtt"]={value:r.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",r.rtt))),ga(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),ga(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function sR(e,t){$e&&t.recordLcpOnPageloadSpan&&($e.element&&e.setAttribute("lcp.element",ke($e.element)),$e.id&&e.setAttribute("lcp.id",$e.id),$e.url&&e.setAttribute("lcp.url",$e.url.trim().slice(0,200)),$e.loadTime!=null&&e.setAttribute("lcp.loadTime",$e.loadTime),$e.renderTime!=null&&e.setAttribute("lcp.renderTime",$e.renderTime),e.setAttribute("lcp.size",$e.size)),Qo?.sources&&t.recordClsOnPageloadSpan&&Qo.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,ke(n.node)))}function aR(e,t,n){n.forEach(([r,i])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<jw||typeof o=="string")&&(t[i]=o)})}function cR(e){const t=Ci(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}var uR="ElementTiming",lR=(()=>({name:uR,setup(){!Fr()||!Ie()||Fn("element",({entries:e})=>{for(const t of e){const n=t;if(!n.identifier)continue;const r=n.identifier,i=n.name,o=n.renderTime,s=n.loadTime,a={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":r};i&&(a["ui.element.paint_type"]=i),n.id&&(a["ui.element.id"]=n.id),n.element&&(a["ui.element.type"]=n.element.tagName.toLowerCase()),n.url&&(a["ui.element.url"]=n.url),n.naturalWidth&&(a["ui.element.width"]=n.naturalWidth),n.naturalHeight&&(a["ui.element.height"]=n.naturalHeight),o>0&&Ha("ui.element.render_time",o,{unit:"millisecond",attributes:a}),s>0&&Ha("ui.element.load_time",s,{unit:"millisecond",attributes:a})}})}})),eP=lR,_a=[],Kr=new Map,Jn=new Map;function fR(){if(Fr()&&Ie()){const e=dR();return()=>{e()}}return()=>{}}var si={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 dR(){return uu(pR)}var pR=({metric:e})=>{if(e.value==null)return;const t=ge(e.value);if(t>60)return;const n=e.entries.find(h=>h.duration===e.value&&si[h.name]);if(!n)return;const{interactionId:r}=n,i=si[n.name],o=ge(Ie()+n.startTime),s=Se(),a=s?ye(s):void 0,c=r!=null?Kr.get(r):void 0,u=c?.span||a,f=u?L(u).description:j().getScopeData().transactionName,l=c?.elementName||ke(n.target),d={[q]:"auto.http.browser.inp",[ie]:`ui.interaction.${i}`,[Hn]:n.duration},p=lu({name:l,transaction:f,attributes:d,startTime:o});p&&(p.addEvent("inp",{[gi]:"millisecond",[_i]:e.value}),p.end(o+t))};function hR(e){return e!=null?Kr.get(e):void 0}function mR(){const e=Object.keys(si);Nn()&&e.forEach(i=>{V.addEventListener(i,t,{capture:!0,passive:!0})});function t(i){const o=i.target;if(!o)return;const s=ke(o),a=Math.round(i.timeStamp);if(Jn.set(a,s),Jn.size>50){const c=Jn.keys().next().value;c!==void 0&&Jn.delete(c)}}function n(i){const o=Math.round(i.startTime);let s=Jn.get(o);if(!s)for(let a=-5;a<=5;a++){const c=Jn.get(o+a);if(c){s=c;break}}return s||"<unknown>"}const r=({entries:i})=>{const o=Se(),s=o&&ye(o);i.forEach(a=>{if(!Lw(a))return;const c=a.interactionId;if(c==null||Kr.has(c))return;const u=a.target?ke(a.target):n(a);if(_a.length>10){const f=_a.shift();Kr.delete(f)}_a.push(c),Kr.set(c,{span:s,elementName:u})})};Fn("event",r),Fn("first-input",r)}function fu(e){const{name:t,op:n,origin:r,metricName:i,value:o,attributes:s,parentSpan:a,reportEvent:c,startTime:u,endTime:f}=e,l=j().getScopeData().transactionName,d={[q]:r,[ie]:n,[Hn]:0,[`browser.web_vital.${i}.value`]:o,"sentry.transaction":l,"user_agent.original":V.navigator?.userAgent,...s};a&&Po(a).attributes?.["sentry.op"]==="pageload"&&(d["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(d[`browser.web_vital.${i}.report_event`]=c);const p=Ze({name:t,attributes:d,startTime:u,parentSpan:a});p&&p.end(f??u)}function gR(e){let t=0,n;if(!Os("largest-contentful-paint"))return;const r=Ns(({metric:i})=>{const o=i.entries[i.entries.length-1];!o||!Oi(i.value)||(t=i.value,n=o)},!0);Ps(e,(i,o,s)=>{_R(t,n,s,i),r()})}function _R(e,t,n,r){if(!Oi(e))return;dt&&g.log(`Sending LCP span (${e})`);const i=Ie()||0,o=ge(i),s=ge(i+(t?.startTime||0)),a=t?ke(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=ke(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(c["browser.web_vital.lcp.size"]=t.size),fu({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:o,endTime:s})}function yR(e){let t=0,n;if(!Os("layout-shift"))return;const r=Ms(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);Ps(e,(i,o,s)=>{vR(t,n,s,i),r()})}function vR(e,t,n,r){dt&&g.log(`Sending CLS span (${e})`);const i=t?ge((Ie()||0)+t.startTime):de(),o=t?ke(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,c)=>{s[`browser.web_vital.cls.source.${c+1}`]=ke(a.node)}),fu({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:i})}function SR(){if(!Fr()||!Ie())return;uu(({metric:t})=>{if(t.value==null||ge(t.value)>60)return;const n=t.entries.find(r=>r.duration===t.value&&si[r.name]);n&&bR(t.value,n)})}function bR(e,t){dt&&g.log(`Sending INP span (${e})`);const n=ge(Ie()+t.startTime),r=ge(e),i=si[t.name],o=hR(t.interactionId),s=Se(),a=s?ye(s):void 0,c=o?.span||a,u=c?Po(c).name:j().getScopeData().transactionName;fu({name:o?.elementName||ke(t.target),op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[Hn]:t.duration,"sentry.transaction":u},startTime:n,endTime:n+r,parentSpan:c})}var ER=1e3,vf,rc,ic;function mm(e){an("dom",e),cn("dom",TR)}function TR(){if(!V.document)return;const e=Xe.bind(null,"dom"),t=Sf(e,!0);V.document.addEventListener("click",t,!1),V.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=V[n]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(xe(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[o]=c[o]||{refCount:0};if(!u.handler){const f=Sf(e);u.handler=f,i.call(this,o,f,a)}u.refCount++}catch{}return i.call(this,o,s,a)}}),xe(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},u=c[o];u&&(u.refCount--,u.refCount<=0&&(i.call(this,o,u.handler,a),u.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function IR(e){if(e.type!==rc)return!1;try{if(!e.target||e.target._sentryId!==ic)return!1}catch{}return!0}function wR(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Sf(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=RR(n);if(wR(n.type,r))return;ve(n,"_sentryCaptured",!0),r&&!r._sentryId&&ve(r,"_sentryId",we());const i=n.type==="keypress"?"input":n.type;IR(n)||(e({event:n,name:i,global:t}),rc=n.type,ic=r?r._sentryId:void 0),clearTimeout(vf),vf=V.setTimeout(()=>{ic=void 0,rc=void 0},ER)}}function RR(e){try{return e.target}catch{return null}}var eo;function Ls(e){const t="history";an(t,e),cn(t,kR)}function kR(){if(V.addEventListener("popstate",()=>{const t=V.location.href,n=eo;eo=t,n!==t&&Xe("history",{from:n,to:t})}),!vI())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=eo,o=AR(String(r));if(eo=o,i===o)return t.apply(this,n);Xe("history",{from:i,to:o})}return t.apply(this,n)}}xe(V.history,"pushState",e),xe(V.history,"replaceState",e)}function AR(e){try{return new URL(e,V.location.origin).toString()}catch{return e}}var To={};function du(e){const t=To[e];if(t)return t;let n=V[e];if(Ga(n))return To[e]=n.bind(V);const r=V.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){dt&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(To[e]=n.bind(V))}function CR(e){To[e]=void 0}function Pi(...e){return du("setTimeout")(...e)}var kt="__sentry_xhr_v3__";function pu(e){an("xhr",e),cn("xhr",MR)}function MR(){if(!V.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=de()*1e3,s=at(r[0])?r[0].toUpperCase():void 0,a=NR(r[1]);if(!s||!a)return t.apply(n,r);n[kt]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[kt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:de()*1e3,startTimestamp:o,xhr:n,virtualError:i};Xe("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,l){return c(),u.apply(f,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,l){const[d,p]=l,h=f[kt];return h&&at(d)&&at(p)&&(h.request_headers[d.toLowerCase()]=p),u.apply(f,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[kt];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:de()*1e3,xhr:n};return Xe("xhr",o),t.apply(n,r)}})}function NR(e){if(at(e))return e;try{return e.toString()}catch{}}var xR=Symbol.for("sentry__originalRequestBody");function gm(e){return new URLSearchParams(e).toString()}function Zo(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[gm(e)];if(!e)return[void 0]}catch(n){return dt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return dt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function hu(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const t=e[0][xR];return t!==void 0?t:void 0}}function _m(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return dt&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
492
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}var OR=40;function ym(e,t=du("fetch")){let n=0,r=0;async function i(o){const s=o.body.length;n+=s,r++;const a={body:o.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 CR("fetch"),c}finally{n-=s,r--}}return yS(e,i,Hc(e.bufferSize||OR))}var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function PR(){const e=R();if(!e){I&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){I&&g.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function LR(){const e=R();if(!e){I&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){I&&g.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}var tP={startProfiler:PR,stopProfiler:LR},DR=10,$R=20,FR=30,BR=40,UR=50;function br(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var HR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,WR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jR=/\((\S*)(?::(\d+))(?::(\d+))\)/,zR=/at (.+?) ?\(data:(.+?),/,qR=e=>{const t=e.match(zR);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=HR.exec(e);if(n){const[,i,o,s]=n;return br(i,"?",+o,+s)}const r=WR.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const s=jR.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[i,o]=vm(r[1]||"?",r[2]);return br(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},GR=[FR,qR],VR=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,YR=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,KR=e=>{const t=VR.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=YR.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||"?";return[r,n]=vm(r,n),br(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},JR=[UR,KR],XR=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,QR=e=>{const t=XR.exec(e);return t?br(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},nP=[BR,QR],ZR=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ek=e=>{const t=ZR.exec(e);return t?br(t[2],t[3]||"?",+t[1]):void 0},rP=[DR,ek],tk=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,nk=e=>{const t=tk.exec(e);return t?br(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},iP=[$R,nk],rk=[GR,JR],ik=Fd(...rk),vm=(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]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function oP(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:bt(r)}},o=ok(e);return rt(i,[o])}function ok(e){return[{type:"user_report"},e]}var to=1024,sk="Breadcrumbs",ak=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:sk,setup(n){t.console&&Wc(fk(n)),t.dom&&mm(lk(n,t.dom)),t.xhr&&pu(dk(n)),t.fetch&&Zc(pk(n)),t.history&&Ls(hk(n)),t.sentry&&n.on("beforeSendEvent",uk(n))}}}),ck=ak;function uk(e){return function(n){R()===e&&vt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:yn(n)},{event:n})}}function lk(e,t){return function(r){if(R()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>to&&(I&&g.warn(`\`dom.maxStringLength\` cannot exceed ${to}, but a value of ${a} was configured. Sentry will use ${to} instead.`),a=to),typeof s=="string"&&(s=[s]);try{const u=r.event,f=mk(u)?u.target:u;i=ke(f,{keyAttrs:s,maxStringLength:a}),o=wc(f)}catch{i="<unknown>"}if(i.length===0)return;const c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),vt(c,{event:r.event,name:r.name,global:r.global})}}function fk(e){return function(n){if(R()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:jo(n.level),message:No(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${No(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;vt(r,{input:n.args,level:n.level})}}function dk(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[kt];if(!r||!i||!o)return;const{method:s,url:a,status_code:c,body:u}=o,f={method:s,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},d={category:"xhr",data:f,type:"http",level:fh(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),vt(d,l)}}function pk(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),vt(s,o)}else{const o=n.response,s={...n.fetchData,status_code:o?.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:s,type:"http",level:fh(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),vt(c,a)}}}function hk(e){return function(n){if(R()!==e)return;let r=n.from,i=n.to;const o=Yt(k.location.href);let s=r?Yt(r):void 0;const a=Yt(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),vt({category:"navigation",data:{from:r,to:i}})}}function mk(e){return!!e&&!!e.target}var gk="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".split(","),_k="BrowserApiErrors",yk=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:_k,setupOnce(){t.setTimeout&&xe(k,"setTimeout",bf),t.setInterval&&xe(k,"setInterval",bf),t.requestAnimationFrame&&xe(k,"requestAnimationFrame",Sk),t.XMLHttpRequest&&"XMLHttpRequest"in k&&xe(XMLHttpRequest.prototype,"send",bk);const n=t.eventTarget;n&&(Array.isArray(n)?n:gk).forEach(r=>Ek(r,t))}}}),vk=yk;function bf(e){return function(...t){const n=t[0];return t[0]=Sr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${xt(e)}`}}),e.apply(this,t)}}function Sk(e){return function(t){return e.apply(this,[Sr(t,{mechanism:{data:{handler:xt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function bk(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&xe(n,r,function(i){const o={mechanism:{data:{handler:xt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${r}`}},s=Rc(i);return s&&(o.mechanism.data.handler=xt(s)),Sr(i,o)})}),e.apply(this,t)}}function Ek(e,t){const n=k[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(xe(n,"addEventListener",function(r){return function(i,o,s){try{Tk(o)&&(o.handleEvent=Sr(o.handleEvent,{mechanism:{data:{handler:xt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Ik(this,i,o),r.apply(this,[i,Sr(o,{mechanism:{data:{handler:xt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),xe(n,"removeEventListener",function(r){return function(i,o,s){try{const a=o.__sentry_wrapped__;a&&r.call(this,i,a,s)}catch{}return r.call(this,i,o,s)}}))}function Tk(e){return typeof e.handleEvent=="function"}function Ik(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var wk=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof k.document>"u"){I&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}hl({ignoreDuration:!0}),ta();const n=Ee();let r=n.getUser();n.addScopeListener(i=>{const o=i.getUser();(r?.id!==o?.id||r?.ip_address!==o?.ip_address)&&(ta(),r=o)}),t==="route"&&Ls(({from:i,to:o})=>{i!==o&&(hl({ignoreDuration:!0}),ta())})}}},Rk="CultureContext",kk=(()=>({name:Rk,preprocessEvent(e){const t=Ef();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Ef();t&&et(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),Ak=kk;function Ef(){try{const e=k.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ck="GlobalHandlers",Mk=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ck,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(xk(n),Tf("onerror")),t.onunhandledrejection&&(Ok(n),Tf("onunhandledrejection"))}}}),Nk=Mk;function xk(e){Ud(t=>{const{stackParser:n,attachStacktrace:r}=Em();if(R()!==e||tm())return;const{msg:i,url:o,line:s,column:a,error:c}=t,u=Pk(As(n,c||i,void 0,r,!1),o,s,a);u.level="error",bi(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Ok(e){Hd(t=>{const{stackParser:n,attachStacktrace:r}=Em();if(R()!==e||tm())return;const i=Sm(t),o=Ot(i)?bm(i):As(n,i,void 0,r,!0);o.level="error",bi(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Sm(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 bm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Pk(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Lk(t)??Bn(),function:"?",in_app:!0}),e}function Tf(e){I&&g.log(`Global Handler attached: ${e}`)}function Em(){return R()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Lk(e){if(!(!at(e)||e.length===0))return e.startsWith("data:")?`<${Kt(e,!1)}>`:e}var Dk=()=>({name:"HttpContext",preprocessEvent(e){if(!k.navigator&&!k.location&&!k.document)return;const t=Ko(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!k.navigator&&!k.location&&!k.document)return;const t=Ko();et(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}}),$k="cause",Fk=5,Bk="LinkedErrors",Uk=((e={})=>{const t=e.limit||Fk,n=e.key||$k;return{name:Bk,preprocessEvent(r,i,o){const s=o.getOptions();ob(ou,s.stackParser,n,t,r,i)}}}),Hk=Uk,Wk="SpotlightBrowser",jk=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],zk=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:Wk,setup:()=>{I&&g.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...jk]},afterAllSetup:n=>{qk(n,t)}}});function qk(e,t){const n=du("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Fo(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}var sP=zk;function Gk(){return Vk()?(I&&Bt(()=>{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 Vk(){if(typeof k.window>"u")return!1;const e=k;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const t=Bn();return!(k===k.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function Yk(e){return[XS(),VS(),rE(),vk(),ck(),Nk(),Hk(),hb(),Dk(),Ak(),wk()]}function Kk(e={}){const t=!e.skipBrowserExtensionCheck&&Gk();let n=e.defaultIntegrations==null?Yk():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:m_(e.stackParser||ik),integrations:Xv({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ym};return CS(sw,r)}function aP(){}function cP(e){e()}function If(e={}){const t=k.document,n=t?.head||t?.body;if(!n){I&&g.error("[showReportDialog] Global document not defined");return}const r=j(),i=R()?.getDsn();if(!i){I&&g.error("[showReportDialog] DSN not configured");return}const o={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||zv()},s=k.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=Kv(i,o);const{onLoad:a,onClose:c}=o;if(a&&(s.onload=a),c){const u=f=>{if(f.data==="__sentry_reportdialog_closed__")try{c()}finally{k.removeEventListener("message",u)}};k.addEventListener("message",u)}n.appendChild(s)}var Jk=F,Xk="ReportingObserver",wf=new WeakMap,Qk=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(wf.has(R()))for(const i of r)Ge(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const c={};for(const u in i.body)c[u]=i.body[u];if(o.setExtra("body",c),i.type==="crash"){const u=i.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=i.body.message||a}jv(`${s}: ${a}`)})}return{name:Xk,setupOnce(){bI()&&new Jk.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){wf.set(r,!0)}}}),uP=Qk,Zk="HttpClient",eA=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:Zk,setup(n){cA(n,t),uA(n,t)}}}),lP=eA;function tA(e,t,n,r,i){if(Im(e,n.status,n.url)){const o=lA(t,r);let s,a,c,u;Rm()&&([s,c]=Rf("Cookie",o),[a,u]=Rf("Set-Cookie",n));const f=wm({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:i,type:"fetch"});bi(f)}}function Rf(e,t){const n=iA(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=Tm(i))}catch{}return[n,r]}function nA(e,t,n,r,i){if(Im(e,t.status,t.responseURL)){let o,s,a;if(Rm()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=Tm(u))}catch{}try{a=oA(t)}catch{}o=r}const c=wm({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i,type:"xhr"});bi(c)}}function rA(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Tm(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function iA(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function oA(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
493
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function sA(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function aA(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function cA(e,t){Lh()&&Zc(n=>{if(R()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,c]=i;r&&tA(t,a,r,c,o||s)},!1)}function uA(e,t){"XMLHttpRequest"in F&&pu(n=>{if(R()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[kt];if(!s)return;const{method:a,request_headers:c}=s;try{nA(t,o,a,c,r||i)}catch(u){I&&g.warn("Error while extracting response event form XHR response",u)}})}function Im(e,t,n){return aA(e.failedRequestStatusCodes,t)&&sA(e.failedRequestTargets,n)&&!Zp(n,R())}function wm(e){const t=R(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,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:rA(e.responseHeaders)}}};return Lt(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function lA(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Rm(){const e=R();return e?!!e.getOptions().sendDefaultPii:!1}var ya=F,fA=7,dA="ContextLines",pA=((e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:fA;return{name:dA,processEvent(n){return hA(n,t)}}}),fP=pA;function hA(e,t){const n=ya.document,r=ya.location&&Bo(ya.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const s=["<!DOCTYPE html>","<html>",...o.split(`
494
+ `),"</html>"];return i.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>mA(u,s,r,t)))}),e}function mA(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||C_(t,e,r),e}var gA="GraphQLClient",_A=(e=>({name:gA,setup(t){yA(t,e),vA(t,e)}}));function yA(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const i=L(n).data||{};if(i["sentry.op"]!=="http.client")return;const o=i["url.full"]||i["http.url"]||i.url,s=i["http.request.method"]||i["http.method"];if(!at(o)||!at(s))return;const{endpoints:a}=t,c=ct(o,a),u=Am(r);if(c&&u){const f=Cm(u);if(f){const l=km(f);n.updateName(`${s} ${o} (${l})`),Ds(f)&&n.setAttribute("graphql.document",f.query),$s(f)&&(n.setAttribute("graphql.persisted_query.hash.sha256",f.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",f.extensions.persistedQuery.version))}}})}function vA(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const a=s?.url,{endpoints:c}=t,u=ct(a,c),f=Am(r);if(u&&s&&f){const l=Cm(f);!s.graphql&&l&&(s["graphql.operation"]=km(l),Ds(l)&&(s["graphql.document"]=l.query),$s(l)&&(s["graphql.persisted_query.hash.sha256"]=l.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=l.extensions.persistedQuery.version))}}})}function km(e){if($s(e))return`persisted ${e.operationName}`;if(Ds(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=SA(t);return r?`${i} ${r}`:`${i}`}return"unknown"}function Am(e){const t="xhr"in e;let n;if(t){const r=e.xhr[kt];n=r&&Zo(r.body)[0]}else{const r=hu(e.input);n=Zo(r)[0]}return n}function SA(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 i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Io(e){return typeof e=="object"&&e!==null}function Ds(e){return Io(e)&&typeof e.query=="string"}function $s(e){return Io(e)&&typeof e.operationName=="string"&&Io(e.extensions)&&Io(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Cm(e){try{const t=JSON.parse(e);return Ds(t)||$s(t)?t:void 0}catch{return}}var dP=_A,pP=(e={})=>{const t=["script"];function n(r,i,o=0){if(!r)return;const s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of s){if(!(a instanceof HTMLElement))continue;const c=wc(a,1)||void 0,u=a.tagName.toLowerCase();if(t.includes(u))continue;const f=e.onElement?.({element:a,componentName:c,tagName:u,depth:o})||{};if(f==="skip")continue;if(f==="children"){n(a,i,o+1);continue}const{x:l,y:d,width:p,height:h}=a.getBoundingClientRect(),m={identifier:a.id||void 0,type:c||u,visible:!0,alpha:1,height:h,width:p,x:l,y:d,...f};m.children=[],n(a,m.children,o+1),i.push(m)}}return{name:"ViewHierarchy",processEvent:(r,i)=>{if(r.type!==void 0||e.shouldAttach?.(r,i)===!1)return r;const o={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||k.document.body,o.windows);const s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(o)};return i.attachments=i.attachments||[],i.attachments.push(s),r}}},he=F,mu="sentryReplaySession",bA="replay_event",gu="Unable to send Replay",EA=3e5,TA=9e5,IA=5e3,wA=5500,RA=6e4,kA=5e3,AA=3,kf=15e4,no=5e3,CA=3e3,MA=300,_u=2e7,NA=4999,xA=5e4,Af=36e5,OA=Object.defineProperty,PA=(e,t,n)=>t in e?OA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>PA(e,typeof t!="symbol"?t+"":t,n),Te=(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))(Te||{});function LA(e){return e.nodeType===e.ELEMENT_NODE}function Jr(e){return e?.host?.shadowRoot===e}function Xr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function DA(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 $A(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 es(e){try{const t=e.rules||e.cssRules;return t?DA(Array.from(t,Mm).join("")):null}catch{return null}}function FA(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Mm(e){let t;if(UA(e))try{t=es(e.styleSheet)||$A(e)}catch{}else if(HA(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=FA(e)),r&&(n=BA(n)),r||i)return n}return t||e.cssText}function BA(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function UA(e){return"styleSheet"in e}function HA(e){return"selectorText"in e}var Nm=class{constructor(){Cf(this,"idNodeMap",new Map),Cf(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function WA(){return new Nm}function Fs({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 ai({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Er(e){return e.toLowerCase()}function oc(e){return e.toUpperCase()}var Mf="__rrweb_original__";function jA(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=Mf in o?o[Mf]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function yu(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Er(t):null}function ts(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function xm(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var Nf={};function Om(e){const t=Nf[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Nf[e]=r.bind(window)}function sc(...e){return Om("setTimeout")(...e)}function Pm(...e){return Om("clearTimeout")(...e)}function Lm(e){try{return e.contentDocument}catch{}}var zA=1,qA=new RegExp("[^a-z0-9-_:]"),ci=-2;function vu(){return zA++}function GA(e){if(e instanceof HTMLFormElement)return"form";const t=Er(e.tagName);return qA.test(t)?"div":t}function VA(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Xn,xf,YA=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,KA=/^(?:[a-z+]+:)?\/\//i,JA=/^www\..*/i,XA=/^(data:)([^,]*),(.*)/i;function QA(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;const o=i.indexOf(":");if(o===-1){r.push(i);continue}const s=i.slice(0,o).trim();t.has(s)||r.push(i)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function ns(e,t){return(e||"").replace(YA,(n,r,i,o,s,a)=>{const c=i||s||a,u=r||o||"";if(!c)return n;if(KA.test(c)||JA.test(c))return`url(${u}${c}${u})`;if(XA.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${VA(t)+c}${u})`;const f=t.split("/"),l=c.split("/");f.pop();for(const d of l)d!=="."&&(d===".."?f.pop():f.push(d));return`url(${u}${f.join("/")}${u})`})}var ZA=/^[^ \t\n\r\u000c]+/,eC=/^[, \t\n\r\u000c]+/;function tC(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(eC),!(n>=t.length);){let o=r(ZA);if(o.slice(-1)===",")o=nr(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=nr(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}var Of=new WeakMap;function nr(e,t){return!t||t.trim()===""?t:Bs(e,t)}function nC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Bs(e,t){let n=Of.get(e);if(n||(n=e.createElement("a"),Of.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Dm(e,t,n,r,i,o,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return nr(e,r);if(n==="xlink:href"&&r[0]!=="#")return nr(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return nr(e,r);if(n==="srcset")return tC(e,r);if(n==="style"){let a=ns(r,Bs(e));return s&&s.size>0&&(a=QA(a,s)),a}else if(t==="object"&&n==="data")return nr(e,r);return typeof o=="function"?o(n,r,i):r}function $m(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function rC(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 i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function iC(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function En(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:En(e.parentNode,t,n,r+1)}function rr(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(iC(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Tr(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const u=s.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(o){if(c=En(s,rr(r,i)),c<0)return!0;a=En(s,rr(t,n),c>=0?c:1/0)}else{if(a=En(s,rr(t,n)),a<0)return!1;c=En(s,rr(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function oC(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=sc(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{Pm(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return sc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function sC(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=sc(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Pm(o),r=!0,t()})}function aC(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:_,dataURLOptions:y={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:N,newlyAddedElement:W=!1,ignoreCSSAttributes:A}=t,S=cC(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Te.Document,childNodes:[],compatMode:e.compatMode}:{type:Te.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Te.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return lC(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:y,inlineImages:v,recordCanvas:b,keepIframeSrcFn:N,newlyAddedElement:W,rootId:S,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,ignoreCSSAttributes:A});case e.TEXT_NODE:return uC(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:_,rootId:S});case e.CDATA_SECTION_NODE:return{type:Te.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:Te.Comment,textContent:e.textContent||"",rootId:S};default:return!1}}function cC(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function uC(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:f}=t,l=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&d){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(d=es(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}d=ns(d,Bs(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const _=Tr(e,r,o,i,s,n);return!p&&!h&&!m&&d&&_&&(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||_)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),l==="OPTION"&&d&&(d=ai({isMasked:Tr(e,r,o,i,s,Fs({type:null,tagName:l,maskInputOptions:c})),element:e,value:d,maskInputFn:u})),{type:Te.Text,textContent:d||"",isStyle:p,rootId:f}}function lC(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:_,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:b,ignoreCSSAttributes:N}=t,W=rC(e,r,i,o),A=GA(e);let S={};const D=e.attributes.length;for(let E=0;E<D;E++){const x=e.attributes[E];x.name&&!$m(A,x.name,x.value)&&(S[x.name]=Dm(n,A,Er(x.name),x.value,e,c,N))}if(A==="link"&&s){const E=Array.from(n.styleSheets).find(M=>M.href===e.href);let x=null;E&&(x=es(E)),x&&(S.rel=null,S.href=null,S.crossorigin=null,S._cssText=ns(x,E.href))}if(A==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=es(e.sheet);E&&(S._cssText=ns(E,Bs(n)))}if(A==="input"||A==="textarea"||A==="select"||A==="option"){const E=e,x=yu(E),M=ts(E,oc(A),x),C=E.checked;if(x!=="submit"&&x!=="button"&&M){const Y=Tr(E,_,v,y,b,Fs({type:x,tagName:oc(A),maskInputOptions:a}));S.value=ai({isMasked:Y,element:E,value:M,maskInputFn:u})}C&&(S.checked=C)}if(A==="option"&&(e.selected&&!a.select?S.selected=!0:delete S.selected),A==="canvas"&&d){if(e.__context==="2d")jA(e)||(S.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const E=e.toDataURL(f.type,f.quality),x=n.createElement("canvas");x.width=e.width,x.height=e.height,E!==x.toDataURL(f.type,f.quality)&&(S.rr_dataURL=E)}}if(A==="img"&&l){Xn||(Xn=n.createElement("canvas"),xf=Xn.getContext("2d"));const E=e,x=E.currentSrc||E.getAttribute("src")||"<unknown-src>",M=E.crossOrigin,C=()=>{E.removeEventListener("load",C);try{Xn.width=E.naturalWidth,Xn.height=E.naturalHeight,xf.drawImage(E,0,0),S.rr_dataURL=Xn.toDataURL(f.type,f.quality)}catch(Y){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?C():E.addEventListener("load",C);return}else console.warn(`Cannot inline img src=${x}! Error: ${Y}`)}E.crossOrigin==="anonymous"&&(M?S.crossOrigin=M:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?C():E.addEventListener("load",C)}if((A==="audio"||A==="video")&&(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),W){const{width:E,height:x}=e.getBoundingClientRect();S={class:S.class,rr_width:`${E}px`,rr_height:`${x}px`}}A==="iframe"&&!p(S.src)&&(!W&&!Lm(e)&&(S.rr_src=S.src),delete S.src);let $;try{customElements.get(A)&&($=!0)}catch{}return{type:Te.Element,tagName:A,attributes:S,childNodes:[],isSVG:nC(e)||void 0,needBlock:W,rootId:m,isCustom:$}}function pe(e){return e==null?"":e.toLowerCase()}function fC(e,t){if(t.comment&&e.type===Te.Comment)return!0;if(e.type===Te.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"&&xm(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(pe(e.attributes.name).match(/^msapplication-tile(image|color)$/)||pe(e.attributes.name)==="application-name"||pe(e.attributes.rel)==="icon"||pe(e.attributes.rel)==="apple-touch-icon"||pe(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&pe(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(pe(e.attributes.property).match(/^(og|twitter|fb):/)||pe(e.attributes.name).match(/^(og|twitter):/)||pe(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(pe(e.attributes.name)==="robots"||pe(e.attributes.name)==="googlebot"||pe(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(pe(e.attributes.name)==="author"||pe(e.attributes.name)==="generator"||pe(e.attributes.name)==="framework"||pe(e.attributes.name)==="publisher"||pe(e.attributes.name)==="progid"||pe(e.attributes.property).match(/^article:/)||pe(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(pe(e.attributes.name)==="google-site-verification"||pe(e.attributes.name)==="yandex-verification"||pe(e.attributes.name)==="csrf-token"||pe(e.attributes.name)==="p:domain_verify"||pe(e.attributes.name)==="verify-v1"||pe(e.attributes.name)==="verification"||pe(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ir(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b={},inlineImages:N=!1,recordCanvas:W=!1,onSerialize:A,onIframeLoad:S,iframeLoadTimeout:D=5e3,onBlockedImageLoad:$,onStylesheetLoad:E,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:C=!1,ignoreCSSAttributes:Y}=t;let{preserveWhiteSpace:Z=!0}=t;const ee=aC(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,dataURLOptions:b,inlineImages:N,recordCanvas:W,keepIframeSrcFn:M,newlyAddedElement:C,ignoreCSSAttributes:Y});if(!ee)return console.warn(e,"not serialized"),null;let oe;r.hasNode(e)?oe=r.getId(e):fC(ee,v)||!Z&&ee.type===Te.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?oe=ci:oe=vu();const T=Object.assign(ee,{id:oe});if(r.add(e,T),oe===ci)return null;A&&A(e);let H=!d;if(T.type===Te.Element){H=H&&!T.needBlock;const P=e.shadowRoot;P&&Xr(P)&&(T.isShadowHost=!0)}if((T.type===Te.Document||T.type===Te.Element)&&H){v.headWhitespace&&T.type===Te.Element&&T.tagName==="head"&&(Z=!1);const P={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:N,recordCanvas:W,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:S,iframeLoadTimeout:D,onBlockedImageLoad:$,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:Y},K=e.childNodes?Array.from(e.childNodes):[];for(const te of K){const re=ir(te,P);re&&T.childNodes.push(re)}if(LA(e)&&e.shadowRoot)for(const te of Array.from(e.shadowRoot.childNodes)){const re=ir(te,P);re&&(Xr(e.shadowRoot)&&(re.isShadow=!0),T.childNodes.push(re))}}if(e.parentNode&&Jr(e.parentNode)&&Xr(e.parentNode)&&(T.isShadow=!0),T.type===Te.Element&&T.tagName==="iframe"&&!T.needBlock&&oC(e,()=>{const P=Lm(e);if(P&&S){const K=ir(P,{doc:P,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:N,recordCanvas:W,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:S,iframeLoadTimeout:D,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:Y});K&&S(e,K)}},D),T.type===Te.Element&&T.tagName==="img"&&!e.complete&&T.needBlock){const P=e,K=()=>{if(P.isConnected&&!P.complete&&$)try{const te=P.getBoundingClientRect();te.width>0&&te.height>0&&$(P,T,te)}catch{}P.removeEventListener("load",K)};P.isConnected&&P.addEventListener("load",K)}return T.type===Te.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&xm(T.attributes.href)==="css")&&sC(e,()=>{if(E){const P=ir(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:v,dataURLOptions:b,inlineImages:N,recordCanvas:W,preserveWhiteSpace:Z,onSerialize:A,onIframeLoad:S,iframeLoadTimeout:D,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:Y});P&&E(e,P)}},x),T.type===Te.Element&&delete T.needBlock,T}function dC(e,t){const{mirror:n=new Nm,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:N,onSerialize:W,onIframeLoad:A,iframeLoadTimeout:S,onBlockedImageLoad:D,onStylesheetLoad:$,stylesheetLoadTimeout:E,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:M=new Set([])}=t||{};return ir(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:f,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:_,maskInputFn:y,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:b,inlineImages:d,recordCanvas:p,preserveWhiteSpace:N,onSerialize:W,onIframeLoad:A,iframeLoadTimeout:S,onBlockedImageLoad:D,onStylesheetLoad:$,stylesheetLoadTimeout:E,keepIframeSrcFn:x,newlyAddedElement:!1,ignoreCSSAttributes:M})}function Le(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Qn=`Please stop import mirror directly. Instead of that,\r
495
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
496
+ or you can use record.mirror to access the mirror instance during recording.`,Pf={map:{},getId(){return console.error(Qn),-1},getNode(){return console.error(Qn),null},removeNodeFromMap(){console.error(Qn)},has(){return console.error(Qn),!1},reset(){console.error(Qn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Pf=new Proxy(Pf,{get(e,t,n){return t==="map"&&console.error(Qn),Reflect.get(e,t,n)}}));function ui(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),c=this;a<=0||a>t?(r&&(vC(r),r=null),i=s,e.apply(c,o)):!r&&n.trailing!==!1&&(r=Us(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function Fm(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){Us(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Fm(e,t,o||{},!0)}function Su(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var rs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(rs=()=>new Date().getTime());function Bm(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 Um(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Hm(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wm(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function We(e,t,n,r,i){if(!e)return!1;const o=Wm(e);if(!o)return!1;const s=rr(t,n);if(!i){const u=r&&o.matches(r);return s(o)&&!u}const a=En(o,s);let c=-1;return a<0?!1:(r&&(c=En(o,rr(null,r))),a>-1&&c<0?!0:a<c)}function pC(e,t){return t.getId(e)!==-1}function va(e,t){return t.getId(e)===ci}function jm(e,t){if(Jr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?jm(e.parentNode,t):!0:!0}function ac(e){return!!e.changedTouches}function hC(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 zm(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function qm(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function cc(e){return!!e?.shadowRoot}var mC=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Gm(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function gC(e){let t=e,n;for(;n=Gm(t);)t=n;return t}function _C(e){const t=e.ownerDocument;if(!t)return!1;const n=gC(e);return t.contains(n)}function Vm(e){const t=e.ownerDocument;return t?t.contains(e)||_C(e):!1}var Lf={};function bu(e){const t=Lf[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Lf[e]=r.bind(window)}function yC(...e){return bu("requestAnimationFrame")(...e)}function Us(...e){return bu("setTimeout")(...e)}function vC(...e){return bu("clearTimeout")(...e)}var X=(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))(X||{}),z=(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))(z||{}),Oe=(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))(Oe||{}),Rt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Rt||{}),Zn=(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))(Zn||{});function Eu(e){try{return e.contentDocument}catch{}}function SC(e){try{return e.contentWindow}catch{}}function Df(e){return"__ln"in e}var bC=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Df(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Df(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},$f=(e,t)=>`${e}@${t}`,EC=class{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=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new bC,r=a=>{let c=a,u=ci;for(;u===ci;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=a=>{if(!a.parentNode||!Vm(a))return;const c=Jr(a.parentNode)?this.mirror.getId(Gm(a)):this.mirror.getId(a.parentNode),u=r(a);if(c===-1||u===-1)return n.addNode(a);const f=ir(a,{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:l=>{zm(l,this.mirror)&&!We(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(l),qm(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),cc(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(l,d)=>{We(l,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(l,d),l.contentWindow&&this.canvasManager.addWindow(l.contentWindow),this.shadowDomManager.observeAttachShadow(l))},onStylesheetLoad:(l,d)=>{this.stylesheetManager.attachLinkElement(l,d)},onBlockedImageLoad:(l,d,{width:p,height:h})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:d.id,attributes:{style:{width:`${p}px`,height:`${h}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});f&&(e.push({parentId:c,nextId:u,node:f}),t.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Ff(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!Bf(this.droppedSet,a)&&!Ff(this.removes,a,this.mirror)||Bf(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){const c=this.mirror.getId(o.value.parentNode),u=r(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=n.tail;for(;c;){const u=c;if(c=c.previous,u){const f=this.mirror.getId(u.value.parentNode);if(r(u.value)===-1)continue;if(f!==-1){a=u;break}else{const l=u.value;if(l.parentNode&&l.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const d=l.parentNode.host;if(this.mirror.getId(d)!==-1){a=u;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),i(a.value)}const s={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:c}=a;if(typeof c.style=="string"){const u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.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(s))},this.processMutation=e=>{if(!va(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!We(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Tr(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Wm(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if(n==="value"){const o=yu(t),s=t.tagName;r=ts(t,s,o);const a=Fs({maskInputOptions:this.maskInputOptions,tagName:s,type:o});r=ai({isMasked:Tr(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(We(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r))if(!Eu(t))n="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!$m(t.tagName,n)&&(i.attributes[n]=Dm(this.doc,Er(t.tagName),Er(n),r,t,this.maskAttributeFn),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const s of Array.from(t.style)){const a=t.style.getPropertyValue(s),c=t.style.getPropertyPriority(s);a!==o.style.getPropertyValue(s)||c!==o.style.getPropertyPriority(s)?c===""?i.styleDiff[s]=a:i.styleDiff[s]=[a,c]:i._unchangedStyles[s]=[a,c]}for(const s of Array.from(o.style))t.style.getPropertyValue(s)===""&&(i.styleDiff[s]=!1)}break}case"childList":if(We(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=Jr(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);We(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||va(t,this.mirror)||!pC(t,this.mirror)||(this.addedSet.has(t)?(uc(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||jm(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[$f(n,r)]?uc(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Jr(e.target)&&Xr(e.target)?!0:void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(va(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[$f(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);We(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(n=>this.genAdds(n)),cc(e)&&e.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}}}init(e){["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","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}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 uc(e,t){e.delete(t),t.childNodes?.forEach(n=>uc(e,n))}function Ff(e,t,n){return e.length===0?!1:TC(e,t,n)}function TC(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function Bf(e,t){return e.size===0?!1:Ym(e,t)}function Ym(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Ym(e,n):!1}var Qr;function IC(e){Qr=e}function wC(){Qr=void 0}var ne=e=>Qr?(...n)=>{try{return e(...n)}catch(r){if(Qr&&Qr(r)===!0)return()=>{};throw r}}:e,or=[];function Li(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 Km(e,t){const n=new EC;or.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(ne(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function RC({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const c=ui(ne(l=>{const d=Date.now()-a;e(s.map(p=>(p.timeOffset-=d,p)),l),s=[],a=null}),o),u=ne(ui(ne(l=>{const d=Li(l),{clientX:p,clientY:h}=ac(l)?l.changedTouches[0]:l;a||(a=rs()),s.push({x:p,y:h,id:r.getId(d),timeOffset:rs()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?z.Drag:l instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),f=[Le("mousemove",u,n),Le("touchmove",u,n),Le("drag",u,n)];return ne(()=>{f.forEach(l=>l())})}function kC({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const f=l=>d=>{const p=Li(d);if(We(p,r,i,o,!0))return;let h=null,m=l;if("pointerType"in d){switch(d.pointerType){case"mouse":h=Rt.Mouse;break;case"touch":h=Rt.Touch;break;case"pen":h=Rt.Pen}h===Rt.Touch?Oe[l]===Oe.MouseDown?m="TouchStart":Oe[l]===Oe.MouseUp&&(m="TouchEnd"):Rt.Pen}else ac(d)&&(h=Rt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===Rt.Touch||m.startsWith("Mouse")&&h===Rt.Mouse)&&(h=null)):Oe[l]===Oe.Click&&(h=u,u=null);const _=ac(d)?d.changedTouches[0]:d;if(!_)return;const y=n.getId(p),{clientX:v,clientY:b}=_;ne(e)({type:Oe[m],id:y,x:v,y:b,...h!==null&&{pointerType:h}})};return Object.keys(Oe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let d=Er(l);const p=f(l);if(window.PointerEvent)switch(Oe[l]){case Oe.MouseDown:case Oe.MouseUp:d=d.replace("mouse","pointer");break;case Oe.TouchStart:case Oe.TouchEnd:return}c.push(Le(d,p,t))}),ne(()=>{c.forEach(l=>l())})}function Jm({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){return Le("scroll",ne(ui(ne(a=>{const c=Li(a);if(!c||We(c,r,i,o,!0))return;const u=n.getId(c);if(c===t&&t.defaultView){const f=Bm(t.defaultView);e({id:u,x:f.left,y:f.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100)),t)}function AC({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Le("resize",ne(ui(ne(()=>{const i=Um(),o=Hm();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200)),t)}var CC=["INPUT","TEXTAREA","SELECT"],Uf=new WeakMap;function MC({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function _(A){let S=Li(A);const D=A.isTrusted,$=S&&oc(S.tagName);if($==="OPTION"&&(S=S.parentElement),!S||!$||CC.indexOf($)<0||We(S,r,i,o,!0))return;const E=S;if(E.classList.contains(s)||a&&E.matches(a))return;const x=yu(S);let M=ts(E,$,x),C=!1;const Y=Fs({maskInputOptions:c,tagName:$,type:x}),Z=Tr(S,d,h,p,m,Y);(x==="radio"||x==="checkbox")&&(C=S.checked),M=ai({isMasked:Z,element:S,value:M,maskInputFn:u}),y(S,l?{text:M,isChecked:C,userTriggered:D}:{text:M,isChecked:C});const ee=S.name;x==="radio"&&ee&&C&&t.querySelectorAll(`input[type="radio"][name="${ee}"]`).forEach(oe=>{if(oe!==S){const T=ai({isMasked:Z,element:oe,value:ts(oe,$,x),maskInputFn:u});y(oe,l?{text:T,isChecked:!C,userTriggered:!1}:{text:T,isChecked:!C})}})}function y(A,S){const D=Uf.get(A);if(!D||D.text!==S.text||D.isChecked!==S.isChecked){Uf.set(A,S);const $=n.getId(A);ne(e)({...S,id:$})}}const v=(f.input==="last"?["change"]:["input","change"]).map(A=>Le(A,ne(_),t)),b=t.defaultView;if(!b)return()=>{v.forEach(A=>A())};const N=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),W=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&v.push(...W.map(A=>Fm(A[0],A[1],{set(){ne(_)({target:this,isTrusted:!1})}},!1,b))),ne(()=>{v.forEach(A=>A())})}function is(e){const t=[];function n(r,i){if(ro("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ro("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ro("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ro("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(e,t)}function zt(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function NC({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ne((f,l,d)=>{const[p,h]=d,{id:m,styleId:_}=zt(l,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:p,index:h}]}),f.apply(l,d)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ne((f,l,d)=>{const[p]=d,{id:h,styleId:m}=zt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),f.apply(l,d)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ne((f,l,d)=>{const[p]=d,{id:h,styleId:m}=zt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),f.apply(l,d)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ne((f,l,d)=>{const[p]=d,{id:h,styleId:m}=zt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),f.apply(l,d)})}));const c={};io("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(io("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),io("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),io("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([f,l])=>{u[f]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[f].insertRule,{apply:ne((d,p,h)=>{const[m,_]=h,{id:y,styleId:v}=zt(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||v&&v!==-1)&&e({id:y,styleId:v,adds:[{rule:m,index:[...is(p),_||0]}]}),d.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[f].deleteRule,{apply:ne((d,p,h)=>{const[m]=h,{id:_,styleId:y}=zt(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...is(p),m]}]}),d.apply(p,h)})})}),ne(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([f,l])=>{l.prototype.insertRule=u[f].insertRule,l.prototype.deleteRule=u[f].deleteRule})})}function Xm({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ne(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function xC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ne((a,c,u)=>{const[f,l,d]=u;if(n.has(f))return o.apply(c,[f,l,d]);const{id:p,styleId:h}=zt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:f,value:l,priority:d},index:is(c.parentRule)}),a.apply(c,u)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ne((a,c,u)=>{const[f]=u;if(n.has(f))return s.apply(c,[f]);const{id:l,styleId:d}=zt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||d&&d!==-1)&&e({id:l,styleId:d,remove:{property:f},index:is(c.parentRule)}),a.apply(c,u)})}),ne(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function OC({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=ne(u=>ui(ne(f=>{const l=Li(f);if(!l||We(l,t,n,r,!0))return;const{currentTime:d,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:i.getId(l),currentTime:d,volume:p,muted:h,playbackRate:m})}),o.media||500)),c=[Le("play",a(Zn.Play),s),Le("pause",a(Zn.Pause),s),Le("seeked",a(Zn.Seeked),s),Le("volumechange",a(Zn.VolumeChange),s),Le("ratechange",a(Zn.RateChange),s)];return ne(()=>{c.forEach(u=>u())})}function PC({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,f){const l=new o(c,u,f);return i.set(l,{family:c,buffer:typeof u!="string",descriptors:f,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const s=Su(t.fonts,"add",function(a){return function(c){return Us(ne(()=>{const u=i.get(c);u&&(e(u),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),ne(()=>{r.forEach(a=>a())})}function LC(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const c=ne(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const f=[],l=u.rangeCount||0;for(let d=0;d<l;d++){const{startContainer:p,startOffset:h,endContainer:m,endOffset:_}=u.getRangeAt(d);We(p,r,i,o,!0)||We(m,r,i,o,!0)||f.push({start:n.getId(p),startOffset:h,end:n.getId(m),endOffset:_})}s({ranges:f})});return c(),Le("selectionchange",c)}function DC({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Su(n.customElements,"define",function(r){return function(i,o,s){try{t({define:{name:i}})}catch{}return r.apply(this,[i,o,s])}})}function $C(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Km(e,e.doc));const i=RC(e),o=kC(e),s=Jm(e),a=AC(e,{win:n}),c=MC(e),u=OC(e);let f=()=>{},l=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(f=NC(e,{win:n}),l=Xm(e,e.doc),d=xC(e,{win:n}),e.collectFonts&&(p=PC(e)));const h=LC(e),m=DC(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return ne(()=>{or.forEach(y=>y.reset()),r?.disconnect(),i(),o(),s(),a(),c(),u(),f(),l(),d(),p(),h(),m(),_.forEach(y=>y())})}function ro(e){return typeof window[e]<"u"}function io(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var lc=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const i=r.get(t);return i||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},FC=class{constructor(){this.crossOriginIframeMirror=new lc(vu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},BC=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new lc(vu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new lc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=Eu(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:X.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return t;case X.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case X.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(n.node,r)}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const i of r)!Array.isArray(t[i])&&typeof t[i]!="number"||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==Te.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},UC=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},HC=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Xr(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Km({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Jm({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Us(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Xm({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=Eu(e),n=SC(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Su(e.prototype,"attachShadow",function(r){return function(i){const o=r.call(this,i);return this.shadowRoot&&Vm(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Hf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var oo=0;oo<Hf.length;oo++)WC[Hf.charCodeAt(oo)]=oo;var Wf=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},jC=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new mC,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const n={id:t,styleIds:[]},r=[];for(const i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),r.push({styleId:o,rules:Array.from(i.rules||CSSRule,(s,a)=>({rule:Mm(s),index:a}))})),n.styleIds.push(o)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},zC=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(r=>r!==t)}add(e,t){this.active||(this.active=!0,yC(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},be,os;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)}var ot=WA();function lt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:v,maskInputFn:b,maskTextFn:N,maxCanvasSize:W=null,packFn:A,sampling:S={},dataURLOptions:D={},mousemoveWait:$,recordDOM:E=!0,recordCanvas:x=!1,recordCrossOriginIframes:M=!1,recordAfter:C=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:Y=!1,collectFonts:Z=!1,inlineImages:ee=!1,plugins:oe,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:P,onMutation:K,getCanvasManager:te}=e;IC(P);const re=M?window.parent===window:!0;let Ae=!1;if(!re)try{window.parent.document&&(Ae=!1)}catch{Ae=!0}if(re&&!t)throw new Error("emit function is required");if(!re&&!Ae)return()=>{};$!==void 0&&S.mousemove===void 0&&(S.mousemove=$),ot.reset();const Be=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}:_!==void 0?_:{},Ve=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||{};hC();let it,Et=0;const dn=O=>{for(const se of oe||[])se.eventProcessor&&(O=se.eventProcessor(O));return A&&!Ae&&(O=A(O)),O};be=(O,se)=>{const G=O;if(G.timestamp=rs(),or[0]?.isFrozen()&&G.type!==X.FullSnapshot&&!(G.type===X.IncrementalSnapshot&&G.data.source===z.Mutation)&&or.forEach(ae=>ae.unfreeze()),re)t?.(dn(G),se);else if(Ae){const ae={type:"rrweb",event:dn(G),origin:window.location.origin,isCheckout:se};window.parent.postMessage(ae,"*")}if(G.type===X.FullSnapshot)it=G,Et=0;else if(G.type===X.IncrementalSnapshot){if(G.data.source===z.Mutation&&G.data.isAttachIframe)return;Et++;const ae=r&&Et>=r,J=n&&it&&G.timestamp-it.timestamp>n;(ae||J)&&hn(!0)}};const Tt=O=>{be({type:X.IncrementalSnapshot,data:{source:z.Mutation,...O}})},qi=O=>be({type:X.IncrementalSnapshot,data:{source:z.Scroll,...O}}),It=O=>be({type:X.IncrementalSnapshot,data:{source:z.CanvasMutation,...O}}),Ye=O=>be({type:X.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...O}}),De=new jC({mutationCb:Tt,adoptedStyleSheetCb:Ye}),Ue=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new FC:new BC({mirror:ot,mutationCb:Tt,stylesheetManager:De,recordCrossOriginIframes:M,wrappedEmit:be});for(const O of oe||[])O.getMirror&&O.getMirror({nodeMirror:ot,crossOriginIframeMirror:Ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ue.crossOriginIframeStyleMirror});const zn=new zC,qn=GC(te,{mirror:ot,win:window,mutationCb:O=>be({type:X.IncrementalSnapshot,data:{source:z.CanvasMutation,...O}}),recordCanvas:x,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:W,sampling:S.canvas,dataURLOptions:D,errorHandler:P}),pn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new UC:new HC({mutationCb:Tt,scrollCb:qi,bypassOptions:{onMutation:K,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Be,dataURLOptions:D,maskAttributeFn:v,maskTextFn:N,maskInputFn:b,recordCanvas:x,inlineImages:ee,sampling:S,slimDOMOptions:Ve,iframeManager:Ue,stylesheetManager:De,canvasManager:qn,keepIframeSrcFn:T,processedNodeManager:zn,ignoreCSSAttributes:H},mirror:ot}),hn=(O=!1)=>{if(!E)return;be({type:X.Meta,data:{href:window.location.href,width:Hm(),height:Um()}},O),De.reset(),pn.init(),or.forEach(G=>G.lock());const se=dC(document,{mirror:ot,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Be,maskAttributeFn:v,maskInputFn:b,maskTextFn:N,slimDOM:Ve,dataURLOptions:D,recordCanvas:x,inlineImages:ee,onSerialize:G=>{zm(G,ot)&&Ue.addIframe(G),qm(G,ot)&&De.trackLinkElement(G),cc(G)&&pn.addShadowRoot(G.shadowRoot,document)},onIframeLoad:(G,ae)=>{Ue.attachIframe(G,ae),G.contentWindow&&qn.addWindow(G.contentWindow),pn.observeAttachShadow(G)},onStylesheetLoad:(G,ae)=>{De.attachLinkElement(G,ae)},onBlockedImageLoad:(G,ae,{width:J,height:pt})=>{Tt({adds:[],removes:[],texts:[],attributes:[{id:ae.id,attributes:{style:{width:`${J}px`,height:`${pt}px`}}}]})},keepIframeSrcFn:T,ignoreCSSAttributes:H});if(!se)return console.warn("Failed to snapshot the document");be({type:X.FullSnapshot,data:{node:se,initialOffset:Bm(window)}}),or.forEach(G=>G.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&De.adoptStyleSheets(document.adoptedStyleSheets,ot.getId(document))};os=hn;try{const O=[],se=ae=>ne($C)({onMutation:K,mutationCb:Tt,mousemoveCb:(J,pt)=>be({type:X.IncrementalSnapshot,data:{source:pt,positions:J}}),mouseInteractionCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.MouseInteraction,...J}}),scrollCb:qi,viewportResizeCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.ViewportResize,...J}}),inputCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.Input,...J}}),mediaInteractionCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.MediaInteraction,...J}}),styleSheetRuleCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.StyleSheetRule,...J}}),styleDeclarationCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.StyleDeclaration,...J}}),canvasMutationCb:It,fontCb:J=>be({type:X.IncrementalSnapshot,data:{source:z.Font,...J}}),selectionCb:J=>{be({type:X.IncrementalSnapshot,data:{source:z.Selection,...J}})},customElementCb:J=>{be({type:X.IncrementalSnapshot,data:{source:z.CustomElement,...J}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:Be,inlineStylesheet:h,sampling:S,recordDOM:E,recordCanvas:x,inlineImages:ee,userTriggeredOnInput:Y,collectFonts:Z,doc:ae,maskAttributeFn:v,maskInputFn:b,maskTextFn:N,keepIframeSrcFn:T,blockSelector:o,unblockSelector:s,slimDOMOptions:Ve,dataURLOptions:D,mirror:ot,iframeManager:Ue,stylesheetManager:De,shadowDomManager:pn,processedNodeManager:zn,canvasManager:qn,ignoreCSSAttributes:H,plugins:oe?.filter(J=>J.observer)?.map(J=>({observer:J.observer,options:J.options,callback:pt=>be({type:X.Plugin,data:{plugin:J.name,payload:pt}})}))||[]},{});Ue.addLoadListener(ae=>{try{O.push(se(ae.contentDocument))}catch(J){console.warn(J)}});const G=()=>{hn(),O.push(se(document))};return document.readyState==="interactive"||document.readyState==="complete"?G():(O.push(Le("DOMContentLoaded",()=>{be({type:X.DomContentLoaded,data:{}}),C==="DOMContentLoaded"&&G()})),O.push(Le("load",()=>{be({type:X.Load,data:{}}),C==="load"&&G()},window))),()=>{O.forEach(ae=>ae()),zn.destroy(),os=void 0,wC()}}catch(O){console.warn(O)}}function qC(e){if(!os)throw new Error("please take full snapshot after start recording");os(e)}lt.mirror=ot;lt.takeFullSnapshot=qC;function GC(e,t){try{return e?e(t):new Wf}catch{return console.warn("Unable to initialize CanvasManager"),new Wf}}var jf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(jf||(jf={}));var VC=3,YC=5;function Tu(e){return e>9999999999?e:e*1e3}function Sa(e){return e>9999999999?e/1e3:e}function Di(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:X.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ne(t,10,1e3)}}),t.category==="console")))}var KC="button,a";function Qm(e){return e.closest(KC)||e}function Zm(e){const t=eg(e);return!t||!(t instanceof Element)?t:Qm(t)}function eg(e){return JC(e)?e.target:e}function JC(e){return typeof e=="object"&&!!e&&"target"in e}var qt;function XC(e){return qt||(qt=[],QC()),qt.push(e),()=>{const t=qt?qt.indexOf(e):-1;t>-1&&qt.splice(t,1)}}function QC(){xe(he,"open",function(e){return function(...t){if(qt)try{qt.forEach(n=>n())}catch{}return e.apply(he,t)}})}var ZC=new Set([z.Mutation,z.StyleSheetRule,z.StyleDeclaration,z.AdoptedStyleSheet,z.CanvasMutation,z.Selection,z.MediaInteraction]);function e1(e,t,n){e.handleClick(t,n)}var t1=class{constructor(e,t,n=Di){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=XC(()=>{this._lastMutation=zf()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(r1(t,this._ignoreSelector)||!i1(e))return;const n={timestamp:Sa(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(r=>r.node===n.node&&Math.abs(r.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Sa(e)}registerScroll(e=Date.now()){this._lastScroll=Sa(e)}registerClick(e){const t=Qm(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(t=>{t.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=zf();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const n of e){const r=this._clicks.indexOf(n);r>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(r,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:o,clickBreadcrumb:s}=e;if(i){const a=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,c=a<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:he.location.href,route:t.getCurrentRoute(),timeAfterClickMs:a,endReason:c,clickCount:o||1}};this._addBreadcrumbEvent(t,u);return}if(o>1){const a={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:he.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Pi(()=>this._checkClicks(),1e3)}},n1=["A","BUTTON","INPUT"];function r1(e,t){return!!(!n1.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 i1(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function zf(){return Date.now()/1e3}function o1(e,t){try{if(!s1(t))return;const{source:n}=t.data;if(ZC.has(n)&&e.registerMutation(t.timestamp),n===z.Scroll&&e.registerScroll(t.timestamp),a1(t)){const{type:r,id:i}=t.data,o=lt.mirror.getNode(i);o instanceof HTMLElement&&r===Oe.Click&&e.registerClick(o)}}catch{}}function s1(e){return e.type===VC}function a1(e){return e.data.source===z.MouseInteraction}function mt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Hs=(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))(Hs||{}),c1=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function u1(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(c1.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var l1=e=>t=>{if(!e.isEnabled())return;const n=f1(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&e1(e.clickDetector,n,Zm(t.event)),Di(e,n)};function tg(e,t){const n=lt.mirror.getId(e),r=n&&lt.mirror.getNode(n),i=r&&lt.mirror.getMeta(r),o=i&&p1(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===Hs.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:u1(o.attributes)}}:{}}}function f1(e){const{target:t,message:n}=d1(e);return mt({category:`ui.${e.name}`,...tg(t,n)})}function d1(e){const t=e.name==="click";let n,r=null;try{r=t?Zm(e.event):eg(e.event),n=ke(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function p1(e){return e.type===Hs.Element}function h1(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=m1(t);n&&Di(e,n)}function m1(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||g1(s)||!o)return null;const a=t||r||i,c=o.length===1;if(!a&&c)return null;const u=ke(s,{maxStringLength:200})||"<unknown>";return mt({category:"ui.keyDown",message:u,data:{...tg(s,u).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function g1(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var _1={resource:E1,paint:S1,navigation:b1};function ba(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function y1(e){return e.map(v1).filter(Boolean)}function v1(e){const t=_1[e.entryType];return t?t(e):null}function Ir(e){return((Ie()||he.performance.timeOrigin)+e)/1e3}function S1(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Ir(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function b1(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return i===0?null:{type:`${t}.${m}`,start:Ir(p),end:Ir(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:l,domComplete:o,redirectCount:d}}}function E1(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ir(o),end:Ir(i),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function T1(e){const t=e.entries[e.entries.length-1];return Iu(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function I1(e){return e.sources!==void 0}function w1(e){const t=[],n=[];for(const r of e.entries)if(I1(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=lt.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return Iu(e,"cumulative-layout-shift",n,t)}function R1(e){const t=e.entries[e.entries.length-1];return Iu(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function Iu(e,t,n,r){const i=e.value,o=e.rating,s=Ir(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>lt.mirror.getId(a)):void 0,attributions:r}}}function k1(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(Fn(i,n))}),r.push(Ns(ba(T1,e)),Ms(ba(w1,e)),uu(ba(R1,e))),()=>{r.forEach(i=>i())}}var B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,A1='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 C1(){const e=new Blob([A1]);return URL.createObjectURL(e)}var qf=["log","warn","error"],wo="[Replay] ";function Ea(e,t="info"){vt({category:"console",data:{logger:"replay"},level:t,message:`${wo}${e}`},{level:t})}function M1(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return B?(qf.forEach(r=>{n[r]=(...i)=>{g[r](wo,...i),t&&Ea(i.join(""),jo(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),g.error(wo,r),e?me(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Ea(r,"error")},n.infoTick=(...r)=>{g.log(wo,...r),t&&setTimeout(()=>Ea(r[0]),0)}):qf.forEach(r=>{n[r]=()=>{}}),n}var U=M1(),wu=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${_u}.`)}},ng=class{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(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>_u)throw new wu;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(const{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:Tu(e)}},N1=class rg{constructor(t){rg.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(B&&U.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{B&&U.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){B&&U.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{this._pending.set(r,{method:t,resolve:i,reject:o});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),o(s)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){B&&U.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}},x1=class{constructor(e){this._worker=new N1(e),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(e){const t=Tu(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>_u?Promise.reject(new wu):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{B&&U.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}},O1=class{constructor(e){this._fallback=new ng,this._compression=new x1(e),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(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){B&&U.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const i of e)r.push(this._compression.addEvent(i));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(i){B&&U.exception(i,"Failed to add events when switching buffers.")}}};function P1({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=L1(t);if(n)return n}return B&&U.log("Using simple buffer"),new ng}function L1(e){try{const t=e||D1();if(!t)return;B&&U.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new O1(n)}catch(t){B&&U.exception(t,"Failed to create compression worker")}}function D1(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?C1():""}function Ru(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function $1(e){F1(),e.session=void 0}function F1(){if(Ru())try{he.sessionStorage.removeItem(mu)}catch{}}function ig(e){return e===void 0?!1:Math.random()<e}function Ws(e){if(Ru())try{he.sessionStorage.setItem(mu,JSON.stringify(e))}catch{}}function og(e){const t=Date.now();return{id:e.id||we(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function B1(e,t){return ig(e)?"session":t?"buffer":!1}function Gf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=og({sampled:B1(e,t),previousSessionId:r});return n&&Ws(i),i}function U1(){if(!Ru())return null;try{const e=he.sessionStorage.getItem(mu);if(!e)return null;const t=JSON.parse(e);return B&&U.infoTick("Loading existing session"),og(t)}catch{return null}}function fc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function H1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return fc(e.started,t,r)||fc(e.lastActivity,n,r)}function ss(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!H1(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Ta({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&U1();return i?ss(i,{sessionIdleExpire:e,maxReplayDuration:t})?(B&&U.infoTick("Session in sessionStorage is expired, creating new one..."),Gf(r,{previousSessionId:i.id})):i:(B&&U.infoTick("Creating new session"),Gf(r,{previousSessionId:n}))}function W1(e){return e.type===X.Custom}function ku(e,t,n){return ag(e,t)?(sg(e,t,n),!0):!1}function j1(e,t,n){return ag(e,t)?sg(e,t,n):Promise.resolve(null)}async function sg(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=z1(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(o){const s=o&&o instanceof wu,a=s?"eventBufferOverflow":"eventBufferError",c=R();if(c){const u=s?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}function ag(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Tu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(B&&U.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function z1(e,t){try{if(typeof t=="function"&&W1(e))return t(e)}catch(n){return B&&U.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Au(e){return!e.type}function dc(e){return e.type==="transaction"}function q1(e){return e.type==="replay_event"}function Vf(e){return e.type==="feedback"}function G1(e){return(t,n)=>{if(!e.isEnabled()||!Au(t)&&!dc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(dc(t)){V1(e,t);return}Y1(e,t)}}}function V1(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Y1(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?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Pi(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function K1(e){return t=>{!e.isEnabled()||!Au(t)||J1(e,t)}}function J1(e,t){const n=t.exception?.values?.[0]?.value;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))&&Di(e,mt({category:"replay.hydrate-error",data:{url:Bn()}}))}function X1(e){const t=R();t&&t.on("beforeAddBreadcrumb",n=>Q1(e,n))}function Q1(e,t){if(!e.isEnabled()||!cg(t))return;const n=Z1(t);n&&Di(e,n)}function Z1(e){return!cg(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?eM(e):mt(e)}function eM(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return mt(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>no?(n=!0,`${i.slice(0,no)}…`):i;if(typeof i=="object")try{const o=Ne(i,7);return JSON.stringify(o).length>no?(n=!0,`${JSON.stringify(o,null,2).slice(0,no)}…`):o}catch{}return i});return mt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function cg(e){return!!e.category}function tM(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function as(){const e=j().getPropagationContext().dsc;e&&delete e.replay_id;const t=Se();if(t){const n=qe(t);delete n.replay_id}}function nM(e){const t=j().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Se();if(n){const r=qe(n);r.replay_id=e}}function rM(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:X.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 iM(e,t){return e.recordingMode!=="buffer"||t.message===gu||!t.exception||t.type?!1:ig(e.getOptions().errorSampleRate)}function oM(e){return Object.assign((t,n)=>{if(e.session&&ss(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&as(),!e.isEnabled()||e.isPaused())return t;if(q1(t))return delete t.breadcrumbs,t;if(!Au(t)&&!dc(t)&&!Vf(t))return t;if(!e.checkAndHandleExpiredSession())return as(),t;if(Vf(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),rM(e,t),t;if(tM(t,n)&&!e.getOptions()._experiments.captureExceptions)return B&&U.log("Ignoring error from rrweb internals",t),null;const r=iM(e,t);if((r||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&Ws(i)}return t},{id:"Replay"})}function js(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:X.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function sM(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 aM(e){return t=>{if(!e.isEnabled())return;const n=sM(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(js(e,[n]),!1)))}}function cM(e,t){return B&&e.getOptions()._experiments.traceInternals?!1:Zp(t,R())}function ug(e,t){e.isEnabled()&&t!==null&&(cM(e,t.name)||e.addUpdate(()=>(js(e,[t]),!0)))}function zs(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=gm(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function lg(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function cs(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function fg(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:c}}}function li(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Xt(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:i,warnings:o}=uM(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function pc(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function uM(e){if(!e||typeof e!="string")return{body:e};const t=e.length>kf,n=lM(e);if(t){const r=e.slice(0,kf);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 lM(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function us(e,t){const n=fM(e);return ct(n,t)}function fM(e,t=he.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(he.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 dM(e,t,n){try{const r=fg("resource.fetch",await hM(e,t,n));ug(n.replay,r)}catch(r){B&&U.exception(r,"Failed to capture fetch breadcrumb")}}function pM(e,t){const{input:n,response:r}=t,i=zs(n?hu(n):void 0),o=r?lg(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function hM(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:f}=e.data,l=us(s,n.networkDetailAllowUrls)&&!us(s,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:c,request:l?mM(n,t.input,u):li(u),response:await gM(l,n,t.response,f)}}function mM({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?vM(n,t):{};if(!e)return Xt(i,r,void 0);const o=hu(n),[s,a]=Zo(o,U),c=Xt(i,r,s);return a?cs(c,a):c}async function gM(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return li(i);const o=r?dg(r.headers,n):{};if(!r||!t&&i!==void 0)return Xt(o,i,void 0);const[s,a]=await yM(r),c=_M(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?cs(c,a):c}function _M(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?zs(e):n;return r?t?Xt(i,o,e):Xt(i,o,void 0):li(o)}catch(o){return B&&U.exception(o,"Failed to serialize response body"),Xt(i,n,void 0)}}async function yM(e){const t=SM(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await bM(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(B&&U.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(B&&U.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function dg(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function vM(e,t){return e.length===1&&typeof e[0]!="string"?Yf(e[0],t):e.length===2?Yf(e[1],t):{}}function Yf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?dg(n,t):Array.isArray(n)?{}:pc(n,t):{}}function SM(e){try{return e.clone()}catch(t){B&&U.exception(t,"Failed to clone response body")}}function bM(e){return new Promise((t,n)=>{const r=Pi(()=>n(new Error("Timeout while trying to read response body")),500);EM(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function EM(e){return await e.text()}async function TM(e,t,n){try{const r=fg("resource.xhr",wM(e,t,n));ug(n.replay,r)}catch(r){B&&U.exception(r,"Failed to capture xhr breadcrumb")}}function IM(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=zs(r),o=n.getResponseHeader("content-length")?lg(n.getResponseHeader("content-length")):AM(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function wM(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:c,method:u,status_code:f=0,request_body_size:l,response_body_size:d}=e.data;if(!c)return null;if(!a||!us(c,n.networkDetailAllowUrls)||us(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:f,request:li(l),response:li(d)};const p=a[kt],h=p?pc(p.request_headers,n.networkRequestHeaders):{},m=pc(_m(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?Zo(s,U):[void 0],[v,b]=n.networkCaptureBodies?RM(a):[void 0],N=Xt(h,l,_),W=Xt(m,d,v);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:f,request:y?cs(N,y):N,response:b?cs(W,b):W}}function RM(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return kM(e.response,e.responseType)}catch(n){t.push(n)}return B&&U.warn("Failed to get xhr response body",...t),[void 0]}function kM(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 B&&U.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return B&&U.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function AM(e,t){try{return zs(t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e)}catch{return}}function CM(e){const t=R();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>MM(a,c,u))}catch{}}function MM(e,t,n){if(t.data)try{NM(t)&&OM(n)&&(IM(t,n),TM(t,n,e)),xM(t)&&PM(n)&&(pM(t,n),dM(t,n,e))}catch(r){B&&U.exception(r,"Error when enriching network breadcrumb")}}function NM(e){return e.category==="xhr"}function xM(e){return e.category==="fetch"}function OM(e){return e?.xhr}function PM(e){return e?.response}function LM(e){const t=R();mm(l1(e)),Ls(aM(e)),X1(e),CM(e);const n=oM(e);Gv(n),t&&(t.on("beforeSendEvent",K1(e)),t.on("afterSendEvent",G1(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function DM(e){try{return Promise.all(js(e,[$M(he.performance.memory)]))}catch{return[]}}function $M(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function FM(e,t,n){return jS(e,t,{...n,setTimeoutImpl:Pi})}var so=F.navigator;function BM(){return/iPhone|iPad|iPod/i.test(so?.userAgent??"")||/Macintosh/i.test(so?.userAgent??"")&&so?.maxTouchPoints&&so?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function UM(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){B&&U.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,HM(n),e.clickDetector&&o1(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!ku(e,n,i))return!0;if(!i)return!1;const o=e.session;if(jM(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const s=e.eventBuffer.getEarliestTimestamp();s&&(B&&U.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&Ws(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function HM(e){const t=e.data;if(!(e.type!==X.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==z.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=lt.mirror.getNode(n.id),i=r&&lt.mirror.getMeta(r);if(i?.type===Hs.Element)for(const[o,s]of Object.entries(n.attributes))s===null?delete i.attributes[o]:i.attributes[o]=s}}function WM(e){const t=e.getOptions();return{type:X.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 jM(e,t){!t||e.session?.segmentId!==0||ku(e,WM(e),!1)}function zM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function qM(e,t,n,r){return rt(kp(e,yi(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function GM({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
497
+ `;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function VM({client:e,scope:t,replayId:n,event:r}){const i={event_id:n,integrations:typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit("preprocessEvent",r,i);const o=await Op(e.getOptions(),r,i,t,e,Ee());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const{name:s,version:a,settings:c}=e.getSdkMetadata()?.sdk||{};return o.sdk={...o.sdk,name:s||"sentry.javascript.unknown",version:a||"0.0.0",settings:c},o}async function YM({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=GM({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:f}=r,l=R(),d=j(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!o.sampled)return Promise.resolve({});const m=await VM({scope:d,client:l,replayId:t,event:{type:bA,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled}});if(!m)return l.recordDroppedEvent("event_processor","replay"),B&&U.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete m.sdkProcessingMetadata;const _=qM(m,s,h,l.getOptions().tunnel);let y;try{y=await p.send(_)}catch(b){const N=new Error(gu);try{N.cause=b}catch{}throw N}const v=Gp({},y);if(qp(v,"replay"))throw new Cu(v);if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new pg(y.statusCode);return y}var pg=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},Cu=class extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}},Kf=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function hg(e,t={count:0,interval:kA}){const{recordingData:n,onError:r}=e;if(n.length)try{return await YM(e),!0}catch(i){if(i instanceof pg||i instanceof Cu)throw i;if(Pp("Replays",{_retryCount:t.count}),r&&r(i),t.count>=AA){const o=new Error(`${gu} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{Pi(async()=>{try{await hg(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}var mg="__THROTTLED",KM="__SKIPPED";function JM(e,t,n){const r=new Map,i=a=>{const c=a-n;r.forEach((u,f)=>{f<c&&r.delete(f)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let s=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(i(c),o()>=t){const f=s;return s=!0,f?KM:mg}s=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var XM=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:EA,sessionIdleExpire:TA},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=t,this._options=e,this._debouncedFlush=FM(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=JM((o,s)=>j1(this,o,s),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(CA,n),timeout:n,scrollTimeout:MA,ignoreSelector:r?r.join(","):""}:void 0;if(i&&(this.clickDetector=new t1(this,i)),B){const o=e._experiments;U.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=mt({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=mt({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{h1(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){B&&U.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){B&&U.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",B&&U.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){B&&U.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){B&&U.log("Buffering is in progress, call `flush()` to save the replay");return}B&&U.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Ta({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){B&&U.log("Buffering is in progress, call `flush()` to save the replay");return}B&&U.infoTick("Starting replay in buffer mode");const e=Ta({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=lt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:RA}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:UM(this),...BM(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const n=t??"manual";R()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{B&&U.log(`Stopping Replay triggered by ${n}`),as(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,$1(this)}catch(r){this.handleException(r)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),B&&U.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),B&&U.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const t=Date.now();B&&U.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();this.recordingMode==="buffer"||!this._isEnabled||t!==!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(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&fc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${he.location.pathname}${he.location.hash}${he.location.search}`,t=`${he.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===mg){const r=mt({category:"replay.throttled"});this.addUpdate(()=>!ku(this,{type:YC,timestamp:r.timestamp||0,data:{tag:"breadcrumb",payload:r,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Se(),t=e&&ye(e),n=(t&&L(t).data||{})[ce];if(!(!t||!n||!["route","custom"].includes(n)))return L(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=P1({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&R()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&nM(this.session.id)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Ta({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return ss(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(e.id))}_addListeners(){try{he.document.addEventListener("visibilitychange",this._handleVisibilityChange),he.addEventListener("blur",this._handleWindowBlur),he.addEventListener("focus",this._handleWindowFocus),he.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(LM(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=k1(this)}_removeListeners(){try{he.document.removeEventListener("visibilitychange",this._handleVisibilityChange),he.removeEventListener("blur",this._handleWindowBlur),he.removeEventListener("focus",this._handleWindowFocus),he.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(ss(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){as();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){B&&U.log("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:X.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=y1(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(n=>n.start>=t)}return Promise.all(js(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={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(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){B&&U.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await DM(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Kf;const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await hg({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:i=>this.handleException(i)})}catch(t){this.handleException(t),this.stop({reason:"sendError"});const n=R();if(n){let r;t instanceof Cu?r="ratelimit_backoff":t instanceof Kf?r="invalid":r="send_error",n.recordDroppedEvent(r,"replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){B&&U.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){B&&U.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),r&&this._debouncedFlush();return}const o=this.eventBuffer;o&&this.session.segmentId===0&&!o.hasCheckout&&B&&U.log("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(a){this.handleException(a)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ws(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(s=>{const a=zM(s.target),c=t.join(",");return a?.matches(c)}))return!1;const n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=r&&n>r;if(n>i||o){const s=mt({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(s)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function Wr(e,t){return[...e,...t].join(",")}function QM({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:Wr(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:Wr(t,[]),blockSelector:Wr(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:Wr(r,[]),ignoreSelector:Wr(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function ZM({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return o;const s=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?o.replace(/[\S]/g,"*"):o}var Jf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',eN=["content-length","content-type","accept"],tN=Symbol.for("sentry__originalRequestBody"),Xf=!1,Qf=!1;function nN(){if(typeof Request>"u"||Qf)return;const e=Request;try{const t=function(n,r){const i=new e(n,r);return r?.body!=null&&(i[tN]=r.body),i};t.prototype=e.prototype,F.Request=t,Qf=!0}catch{}}var hP=(e=>new rN(e)),rN=class{constructor({flushMinDelay:e=IA,flushMaxDelay:t=wA,minReplayDuration:n=NA,maxReplayDuration:r=Af,stickySession:i=!0,useCompression:o=!0,workerUrl:s,_experiments:a={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:l=750,mutationLimit:d=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:_=[],networkCaptureBodies:y=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:N=[],maskAttributes:W=["title","placeholder","aria-label"],unmask:A=[],block:S=[],unblock:D=[],ignore:$=[],maskFn:E,beforeAddRecordingEvent:x,beforeErrorSampling:M,onError:C,attachRawBodyFromRequest:Y=!1}={}){this.name="Replay";const Z=QM({mask:N,unmask:A,block:S,unblock:D,ignore:$});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:E,maskInputFn:E,maskAttributeFn:(ee,oe,T)=>ZM({maskAttributes:W,maskAllText:c,privacyOptions:Z,key:ee,value:oe,el:T}),...Z,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ee=>{try{ee.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,xA),maxReplayDuration:Math.min(r,Af),stickySession:i,useCompression:o,workerUrl:s,blockAllMedia:f,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:l,mutationLimit:d,slowClickTimeout:p,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:_,networkCaptureBodies:y,networkRequestHeaders:Zf(v),networkResponseHeaders:Zf(b),beforeAddRecordingEvent:x,beforeErrorSampling:M,onError:C,attachRawBodyFromRequest:Y,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Jf}`:Jf,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Nn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Xf}set _isInitialized(e){Xf=e}afterAllSetup(e){!Nn()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&nN(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=iN(this._initialOptions,e);this._replay=new XM({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function iN(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=Cn(n.replaysSessionSampleRate),o=Cn(n.replaysOnErrorSampleRate);return i==null&&o==null&&Bt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function Zf(e){return[...eN,...e.map(t=>t.toLowerCase())]}function mP(){return R()?.getIntegrationByName("Replay")}var oN=Object.defineProperty,sN=(e,t,n)=>t in e?oN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ed=(e,t,n)=>sN(e,typeof t!="symbol"?t+"":t,n),aN=class{constructor(){ed(this,"idNodeMap",new Map),ed(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function cN(){return new aN}function uN(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function hc(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:hc(e.parentNode,t,n,r+1)}function td(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(uN(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var er=`Please stop import mirror directly. Instead of that,\r
498
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
499
+ or you can use record.mirror to access the mirror instance during recording.`,nd={map:{},getId(){return console.error(er),-1},getNode(){return console.error(er),null},removeNodeFromMap(){console.error(er)},has(){return console.error(er),!1},reset(){console.error(er)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(nd=new Proxy(nd,{get(e,t,n){return t==="map"&&console.error(er),Reflect.get(e,t,n)}}));function Mu(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_g(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Mu(e,t,o||{},!0)}function Nu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function lN(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function qs(e,t,n,r,i){if(!e)return!1;const o=lN(e);if(!o)return!1;const s=td(t,n);if(!i){const u=r&&o.matches(r);return s(o)&&!u}const a=hc(o,s);let c=-1;return a<0?!1:(r&&(c=hc(o,td(null,r))),a>-1&&c<0?!0:a<c)}var rd={};function gg(e){const t=rd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return rd[e]=r.bind(window)}function _n(...e){return gg("requestAnimationFrame")(...e)}function _g(...e){return gg("setTimeout")(...e)}var wr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(wr||{}),Ro;function fN(e){Ro=e}var Ia=e=>Ro?(...n)=>{try{return e(...n)}catch(r){if(Ro&&Ro(r)===!0)return()=>{};throw r}}:e,sr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ao=0;ao<sr.length;ao++)dN[sr.charCodeAt(ao)]=ao;var pN=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=sr[t[n]>>2],i+=sr[(t[n]&3)<<4|t[n+1]>>4],i+=sr[(t[n+1]&15)<<2|t[n+2]>>6],i+=sr[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},id=new Map;function hN(e,t){let n=id.get(e);return n||(n=new Map,id.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var yg=(e,t,n)=>{if(!e||!(Sg(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=hN(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function ko(e,t,n){if(e instanceof Array)return e.map(r=>ko(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)return{rr_type:e.constructor.name,base64:pN(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ko(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ko(e.data,t,n),e.width,e.height]};if(Sg(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:yg(e,t,n)}}return e}var vg=(e,t,n)=>e.map(r=>ko(r,t,n)),Sg=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]);function mN(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Nu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...f){return qs(this.canvas,n,r,i,!0)||_g(()=>{const l=vg(f,t,this);e(this.canvas,{type:wr["2D"],property:a,args:l})},0),u.apply(this,f)}});o.push(c)}catch{const c=Mu(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:wr["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function gN(e){return e==="experimental-webgl"?"webgl":e}function od(e,t,n,r,i){const o=[];try{const s=Nu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!qs(this,t,n,r,!0)){const f=gN(c);if("__context"in this||(this.__context=f),i&&["webgl","webgl2"].includes(f))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])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function sd(e,t,n,r,i,o,s,a){const c=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Nu(e,f,function(d){return function(...p){const h=d.apply(this,p);if(yg(h,a,this),"tagName"in this.canvas&&!qs(this.canvas,r,i,o,!0)){const m=vg(p,a,this),_={type:t,property:f,args:m};n(this.canvas,_)}return h}});c.push(l)}catch{const l=Mu(e,f,{set(d){n(this.canvas,{type:t,property:f,args:[d],setter:!0})}});c.push(l)}return c}function _N(e,t,n,r,i,o){const s=[];return s.push(...sd(t.WebGLRenderingContext.prototype,wr.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...sd(t.WebGL2RenderingContext.prototype,wr.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}var yN='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 vN(){const e=new Blob([yN]);return URL.createObjectURL(e)}var SN=class{constructor(e){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=(s,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(s)||this.pendingCanvasMutations.set(s,[]),this.pendingCanvasMutations.get(s).push(a)};const{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:i,errorHandler:o}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,o&&fN(o),(i&&typeof n=="number"||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&Ia(()=>{i&&n==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}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(e){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:o,enableManualSnapshot:s}=this.options;if(!this.windowsSet.has(e)){if(s){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}Ia(()=>{if(o&&t==="all"&&this.initCanvasMutationObserver(e,n,r,i),o&&typeof t=="number"){const a=od(e,n,r,i,!0);this.restoreHandlers.push(()=>{a()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(t?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}_n(n=>this.takeSnapshot(n,!0,e))}initFPSWorker(){const e=new Worker(vN());return e.onmessage=t=>{const n=t.data,{id:r}=n;if(this.snapshotInProgressMap.set(r,!1),!("base64"in n))return;const{base64:i,type:o,width:s,height:a}=n;this.mutationCb({id:r,type:wr["2D"],commands:[{property:"clearRect",args:[0,0,s,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:o}]},0,0,s,a]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;const t=n=>{this.takeSnapshot(n,!1),e=_n(t)};e=_n(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){const i=od(e,t,n,r,!1),o=mN(this.processMutation.bind(this),e,t,n,r),s=_N(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),o(),s()})}getCanvasElements(e,t,n){const r=[],i=o=>{o.querySelectorAll("canvas").forEach(s=>{qs(s,e,t,n,!0)||r.push(s)})};for(const o of this.windows){const s=o.deref();let a;try{a=s&&s.document}catch{}a&&i(a)}for(const o of this.shadowDoms){const s=o.deref();s&&i(s)}return r}takeSnapshot(e,t,n){const{sampling:r,blockClass:i,blockSelector:o,unblockSelector:s,dataURLOptions:a,maxCanvasSize:c}=this.options,u=1e3/(r==="all"?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<u?!1:(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,o,s)).forEach(f=>{const l=this.mirror.getId(f);if(!(!this.mirror.hasNode(f)||!f.width||!f.height||this.snapshotInProgressMap.get(l))){if(this.snapshotInProgressMap.set(l,!0),!t&&["webgl","webgl2"].includes(f.__context)){const d=f.getContext(f.__context);d?.getContextAttributes()?.preserveDrawingBuffer===!1&&d.clear(d.COLOR_BUFFER_BIT)}createImageBitmap(f).then(d=>{this.worker?.postMessage({id:l,bitmap:d,width:f.width,height:f.height,dataURLOptions:a,maxCanvasSize:c},[d])}).catch(d=>{Ia(()=>{throw this.snapshotInProgressMap.delete(l),d})()})}}),!0)}startPendingCanvasMutationFlusher(){_n(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,_n(e)};_n(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),_n(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;const r=n.map(o=>{const{type:s,...a}=o;return a}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};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)}cN();var ad;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ad||(ad={}));var cd={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}}},bN="ReplayCanvas",co=1280,EN=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,co):co,n?Math.min(n,co):co]};let i,o;const s=new Promise(a=>o=a);return{name:bN,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:f=>{const l=new SN({...f,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return i=l,o(l),l},...cd[a]||cd.medium}},async snapshot(a,c){(i||await s).snapshot(a,c)}}}),gP=EN;function TN(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function bg(e){try{return new URL(e,k.location.origin).href}catch{return}}function IN(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Eg(e){try{return new Headers(e)}catch{return}}var ud=new WeakMap,wa=new Map,Tg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function wN(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...Tg,...t},f=typeof o=="function"?o:h=>!0,l=h=>kN(h,a),d={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(m=>{if(m.op==="http.client"){const _=wa.get(m.span_id);_&&(m.timestamp=_/1e3,wa.delete(m.span_id))}}),h)),i&&EI(h=>{if(h.response){const m=ud.get(h.response);m&&h.endTimestamp&&wa.set(m,h.endTimestamp)}}),Zc(h=>{const m=iE(h,f,l,d,{propagateTraceparent:p,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&ud.set(h.response,h.fetchData.__span),m){const _=bg(h.fetchData.url),y=_?Yt(_).host:void 0;m.setAttributes({"http.url":_?Kt(_):void 0,"server.address":y}),s&&ld(m,e),c?.(m,{headers:h.headers})}})),r&&pu(h=>{const m=AN(h,f,l,d,p,u);m&&(s&&ld(m,e),c?.(m,{headers:Eg(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}var RN=300;function ld(e,t){const{url:n}=L(e).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(i)};if(ft(t)){const o=e.end.bind(e);e.end=s=>{const a=s??de();let c=!1;const u=()=>{c||(c=!0,setTimeout(i),o(a),clearTimeout(f))};r=u;const f=setTimeout(u,RN)}}const i=Fn("resource",({entries:o})=>{o.forEach(s=>{IN(s)&&s.name.endsWith(n)&&(e.setAttributes(hm(s)),r())})})}function kN(e,t){const n=Bn();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?ct(r.toString(),t)||o&&ct(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?ct(e,t):r}}function AN(e,t,n,r,i,o){const s=e.xhr,a=s?.[kt];if(!s||s.__sentry_own_request__||!a)return;const{url:c,method:u}=a,f=Qe()&&t(c);if(e.endTimestamp){const y=s.__sentry_xhr_span_id__;if(!y)return;const v=r[y];v&&(f&&a.status_code!==void 0&&(Oo(v,a.status_code),v.end(),o?.(v,{headers:Eg(_m(s)),error:e.error})),delete r[y]);return}const l=bg(c),d=Yt(l||c),p=Kt(Bo(c)),h=R(),m=!!Se()||!!h&&ft(h),_=f&&m?Ze({name:`${u} ${p}`,attributes:{url:Kt(c),type:"xhr","http.method":u,"http.url":l?Kt(l):void 0,"server.address":d?.host,[q]:"auto.http.browser",[ie]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new ze;return f&&!m&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=_.spanContext().spanId,r[s.__sentry_xhr_span_id__]=_,n(c)&&CN(s,Qe()&&m?_:void 0,i),h&&h.emit("beforeOutgoingRequestSpan",_,e),_}function CN(e,t,n){const{"sentry-trace":r,baggage:i,traceparent:o}=th({span:t,propagateTraceparent:n});r&&MN(e,r,i,o)}function MN(e,t,n,r){const i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!i?.traceparent&&e.setRequestHeader("traceparent",r),n){const o=i?.baggage;(!o||!TN(o))&&e.setRequestHeader("baggage",n)}}catch{}}function NN(){k.document?k.document.addEventListener("visibilitychange",()=>{const e=Se();if(!e)return;const t=ye(e);if(k.document.hidden&&t){const n="cancelled",{op:r,status:i}=L(t);I&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):I&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var Ig="sentry_previous_trace",xN="sentry.previous_trace";function ON(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?DN():void 0;e.on("spanStart",s=>{if(ye(s)!==s)return;const a=j().getPropagationContext();i=PN(i,s,a),r&&LN(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=j(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(mc(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=mc(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[J_]:i.sampleRate}})}function PN(e,t,n){const r=L(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.["sentry.sample_rate"])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(I&&g.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[ay]:"previous_trace"}}),t.setAttribute(xN,`${s.traceId}-${s.spanId}-${mc(s)?1:0}`)),o)}function LN(e){try{k.sessionStorage.setItem(Ig,JSON.stringify(e))}catch(t){I&&g.warn("Could not store previous trace in sessionStorage",t)}}function DN(){try{const e=k.sessionStorage?.getItem(Ig);return JSON.parse(e)}catch{return}}function mc(e){return e.traceFlags===1}var $N="BrowserTracing",FN=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function BN(){const e=k.navigator;return e?.userAgent?FN.test(e.userAgent):!1}var UN={...po,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Tg},$i=((e={})=>{"enableElementTiming"in e&&Bt(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=k.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:f,finalTimeout:l,childSpanTimeout:d,markBackgroundSpan:p,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:y,enableHTTPTimings:v,ignoreResourceSpans:b,ignorePerformanceApiSpans:N,instrumentPageLoad:W,instrumentNavigation:A,detectRedirects:S,linkPreviousTrace:D,consistentTraceSampling:$,enableReportPageLoaded:E,onRequestSpanStart:x,onRequestSpanEnd:M}={...UN,...e},C=BN();let Y,Z,ee;function oe(T,H,P=!0){const K=H.op==="pageload",te=H.name,re=u?u(H):H,Ae=re.attributes||{};if(te!==re.name&&(Ae[ce]="custom",re.attributes=Ae),!P){const it=Un();Ze({...re,startTime:it}).end(it);return}t.name=re.name,t.source=Ae[ce];const Be=Mp(re,{idleTimeout:f,finalTimeout:l,childSpanTimeout:d,disableAutoFinish:K,beforeSpanEnd:it=>{Y?.();const Et=ft(T);Xw(it,{recordClsOnPageloadSpan:!Et&&!a,recordLcpOnPageloadSpan:!Et&&!c,ignoreResourceSpans:b,ignorePerformanceApiSpans:N,spanStreamingEnabled:Et}),pd(T,void 0);const dn=j(),Tt=dn.getPropagationContext();dn.setPropagationContext({...Tt,traceId:Be.spanContext().traceId,sampled:Ut(Be),dsc:qe(it)}),K&&(ee=void 0)},trimIdleSpanEndTimestamp:!E});K&&E&&(ee=Be),pd(T,Be);function Ve(){n&&["interactive","complete"].includes(n.readyState)&&T.emit("idleSpanEnableAutoFinish",Be)}K&&!E&&n&&(n.addEventListener("readystatechange",()=>{Ve()}),Ve())}return{name:$N,setup(T){if(C){I&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}Ay();const H=ft(T);if(Y=zw({recordClsStandaloneSpans:H?void 0:a||!1,recordLcpStandaloneSpans:H?void 0:c||!1,client:T}),H?(gR(T),yR(T),r&&SR()):r&&fR(),o&&F.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Gw():i&&qw(),s&&Vw(),S&&n){const K=()=>{Z=de()};addEventListener("click",K,{capture:!0}),addEventListener("keydown",K,{capture:!0,passive:!0})}function P(){const K=fi(T);K&&!L(K).timestamp&&(I&&g.log(`[Tracing] Finishing current active span with op: ${L(K).op}`),K.setAttribute(xo,"cancelled"),K.end())}T.on("startNavigationSpan",(K,te)=>{if(R()!==T)return;if(te?.isRedirect){I&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),oe(T,{op:"navigation.redirect",...K},!1);return}Z=void 0,P(),Ee().setPropagationContext({traceId:_t(),sampleRand:Math.random(),propagationSpanId:Qe()?void 0:Ct()});const re=j();re.setPropagationContext({traceId:_t(),sampleRand:Math.random(),propagationSpanId:Qe()?void 0:Ct()}),re.setSDKProcessingMetadata({normalizedRequest:void 0}),oe(T,{op:"navigation",...K,parentSpan:null,forceTransaction:!0})}),T.on("startPageLoadSpan",(K,te={})=>{if(R()!==T)return;P();const re=te.sentryTrace||fd("sentry-trace")||dd("sentry-trace"),Ae=te.baggage||fd("baggage")||dd("baggage"),Be=up(re,Ae),Ve=j();Ve.setPropagationContext(Be),Qe()||(Ve.getPropagationContext().propagationSpanId=Ct()),Ve.setSDKProcessingMetadata({normalizedRequest:Ko()}),oe(T,{op:"pageload",...K})}),T.on("endPageloadSpan",()=>{E&&ee&&(ee.setAttribute(xo,"reportPageLoaded"),ee.end())})},afterAllSetup(T){if(C)return;let H=Bn();if(D!=="off"&&ON(T,{linkPreviousTrace:D,consistentTraceSampling:$}),k.location){if(W){const P=Ie();Fi(T,{name:k.location.pathname,startTime:P?P/1e3:void 0,attributes:{[ce]:"url",[q]:"auto.pageload.browser"}})}A&&Ls(({to:P,from:K})=>{if(K===void 0&&H?.indexOf(P)!==-1){H=void 0;return}H=void 0;const te=Lc(P),re=fi(T),Ae=re&&S&&WN(re,Z);Bi(T,{name:te?.pathname||k.location.pathname,attributes:{[ce]:"url",[q]:"auto.navigation.browser"}},{url:P,isRedirect:Ae})})}p&&NN(),s&&HN(T,f,l,d,t),r&&mR(),wN(T,{traceFetch:h,traceXHR:m,trackFetchStreamPerformance:_,tracePropagationTargets:T.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:v,onRequestSpanStart:x,onRequestSpanEnd:M})}}});function Fi(e,t,n){e.emit("startPageLoadSpan",t,n),j().setTransactionName(t.name);const r=fi(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Bi(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=j();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...Ko(),url:r}}),fi(e)}function fd(e){return k.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function dd(e){return k.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(t=>t.name===e)?.description}function HN(e,t,n,r,i){const o=k.document;let s;const a=()=>{const c="ui.action.click",u=fi(e);if(u){const f=L(u).op;if(["navigation","pageload"].includes(f)){I&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(xo,"interactionInterrupted"),s.end(),s=void 0),!i.name){I&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=Mp({name:i.name,op:c,attributes:{[ce]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}var wg="_sentry_idleSpan";function fi(e){return e[wg]}function pd(e,t){ve(e,wg,t)}var hd=1.5;function WN(e,t){const n=L(e),r=Un();return!(r-n.start_timestamp>hd||t&&r-t<=hd)}function _P(e=R()){e?.emit("endPageloadSpan")}function yP(e){const t=Se();if(t===e)return;const n=j();e.end=new Proxy(e.end,{apply(r,i,o){return yt(n,t),Reflect.apply(r,i,o)}}),yt(n,e)}var vP=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(I&&g.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!ft(e)){r.traceLifecycle="static",I&&g.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const i=r.beforeSendSpan;if(i&&!ms(i)){r.traceLifecycle="static",I&&g.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const o=new yI(e);e.on("afterSpanEnd",s=>{Ut(s)&&o.add(Iv(s,e))}),e.on("afterSegmentSpanEnd",s=>{const a=s.spanContext().traceId;setTimeout(()=>{o.flush(a)},500)})}});function Rr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function jN(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Rr(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function xu(e){return Rr(e.getAllKeys())}function zN(e,t,n){return e(r=>xu(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Rr(r.transaction)}))}function qN(e,t,n){return e(r=>xu(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Rr(r.transaction)}))}function GN(e){return e(t=>xu(t).then(n=>{const r=n[0];if(r!=null)return Rr(t.get(r)).then(i=>(t.delete(r),Rr(t.transaction).then(()=>i)))}))}function VN(e){let t;function n(){return t==null&&(t=jN(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=Fo(r);await zN(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=Fo(r);await qN(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await GN(n());if(r)return qy(r)}catch{}}}}function YN(e){return t=>{const n=e({...t,createStore:VN});return k.addEventListener("online",async r=>{await n.flush()}),n}}function SP(e=ym){return YN(xS(e))}var md=1e6,KN="window"in F&&F.window===F&&typeof importScripts>"u",Qt=String(0),ls=KN?"main":"worker",fs=k.navigator,Rg="",kg="",Ag="",gc=fs?.userAgent||"",Cg="",JN=fs?.language||fs?.languages?.[0]||"";function XN(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var gd=fs?.userAgentData;XN(gd)&&gd.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Rg=e.platform||"",Ag=e.architecture||"",Cg=e.model||"",kg=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];gc=`${t.brand} ${t.version}`}}).catch(e=>{});function QN(e){return!("thread_metadata"in e)}function ZN(e){return QN(e)?ox(e):e}function ex(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&I&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function tx(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 i=ex(r),o=ZN(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:de()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:de()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||"production",runtime:{name:"javascript",version:k.navigator.userAgent},os:{name:Rg,version:kg,build_number:gc},device:{locale:JN,model:Cg,manufacturer:gc,architecture:Ag,is_emulator:!1},debug_meta:{images:Ng(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||we(),trace_id:i,active_thread_id:Qt,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function nx(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=ix(e),i=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:we(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||we(),platform:"javascript",version:"2",release:i.release??"",environment:i.environment??"production",debug_meta:{images:Ng(e.resources)},profile:r}}function rx(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 ix(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 f=c;for(;f;)u.push(f.frameId),f=f.parentId===void 0?void 0:e.stacks[f.parentId];n[a]=u}const r=Ie(),i=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=i-(r||i),s=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(i+(c.timestamp-o))/1e3;s[a]={stack_id:c.stackId??0,thread_id:Qt,timestamp:u}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Qt]:{name:ls}}}}function Mg(e){return L(e).op==="pageload"}function ox(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Qt]:{name:ls}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=Ie(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,f)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((u.timestamp+c-o)*md).toFixed(0),stack_id:t,thread_id:Qt};return}let l=e.stacks[u.stackId];const d=[];for(;l;){d.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 p={elapsed_since_start_ns:((u.timestamp+c-o)*md).toFixed(0),stack_id:n,thread_id:Qt};r.stacks[n]=d,r.samples[f]=p,n++}),r}function sx(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function ax(e){const t=[];return Mn(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function Ng(e){const t=R()?.getOptions()?.stackParser;return t?xv(t,e):[]}function xg(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(I&&g.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?(I&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cx(e){return e.samples.length<2?(I&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(I&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}var Ou=!1,Og=3e4;function ux(e){return typeof e=="function"}function Pg(){const e=k.Profiler;if(!ux(e)){I&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Og/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{I&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),Ou=!0}}function _d(e){if(Ou)return I&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return I&&g.log("[Profiling] Discarding profile because root span was not sampled."),!1;const t=R()?.getOptions();if(!t)return I&&g.log("[Profiling] Profiling disabled, no options found."),!1;const n=t.profilesSampleRate;return xg(n)?n?n===!0||Math.random()<n?!0:(I&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(n)})`),!1):(I&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(I&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function lx(e){if(Ou)return I&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return I&&g.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return xg(t)?t?Math.random()<=t:(I&&g.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(I&&g.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function uo(e){return typeof e.profilesSampleRate<"u"}function fx(e,t,n,r){return cx(n)?tx(e,t,n,r):null}var Tn=new Map;function dx(){return Tn.size}function px(e){const t=Tn.get(e);return t&&Tn.delete(e),t}function hx(e,t){if(Tn.set(e,t),Tn.size>30){const n=Tn.keys().next().value;n!==void 0&&Tn.delete(n)}}function mx(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace={...e.contexts.trace,data:{...e.contexts.trace.data??{},"thread.id":Qt,"thread.name":ls}}),e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Qt,"thread.name":ls}})),e}function yd(e){let t;Mg(e)&&(t=de()*1e3);const n=Pg();if(!n)return;I&&g.log(`[Profiling] started profiling span: ${L(e).description}`);const r=we();let i=null;j().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n){if(i){I&&g.log("[Profiling] profile for:",L(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(s&&(k.clearTimeout(s),s=void 0),I&&g.log(`[Profiling] stopped profiling of span: ${L(e).description}`),!u){I&&g.log(`[Profiling] profiler returned null profile for: ${L(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=u,hx(r,u)}).catch(u=>{I&&g.log("[Profiling] error while stopping profiler:",u)})}}let s=k.setTimeout(()=>{I&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",L(e).description),o()},Og);const a=e.end.bind(e);function c(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=c}var gx=6e4,_x=3e5,yx=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){const t=e.getOptions().profileLifecycle,n=lx(e.getOptions());I&&g.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||I&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=we(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t==="trace"&&this._setupTraceLifecycleListeners(e)}start(){if(this._lifecycleMode==="trace"){I&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){I&&g.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){I&&g.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){I&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){I&&g.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);const n=this._activeRootSpanIds.size;n===1&&(I&&g.log("[Profiling] Detected already active root span during setup. Active root spans now:",n),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,I&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),ar().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){I&&g.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{I&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode==="manual"&&ar().setContext("profile",{}))}_setupTraceLifecycleListeners(e){e.on("spanStart",t=>{if(!this._sessionSampled){I&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(t!==ye(t))return;if(!t.isRecording()){I&&g.log("[Profiling] Discarding profile because root span was not sampled.");return}const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(I&&g.log(`[Profiling] Root span ${n} started. Profiling active while there are active root spans (count=${r}).`),this._beginProfiling())}),e.on("spanEnd",t=>{if(!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||!this._activeRootSpanIds.has(n))return;this._activeRootSpanIds.delete(n);const r=this._activeRootSpanIds.size;I&&g.log(`[Profiling] Root span with ID ${n} ended. Will continue profiling for as long as there are active root spans (currently: ${r}).`),r===0&&(this._collectCurrentChunk().catch(i=>{I&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,ar().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);const t=setTimeout(()=>this._onRootSpanTimeout(e),_x);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const e=Pg();if(!e){I&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=e}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{I&&g.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},gx))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(I&&g.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const e=this._profiler;if(this._profiler=void 0,!!e)try{const t=await e.stop(),n=nx(t,this._client,this._profilerId),r=rx(n);if("reason"in r){I&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",r.reason);return}this._sendProfileChunk(n),I&&g.log("[Profiling] Collected browser profile chunk.")}catch(t){I&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",t)}}_sendProfileChunk(e){const t=this._client,n=yi(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,o=rt({event_id:we(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:bt(r)}},[[{type:"profile_chunk",platform:"javascript"},e]]);t.sendEnvelope(o).then(null,s=>{I&&g.error("Error while sending profile chunk envelope:",s)})}},vx="BrowserProfiling",Sx=(()=>({name:vx,setup(e){const t=e.getOptions(),n=new yx;if(!uo(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),uo(t)&&!t.profilesSampleRate){I&&g.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Se(),i=r&&ye(r);if(uo(t)&&t.profileSessionSampleRate!==void 0&&I&&g.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),uo(t))i&&Mg(i)&&_d(i)&&yd(i),e.on("spanStart",o=>{o===ye(o)&&_d(o)&&yd(o)}),e.on("beforeEnvelope",o=>{if(!dx())return;const s=ax(o);if(!s.length)return;const a=[];for(const c of s){const u=c?.contexts,f=u?.profile?.profile_id,l=u?.profile?.start_timestamp;if(typeof f!="string"){I&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!f){I&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;const d=px(f);if(!d){I&&g.log(`[Profiling] Could not retrieve profile for span: ${f}`);continue}const p=fx(f,l,d,c);p&&a.push(p)}sx(o,a)});else{const o=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),o==="manual")n.initialize(e);else if(o==="trace"){if(!Qe(t)){I&&g.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),k.setTimeout(()=>{const s=Se(),a=s&&ye(s);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return mx(e)}})),bP=Sx,EP=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Mr(e)}});function TP(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{xn(e,t.value),On(e,t.value)}}}var IP=()=>({name:"OpenFeature",processEvent(e,t,n){return Mr(e)}}),wP=class{after(e,t){xn(t.flagKey,t.value),On(t.flagKey,t.value)}error(e,t,n){xn(e.flagKey,e.defaultValue),On(e.flagKey,e.defaultValue)}},RP=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;xe(t,"isEnabled",bx)},processEvent(t,n,r){return Mr(t)}});function bx(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(xn(n,r),On(n,r)):I&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var kP=(({growthbookClass:e})=>eE({growthbookClass:e})),AP=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{xn(n.gate.name,n.gate.value),On(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Mr(t)}});async function CP(){const e=R();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const t=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await sv(()=>fetch(t,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}var Ex="WebWorker",MP=({worker:e})=>({name:Ex,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>vd(t))},addWorker:t=>vd(t)});function vd(e){e.addEventListener("message",t=>{if(Ix(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(I&&g.log("Sentry debugId web worker message received",t.data),k._sentryDebugIds={...t.data._sentryDebugIds,...k._sentryDebugIds}),t.data._sentryModuleMetadata&&(I&&g.log("Sentry module metadata web worker message received",t.data),k._sentryModuleMetadata={...t.data._sentryModuleMetadata,...k._sentryModuleMetadata}),t.data._sentryWasmImages){I&&g.log("Sentry WASM images web worker message received",t.data);const n=k._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(i=>Fe(i)&&typeof i.code_file=="string"&&!n.some(o=>o.code_file===i.code_file));k._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(I&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),Tx(t.data._sentryWorkerError))}})}function Tx(e){const t=R();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,o=Ot(i)?bm(i):As(n,i,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),bi(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),I&&g.log("Captured worker unhandled rejection",i)}function NP({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const n={reason:Sm(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n}),I&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",n)}),I&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function Ix(e){if(!Fe(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(Fe(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Fe(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Fe(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(o=>Fe(o)&&typeof o.code_file=="string")))}var Me=a_(c_());function xP(e){const t={...e};return eh(t,"react"),Pp("react",{version:Me.version}),Kk(t)}function wx(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Rx(e,t){const n=new WeakSet;function r(i,o){if(!n.has(i)){if(i.cause)return n.add(i),r(i.cause,o);i.cause=o}}r(e,t)}function Lg(e,{componentStack:t},n){if(wx(Me.version)&&gt(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,Rx(e,r)}return Ge(r=>(r.setContext("react",{componentStack:t}),me(e,n)))}function OP(e){return(t,n)=>{const r=!!e,i=Lg(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,i)}}var Dg="ui.react.render",kx="ui.react.update",$g="ui.react.mount",Ax={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Cx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Mx={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Nx=Symbol.for("react.forward_ref"),Bg=Symbol.for("react.memo");function xx(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bg}var Pu={};Pu[Nx]=Mx;Pu[Bg]=Fg;function Sd(e){if(xx(e))return Fg;const t=e.$$typeof;return t&&Pu[t]||Ax}var Ox=Object.defineProperty.bind(Object),Px=Object.getOwnPropertyNames.bind(Object),bd=Object.getOwnPropertySymbols?.bind(Object),Ed=Object.getOwnPropertyDescriptor.bind(Object),Lx=Object.getPrototypeOf.bind(Object),Td=Object.prototype;function Ui(e,t,n){if(typeof t!="string"){if(Td){const s=Lx(t);s&&s!==Td&&Ui(e,s)}let r=Px(t);bd&&(r=r.concat(bd(t)));const i=Sd(e),o=Sd(t);for(const s of r)if(!Cx[s]&&!o?.[s]&&!i?.[s]&&!Ed(e,s)){const a=Ed(t,s);if(a)try{Ox(e,s,a)}catch{}}}return e}var Ug=class extends Me.Component{constructor(e){super(e);const{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=Ze({name:`<${t}>`,onlyIfParent:!0,op:$g,attributes:{[q]:"auto.ui.react.profiler","ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){const n=Object.keys(e).filter(r=>e[r]!==this.props.updateProps[r]);if(n.length>0){const r=de();this._updateSpan=gr(this._mountSpan,()=>Ze({name:`<${this.props.name}>`,onlyIfParent:!0,op:kx,startTime:r,attributes:{[q]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":n}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=de(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const r=L(this._mountSpan).timestamp;gr(this._mountSpan,()=>{const i=Ze({onlyIfParent:!0,name:`<${t}>`,op:Dg,startTime:r,attributes:{[q]:"auto.ui.react.profiler","ui.component_name":t}});i&&i.end(e)})}}render(){return this.props.children}};Object.assign(Ug,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function PP(e,t){const n=t?.name||e.displayName||e.name||"unknown",r=i=>Me.createElement(Ug,{...t,name:n,updateProps:i},Me.createElement(e,{...i}));return r.displayName=`profiler(${n})`,Ui(r,e),r}function LP(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=Me.useState(()=>{if(!t?.disabled)return Ze({name:`<${e}>`,onlyIfParent:!0,op:$g,attributes:{[q]:"auto.ui.react.profiler","ui.component_name":e}})});Me.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=L(n).timestamp,i=de(),o=Ze({name:`<${e}>`,onlyIfParent:!0,op:Dg,startTime:r,attributes:{[q]:"auto.ui.react.profiler","ui.component_name":e}});o&&o.end(i)}}),[])}var Re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ra={componentStack:null,error:null,eventId:null},Dx=class extends Me.Component{constructor(e){super(e),this.state=Ra,this._openFallbackReportDialog=!0;const t=R();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&If({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){const{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:o,dialogOptions:s}=this.props;Ge(a=>{r&&r(a,e,n);const c=this.props.handled!=null?this.props.handled:!!this.props.fallback,u=Lg(e,t,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(e,n,u),o&&(this._lastEventId=u,this._openFallbackReportDialog&&If({...s,eventId:u})),this.setState({error:e,componentStack:n,eventId:u})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===Ra?r(null,null,null):r(e,t,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(Ra)}render(){const{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t=="function"?t():t;const r=typeof e=="function"?Me.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return Me.isValidElement(r)?r:(e&&Re&&g.warn("fallback did not produce a valid ReactElement"),null)}};function DP(e,t){const n=e.displayName||e.name||"unknown",r=Me.memo(i=>Me.createElement(Dx,{...t},Me.createElement(e,{...i})));return r.displayName=`errorBoundary(${n})`,Ui(r,e),r}var $x="redux.action",Fx="info",Bx={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function $P(e){const t={...Bx,...e};return n=>(r,i)=>{t.attachReduxState&&ar().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 o(a){return(c,u)=>{const f=a(c,u),l=j(),d=t.actionTransformer(u);typeof d<"u"&&d!==null&&vt({category:$x,data:d,type:Fx});const p=t.stateTransformer(f);if(typeof p<"u"&&p!==null){const m=R()?.getOptions()?.normalizeDepth||3,_={state:{type:"redux",value:p}};Py(_,3+m),l.setContext("state",_)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,f),f}}const s=n(o(r),i);return s.replaceReducer=new Proxy(s.replaceReducer,{apply:function(a,c,u){a.apply(c,[o(u[0])])}}),s}}function FP(e){const t=$i({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:i,instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),o&&k.location&&Id(r,k.location,i,(c,u="url")=>{Fi(a,{name:c,attributes:{[ie]:"pageload",[q]:"auto.pageload.react.reactrouter_v3",[ce]:u}})}),s&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&Id(r,c,i,(u,f="url")=>{Bi(a,{name:u,attributes:{[ie]:"navigation",[q]:"auto.navigation.react.reactrouter_v3",[ce]:f}})})})}}}function Id(e,t,n,r){let i=t.pathname;n({location:t,routes:e},(o,s,a)=>{if(o||!a)return r(i);const c=Ux(a.routes||[]);return c.length===0||c==="/*"?r(i):(i=c,r(i,"route"))})}function Ux(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:i})=>`${r}${r==="/"||r===""?i:`/${i}`}`,"")}function BP(e,t={}){const n=e,r=$i({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:i=!0,instrumentNavigation:o=!0}=t;return{...r,afterAllSetup(s){r.afterAllSetup(s);const a=k.location;if(i&&a){const c=n.matchRoutes(a.pathname,n.options.parseSearch(a.search),{preload:!1,throwOnError:!1}),u=c[c.length-1],f=u?.routeId!=="__root__"?u:void 0;Fi(s,{name:f?f.routeId:a.pathname,attributes:{[ie]:"pageload",[q]:"auto.pageload.react.tanstack_router",[ce]:f?"route":"url",...wd(f)}})}o&&n.subscribe("onBeforeNavigate",c=>{if(!c.fromLocation||c.toLocation.state===c.fromLocation.state)return;const u=n.matchRoutes(c.toLocation.pathname,c.toLocation.search,{preload:!1,throwOnError:!1}),f=u[u.length-1],l=f?.routeId!=="__root__"?f:void 0,d=k.location,p=Bi(s,{name:l?l.routeId:d.pathname,attributes:{[ie]:"navigation",[q]:"auto.navigation.react.tanstack_router",[ce]:l?"route":"url"}}),h=n.subscribe("onResolved",m=>{if(h(),p){const _=n.matchRoutes(m.toLocation.pathname,m.toLocation.search,{preload:!1,throwOnError:!1}),y=_[_.length-1],v=y?.routeId!=="__root__"?y:void 0;v&&(p.updateName(v.routeId),p.setAttribute(ce,"route"),p.setAttributes(wd(v)))}})})}}}function wd(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 UP(e){const t=$i({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),Hg(a,o,s,n,"reactrouter_v4",r,i)}}}function HP(e){const t=$i({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),Hg(a,o,s,n,"reactrouter_v5",r,i)}}}function Hg(e,t,n,r,i,o=[],s){function a(){if(r.location)return r.location.pathname;if(k.location)return k.location.pathname}function c(u){if(o.length===0||!s)return[u,"url"];const f=Wg(o,u,s);for(const l of f)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[f,l]=c(u);Fi(e,{name:f,attributes:{[ie]:"pageload",[q]:`auto.pageload.react.${i}`,[ce]:l}})}}n&&r.listen&&r.listen((u,f)=>{if(f&&(f==="PUSH"||f==="POP")){const[l,d]=c(u.pathname);Bi(e,{name:l,attributes:{[ie]:"navigation",[q]:`auto.navigation.react.${i}`,[ce]:d}})}})}function Wg(e,t,n,r=[]){return e.some(i=>{const o=i.path?n(t,i):r.length?r[r.length-1].match:Hx(t);return o&&(r.push({route:i,match:o}),i.routes&&Wg(i.routes,t,n,r)),!!o}),r}function Hx(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function WP(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const i=r.computedMatch.path,o=Wx();j().setTransactionName(i),o&&(o.updateName(i),o.setAttribute(ce,"route"))}return Me.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,Ui(n,e),n}function Wx(){const e=Se(),t=e&&ye(e);if(!t)return;const n=L(t).op;return n==="navigation"||n==="pageload"?t:void 0}function Hi(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)||"/"}var Rd=new WeakMap;function jx(e,t,n){if(!e||!t?.length)return null;const r=n?Hi(e,n):e;let i=Rd.get(t);i||(i=Kx(t),Rd.set(t,i),Re&&g.log("[React Router] Sorted route manifest by specificity:",i.length,"patterns"));for(const o of i)if(zx(r,o))return Re&&g.log("[React Router] Matched pathname",r,"to pattern",o),o;return Re&&g.log("[React Router] No manifest match found for pathname:",r),null}function zx(e,t){if(t==="/")return e==="/"||e==="";const n=Ad(e),r=Ad(t);if(r.length>0&&r[r.length-1]==="*"){const i=r.slice(0,-1);if(n.length<i.length)return!1;for(const[o,s]of i.entries())if(!kd(n[o],s))return!1;return!0}if(n.length!==r.length)return!1;for(const[i,o]of r.entries())if(!kd(n[i],o))return!1;return!0}function kd(e,t){return e===void 0||t===void 0?!1:jg.test(t)?!0:e===t}function Ad(e){return e.split("/").filter(Boolean)}var jg=/^:[\w-]+$/,qx=10,Gx=3,Vx=1,Yx=-2;function Cd(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=Yx);for(const r of t)r!=="*"&&(jg.test(r)?n+=Gx:r===""?n+=Vx:n+=qx);return n}function Kx(e){return[...e].sort((t,n)=>{const r=Cd(t);return Cd(n)-r})}var Lu,kn=!1,Zt=[],Jx=10;function Xx(e,t){const n={};return Zt.length>=Jx&&(Re&&g.warn("[React Router] Navigation context stack overflow - removing oldest context"),Zt.shift()),Zt.push({token:n,targetPath:e,span:t}),n}function Qx(e){Zt[Zt.length-1]?.token===e&&Zt.pop()}function zg(){const e=Zt.length;return e>0?Zt[e-1]??null:null}function Zx(e,t=!1){Lu=e,kn=t}function eO(e){return nO(e.route.path||"")}function tO(e){return e.params["*"]||""}function nO(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function fr(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function qg(e){return e.endsWith("*")}function sn(e){return e.includes("/*")||e.endsWith("*")}function Md(e,t){return qg(e)&&!!t.route.children?.length||!1}function rO(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function iO(e,t,n){const r=e&&e.length>0?e:kn?Hi(t,n):t;let i=r.slice(-2)==="/*"?r.slice(0,-2):r;return i.length>1&&i[i.length-1]==="/"&&(i=i.slice(0,-1)),[i,"route"]}function Nd(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function ds(e){return e[0]==="/"?e:`/${e}`}function Gg(e,t){const n=Lu(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const i=eO(r),o=Hi(t.pathname,ds(r.pathnameBase));return t.pathname===o?fr(o):fr(fr(i||"")+ds(Gg(e.filter(s=>s!==r.route),{pathname:o})))}return""}function oO(e,t){const n=Lu(t,e);if(n){for(const r of n)if(rO(r.route)&&tO(r))return!0}return!1}function xd(e,t){return kn?Hi(e.pathname,t):e.pathname||""}function sO(e,t,n,r=""){if(!e||e.length===0)return[kn?Hi(t.pathname,r):t.pathname,"url"];if(!n)return[xd(t,r),"url"];let i="";for(const o of n){const s=o.route;if(!s)continue;if(s.index)return iO(i,o.pathname,r);const a=s.path;if(!a||Md(a,o))continue;const c=a[0]==="/"||i[i.length-1]==="/"?a:`/${a}`;if(i=fr(i)+ds(c),fr(t.pathname)===fr(r+o.pathname))return Nd(i)!==Nd(o.pathname)&&!qg(i)?[(kn?"":r)+c,"route"]:(Md(i,o)&&(i=i.slice(0,-1)),[(kn?"":r)+i,"route"])}return[xd(t,r),"url"]}function Gs(e,t,n,r,i="",o,s){if(s&&o&&o.length>0){const f=jx(e.pathname,o,i);if(f)return[(kn?"":i)+f,"route"]}let a,c="url";const u=oO(e,n);return u&&(a=ds(Gg(n,e)),c="route"),(!u||!a)&&([a,c]=sO(t,e,r,i)),[a||e.pathname,c]}function St(){const e=Se(),t=e?ye(e):void 0;if(!t)return;const n=L(t).op;return n==="navigation"||n==="pageload"?t:void 0}function aO(){const e=zg();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof k<"u")try{const t=k.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Re&&g.warn("[React Router] Could not access window.location")}return null}function cO(){const e=zg();return e?e.span:St()}function uO(e,t,n,r){const i=new Proxy(e,{apply(o,s,a){const c=aO(),u=cO(),f=o.apply(s,a);return lO(f,t,n,r,c,u),f}});return ve(i,"__sentry_proxied__",!0),i}function lO(e,t,n,r,i,o){un(e)?e.then(s=>{Array.isArray(s)&&r(s,t,i??void 0,o)}).catch(s=>{Re&&g.warn(`Error resolving async handler '${n}' for route`,t,s)}):Array.isArray(e)&&r(e,t,i??void 0,o)}function Vs(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]=uO(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)Vs(n,t)}var en,tn,nn,Ao,nt,fn=!1,In=3e3,Wi,Du="",Vg=new WeakSet,Sn=new WeakMap,Ce=new Set,Co=new WeakMap,_c=new WeakMap;function fO(e){return k?.requestAnimationFrame?k.requestAnimationFrame(e):setTimeout(e,0)}function Od(e){k?.cancelAnimationFrame?k.cancelAnimationFrame(e):clearTimeout(e)}function Yg(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function Pd(e){return e.includes(":")||e.includes("*")}function dO(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const i=!!e.routeName&&sn(e.routeName),o=sn(n),s=!!e.routeName&&Pd(e.routeName),a=Pd(n),c=i&&!o,u=!s&&a,f=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!o;return{skip:!0,shouldUpdate:!!(e.routeName&&(c||u||f))}}return{skip:!1,shouldUpdate:!1}}function Kg(e,t){const n=t.children||[],r=e.filter(i=>!n.some(o=>o===i||i.path&&o.path===i.path||i.id&&o.id===i.id));r.length>0&&(t.children=[...n,...r])}function Jg(e,t){let n=Co.get(e);n||(n=new Set,Co.set(e,n)),n.add(t),t.finally(()=>{const r=Co.get(e);r&&r.delete(t)})}function Xg(e){Jg(e,new Promise(t=>{_c.set(e,t)}))}function pO(e){const t=_c.get(e);t&&(t(),_c.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function $u(e,t,n=null,r){e.forEach(o=>{Ce.add(o),fn&&Vs(o,$u)}),t&&Kg(e,t);const i=r??St();if(i){const o=L(i);if(o.timestamp){Re&&g.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const s=o.op;let a=n;if(!a&&!r&&typeof k<"u"){const c=k.location;c?.pathname&&(a={pathname:c.pathname})}a&&(s==="pageload"?zi({activeRootSpan:i,location:{pathname:a.pathname},routes:Array.from(Ce),allRoutes:Array.from(Ce)}):s==="navigation"&&yc(i,a,Array.from(Ce),!1,nt))}}function yc(e,t,n,r=!1,i){const o=L(e),s=o.description,a=e?.__sentry_navigation_name_set__,c=s&&sn(s);if((!a||r||c)&&!o.timestamp){const u=i(n,t),[f,l]=Gs(t,n,n,u||[],Du,Wi,fn),d=o.data?.[ce];f&&(!s||!a&&(d!=="route"||l==="route")||d!=="route"&&l==="route"||d==="route"&&l==="route"&&c)&&(e.updateName(f),e.setAttribute(ce,l),!sn(f)&&l==="route"&&ve(e,"__sentry_navigation_name_set__",!0))}}function Qg(e,t,n,r,i){let o=!1,s=!!i&&L(i).op==="pageload",a=!1,c=null,u=null;e.subscribe(f=>{if(!o){const l=St();l&&L(l).op==="pageload"?s=!0:s&&(f.historyAction==="POP"&&!a?a=!0:o=!0)}if(f.historyAction==="PUSH"||f.historyAction==="POP"&&o){const l=Yg(f.location),d=()=>{u!==l&&(u=l,c=null,Fu({location:f.location,routes:t,navigationType:f.historyAction,version:n,basename:r,allRoutes:Array.from(Ce)}))};f.navigation.state!=="idle"?(u!==l&&(u=null),c!==null&&Od(c),c=fO(d)):(c!==null&&(Od(c),c=null),d())}})}function Zg(e,t){return!en||!tn||!nn||!nt?(Re&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(ji(n),fn)for(const a of n)Vs(a,$u);const i=St();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(ve(i,"__sentry_may_have_lazy_routes__",!0),Xg(i));const o=e(n,r_(r,!1,i)),s=r?.basename;return o.state.historyAction==="POP"&&i&&zi({activeRootSpan:i,location:o.state.location,routes:n,basename:s,allRoutes:Array.from(Ce)}),Du=s||"",Qg(o,n,t,s,i),o}}function e_(e,t){return!en||!tn||!nn||!nt?(Re&&g.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(ji(n),fn)for(const h of n)Vs(h,$u);const i=St();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(ve(i,"__sentry_may_have_lazy_routes__",!0),Xg(i));const o=e(n,r_(r,!0,i)),s=r?.basename;let a;const c=r?.initialEntries,u=r?.initialIndex,f=c?.length===1,l=u!==void 0&&c?.[u];a=f?c[0]:l?c[u]:void 0;const d=a?typeof a=="string"?{pathname:a}:a:o.state.location,p=St();return o.state.historyAction==="POP"&&p&&zi({activeRootSpan:p,location:d,routes:n,basename:s,allRoutes:Array.from(Ce)}),Du=s||"",Qg(o,n,t,s,p),o}}function t_(e,t){const n=$i({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:f=!0,instrumentNavigation:l=!0,lazyRouteTimeout:d,lazyRouteManifest:p}=e;return{...n,setup(h){n.setup(h);const m=e.finalTimeout??3e4,_=(e.idleTimeout??1e3)*3,y=d??_;y===1/0?(In=m,Re&&g.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",m,"ms to prevent indefinite hangs")):Number.isNaN(y)?(Re&&g.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",_),In=_):y<0?(Re&&g.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",y,"falling back to:",_),In=_):In=y,en=r,tn=i,nn=o,nt=a,Ao=s,fn=u,Wi=p,Zx(a,c||!1)},afterAllSetup(h){n.afterAllSetup(h);const m=k.location?.pathname;f&&m&&Fi(h,{name:m,attributes:{[ce]:"url",[ie]:"pageload",[q]:`auto.pageload.react.reactrouter_v${t}`}}),l&&Vg.add(h)}}}function n_(e,t){if(!en||!tn||!nn||!nt)return Re&&g.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const i=Me.useRef(!0),{routes:o,locationArg:s}=r,a=e(o,s),c=tn(),u=nn(),f=typeof s=="string"||s?.pathname?s:c;return en(()=>{const l=typeof f=="string"?{pathname:f}:f;i.current?(ji(o),zi({activeRootSpan:St(),location:l,routes:o,allRoutes:Array.from(Ce)}),i.current=!1):Fu({location:l,routes:o,navigationType:u,version:t,allRoutes:Array.from(Ce)})},[u,f]),a};return(r,i)=>Me.createElement(n,{routes:r,locationArg:i})}function r_(e,t=!1,n){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async i=>{const o=i?.path,s=St()??n;if(!t){const c=i?.patch,u=i?.matches;c&&(i.patch=(f,l)=>{if(ji(l),u&&u.length>0){const p=u[u.length-1]?.route;if(p){const h=Array.from(Ce).find(m=>{const _=m.id!==void 0&&m.id===f,y=m===p,v=m.path!==void 0&&p.path!==void 0&&m.path===p.path;return _||y||v});h&&Kg(l,h)}}const d=s?L(s):void 0;return o&&s&&d&&!d.timestamp&&d.op==="navigation"&&yc(s,{pathname:o,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!0,nt),c(f,l)})}const a=(async()=>{const c=Xx(o,s);let u;try{u=await r(i)}finally{Qx(c),s&&pO(s)}const f=s?L(s):void 0;if(s&&f&&!f.timestamp&&f.op==="navigation"){const l=o;l&&yc(s,{pathname:l,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!1,nt)}return u})();return s&&Jg(s,a),a}}}function Fu(e){const{location:t,routes:n,navigationType:r,version:i,matches:o,basename:s,allRoutes:a}=e,c=Array.isArray(o)?o:nt(a||n,t,s),u=R();if(!u||!Vg.has(u))return;const f=St();if(!(f&&L(f).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,d]=Gs(t,a||n,a||n,c,s,Wi,fn),p=Yg(t),h=Sn.get(u),{skip:m,shouldUpdate:_}=dO(h,p,l,h&&!h.isPlaceholder?!!L(h.span).timestamp:!1);if(m){if(_&&h){const b=h.routeName;h.isPlaceholder?(h.routeName=l,Re&&g.log(`[Tracing] Updated placeholder navigation name from "${b}" to "${l}" (will apply to real span)`)):(h.span.updateName(l),h.span.setAttribute(ce,d),ve(h.span,"__sentry_navigation_name_set__",!0),h.routeName=l,Re&&g.log(`[Tracing] Updated navigation span name from "${b}" to "${l}"`))}else Re&&g.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const y={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:p,isPlaceholder:!0};Sn.set(u,y);let v;try{v=Bi(u,{name:y.routeName,attributes:{[ce]:d,[ie]:"navigation",[q]:`auto.navigation.react.reactrouter_v${i}`}})}catch(b){throw Sn.delete(u),b}v?(Sn.set(u,{span:v,routeName:y.routeName,pathname:t.pathname,locationKey:p}),vc(v,t,n,s,"navigation")):Sn.delete(u)}}function ji(e){e.forEach(t=>{i_(t).forEach(n=>{Ce.add(n)})})}function i_(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{i_(n,t).forEach(r=>{t.add(r)})})),t}function zi({activeRootSpan:e,location:t,routes:n,matches:r,basename:i,allRoutes:o}){const s=Array.isArray(r)?r:nt(o||n,t,i);if(s){const[a,c]=Gs(t,o||n,o||n,s,i,Wi,fn);j().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ce,c),vc(e,t,n,i,"pageload"))}else e&&vc(e,t,n,i,"pageload")}function hO(e,t,n,r,i=!1){return n?!!(!e&&i||e&&sn(e)&&r==="route"&&!sn(n)||t!=="route"&&r==="route"):!1}function ka(e,t,n,r,i,o,s,a){try{const c=t.data?.[ce];if(c==="route"&&n&&!sn(n))return;const u=Array.from(a),f=u.length>0?u:i,l=nt(f,r,o);if(!l)return;const[d,p]=Gs(r,f,f,l,o,Wi,fn),h=hO(n,c,d,p,!0),m=s==="pageload"||!t.timestamp;h&&m&&(e.updateName(d),e.setAttribute(ce,p))}catch(c){Re&&g.warn(`Error updating span details before ending: ${c}`)}}function vc(e,t,n,r,i){const o=`__sentry_${i}_end_patched__`;if(e?.[o]||!e.end)return;const s=e.end.bind(e);let a=!1;e.end=function(...u){if(a)return;a=!0;const f=u.length>0?u[0]:Date.now()/1e3,l=L(e),d=l.description,p=l.data?.[ce],h=()=>{const y=R();if(y&&i==="navigation"){const v=Sn.get(y);v&&v.span===e&&Sn.delete(y)}},m=Co.get(e),_=e.__sentry_may_have_lazy_routes__;if((m&&m.size>0||_)&&d&&(sn(d)||p!=="route")){if(In===0){ka(e,l,d,t,n,r,i,Ce),h(),s(f);return}const y=new Promise(b=>setTimeout(b,In));let v;if(m&&m.size>0){const b=Promise.allSettled(m).then(()=>{});v=In===1/0?b:Promise.race([b,y])}else v=y;v.then(()=>{const b=L(e);ka(e,b,b.description,t,n,r,i,Ce),h(),s(f)}).catch(()=>{h(),s(f)});return}ka(e,l,d,t,n,r,i,Ce),h(),s(f)},ve(e,o,!0)}function o_(e,t){if(!en||!tn||!nn||!Ao||!nt)return Re&&g.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
500
+ useEffect: ${en}. useLocation: ${tn}. useNavigationType: ${nn}.
501
+ createRoutesFromChildren: ${Ao}. matchRoutes: ${nt}.`),e;const n=r=>{const i=Me.useRef(!0),o=tn(),s=nn();return en(()=>{const a=Ao(r.children);i.current?(ji(a),zi({activeRootSpan:St(),location:o,routes:a,allRoutes:Array.from(Ce)}),i.current=!1):Fu({location:o,routes:a,navigationType:s,version:t,allRoutes:Array.from(Ce)})},[o,s]),Me.createElement(e,{...r})};return Ui(n,e),n}function jP(e){return t_(e,"6")}function zP(e){return n_(e,"6")}function qP(e){return Zg(e,"6")}function GP(e){return e_(e,"6")}function VP(e){return o_(e,"6")}function YP(e){return t_(e,"7")}function KP(e){return o_(e,"7")}function JP(e){return Zg(e,"7")}function XP(e){return e_(e,"7")}function QP(e){return n_(e,"7")}export{sw as BrowserClient,Dx as ErrorBoundary,NO as MULTIPLEXED_TRANSPORT_EXTRA_KEY,wP as OpenFeatureIntegrationHook,Ug as Profiler,Zr as SDK_VERSION,ie as SEMANTIC_ATTRIBUTE_SENTRY_OP,q as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,K_ as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ce as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,An as Scope,k as WINDOW,vt as addBreadcrumb,Gv as addEventProcessor,_l as addIntegration,ck as breadcrumbsIntegration,vk as browserApiErrorsIntegration,bP as browserProfilingIntegration,wk as browserSessionIntegration,$i as browserTracingIntegration,TP as buildLaunchDarklyFlagUsedHandler,PO as captureConsoleIntegration,bi as captureEvent,me as captureException,fE as captureFeedback,jv as captureMessage,Lg as captureReactException,ta as captureSession,GR as chromeStackLineParser,CO as close,WO as consoleLoggingIntegration,fP as contextLinesIntegration,bO as continueTrace,zO as createConsolaReporter,Oh as createLangChainCallbackHandler,$P as createReduxEnhancer,yS as createTransport,oP as createUserFeedbackEnvelope,Ak as cultureContextIntegration,hb as dedupeIntegration,Tg as defaultRequestInstrumentationOptions,rk as defaultStackLineParsers,ik as defaultStackParser,CP as diagnoseSdkConnectivity,eP as elementTimingIntegration,Lp as endSession,JS as eventFiltersIntegration,tw as eventFromException,nw as eventFromMessage,ou as exceptionFromError,LO as extraErrorDataIntegration,UO as featureFlagsIntegration,QO as feedbackAsyncIntegration,ZO as feedbackIntegration,ZO as feedbackSyncIntegration,AO as flush,aP as forceLoad,VS as functionToStringIntegration,JR as geckoStackLineParser,Se as getActiveSpan,R as getClient,j as getCurrentScope,Yk as getDefaultIntegrations,XO as getFeedback,ar as getGlobalScope,Ee as getIsolationScope,mP as getReplay,ye as getRootSpan,lo as getSpanDescendants,uy as getSpanStatusFromHttpCode,th as getTraceData,Nk as globalHandlersIntegration,dP as graphqlClientIntegration,kP as growthbookIntegration,lP as httpClientIntegration,Dk as httpContextIntegration,XS as inboundFiltersIntegration,xP as init,GO as instrumentAnthropicAiClient,YO as instrumentCreateReactAgent,VO as instrumentGoogleGenAIClient,JO as instrumentLangChainEmbeddings,KO as instrumentLangGraph,qO as instrumentOpenAiClient,wN as instrumentOutgoingRequests,Fb as instrumentSupabaseClient,BN as isBotUserAgent,qv as isEnabled,MO as isInitialized,zv as lastEventId,EP as launchDarklyIntegration,V0 as lazyLoadIntegration,Hk as linkedErrorsIntegration,HO as logger,SP as makeBrowserOfflineTransport,ym as makeFetchTransport,xO as makeMultiplexedTransport,jO as metrics,OO as moduleMetadataIntegration,cP as onLoad,IP as openFeatureIntegration,rP as opera10StackLineParser,iP as opera11StackLineParser,FS as parameterize,OP as reactErrorHandler,FP as reactRouterV3BrowserTracingIntegration,UP as reactRouterV4BrowserTracingIntegration,HP as reactRouterV5BrowserTracingIntegration,jP as reactRouterV6BrowserTracingIntegration,YP as reactRouterV7BrowserTracingIntegration,Ay as registerSpanErrorInstrumentation,NP as registerWebWorker,gP as replayCanvasIntegration,hP as replayIntegration,_P as reportPageLoaded,uP as reportingObserverIntegration,DO as rewriteFramesIntegration,JI as sendFeedback,yP as setActiveSpanInBrowser,Pp as setContext,kO as setConversationId,MS as setCurrentClient,TO as setExtra,EO as setExtras,Oo as setHttpStatus,tv as setMeasurement,wO as setTag,IO as setTags,RO as setUser,If as showReportDialog,vP as spanStreamingIntegration,vO as spanToBaggageHeader,L as spanToJSON,Iy as spanToTraceHeader,sP as spotlightBrowserIntegration,Bi as startBrowserTracingNavigationSpan,Fi as startBrowserTracingPageLoadSpan,Ze as startInactiveSpan,av as startNewTrace,hl as startSession,Ht as startSpan,Gt as startSpanManual,AP as statsigIntegration,$O as supabaseIntegration,sv as suppressTracing,BP as tanstackRouterBrowserTracingIntegration,BO as thirdPartyErrorFilterIntegration,tP as uiProfiler,RP as unleashIntegration,yO as updateSpanName,LP as useProfiler,pP as viewHierarchyIntegration,MP as webWorkerIntegration,nP as winjsStackLineParser,gr as withActiveSpan,DP as withErrorBoundary,_O as withIsolationScope,PP as withProfiler,Ge as withScope,VP as withSentryReactRouterV6Routing,KP as withSentryReactRouterV7Routing,WP as withSentryRouting,SO as withStreamedSpan,qP as wrapCreateBrowserRouterV6,JP as wrapCreateBrowserRouterV7,GP as wrapCreateMemoryRouterV6,XP as wrapCreateMemoryRouterV7,zP as wrapUseRoutesV6,QP as wrapUseRoutesV7,FO as zodErrorsIntegration};