iobroker.smartcontrol 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +16 -6
  2. package/admin/custom/assets/Components-CDPYnOs-.js +77 -0
  3. package/admin/custom/assets/Components-DpQjIfuo.js +1 -0
  4. package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__SmartcontrolSet__mf_owner__1-C9SdP7_s.js +1 -0
  5. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Ca-6Y14s.js +1525 -0
  6. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare__shared-4MdeZwge.js +2 -0
  7. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-QT6he7QZ.js +122 -0
  8. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-BWTOCVCn.js +1 -0
  9. package/admin/custom/assets/dist-Cnxr-ruU.js +1 -0
  10. package/admin/custom/assets/helpers-CNHzo155.js +1 -0
  11. package/admin/custom/assets/hostInit-BVoHSU7s.js +1 -0
  12. package/admin/custom/assets/iconLibraryData-B5fiyl1C.js +1 -0
  13. package/admin/custom/assets/index-CwC_q7vn.js +1 -0
  14. package/admin/custom/assets/lib-CgOpGT17.js +3 -0
  15. package/admin/custom/assets/mf-entry-bootstrap-0-6167c687.js +54 -0
  16. package/admin/custom/assets/pendingShares-CEz9fejL.js +2 -0
  17. package/admin/custom/assets/prod-XWAlCKxB.js +492 -0
  18. package/admin/custom/assets/rolldown-runtime-9C0vUP4u.js +1 -0
  19. package/admin/custom/assets/utils-DmVoYT7i.js +4 -0
  20. package/admin/custom/assets/vite-preload-helper-nldAWQd6.js +1 -0
  21. package/admin/custom/customComponents.js +12 -0
  22. package/admin/custom/i18n/de.json +59 -0
  23. package/admin/custom/i18n/en.json +59 -0
  24. package/admin/custom/mf-manifest.json +1 -0
  25. package/admin/doc-md/readme.txt +2 -6
  26. package/admin/doc-md/start_de.md +34 -89
  27. package/admin/doc-md/start_en.md +33 -90
  28. package/admin/doc-md/table-conditions_de.md +7 -9
  29. package/admin/doc-md/table-conditions_en.md +7 -9
  30. package/admin/doc-md/table-execution_de.md +11 -10
  31. package/admin/doc-md/table-execution_en.md +12 -11
  32. package/admin/doc-md/table-options_de.md +58 -0
  33. package/admin/doc-md/table-options_en.md +58 -0
  34. package/admin/doc-md/table-target-devices_de.md +20 -16
  35. package/admin/doc-md/table-target-devices_en.md +18 -16
  36. package/admin/doc-md/table-target-enums_de.md +13 -13
  37. package/admin/doc-md/table-target-enums_en.md +12 -14
  38. package/admin/doc-md/table-target-url_de.md +14 -25
  39. package/admin/doc-md/table-target-url_en.md +14 -23
  40. package/admin/doc-md/table-trigger-devices_de.md +10 -11
  41. package/admin/doc-md/table-trigger-devices_en.md +10 -10
  42. package/admin/doc-md/table-trigger-motion_de.md +41 -24
  43. package/admin/doc-md/table-trigger-motion_en.md +35 -19
  44. package/admin/doc-md/table-trigger-times_de.md +11 -12
  45. package/admin/doc-md/table-trigger-times_en.md +11 -11
  46. package/admin/doc-md/table-zones_de.md +19 -14
  47. package/admin/doc-md/table-zones_en.md +19 -14
  48. package/admin/doc-md/table-zones_select-targets_de.md +7 -15
  49. package/admin/doc-md/table-zones_select-targets_en.md +7 -15
  50. package/admin/i18n/{de/translations.json → de.json} +2 -1
  51. package/admin/i18n/{en/translations.json → en.json} +2 -1
  52. package/admin/i18n/{es/translations.json → es.json} +2 -1
  53. package/admin/i18n/{fr/translations.json → fr.json} +2 -1
  54. package/admin/i18n/{it/translations.json → it.json} +2 -1
  55. package/admin/i18n/{nl/translations.json → nl.json} +2 -1
  56. package/admin/i18n/{pl/translations.json → pl.json} +2 -1
  57. package/admin/i18n/{pt/translations.json → pt.json} +2 -1
  58. package/admin/i18n/{ru/translations.json → ru.json} +2 -1
  59. package/admin/i18n/uk.json +110 -0
  60. package/admin/i18n/{zh-cn/translations.json → zh-cn.json} +2 -1
  61. package/admin/img/option-screenshots/tab-conditions.png +0 -0
  62. package/admin/img/option-screenshots/tab-further-options.png +0 -0
  63. package/admin/img/option-screenshots/tab-start.png +0 -0
  64. package/admin/img/option-screenshots/tab-target-devices.png +0 -0
  65. package/admin/img/option-screenshots/tab-triggers-motion.png +0 -0
  66. package/admin/img/option-screenshots/tab-triggers-other.png +0 -0
  67. package/admin/img/option-screenshots/tab-triggers-time.png +0 -0
  68. package/admin/img/option-screenshots/tab-zones-execution.png +0 -0
  69. package/admin/img/option-screenshots/tab-zones.png +0 -0
  70. package/admin/jsonConfig.json5 +524 -0
  71. package/io-package.json +17 -14
  72. package/lib/helper.js +40 -6
  73. package/lib/trigger-class.js +185 -80
  74. package/lib/trigger-match.js +76 -0
  75. package/main.js +132 -62
  76. package/package.json +11 -21
  77. package/admin/admin.d.ts +0 -4
  78. package/admin/css/LICENSE-github-markdown-css.txt +0 -24
  79. package/admin/css/github-markdown-dark.min.css +0 -8
  80. package/admin/css/github-markdown.min.css +0 -8
  81. package/admin/doc-md/img/start_dropdown-ani.gif +0 -0
  82. package/admin/doc-md/img/start_open-dialog.png +0 -0
  83. package/admin/doc-md/img/start_show-explanation.gif +0 -0
  84. package/admin/doc-md/img/table-zones_select-target-devices-overwrite.gif +0 -0
  85. package/admin/fancytree/skin-lion/icons-rtl.gif +0 -0
  86. package/admin/fancytree/skin-lion/icons.gif +0 -0
  87. package/admin/fancytree/skin-lion/loading.gif +0 -0
  88. package/admin/fancytree/skin-lion/ui.fancytree.min.css +0 -6
  89. package/admin/fancytree/skin-lion/vline-rtl.gif +0 -0
  90. package/admin/fancytree/skin-lion/vline.gif +0 -0
  91. package/admin/img/info-big.png +0 -0
  92. package/admin/img/info-big.png_README.txt +0 -6
  93. package/admin/img/sc_always.png +0 -0
  94. package/admin/img/select-target-devices-overwrite.gif +0 -0
  95. package/admin/img/smartControl_options1.gif +0 -0
  96. package/admin/img/smartControl_options_dropdown.gif +0 -0
  97. package/admin/img/smartControl_options_dropdown_2.gif +0 -0
  98. package/admin/index_m.html +0 -812
  99. package/admin/index_m.js +0 -1659
  100. package/admin/style.css +0 -255
  101. package/admin/tsconfig.json +0 -45
  102. package/admin/words.js +0 -113
  103. package/admin/zero-md/readme.txt +0 -1
  104. package/admin/zero-md/webcomponents-loader.min.js +0 -9
  105. package/admin/zero-md/zero-md.min.js.js +0 -9
@@ -0,0 +1,492 @@
1
+ import{yr as e}from"./_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Ca-6Y14s.js";var t=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,n=globalThis,r=`11.23.0`;function i(){return a(n),n}function a(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`11.23.0`,t[r]=t[`11.23.0`]||{}}function o(e,t,i=n){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[r]=a[`11.23.0`]||{};return o[e]||(o[e]=t())}var s=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],c=`Sentry Logger `,l={};function u(e){if(!(`console`in n))return e();let t=n.console,r={},i=Object.keys(l);i.forEach(e=>{let n=l[e];r[e]=t[e],t[e]=n});try{return e()}finally{i.forEach(e=>{t[e]=r[e]})}}function d(){v().enabled=!0}function f(){v().enabled=!1}function p(){return v().enabled}function m(...e){_(`log`,...e)}function h(...e){_(`warn`,...e)}function g(...e){_(`error`,...e)}function _(e,...r){t&&p()&&u(()=>{n.console[e](`${c}[${e}]:`,...r)})}function v(){return t?o(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var y={enable:d,disable:f,isEnabled:p,log:m,warn:h,error:g},b=50,x=/\(error: (.*)\)/,S=/captureMessage|captureException/;function C(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
+ `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=x.test(n)?n.replace(x,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=b+r)break}}return ee(i.slice(r))}}function w(e){return Array.isArray(e)?C(...e):e}function ee(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(T(t).function||``)&&t.pop(),t.reverse(),S.test(T(t).function||``)&&(t.pop(),S.test(T(t).function||``)&&t.pop()),t.slice(0,b).map(e=>({...e,filename:e.filename||T(t).filename,function:e.function||`?`}))}function T(e){return e[e.length-1]||{}}var te=`<anonymous>`;function ne(e){try{return!e||typeof e!=`function`?te:e.name||te}catch{return te}}function re(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function ie(e){let t=e!=null&&e.startsWith(`file://`)?e.slice(7):e;return t!=null&&t.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var ae={},oe={};function se(e,t){return ae[e]=ae[e]||[],ae[e].push(t),()=>{let n=ae[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function E(e,n){if(!oe[e]){oe[e]=!0;try{n()}catch(n){t&&y.error(`Error while instrumenting ${e}`,n)}}}function ce(e,n){let r=e&&ae[e];if(r)for(let i of r)try{i(n)}catch(n){t&&y.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ne(i)}\nError:`,n)}}var le=null;function ue(e){let t=`error`;se(t,e),E(t,de)}function de(){le=n.onerror,n.onerror=function(e,t,n,r,i){return ce(`error`,{column:r,error:i,line:n,msg:e,url:t}),le?le.apply(this,arguments):!1},n.onerror.__SENTRY_INSTRUMENTED__=!0}var fe=null;function pe(e){let t=`unhandledrejection`;se(t,e),E(t,me)}function me(){fe=n.onunhandledrejection,n.onunhandledrejection=function(e){return ce(`unhandledrejection`,e),!fe||fe.apply(this,arguments)},n.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var he=Object.prototype.toString;function D(e){switch(he.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Ee(e,Error)}}function ge(e,t){return he.call(e)===`[object ${t}]`}function _e(e){return ge(e,`ErrorEvent`)}function ve(e){return ge(e,`DOMError`)}function ye(e){return ge(e,`DOMException`)}function be(e){return ge(e,`String`)}function xe(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function O(e){return e===null||xe(e)||typeof e!=`object`&&typeof e!=`function`}function k(e){return ge(e,`Object`)}function Se(e){return typeof e==`object`&&!!e}function Ce(e){return typeof Event<`u`&&Ee(e,Event)}function we(e){return ge(e,`RegExp`)}function Te(e){return!!(e!=null&&e.then&&typeof e.then==`function`)}function Ee(e,t){try{return e instanceof t}catch{return!1}}function De(e){return typeof Request<`u`&&Ee(e,Request)}function Oe(e,n,r){if(!(n in e))return;let i=e[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&Ae(a,i);try{e[n]=a}catch{t&&y.log(`Failed to replace method "${String(n)}" in object`,e)}}function ke(e,n,r){try{Object.defineProperty(e,n,{value:r,writable:!0,configurable:!0})}catch{t&&y.log(`Failed to add non-enumerable property "${String(n)}" to object`,e)}}function Ae(e,t){try{e.prototype=t.prototype=t.prototype||{},ke(e,`__sentry_original__`,t)}catch{}}function je(e){return e.__sentry_original__}function Me(e){if(D(e))return{message:e.message,name:e.name,stack:e.stack,...Ne(e)};if(Ce(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Ne(e)}}return e}function Ne(e){return Se(e)?Object.fromEntries(Object.entries(e)):{}}function Pe(e){let t=Object.keys(Me(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Fe;function Ie(e){if(Fe!==void 0)return Fe?Fe(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=n;return t in r&&typeof r[t]==`function`?(Fe=r[t],Fe(e)):(Fe=null,e())}function Le(){return Ie(()=>Math.random())}function Re(){return Ie(()=>Date.now())}var ze=Symbol.for(`sentry.skipNormalization`),Be=Symbol.for(`sentry.overrideNormalizationDepth`);function Ve(e){ke(e,ze,!0)}function He(e){return!!e[ze]}function Ue(e){let t=e[Be];return typeof t==`number`?t:void 0}var We;function Ge(e){We=e}function Ke(e,t=100,n=1/0){try{return Ye(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${qe(e)})`}}}function qe(e){try{return String(e)}catch{return`unknown error`}}function Je(e,t=3,n=102400){let r=Ke(e,t);return $e(r)>n?Je(e,t-1,n):r}function Ye(e,t,n=1/0,r=1/0,i=et()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Xe(e,t);if(!s.startsWith(`[object `))return s;if(He(t))return t;let c=Ue(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ye(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Me(t);for(let e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(f>=r){d[e]=`[MaxProperties ~]`;break}d[e]=Ye(e,p[e],l-1,r,i),f++}return o(t),d}function Xe(e,t){try{if(We){let e=We(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${ne(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Ze(t)}]`}catch(e){return`**non-serializable** (${qe(e)})`}}function Ze(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function Qe(e){return~-encodeURI(e).split(/%..|./).length}function $e(e){return Qe(JSON.stringify(e))}function et(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function tt(e,t=`[unserializable]`){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return typeof t==`function`?t(e):t}}function nt(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function rt(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function it(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];O(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Xe(void 0,r))}return n.join(t)}function at(e,t,n=!1){return be(e)?we(t)?t.test(e):be(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function ot(e,t=[],n=!1){for(let r of t)if(at(e,r,n))return!0;return!1}function st(){let e=n;return e.crypto||e.msCrypto}var ct;function lt(){return Le()*16}function ut(e=st()){try{if(e!=null&&e.randomUUID)return Ie(()=>e.randomUUID()).replace(/-/g,``)}catch{}return ct||=`10000000100040008000100000000000`,ct.replace(/[018]/g,e=>(e^(lt()&15)>>e/4).toString(16))}function dt(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}function ft(e){let{message:t,event_id:n}=e;if(t)return t;let r=dt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function pt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function mt(e,t){let n=dt(e);n&&gt(n,t)}function ht(e,t){var n;let r=(n=e.exception)==null?void 0:n.values,i=(r==null?void 0:r.find(e=>{var t;return((t=e.mechanism)==null?void 0:t.exception_id)===0}))??(r==null?void 0:r[0]);i&&gt(i,t)}function gt(e,t){let n={type:`generic`,handled:!0},r=e.mechanism;e.mechanism={...n,...r,...t},t&&`data`in t&&(e.mechanism.data={...r==null?void 0:r.data,...t.data})}function _t(e,t,n=5){if(t.lineno===void 0)return;let 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(e=>rt(e,0)),t.context_line=rt(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>rt(e,0))}function vt(e){if(yt(e))return!0;try{ke(e,`__sentry_captured__`,!0)}catch{}return!1}function yt(e){try{return e.__sentry_captured__}catch{}}var bt=1e3,xt=1e3,St=100;function Ct(){return Re()/bt}var wt=[];function Tt(){let{performance:e}=n;if(!(e!=null&&e.now)||!e.timeOrigin)return e!=null&&e.now&&(wt=[{from:0,origin:Re()-Ie(()=>e.now())}]),Ct;let t=e.timeOrigin;wt=[{from:0,origin:t}];let r=!0,i=0;return()=>Ie(()=>{let n=e.now(),a=Date.now();return Math.abs(t+n-a)>xt&&(t=a-n,r?wt=[{from:0,origin:t}]:(wt.push({from:i,origin:t}),wt.length>St&&wt.splice(1,1))),r=!1,i=n,(t+n)/bt})}function Et(){let{performance:e}=n;return e!=null&&e.now?Ie(()=>e.now()):void 0}var Dt,Ot=!1;function kt(e,t=e){let n=At(t);return n==null?void 0:(n+e)/bt}function A(){return(Dt??=Tt())()}function At(e=0){Ot||(Ot=!0,Promise.resolve().then(()=>{Ot=!1}),A());let t;for(let n of wt){if(t&&n.from>e)break;t=n}return t==null?void 0:t.origin}function jt(e){let t=A(),n={sid:ut(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>Pt(n)};return e&&Mt(n,e),n}function Mt(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||A(),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:ut()),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{let t=e.timestamp-e.started;e.duration=t>=0?t: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 Nt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Mt(e,n)}function Pt(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 Ft(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Ft(r[e],t[e],n-1));return r}function It(){return ut()}function Lt(){return ut().substring(16)}var Rt=100,zt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},ke(this,`refs`,{}),this._propagationContext={traceId:It(),sampleRand:Le()}}clone(){let t=new e;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,t.refs={...this.refs},t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Mt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():k(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Rt;if(n<=0)return this;let r={timestamp:Ct(),...e,message:e.message?nt(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),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,conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ft(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=(n==null?void 0:n.event_id)||ut();if(!this._client)return t&&y.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureMessage(e,n,r){let i=(r==null?void 0:r.event_id)||ut();if(!this._client)return t&&y.warn(`No client configured on scope - will not capture message!`),i;let a=(r==null?void 0:r.syntheticException)??Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:a,...r,event_id:i},this),i}captureEvent(e,n){let r=e.event_id||(n==null?void 0:n.event_id)||ut();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(t&&y.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Bt(){return o(`defaultCurrentScope`,()=>new zt)}function Vt(){return o(`defaultIsolationScope`,()=>new zt)}var Ht=`__SENTRY_SUPPRESS_TRACING__`,Ut=e=>e instanceof Promise&&!e[Wt],Wt=Symbol(`chained PromiseLike`),Gt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Ut(r)&&Ut(e)?r:Kt(e,r)},Kt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Wt]:!0}),t},qt=class{constructor(e,t){let n;n=e||new zt;let r;r=t||new zt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Te(n)?Gt(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(){let 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 Jt(){let e=a(i());return e.stack=e.stack||new qt(Bt(),Vt())}function Yt(e){return Jt().withScope(e)}function Xt(e,t){let n=Jt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Zt(e){return Jt().withScope(()=>e(Jt().getIsolationScope()))}function Qt(){return{suppressTracing:$t,withIsolationScope:Zt,withScope:Yt,withSetScope:Xt,withSetIsolationScope:(e,t)=>Zt(t),getCurrentScope:()=>Jt().getScope(),getIsolationScope:()=>Jt().getIsolationScope()}}function $t(e){return Yt(t=>{t.setSDKProcessingMetadata({[Ht]:!0});let n=e();return t.setSDKProcessingMetadata({[Ht]:void 0}),n})}function en(e){let t=a(e);return t.acs?t.acs:Qt()}function tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function nn(e,t){let{value:n,unit:r}=tn(e)?e:{value:e,unit:void 0},i=sn(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function rn(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=nn(i,t);e&&(n[r]=e)}return n}function an(e){if(!e)return 0;let t=0;for(let[r,i]of Object.entries(e)){var n;t+=r.length*2,t+=i.type.length*2,t+=(((n=i.unit)==null?void 0:n.length)??0)*2;let e=i.value;Array.isArray(e)?t+=on(e[0])*e.length:O(e)?t+=on(e):t+=100}return t}function on(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function sn(e){if(Array.isArray(e))return{value:e,type:`array`};let 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}}function cn(){var e,t;return(e=(t=a(i())).externalPropagationContextProvider)==null?void 0:e.call(t)}function ln(){return a(i()).externalPropagationContextProvider!==void 0}function j(){return en(i()).getCurrentScope()}function M(){return en(i()).getIsolationScope()}function un(){return o(`globalScope`,()=>new zt)}function dn(...e){let t=en(i());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function fn(...e){let t=en(i());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function N(){return j().getClient()}function pn(e){let t=cn();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Lt()};return r&&(a.parent_span_id=r),a}var mn=`angular.version`,hn=`browser.bfcache.frame`,gn=`browser.bfcache.not_restored_reason_count`,_n=`browser.bfcache.outcome`,vn=`browser.bfcache.reason`,yn=`browser.navigation.id`,bn=`browser.navigation.type`,xn=`browser.paint.type`,Sn=`browser.performance.navigation.activation_start`,Cn=`browser.performance.time_origin`,wn=`browser.script.invoker`,Tn=`browser.script.invoker_type`,En=`browser.script.source_char_position`,Dn=`browser.web_vital.inp.input_delay`,On=`browser.web_vital.inp.presentation_delay`,kn=`browser.web_vital.inp.processing_duration`,An=`browser.web_vital.inp.target`,jn=`browser.web_vital.lcp.element`,Mn=`browser.web_vital.lcp.element_render_delay`,Nn=`browser.web_vital.lcp.resource_load_delay`,Pn=`browser.web_vital.lcp.resource_load_duration`,Fn=`browser.web_vital.ttfb.request_time`,In=`code.file.path`,Ln=`code.function.name`,Rn=`connectionType`,zn=`culture.calendar`,Bn=`culture.locale`,Vn=`culture.timezone`,Hn=`db.operation.name`,Un=`db.system.name`,Wn=`deviceMemory`,Gn=`device.memory.estimated_capacity`,Kn=`device.processor_count`,qn=`effectiveConnectionType`,Jn=`gen_ai.conversation.id`,Yn=`graphql.document`,Xn=`graphql.operation.name`,Zn=`graphql.operation.type`,Qn=`hardwareConcurrency`,$n=`http.request.connection_end`,er=`http.request.connect_start`,tr=`http.request.domain_lookup_end`,nr=`http.request.domain_lookup_start`,rr=`http.request.fetch_start`,ir=`http.request.method`,ar=`http.request.redirect_end`,or=`http.request.redirect_start`,sr=`http.request.request_start`,cr=`http.request.response_end`,lr=`http.request.response_start`,ur=`http.request.same_origin`,dr=`http.request.secure_connection_start`,fr=`http.request.time_to_first_byte`,pr=`http.request.worker_start`,mr=`http.response.body.decoded_size`,hr=`http.response.body.size`,gr=`http.response_delivery_type`,_r=`http.response.size`,vr=`http.response.status_code`,yr=`http.route`,br=`lcp.element`,xr=`lcp.id`,Sr=`lcp.loadTime`,Cr=`lcp.renderTime`,wr=`lcp.size`,Tr=`lcp.url`,Er=`network.connection.effective_type`,Dr=`network.connection.rtt`,Or=`network.connection.type`,kr=`network.protocol.name`,Ar=`network.protocol.version`,jr=`performance.activationStart`,Mr=`performance.timeOrigin`,Nr=`react.version`,Pr=`resource.render_blocking_status`,Fr=`router.navigation.route.id`,Ir=`sentry.cancellation_reason`,Lr=`sentry.environment`,Rr=`sentry.exclusive_time`,zr=`sentry.idle_span_finish_reason`,Br=`sentry.is_localhost`,Vr=`sentry.kind`,Hr=`sentry.link.type`,Ur=`sentry.message.template`,Wr=`sentry.op`,P=`sentry.origin`,Gr=`sentry.pageload.span_id`,Kr=`sentry.profiler_id`,qr=`sentry.profile_id`,Jr=`sentry.release`,Yr=`sentry.replay_id`,Xr=`sentry.sdk.integrations`,Zr=`sentry.sdk.name`,Qr=`sentry.sdk.version`,$r=`sentry.segment.id`,ei=`sentry.segment.name`,ti=`sentry.segment.name.source`,ni=`sentry.timestamp.sequence`,ri=`sentry.trace_lifecycle`,ii=`sentry.trace.parent_span_id`,ai=`sentry.transaction`,oi=`server.address`,si=`server.port`,ci=`state.type`,li=`thread.id`,ui=`thread.name`,di=`ui.component_name`,fi=`ui.element.height`,pi=`ui.element.id`,mi=`ui.element.identifier`,hi=`ui.element.paint_type`,gi=`ui.element.type`,_i=`ui.element.url`,vi=`ui.element.width`,yi=`url.domain`,bi=`url.fragment`,xi=`url.full`,Si=`url.path`,Ci=`url.query`,wi=`url.scheme`,Ti=`url.template`,Ei=`user_agent.original`,Di=`user.email`,Oi=`user.id`,ki=`user.ip_address`,Ai=`user.name`,ji=`sentry.sample_rate`,Mi=`sentry.previous_trace_sample_rate`,Ni=`sentry.op`,Pi=`sentry.origin`,Fi=`sentry.measurement_unit`,Ii=`sentry.measurement_value`,Li=`sentry.custom_span_name`,Ri=[`ok`,`deadline_exceeded`,`unauthenticated`,`permission_denied`,`not_found`,`resource_exhausted`,`invalid_argument`,`unimplemented`,`unavailable`,`internal_error`,`unknown_error`,`cancelled`,`already_exists`,`failed_precondition`,`aborted`,`out_of_range`,`data_loss`];function zi(e){return e!==`ok`&&Ri.includes(e)}function Bi(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 Vi(e,t){e.setAttribute(vr,t);let n=Bi(t);n.message!==`unknown_error`&&e.setStatus(n)}function Hi(e){try{let t=n.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Ui(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var Wi=`_sentryScope`,Gi=`_sentryIsolationScope`,Ki=Symbol.for(`sentry.tracerProviderSpan`);function qi(e,t,n){e&&(ke(e,Gi,Hi(n)),ke(e,Wi,t))}function Ji(e){let t=e;return{scope:t[Wi],isolationScope:Ui(t[Gi])}}function Yi(e){return e[Ki]===!0}var Xi=`sentry-`;function Zi(e){let t=$i(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Qi(e){if(e)return ta(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Xi}${t}`]=n),e),{}))}function $i(e){if(e&&(be(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=ea(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):ea(e)}function ea(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function ta(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[n,r],i)=>{let a=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(t&&y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},``)}var na=/^o(\d+)\./,ra=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function ia(e){return e===`http`||e===`https`}function aa(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function oa(e){let t=ra.exec(e);if(!t){u(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,d=l.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),l=d.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return sa({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function sa(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ca(e){if(!t)return!0;let{port:n,projectId:r,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(y.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:r.match(/^\d+$/)?ia(i)?n&&isNaN(parseInt(n,10))?(y.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(y.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(y.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function la(e){var t;return(t=e.match(na))==null?void 0:t[1]}function ua(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=la(n)),r}function da(e){let t=typeof e==`string`?oa(e):sa(e);if(t&&ca(t))return t}function fa(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var pa=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function ma(e){if(!e)return;let t=e.match(pa);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 ha(e,t){let n=ma(e),r=Zi(t);if(!(n!=null&&n.traceId))return{traceId:It(),sampleRand:Le()};let i=va(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r,sampleRand:i}}function ga(e=It(),t=Lt(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function _a(e=It(),t=Lt(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function va(e,t){let n=fa(t==null?void 0:t.sample_rand);if(n!==void 0)return n;let r=fa(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Le()*r:r+Le()*(1-r):Le()}function ya(e,n){let r=ua(e);return n&&r&&n!==r?(t&&y.log(`Won't continue trace because org IDs don't match (incoming baggage: ${n}, SDK options: ${r})`),!1):e.getOptions().strictTraceContinuation&&(n&&!r||!n&&r)?(t&&y.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${n}, Sentry client: ${r})`),!1):!0}var ba=`span`;function xa(e,t){t?e.refs[ba]=Hi(t):delete e.refs[ba]}function Sa(e){return Ui(e.refs[ba])}function Ca(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=Ma(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function wa(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Ma(e).parent_span_id,a=Ji(e).scope;return{parent_span_id:i,span_id:r?(a==null?void 0:a.getPropagationContext().propagationSpanId)||Lt():t,trace_id:n}}function Ta(e){let{traceId:t,spanId:n}=e.spanContext();return ga(t,n,La(e))}function Ea(e){let{traceId:t,spanId:n}=e.spanContext();return _a(t,n,La(e))}function Da(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Oa(e){if(e!=null&&e.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function ka(e){return typeof e==`number`?Aa(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Aa(e.getTime()):A()}function Aa(e){return e>9999999999?e/1e3:e}function ja(e){return typeof e==`number`?e<1e12?kt(e)??A():e/1e3:ka(e)}function Ma(e){if(Ia(e))return e.getStaticSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Fa(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Na(e),start_timestamp:ka(i),timestamp:ka(o)||void 0,status:Ra(s),op:r[Wr],origin:r[P],links:Da(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:`ok`,data:{}}}function F(e){if(Ia(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Fa(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:Na(e),start_timestamp:ka(i),end_timestamp:ka(o)||void 0,is_segment:Ja(e),status:za(s),attributes:Ba(r,s),links:Oa(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,status:`ok`,is_segment:Ja(e),attributes:{}}}function Na(e){var t;return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function Pa(e){var t;return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:rn(e.attributes),links:(t=e.links)==null?void 0:t.map(e=>({...e,attributes:rn(e.attributes)}))}}function Fa(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Ia(e){return typeof e.getSpanJSON==`function`}function La(e){let{traceFlags:t}=e.spanContext();return t===1}function Ra(e){return!e||e.code===0||e.code===1?`ok`:e.message&&zi(e.message)?e.message:`internal_error`}function za(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function Ba(e,t){let n=za(t)===`error`?t==null?void 0:t.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var Va=`_sentryChildSpans`,Ha=`_sentryRootSpan`;function Ua(e,t){let n=e[Ha]||e;ke(t,Ha,n),t.setAttribute(ti,void 0),La(e)&&(e.isRecording()||n.isRecording())&&(e[Va]?e[Va].add(t):ke(e,Va,new Set([t])))}function Wa(e,t){e[Va]&&e[Va].delete(t)}function Ga(e){let t=new Set;function n(e){if(!t.has(e)&&La(e)){t.add(e);let r=e[Va]?Array.from(e[Va]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var Ka=qa;function qa(e){return e[Ha]||e}function Ja(e){return e===qa(e)}function I(e){let t=en(i());return t.getActiveSpan?t.getActiveSpan(e):Sa(e||j())}function Ya(e,t){e.updateName(t),e.setAttributes({[Li]:t}),Xa(e,`custom`)}function Xa(e,t){Ja(e)&&e.setAttribute(ti,t)}var Za=!1;function Qa(){if(Za)return;function e(){let e=I(),n=e&&Ka(e);if(n){let e=`internal_error`;t&&y.log(`[Tracing] Root span: ${e} -> Global error occurred`),n.setStatus({code:2,message:e})}}Za=!0,ue(e),pe(e)}function $a(e){var t;if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let n=e||((t=N())==null?void 0:t.getOptions());return!!n&&(n.tracesSampleRate!=null||!!n.tracesSampler)}function eo(e){y.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function to(e,n){if(!(n!=null&&n.length))return!1;for(let r of n){if(io(r)){if(e.description&&at(e.description,r))return t&&eo(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=!r.name||e.description&&at(e.description,r.name),a=!r.op||e.op&&at(e.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([t,n])=>{var r;return no((r=e.attributes)==null?void 0:r[t],n)});if(i&&a&&o)return t&&eo(e),!0}return!1}function no(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?at(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function ro(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function io(e){return typeof e==`string`||e instanceof RegExp}var ao=[];function oo(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function so(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return oo(r)}function co(e,t){let n={};return t.forEach(t=>{t!=null&&t.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&uo(e,t,n)}),n}function lo(e,t){for(let n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function uo(e,n,r){if(r[n.name])t&&y.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,!ao.includes(n.name)&&typeof n.setupOnce==`function`&&(n.setupOnce(),ao.push(n.name)),n.setup&&typeof n.setup==`function`&&n.setup(e),typeof n.preprocessEvent==`function`){let t=n.preprocessEvent.bind(n);e.on(`preprocessEvent`,(n,r)=>t(n,r,e))}if(typeof n.processEvent==`function`){let t=n.processEvent.bind(n),r=Object.assign((n,r)=>t(n,r,e),{id:n.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(t=>{let r=n[t];typeof r==`function`&&e.on(t,t=>r.call(n,t,e))}),t&&y.log(`Integration installed: ${n.name}`)}}function fo(e){let n=N();n?n.addIntegration(e):t&&y.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`)}function L(e,t){return(...n)=>{let r=k(n[0])?{...n[0]}:n[0],i=e(...n);return i._options=r,i._libraryOptions=t==null?void 0:t.libraryOptions,i}}var po=`production`,mo=Symbol.for(`sentry.nonRecordingSpan`),ho=class{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||Lt(),this.dropReason=e.dropReason,ke(this,mo,!0)}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 go(e){return!!e&&e[mo]===!0}var _o=`_frozenDsc`;function vo(e,t){ke(e,_o,t)}function yo(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:ua(t)};return t.emit(`createDsc`,i),i}function bo(e,t){if(cn())return;let n=t.getPropagationContext();return n.dsc||yo(n.traceId,e)}function xo(e){let t=N();if(!t)return{};let n=Ka(e),r=Ma(n),i=r.data,a=n.spanContext().traceState,o=(a==null?void 0:a.get(`sentry.sample_rate`))??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[_o];if(c)return s(c);let l=go(n),u=l&&n.dropReason===`ignored`;if(l&&(!$a(t.getOptions())||u)){let e=Ji(n).scope,r=e&&bo(t,e);if(r){let e={...r};return u&&(e.sampled=`false`),s(e)}}let d=a==null?void 0:a.get(`sentry.dsc`),f=d&&Zi(d);if(f)return s(f);let p=yo(e.spanContext().traceId,t),m=i[ti],h=r.description;if(m!==`url`&&h&&(p.transaction=h),$a()){var g;let e=(g=Ji(n).scope)==null?void 0:g.getPropagationContext(),t=La(n);p.sampled=String(t),p.sample_rand=(a==null?void 0:a.get(`sentry.sample_rand`))??(e==null?void 0:e.sampleRand.toString()),o==null&&typeof(e==null?void 0:e.sampled)==`boolean`&&(p.sample_rate=t?`1`:`0`)}return s(p),t.emit(`createDsc`,p,n),p}function So(e){return Qi(xo(e))}function Co(e,t){let{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:i}=t;Do(e,t),jo(e,n),Oo(e,r),ko(e,i)}function wo(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m}=t;To(e,`extra`,n),To(e,`tags`,r),To(e,`attributes`,i),To(e,`user`,a),To(e,`contexts`,o),e.sdkProcessingMetadata=Ft(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function To(e,t,n){e[t]=Ft(e[t],n,1)}function Eo(e,t){let n=un().getScopeData();return e&&wo(n,e.getScopeData()),t&&wo(n,t.getScopeData()),n}function Do(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=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(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Oo(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ko(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ao(e,t){e.contexts={trace:wa(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:xo(t),...e.sdkProcessingMetadata};let n=Ma(Ka(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function jo(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 Mo=Symbol.for(`SentryCallbackError`);function No(e,t,n){let r;try{r=t()}catch(t){return Po(e,t,n)}return Te(r)?r.then(void 0,t=>Po(e,t,n)):r}function Po(e,n,r){return t&&y.error(e,n),r(n)}function Fo(e){return ke(e,`_static`,!0),e}function Io(e){return e}function Lo(e){return!!e&&typeof e==`function`&&`_static`in e&&!!e._static}function Ro(e,n){return No(t?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":``,()=>n(e),()=>e)||e}function zo(e){return Pa({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function Bo(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[vr]=n.status_code),n.body_size!=null&&(t[hr]=n.body_size)),r&&(r.profile_id&&(t[qr]=r.profile_id),r.profiler_id&&(t[Kr]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[Bn]=a.locale),a.timezone&&(t[Vn]=a.timezone)),o!=null&&o.state&&typeof o.state.type==`string`&&(t[ci]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[mn]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[Nr]=e)}return t}function Vo(e,t){let n=F(e);n.attributes&&delete n.attributes[Li];let r=qa(e),i=F(r),{isolationScope:a,scope:o}=Ji(e),s=Eo(a,o);Ko(n,i,t,s),t.emit(`preprocessSpan`,n),n.is_segment&&(vo(r,xo(r)),Ho(n,s),Wo(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:c,traceLifecycle:l}=t.getOptions();return{...Pa(l!==`static`&&c&&!Lo(c)?Ro(n,c):n),_segmentSpan:r,_segmentNameAtCapture:i.name}}function Ho(e,t){Uo(e,Bo(t.contexts))}function Uo(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function Wo(e,t){let n=t.getIntegrationNames();n.length&&Uo(e,{[Xr]:n})}function Go(e,t,n,r=!0){var i,a,o,s,c,l;let u=t.getSdkMetadata(),{release:d,environment:f}=t.getOptions();return{[ri]:`stream`,[ei]:e.name,[$r]:e.span_id,[Zr]:u==null||(i=u.sdk)==null?void 0:i.name,[Qr]:u==null||(a=u.sdk)==null?void 0:a.version,[Jr]:d,[Lr]:f||`production`,[Oi]:(o=n.user)==null?void 0:o.id,[Di]:(s=n.user)==null?void 0:s.email,[ki]:(c=n.user)==null?void 0:c.ip_address,[Ai]:(l=n.user)==null?void 0:l.username,...r?n.attributes:void 0}}function Ko(e,t,n,r){Uo(e,Go(t,n,r))}function qo(e,t,n){let r=Ma(e),i=F(qa(e)),{isolationScope:a,scope:o}=Ji(e),s=Go(i,t,Eo(a,o),!1);return Object.entries(s).forEach(([e,t])=>{t!=null&&!(e in r.data)&&(r.data[e]=t)}),zo(Ro(r,n))}function R(e){return e.getOptions().traceLifecycle===`stream`}function Jo(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Yo(e,t=[]){return[e,t]}function Xo(e,t){let[n,r]=e;return[n,[...r,t]]}function Zo(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function Qo(e,t){return Zo(e,(e,n)=>t.includes(n))}function $o(e){let t=a(n);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function es(e){let t=a(n);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function ts(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[$o(r),e]:r.push(typeof e==`string`?$o(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Ke(n))}i(e)}}return typeof r==`string`?r:ns(r)}function ns(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function rs(e){let t=typeof e==`string`?$o(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(es(n(e)))}let i=r(),a=[];for(;t.length;){let e=r(),t=typeof e.length==`number`?e.length:void 0;a.push([e,t?n(t):r()])}return[i,a]}function is(e){let 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 as={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`,metric:`trace_metric`};function os(e){return e in as}function ss(e){return os(e)?as[e]:e}function cs(e){if(!(e!=null&&e.sdk))return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ls(e,t,n,r){var i;let a=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Re()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:aa(r)},...a&&{trace:a}}}function us(e){return e===`replay_event`?`replay`:e||`error`}function ds(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function fs(){return`npm`}function ps(){return!ds()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function ms(){return typeof window<`u`&&(!ps()||hs())}function hs(){var e;return((e=n.process)==null?void 0:e.type)===`renderer`}function gs(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=cs(r._metadata);return Yo({sent_at:new Date(Re()).toISOString(),...vs(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:aa(i)}},[_s(e,n)])}function _s(e,t){let n=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,ingest_settings:ms()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function vs(e){return!!e.trace_id&&!!e.public_key}function ys(e){let t=156;if(t+=e.name.length*2,t+=an(e.attributes),e.links&&e.links.length>0){var n;let r=(n=e.links[0])==null?void 0:n.attributes,i=100+(r?an(r):0);t+=i*e.links.length}return t}var bs=1e3,xs=5e6,Ss=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=bs?n:bs,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:xs,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:Jo(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=ys(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(t&&y.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){var n;let r=this._traceBuckets.get(e);if(!r)return;if(!r.spans.size){this._removeTrace(e);return}let i=Array.from(r.spans),a=(n=i[0])==null?void 0:n._segmentSpan;if(!a){t&&y.warn(`No segment span reference found on span JSON, cannot compute DSC`),this._removeTrace(e);return}let o=xo(a);vo(a,o);let s=new Map,c=e=>{let t=s.get(e);return t===void 0&&(t=F(e).name,s.set(e,t)),t},l=i.map(e=>{let{_segmentSpan:t,_segmentNameAtCapture:n,...r}=e;return Cs(r,n,()=>c(t)),r}),u=gs(l,o,this._client);t&&y.log(`Sending span envelope for trace ${e} with ${l.length} spans`),this._client.sendEnvelope(u).then(null,e=>{t&&y.error(`Error while sending streamed span envelope:`,e)}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function Cs(e,t,n){let r=e.attributes[ei];if(t===void 0||(r==null?void 0:r.value)!==t)return;let i=n();i!==t&&(e.attributes[ei]={...r,value:i})}var ws=`SpanStreaming`,Ts=L((e={})=>{let n=e.flushOnSegmentEnd??!0;return{name:ws,setup(e){if(!R(e)){t&&y.log('[SpanStreaming] `traceLifecycle` is "static", skipping setup.');return}let r=new Ss(e);e.on(`afterSpanEnd`,t=>{La(t)&&r.add(Vo(t,e))}),e.on(`flushTraceSpans`,e=>{r.flush(e)}),n&&e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;Jo(setTimeout(()=>{r.flush(t)},500))})}}});function Es(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return Ds(i,t,n,r)}function Ds(e,t,n,r){return Te(e)?Gt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}var Os=new WeakMap;function ks(e){return O(e)?void 0:e}function As(e,t){let n=ks(e);n&&La(t)&&!Os.has(n)&&Os.set(n,wa(t))}function js(e,t,n){var r;let i=ks(t.originalException),a=i&&Os.get(i);if(!a)return;let o=(r=e.contexts)==null?void 0:r.trace;((o==null?void 0:o.trace_id)??(n&&pn(n).trace_id))===a.trace_id&&(e.contexts={...e.contexts,trace:{...o,...a}})}function Ms(e){if(!t)return;let{description:n=`< unknown name >`,op:r=`< unknown op >`,parent_span_id:i}=Ma(e),{spanId:a}=e.spanContext(),o=La(e),s=Ka(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${r}`,`name: ${n}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=Ma(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}y.log(`${l}
3
+ ${u.join(`
4
+ `)}`)}function Ns(e){if(!t)return;let{description:n=`< unknown name >`,op:r=`< unknown op >`}=Ma(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${r}" ${Ka(e)===e?`root `:``}span "${n}" with ID ${i}`;y.log(a)}function Ps(e,n,r){if(!$a(e))return[!1];let i=Fs(e,n);if(!i)return[!1,void 0,void 0,`callback_error`];let[a,o]=i,s=fa(a);if(s===void 0)return t&&y.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(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!s)return t&&y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,s,o];let c=r<s;return c||t&&y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[c,s,o]}function Fs(e,n){let{tracesSampler:r,tracesSampleRate:i}=e;if(typeof r==`function`){let e=No(t?"The `tracesSampler` callback threw an error, falling back to the parent sampling decision or `tracesSampleRate`:":``,()=>[r({...n,inheritOrSampleWith:e=>typeof n.parentSampleRate==`number`?n.parentSampleRate:typeof n.parentSampled==`boolean`?Number(n.parentSampled):e}),!0],()=>void 0);if(e)return e}if(n.parentSampled!==void 0)return[n.parentSampled];if(i!==void 0)return[i,!0]}function Is(e,n,r,i=I()){let a=i&&Ka(i);a&&(t&&y.log(`[Measurement] Setting measurement on root span: ${e} = ${n} ${r}`),a.addEvent(e,{[Ii]:n,[Fi]:r}))}function Ls(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Fi],i=n[Ii];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Rs(){return a(i()).segmentSpanCaptureStrategy}var zs=1e3,Bs=class{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||Lt(),e.startTimestamp?this._startTime=e.startTimestamp:(this._startTime=A(),this._startPerformanceNow=Et()),this._links=e.links,this._attributes={},this.setAttributes({[P]:`manual`,[Wr]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),this._events=[],this._isStandaloneSpan=e.isStandalone}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,n){return this._frozen?this:e===`sentry.segment.name.source`&&n!==void 0&&!Ja(this)?(t&&y.warn(`[Tracing] Ignoring name source on a child span: this attribute is only valid on the root span.`),this):(n===void 0?delete this._attributes[e]:this._attributes[e]=n,this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Vs(this,e),this._startPerformanceNow=void 0)}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,Xa(this,`custom`)),this}end(e){this._endTime||(this._endTime=e==null?this._getEndTimeFromDuration():Vs(this,e),Ns(this),this._onSpanEnded(),this._frozen=Yi(this))}getStaticSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Wr],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ra(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[P],profile_id:this._attributes[qr],exclusive_time:this._attributes[Rr],measurements:Ls(this._events),links:Da(this._links)}}getSpanJSON(){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,is_segment:Ja(this),status:za(this._status),attributes:Ba(this._attributes,this._status),links:Oa(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){if(this._frozen)return this;t&&y.log(`[Tracing] Adding an event to span:`,e);let i=Hs(n)?n:r||void 0,a=Hs(n)?{}:n||{},o={name:e,time:Vs(this,i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){let e=Et();return this._startPerformanceNow==null||e==null?A():this._startTime+(e-this._startPerformanceNow)/1e3}_onSpanEnded(){let e=N();if(e==null||e.emit(`spanEnd`,this),this._isStandaloneSpan){if(!e)return;if(this._sampled){Gs(this,e);return}t&&y.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`);return}e==null||e.emit(`afterSpanEnd`,this);let n=Ka(this);if(n!==this){let e=Rs();if(e){let t=Ji(this).scope||j();e.onChildSpanEnded(this,n,e=>this._convertSpanToTransaction(e),t)}return}if(e&&R(e)){e.emit(`afterSegmentSpanEnd`,this);return}let r=Ji(this).scope||j(),i=Rs();if(i)i.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),r);else{let e=this._convertSpanToTransaction();e&&r.captureEvent(e)}}_convertSpanToTransaction(e={}){var n,r;if(!Us(Ma(this)))return;this._name||=(t&&y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:i,isolationScope:a}=Ji(this),o=i==null||(n=i.getScopeData().sdkProcessingMetadata)==null?void 0:n.normalizedRequest;if(this._sampled!==!0)return;(r=e.onSpanCaptured)==null||r.call(e,this);let s=[],c=0;for(let t of Ga(this)){var l,u;if(t===this||Ws(t)||(l=e.isSpanAlreadyCaptured)!=null&&l.call(e,t))continue;let n=Ma(t);Us(n)?((u=e.onSpanCaptured)==null||u.call(e,t),s.push(n)):e.onSpanCaptured||c++}let d=(i==null?void 0:i.getClient())||N();c&&(d==null||d.recordDroppedEvent(`invalid`,`span`,c)),s.length>zs&&(d==null||d.recordDroppedEvent(`buffer_overflow`,`span`,s.length-zs));let f=this._attributes[ti];delete this._attributes[Li];let p=!1;s.forEach(e=>{var t;delete e.data[Li],(t=e.op)!=null&&t.startsWith(`gen_ai.`)&&(p=!0)});let m={contexts:{trace:Ca(this)},spans:s.length>zs?s.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,zs):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:i,capturedSpanIsolationScope:a,dynamicSamplingContext:xo(this),hasGenAiSpans:p},request:o,...f&&{transaction_info:{source:f}}},h=Ls(this._events);return h&&Object.keys(h).length&&(t&&y.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(h,void 0,2)),m.measurements=h),m}};function Vs(e,t){return Yi(e)?ja(t):ka(t)}function Hs(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Us(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Ws(e){return e instanceof Bs&&e.isStandaloneSpan()}function Gs(e,t){let{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if(r===`static`&&Lo(n)){let r=qo(e,t,n),i=xo(e);t.sendEnvelope(gs([r],i,t));return}let{_segmentSpan:i,_segmentNameAtCapture:a,...o}=Vo(e,t),s=xo(i);t.sendEnvelope(gs([o],s,t))}function Ks(e,t){let n=ic(e),{forceTransaction:r,parentSpan:i,scope:a}=e;return dn(a==null?void 0:a.clone(),()=>lc(i)(()=>{let o=j(),s=cc(a??o,i),c=N(),l=e.onlyIfParent&&!s?ec(o,c):rc({parentSpan:s,spanArguments:n,forceTransaction:r,scope:o});return fc(l,!dc(l)||!s,()=>t(l),()=>l.end())}))}function qs(e,t){let n=ic(e),{forceTransaction:r,parentSpan:i,scope:a}=e;return dn(a==null?void 0:a.clone(),()=>lc(i)(()=>{let o=j(),s=cc(a??o,i),c=e.onlyIfParent&&!s?ec(o,N()):rc({parentSpan:s,spanArguments:n,forceTransaction:r,scope:o});return fc(c,!dc(c)||!s,()=>t(c,()=>c.end()))}))}function Js(e){let t=ic(e),{forceTransaction:n,parentSpan:r,scope:i}=e;return(i?e=>dn(i,e):r===void 0?e=>e():e=>Xs(r,e))(()=>{let a=j(),o=cc(i??a,r),s=N();return e.onlyIfParent&&!o?ec(a,s):rc({parentSpan:o,spanArguments:t,forceTransaction:n,scope:a})})}var Ys=(e,t)=>{let n=en(i());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:a}=e,o=N(),s=Zi(a);return o&&!ya(o,s==null?void 0:s.org_id)?$s(t):dn(e=>{let n=ha(r,a);return e.setPropagationContext(n),Xs(null,t)})};function Xs(e,t){let n=e&&nc(e),r=ac();return r.withActiveSpan?r.withActiveSpan(n,t):dn(e=>(xa(e,n||void 0),t(e)))}function Zs(e){let t=ac();return t.suppressTracing?t.suppressTracing(e):dn(t=>(t.setSDKProcessingMetadata({[Ht]:!0}),e()))}function Qs(e=j()){let t=ac();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Ht]===!0}function $s(e){let n=ac();return n.startNewTrace?n.startNewTrace(e):Xs(null,()=>dn(n=>(n.setPropagationContext({traceId:It(),sampleRand:Le()}),t&&y.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),e())))}function ec(e,t){t==null||t.recordDroppedEvent(`no_parent_span`,`span`);let n=new ho({dropReason:`no_parent_span`,traceId:e.getPropagationContext().traceId});return qi(n,e,M()),n}var tc=`_sentryIgnoredSpanParent`;function nc(e){return e[tc]||e}function rc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var i;let a=M(),o={scope:r,parentSpan:e};(i=N())==null||i.emit(`prepareSpanScope`,o);let{scope:s,parentSpan:c}=o;if(!$a()){let e=s.getPropagationContext(),t=new ho({traceId:c?c.spanContext().traceId:e.traceId});return c&&!n&&Ua(c,t),qi(t,s,a),t}let l=N();if(uc(l,t)){Qs(s)||l==null||l.recordDroppedEvent(`ignored`,`span`);let e=new ho({dropReason:`ignored`,traceId:(c==null?void 0:c.spanContext().traceId)??s.getPropagationContext().traceId});return c&&!n&&(Ua(c,e),ke(e,tc,c)),qi(e,s,a),e}let u;if(c&&!n)u=sc(c,s,t,a),Ua(c,u);else if(c){let e=xo(c),{traceId:n,spanId:r}=c.spanContext(),i=La(c);u=oc({traceId:n,parentSpanId:r,...t},s,a,i),vo(u,e)}else{let{traceId:e,dsc:n,parentSpanId:r,sampled:i}=s.getPropagationContext();u=oc({traceId:e,parentSpanId:r,...t},s,a,i),n&&vo(u,n)}return Ms(u),u}function ic(e){var t;let n={isStandalone:(t=e.experimental)==null?void 0:t.standalone,...e};if(e.op&&(n.attributes={[Wr]:e.op,...e.attributes}),e.startTime){let t={...n};return t.startTimestamp=ka(e.startTime),delete t.startTime,t}return n}function ac(){return en(i())}function oc(e,n,r,i){var a;let o=N(),s=(o==null?void 0:o.getOptions())||{},{name:c=``}=e,l={spanAttributes:{...e.attributes},spanName:c,parentSampled:i};o==null||o.emit(`beforeSampling`,l,{decision:!1});let u=l.parentSampled??i,d=l.spanAttributes,f=n.getPropagationContext(),p=Qs(n),[m,h,g,_]=p?[!1]:Ps(s,{name:c,parentSampled:u,attributes:d,normalizedRequest:r.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:fa((a=f.dsc)==null?void 0:a.sample_rate)},f.sampleRand),v=new Bs({...e,attributes:{[ti]:`custom`,[ji]:h!==void 0&&g?h:void 0,...d},sampled:m});if(!m&&o&&!p){t&&y.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`);let n=_||`sample_rate`;!R(o)&&!e.isStandalone&&o.recordDroppedEvent(n,`transaction`),o.recordDroppedEvent(n,`span`)}return qi(v,n,r),o&&o.emit(`spanStart`,v),v}function sc(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=Qs(t),s=!o&&La(e),c=s?new Bs({...n,parentSpanId:i,traceId:a,sampled:s}):new ho({traceId:a});Ua(e,c),qi(c,t,r);let l=N();return l&&(go(c)&&(go(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c)),c}function cc(e,t){if(t)return nc(t);if(t===null)return;let n=I(e);if(!n)return;let r=N();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Ka(n):nc(n)}function lc(e){return e===void 0?e=>e():t=>Xs(e,t)}function uc(e,t){var n;let r=e==null?void 0:e.getOptions().ignoreSpans;return!e||!R(e)||!(r!=null&&r.length)?!1:to({description:t.name||``,op:((n=t.attributes)==null?void 0:n[`sentry.op`])||t.op,attributes:t.attributes},r)}function dc(e){return go(e)&&e.dropReason===`ignored`}function fc(e,t,n,r){return(t?t=>Xs(e,()=>{let n=j(),r=Ji(e).scope;return r&&n.setPropagationContext(r.getPropagationContext()),qi(e,n,M()),t()}):e=>e())(()=>Es(()=>n(),t=>{As(t,e);let{status:n}=Ma(e);e.isRecording()&&n===`ok`&&e.setStatus({code:2,message:`internal_error`})},r))}var pc=new WeakSet;function mc(e=N()){e&&!pc.has(e)&&R(e)&&(pc.add(e),e.addIntegration(Ts()))}function hc(e,t){return mc(),Ks(e,t)}function gc(e,t){return mc(),qs(e,t)}function _c(e){return mc(),Js(e)}var vc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},yc=`heartbeatFailed`,bc=`idleTimeout`,xc=`finalTimeout`,Sc=`externalFinish`;function Cc(e,n={}){let r=N();mc(r);let i=new Map,a=!1,o,s,c,l=Sc,u=!n.disableAutoFinish,d=[],{idleTimeout:f=vc.idleTimeout,finalTimeout:p=vc.finalTimeout,childSpanTimeout:m=vc.childSpanTimeout,trimIdleSpanEndTimestamp:h=!0}=n,g=j();if(!r||!$a()){let e=new ho({traceId:g.getPropagationContext().traceId});return qi(e,g,M()),e}let _=I(),v=Js(e);xa(j(),v),t&&y.log(`[Tracing] Started span is an idle span`),v.end=new Proxy(v.end,{apply(e,t,n){if(r.emit(`beforeIdleSpanEnd`,v),go(t))return;let[i,...a]=n,o=ka(i||A()),s=Ga(v).filter(e=>e!==v),c=Ma(v);if(!s.length||!h)return T(o),Reflect.apply(e,t,[o,...a]);let l=r.getOptions().ignoreSpans,u=s==null?void 0:s.reduce((e,t)=>{let n=Ma(t);return!n.timestamp||l&&to({description:n.description,op:n.op,attributes:n.data},l)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=c.start_timestamp,f=Math.min(d?d+p/1e3:1/0,Math.max(d||-1/0,Math.min(o,u||1/0)));return T(f),Reflect.apply(e,t,[f,...a])}});function b(){o&&=(clearTimeout(o),void 0)}function x(){s&&=(clearTimeout(s),void 0)}function S(e){b(),o=setTimeout(()=>{!a&&i.size===0&&u&&(l=bc,v.end(e))},f)}function C(e){x(),s=setTimeout(()=>{!a&&u&&(l=yc,v.end(e))},m)}function w(e){b(),i.set(e,!0),C(A()+m/1e3)}function ee(e){i.has(e)&&i.delete(e),i.size===0&&(S(A()+f/1e3),x())}function T(e){a=!0,i.clear(),b(),x(),clearTimeout(c),d.forEach(e=>e()),xa(g,_);let n=Ma(v),{start_timestamp:r}=n;if(!r)return;n.data[`sentry.idle_span_finish_reason`]||v.setAttribute(zr,l);let o=n.status;o&&o!==`unknown`||v.setStatus({code:1}),t&&y.log(`[Tracing] Idle span "${n.op}" finished`);let s=Ga(v).filter(e=>e!==v),u=0;s.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:`cancelled`}),n.end(e),t&&y.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(n,void 0,2)));let{timestamp:r=0,start_timestamp:i=0}=Ma(n),a=i<=e,o=(p+f)/1e3,s=r-i<=o;if(t){let e=JSON.stringify(n,void 0,2);a?s||y.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):y.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}s&&a||(Wa(v,n),u++)}),u>0&&v.setAttribute(`sentry.idle_span_discarded_spans`,u)}return d.push(r.on(`spanStart`,e=>{a||e===v||F(e).end_timestamp||e instanceof Bs&&e.isStandaloneSpan()||Ga(v).includes(e)&&w(e.spanContext().spanId)})),d.push(r.on(`spanEnd`,e=>{a||ee(e.spanContext().spanId)})),d.push(r.on(`idleSpanEnableAutoFinish`,e=>{e===v&&(u=!0,S(),i.size&&C())})),n.disableAutoFinish||S(),c=setTimeout(()=>{a||(v.setStatus({code:2,message:`deadline_exceeded`}),l=xc,v.end())},p),v}function wc(e,t,n){let r,i,a,o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,s=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return u.cancel=l,u.flush=function(){return i!==void 0||a!==void 0?c():r},u}var Tc=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`,`addEventListener`],Ec=[`removeListener`,`off`,`removeEventListener`],Dc=Symbol(`SentryScopeBoundListeners`),Oc;function kc(e){return Oc!==void 0&&(e===Oc||e.listener===Oc)}function Ac(e,t=j()){let n=e;if(Lc(n))return e;Ic(n);for(let e of Tc)typeof n[e]==`function`&&(n[e]=Nc(n,n[e],t));for(let e of Ec)typeof n[e]==`function`&&(n[e]=Pc(n,n[e]));return typeof n.removeAllListeners==`function`&&(n.removeAllListeners=Fc(n,n.removeAllListeners)),e}function jc(e,t){return function(...n){return dn(t,()=>e.apply(this,n))}}function Mc(e){return typeof e==`function`}function Nc(e,t,n){return function(...r){let i=r[0],a=r[1],o=r.slice(2);if(!Mc(a)||kc(a))return t.apply(this,r);let s=Lc(e)||Ic(e),c=s.get(i);c||(c=new WeakMap,s.set(i,c));let l=c.get(a);l||(l=jc(a,n),c.set(a,l));let u=Oc;Oc=l;try{return t.call(this,i,l,...o)}finally{Oc=u}}}function Pc(e,t){return function(...n){var r;let i=n[0],a=n[1],o=n.slice(2),s=Mc(a)?(r=Lc(e))==null||(r=r.get(i))==null?void 0:r.get(a):void 0;return s?t.call(this,i,s,...o):t.apply(this,n)}}function Fc(e,t){return function(...n){let r=Lc(e);if(r){if(n.length===0)Ic(e);else{let e=n[0];r.delete(e)}}return t.apply(this,n)}}function Ic(e){let t=new Map;return e[Dc]=t,t}function Lc(e){return e[Dc]}var Rc=`pageload`,zc=`navigation`,Bc=`navigation.redirect`,Vc=`resource.other`,Hc=`browser.paint`,Uc=`browser.unload_event`,Wc=`browser.redirect`,Gc=`browser.dom_content_loaded_event`,Kc=`browser.load_event`,qc=`browser.connect`,Jc=`browser.tls_ssl`,Yc=`browser.cache`,Xc=`browser.dns`,Zc=`browser.request`,Qc=`browser.response`,$c=`ui.long_task`,el=`ui.long_animation_frame`,tl=`ui.interaction.click`,nl=`ui.interaction.hover`,rl=`ui.interaction.drag`,il=`ui.interaction.press`,al=`ui.webvital.lcp`,ol=`ui.webvital.cls`,sl=`ui.action.click`,cl=`http.client`,ll=`http.client.stream`,ul=`Pageload`,dl=`Navigation`,fl=`Main UI thread blocked`,pl=`Click`,ml=`Hover`,hl=`Drag`,gl=`Key press`,_l={[Yc]:`Cache lookup`,[Xc]:`DNS lookup`,[qc]:`Connect`,[Jc]:`TLS handshake`,[Wc]:`Redirect`,[Zc]:`Request`,[Qc]:`Response`,[Uc]:`Unload event`,[Gc]:`DOMContentLoaded event`,[Kc]:`Load event`};function vl(e,t){var n,r,i,a;if(!t)return e;let o=e.sdk||{};return e.sdk={...o,name:o.name||t.name,version:o.version||t.version,integrations:[...((n=e.sdk)==null?void 0:n.integrations)||[],...t.integrations||[]],packages:[...((r=e.sdk)==null?void 0:r.packages)||[],...t.packages||[]],settings:(i=e.sdk)!=null&&i.settings||t.settings?{...(a=e.sdk)==null?void 0:a.settings,...t.settings}:void 0},e}function yl(e,t,n,r){let i=cs(n);return Yo({sent_at:new Date(Re()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:aa(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function bl(e,t,n,r){let i=cs(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;vl(e,n==null?void 0:n.sdk);let o=ls(e,i,r,t);return delete e.sdkProcessingMetadata,Yo(o,[[{type:a},e]])}var xl=`[Filtered]`,Sl=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],Cl=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function wl(e,t){return t.some(t=>e.includes(t))}function Tl(e,t,n){if(t===!1)return!0;let r=e.toLowerCase();if(wl(r,n==null?Sl:[...Sl,...n]))return!0;if(t===!0)return!1;let i=(`deny`in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return`deny`in t?i:!i}function El(e,t,n){if(t===!1)return{};let r={};for(let[i,a]of Object.entries(e))r[i]=Tl(i,t,n)?xl:a;return r}var Dl=0,Ol=1,kl=2;function Al(e){return new Ml(t=>{t(e)})}function jl(e){return new Ml((t,n)=>{n(e)})}var Ml=class e{constructor(e){this._state=Dl,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(this._state===Dl)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Ol&&e[1](this._value),this._state===kl&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{this._state===Dl&&(Te(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(Ol,e)},r=e=>{t(kl,e)};try{e(n,r)}catch(e){r(e)}}};function Nl(e,t,n,r=0,i){try{let a=Pl(t,n,e,r,i);return Te(a)?a:Al(a)}catch(e){return jl(e)}}function Pl(e,n,r,i,a){let o=r[i];if(!e||!o)return e;let s=`Event processor "${o.id||`?`}"`,c=!1,l=No(t?`${s} threw an error, dropping event:`:``,()=>o({...e},n),()=>(c=!0,null));return t&&l===null&&y.log(`${s} dropped event`),Te(l)?l.then(e=>e?Pl(e,n,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)):l?Pl(l,n,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)}var Fl,Il,Ll,Rl;function zl(e){let t=n._sentryDebugIds,r=n._debugIds;if(!t&&!r)return{};let i=t?Object.keys(t):[],a=r?Object.keys(r):[];if(Rl&&i.length===Il&&a.length===Ll)return Rl;Il=i.length,Ll=a.length,Rl={},Fl||={};let o=(t,n)=>{for(let i of t){let t=n[i],a=Fl==null?void 0:Fl[i];if(a&&Rl&&t)Rl[a[0]]=t,Fl&&(Fl[i]=[a[0],t]);else if(t){let n=e(i);for(let e=n.length-1;e>=0;e--){var r;let a=(r=n[e])==null?void 0:r.filename;if(a&&Rl&&Fl){Rl[a]=t,Fl[i]=[a,t];break}}}}};return t&&o(i,t),r&&o(a,r),Rl}function Bl(e,t){let n=zl(e);if(!n)return[];let r=[];for(let e of t){let t=ie(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function Vl(e){var t;return((t=e.data)==null?void 0:t.__sentry__)===!0}function Hl(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Ul(e,t,n,r,i,a){var o;let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=e,l={...t,event_id:t.event_id||n.event_id||ut(),timestamp:t.timestamp||Ct()},u=n.integrations||e.integrations.map(e=>e.name);Wl(l,e),ql(l,u),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Gl(l,e.stackParser);let d=Yl(r,n.captureContext);n.mechanism&&ht(l,n.mechanism);let f=i?i.getEventProcessors():[],p=Eo(a,d),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),Co(l,p);let h=I(d);h&&Ao(l,h),js(l,n,d);let g=[...f,...p.eventProcessors],_=t.type===`transaction`,v=((o=t.spans)==null?void 0:o.length)||0;return(Vl(n)?Al(l):Nl(g,l,n,0,e=>{i&&(i.recordDroppedEvent(e,us(t.type)),_&&i.recordDroppedEvent(e,`span`,1+v))})).then(e=>{if(!e)return null;if(_&&i){var t;let n=v-(((t=e.spans)==null?void 0:t.length)||0);n>0&&i.recordDroppedEvent(`event_processor`,`span`,n)}return Kl(e),typeof s==`number`&&s>0?Jl(e,s,c):e})}function Wl(e,t){var n;let{environment:r,release:i,dist:a,maxValueLength:o}=t;e.environment=e.environment||r||`production`,!e.release&&i&&(e.release=i),!e.dist&&a&&(e.dist=a);let s=e.request;s!=null&&s.url&&o&&(s.url=nt(s.url,o)),o&&((n=e.exception)==null||(n=n.values)==null||n.forEach(e=>{e.value&&=nt(e.value,o)}))}function Gl(e,t){var n;let r=zl(t);(n=e.exception)==null||(n=n.values)==null||n.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.filename&&(e.debug_id=r[e.filename])})})}function Kl(e){var t;let n={};if((t=e.exception)==null||(t=t.values)==null||t.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.debug_id&&(e.abs_path?n[e.abs_path]=e.debug_id:e.filename&&(n[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(n).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(n).forEach(([e,t])=>{r.push({type:`sourcemap`,code_file:e,debug_id:t})})}function ql(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Jl(e,t,n){var r,i;if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ke(e.data,t,n)}}))},...e.user&&{user:Ke(e.user,t,n)},...e.contexts&&{contexts:Ke(e.contexts,t,n)},...e.extra&&{extra:Ke(e.extra,t,n)}};return(r=e.contexts)!=null&&r.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Ke(e.contexts.trace.data,t,n))),e.spans&&(a.spans=e.spans.map(e=>({...e,...e.data&&{data:Ke(e.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&a.contexts&&(a.contexts.flags=Ke(e.contexts.flags,3,n)),a}function Yl(e,t){if(!t)return e;let n=e?e.clone():new zt;return n.update(t),n}function Xl(e){if(e)return Zl(e)||$l(e)?{captureContext:e}:e}function Zl(e){return e instanceof zt||typeof e==`function`}var Ql=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function $l(e){return Object.keys(e).some(e=>Ql.includes(e))}function eu(e,t){return j().captureException(e,Xl(t))}function tu(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return j().captureMessage(e,n,r)}function nu(e,t){return j().captureEvent(e,t)}function ru(e,t){M().setContext(e,t)}function iu(e){M().setExtras(e)}function au(e,t){M().setExtra(e,t)}function ou(e){M().setTags(e)}function su(e,t){M().setTag(e,t)}function cu(e){M().setAttributes(e)}function lu(e,t){M().setAttribute(e,t)}function uu(e){M().setUser(e)}function du(e){M().setConversationId(e)}function fu(){return M().lastEventId()}async function pu(e){let n=N();return n?n.flush(e):(t&&y.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function mu(e){let n=j(),r=n.getClient();if(r){let t=await r.close(e);return n.getClient()===r&&n.setClient(void 0),t}return t&&y.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1)}function hu(){return!!N()}function gu(){let e=N();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function _u(e){M().addEventProcessor(e)}function vu(e){var t;let r=M(),{user:i}=Eo(r,j()),a=(t=n.navigator)==null?void 0:t.userAgent;if(a){var o;let e=((o=N())==null?void 0:o.getDataCollectionOptions().httpHeaders.request)??!0;a=El({"User-Agent":a},e)[`User-Agent`]}let s=jt({user:i,userAgent:a,...e}),c=r.getSession();return(c==null?void 0:c.status)===`ok`&&Mt(c,{status:`exited`}),yu(),r.setSession(s),s}function yu(){let e=M(),t=j().getSession()||e.getSession();t&&Nt(t),bu(),e.setSession()}function bu(){let e=M(),t=N(),n=e.getSession();n&&t&&t.captureSession(n)}function xu(e=!1){e?yu():bu()}function Su(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Cu(e){return`${Su(e)}${e.projectId}/envelope/`}function wu(e,t){let 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 Tu(e,t,n){return t||`${Cu(e)}?${wu(e,n)}`}function Eu(e,t){let n=da(e);if(!n)return``;let r=`${Su(n)}embed/error-page/`,i=`dsn=${aa(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`&&e!==`onError`){if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`}return`${r}?${i}`}function Du(e,t){var n,r,i;if(e.type!==`transaction`||!((n=e.spans)!=null&&n.length)||!((r=e.sdkProcessingMetadata)!=null&&r.hasGenAiSpans)||R(t))return;let a=[],o=[];for(let t of e.spans)(i=t.op)!=null&&i.startsWith(`gen_ai.`)?a.push(zo(t)):o.push(t);if(a.length!==0)return e.spans=o,_s(a,t)}var Ou=Symbol.for(`SentryBufferFullError`);function ku(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return jl(Ou);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Al(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Jo(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Au=6e4;function ju(e,t=Re()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Au:r-t}function Mu(e,t){return e[t]||e.all||0}function Nu(e,t,n=Re()){return Mu(e,t)>n}function Pu(e,t,n=Re()){let r={...e};return Fu(t,n,(e,t)=>{r[e]=Math.max(r[e]||0,t)}),r}function Fu({statusCode:e,headers:t},n,r){let i=t==null?void 0:t[`x-sentry-rate-limits`],a=t==null?void 0:t[`retry-after`];if(i)for(let e of i.trim().split(`,`)){let[t,i,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!i)r(`all`,n+s);else for(let e of i.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&r(e,n+s):r(e,n+s)}else a?r(`all`,n+ju(a,n)):e===429&&r(`all`,n+6e4)}function Iu(e,n,r=ku(e.bufferSize||64)){let i={},a=e=>r.drain(e);function o(t,[n,r],i){var a;let o=ss(i);i===`transaction`&&e.recordDroppedEvent(t,`span`,(((a=r.spans)==null?void 0:a.length)??0)+1),e.recordDroppedEvent(t,o,typeof n.item_count==`number`?n.item_count:1)}function s(e){let a=[];if(Zo(e,(e,t)=>{Nu(i,ss(t))?o(`ratelimit_backoff`,e,t):a.push(e)}),a.length===0)return Promise.resolve({});let s=Yo(e[0],a),c=e=>{Qo(s,[`client_report`])?t&&y.warn(`Dropping client report. Will not send outcomes (reason: ${e}).`):Zo(s,(t,n)=>{o(e,t,n)})};return r.add(()=>n({body:ts(s)}).then(e=>e.statusCode===413?(t&&y.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(t&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&y.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Pu(i,e),e),e=>{throw c(`network_error`),t&&y.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===Ou)return t&&y.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:s,flush:a}}function Lu(e,t,n){let r=[{type:`client_report`},{timestamp:n||Ct(),discarded_events:e}];return Yo(t?{dsn:t}:{},[r])}function Ru(e){var t;let{trace_id:n,parent_span_id:r,span_id:i,status:a,origin:o,data:s,op:c,links:l}=((t=e.contexts)==null?void 0:t.trace)??{};return{data:s??{},description:e.transaction,op:c,parent_span_id:r,span_id:i??``,start_timestamp:e.start_timestamp??0,status:a??`ok`,timestamp:e.timestamp,trace_id:n??``,origin:o,links:l,profile_id:s==null?void 0:s[qr],exclusive_time:s==null?void 0:s[Rr],measurements:e.measurements,is_segment:!0}}function zu(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,links:e.links,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}function Bu(e){var t;e.traceLifecycle===`stream`&&(e.beforeSendTransaction||(t=e.ignoreTransactions)!=null&&t.length)&&u(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}var Vu={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function Hu(e){return typeof e==`boolean`||`allow`in e||`deny`in e}function Uu(e){return e===void 0?{...Vu.httpHeaders}:Hu(e)?{request:e,response:e}:{request:e.request??Vu.httpHeaders.request,response:e.response??Vu.httpHeaders.response}}function Wu(e){var t,n,r,i,a,o;let s=e.dataCollection??{};return{userInfo:s.userInfo??Vu.userInfo,cookies:s.cookies??Vu.cookies,httpHeaders:Uu(s.httpHeaders),httpBodies:s.httpBodies??Vu.httpBodies,urlQueryParams:s.urlQueryParams??Vu.urlQueryParams,graphQL:{document:((t=s.graphQL)==null?void 0:t.document)??Vu.graphQL.document,variables:((n=s.graphQL)==null?void 0:n.variables)??Vu.graphQL.variables},genAI:{inputs:((r=s.genAI)==null?void 0:r.inputs)??Vu.genAI.inputs,outputs:((i=s.genAI)==null?void 0:i.outputs)??Vu.genAI.outputs},mcp:{inputs:((a=s.mcp)==null?void 0:a.inputs)??Vu.mcp.inputs,outputs:((o=s.mcp)==null?void 0:o.outputs)??Vu.mcp.outputs},databaseQueryData:s.databaseQueryData??Vu.databaseQueryData,queues:s.queues??Vu.queues,stackFrameVariables:s.stackFrameVariables??Vu.stackFrameVariables,frameContextLines:s.frameContextLines??Vu.frameContextLines}}var Gu=`Not capturing exception because it's already been captured.`,Ku=`Discarded session because of missing or non-string release`,qu=Symbol.for(`SentryInternalError`),Ju=Symbol.for(`SentryDoNotSendEventError`),Yu=Symbol.for(`SentryClosedClient`);function Xu(e){return Yu in e}function Zu(e){return{message:e,[qu]:!0}}function Qu(e){return{message:e,[Ju]:!0}}function $u(e){return Qu(`Discarding event because it's not included in the random sample (sampling rate = ${e})`)}function ed(e){return Se(e)&&qu in e}function td(e){return Se(e)&&Ju in e}var nd=class{constructor(e){var n;this._options={attachStacktrace:!0,...e,traceLifecycle:e.traceLifecycle===`static`?`static`:`stream`},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ku(((n=e.transportOptions)==null?void 0:n.bufferSize)??64),this._dataCollection=Wu(e),this._unhandledSessionStatus=`crashed`,this._attachStacktraceIsDefault=e.attachStacktrace===void 0,e.dsn?this._dsn=da(e.dsn):t&&y.warn(`No DSN provided, client will not send events.`);let{beforeSendSpan:r,traceLifecycle:i}=this._options;if(t&&r&&Lo(r)!==(i===`static`)&&u(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${i===`static`?`wrap it with`:`remove`} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${i}"\`.`)}),this._dsn){let n=Tu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=No(t?`Failed to create the transport, client will not send events:`:``,()=>e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n}),()=>void 0)}}captureException(e,n,r){let i=ut();if(vt(e))return t&&y.log(Gu),i;let a={event_id:i,...n};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:ut(),...n},a=xe(e)?e:String(e),o=O(e),s=o?this.eventFromMessage(a,t,i).then(e=>(e.exception&&this._attachStacktraceIsDefault&&(e.sdkProcessingMetadata={...e.sdkProcessingMetadata,hasDefaultSyntheticStacktrace:!0}),e)):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,n,r){let i=ut();if(n!=null&&n.originalException&&vt(n.originalException))return t&&y.log(Gu),i;let a={event_id:i,...n},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=us(e.type);return this._process(()=>this._captureEvent(e,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),Mt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e);this._options.sendClientReports&&this._flushOutcomes();let r=await t.flush(e);return n&&r}async close(e){Object.defineProperty(this,Yu,{value:!0});let 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(),Bu(this._options))}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),uo(this,e,this._integrations),t||lo(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Du(e,this),r=bl(e,this._dsn,this._options._metadata,this._options.tunnel);if(!Vl(t))for(let e of t.attachments||[])r=Xo(r,is(e));n&&(r=Xo(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:n,environment:r=po}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!n){t&&y.warn(Ku);return}i.release=i.release||n,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!n){t&&y.warn(Ku);return}e.release=e.release||n,e.environment=e.environment||r}this.emit(`beforeSendSession`,e);let i=yl(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;t&&y.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{let t=await this._transport.send(e);return this.emit(`afterEnvelope`,e),t}catch(e){return t&&y.error(`Error while sending envelope:`,e),{}}return t&&y.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=co(this,e),lo(this,e)}_updateSessionFromEvent(e,t){var n;let r=t.level===`fatal`,i=!1,a=(n=t.exception)==null?void 0:n.values;if(a){var o;i=!0,r=!1;for(let e of a)if(((o=e.mechanism)==null?void 0:o.handled)===!1){r=!0;break}}let s=e.status===`ok`;(s&&e.errors===0||s&&r)&&(Mt(e,{...r&&{status:this._unhandledSessionStatus},errors:e.errors||Number(i||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ul(i,e,t,n,this,r).then(e=>{var r;return e===null||(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...(r=e.contexts)==null?void 0:r.trace,...pn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:bo(this,n),...e.sdkProcessingMetadata}),e})}_captureEvent(e,n={},r=j(),i=M()){return t&&id(e)&&y.log(`Captured error event \`${Hl(e)[0]||`<unknown>`}\``),this._processEvent(e,n,r,i).then(e=>e.event_id,e=>{t&&(td(e)?y.log(e.message):ed(e)?y.warn(e.message):y.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=ad(e),s=id(e),c=`before send for type \`${e.type||`error`}\``,l=`before_send`,u=0,d=a===void 0?void 0:fa(a),f=s&&typeof d==`number`&&Le()>d,p=us(e.type),m=0,h=n.getSession()||r.getSession();return f&&(h==null?void 0:h.status)!==`ok`?(this.recordDroppedEvent(`sample_rate`,`error`),jl($u(a))):this._prepareEvent(e,t,n,r).then(e=>{var n;if(e===null)throw Qu("An event processor returned `null`, will not send event.");return m=((n=e.spans)==null?void 0:n.length)||0,Vl(t)?e:rd(i,e,t,e=>{l=e},e=>{u=e})}).then(n=>{if(u&&this.recordDroppedEvent(`ignored`,`span`,u),!k(n)||n===null)throw this.recordDroppedEvent(l,p),o&&this.recordDroppedEvent(l,`span`,1+m-u),n===null?Qu(`${l===`ignored`?"Transaction matched `ignoreSpans`":`${c} ${l===`callback_error`?`threw an error`:"returned `null`"}`}, will not send event.`):Zu(`${c} must return \`null\` or a valid event.`);if(s&&h&&this._updateSessionFromEvent(h,n),f)throw this.recordDroppedEvent(`sample_rate`,`error`),$u(a);if(o){var r;let e=m-u-(((r=n.spans)==null?void 0:r.length)||0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let i=n.transaction_info;return o&&i&&n.transaction!==e.transaction&&(n.transaction_info={...i,source:`custom`}),this.sendEvent(n,t),n}).then(null,e=>{throw td(e)||ed(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Zu(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Ou&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){t&&y.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){t&&y.log(`No outcomes to send`);return}if(!this._dsn){t&&y.log(`No dsn provided, will not send outcomes`);return}t&&y.log(`Sending outcomes:`,e);let n=Lu(e,this._options.tunnel&&aa(this._dsn));this.sendEnvelope(n)}};function rd(e,n,r,i,a){let{beforeSend:o,ignoreSpans:s,beforeSendTransaction:c}=e,l=Lo(e.beforeSendSpan)&&e.beforeSendSpan,u=n;if(id(u)&&o){let e=u;return No(t?"The `beforeSend` callback threw an error, dropping the event:":``,()=>o(e,r),()=>(i(`callback_error`),null))}if(ad(u)){if(l||s){let e=Ru(u);if(s!=null&&s.length&&to({description:e.description,op:e.op,attributes:e.data},s))return i(`ignored`),null;if(l&&(u=Ft(n,zu(Ro(e,l)))),u.spans){let e=[],t=u.spans;for(let n of t)s!=null&&s.length&&to({description:n.description,op:n.op,attributes:n.data},s)?ro(t,n):l?e.push(Ro(n,l)):e.push(n);a(t.length-e.length),u.spans=e}}if(c)return No(t?"The `beforeSendTransaction` callback threw an error, dropping the event:":``,()=>c(u,r),()=>(i(`callback_error`),null))}return u}function id(e){return e.type===void 0}function ad(e){return e.type===`transaction`}function od(e,n){n.debug===!0&&(t?y.enable():u(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),sd(),j().update(n.initialScope);let r=new e(n);return cd(r),r.init(),r}function sd(){let e=N();e&&!Xu(e)&&u(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")})}function cd(e){j().setClient(e)}var ld=5e3,ud=36e5;function dd(e){function n(...e){t&&y.log(`[Offline]:`,...e)}return t=>{let r=e(t);if(!t.createStore)throw Error("No `createStore` function was provided");let i=t.createStore(t),a=ld,o;function s(e,n,r){return Qo(e,[`client_report`])?!1:!t.shouldStore||t.shouldStore(e,n,r)}function c(e){o&&clearTimeout(o),o=Jo(setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(n(`Attempting to send previously queued event`),e[0].sent_at=new Date(Re()).toISOString(),u(e,!0).catch(e=>{n(`Failed to retry sending`,e)}))},e))}function l(){o||(c(a),a=Math.min(a*2,ud))}async function u(e,o=!1){if(!o&&Qo(e,[`replay_event`,`replay_recording`]))return await i.push(e),c(100),{};try{if(t.shouldSend){let n=t.shouldSend(e);if((Te(n)?await n:n)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false")}let n=await r.send(e),i=100;if(n){var u,d;if((u=n.headers)!=null&&u[`retry-after`])i=ju(n.headers[`retry-after`]);else if((d=n.headers)!=null&&d[`x-sentry-rate-limits`])i=6e4;else if((n.statusCode||0)>=400)return n}return c(i),a=ld,n}catch(t){let r=s(e,t,a);if(Te(r)?await r:r)return o?await i.unshift(e):await i.push(e),l(),n(`Error sending. Event queued.`,t),{};throw t}}return t.flushAtStartup&&l(),{send:u,flush:e=>(e===void 0&&(a=ld,c(100)),r.flush(e))}}}var fd=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function pd(e,t){let n;return Zo(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function md(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=pd(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function hd(e,t){return Yo(t?{...e[0],dsn:t}:e[0],e[1])}function gd(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{var t;let n=e.getEvent();return n!=null&&(t=n.extra)!=null&&t.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(n.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?n.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=oa(t);if(!s)return;let c=Tu(s,n.tunnel);o=r?md(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return pd(e,t!=null&&t.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(hd(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}}}function _d(e,t){return(Array.isArray(e)?e:[e]).flatMap(e=>typeof e==`string`?t===`set-cookie`?vd(e).flatMap(e=>e.split(`;`,1)):e.split(`;`):[]).map(e=>e.trim()).filter(e=>e!==``&&e!==`=`).map(e=>{let t=e.indexOf(`=`);return t===-1?[``,e]:[e.slice(0,t).trim(),e.slice(t+1).trim()]})}function vd(e){return e.split(/,(?=[^;=,]*=)/)}function yd(e){let t={};for(let[n,r]of e)t[n]===void 0&&(t[n]=n===``?xl:bd(r));return t}function bd(e){let t=e.length>1&&e.startsWith(`"`)&&e.endsWith(`"`)?e.slice(1,-1):e;try{return t.indexOf(`%`)===-1?t:decodeURIComponent(t)}catch{return t}}function xd(e,t,n){return t===!1?{}:El(yd(_d(e,n)),t,Cl)}function Sd(e,t){let n=e.indexOf(`=`),r=n===-1?e:e.slice(0,n),i=new URLSearchParams(`${r}=`).keys().next().value;return i!==void 0&&Tl(i,t)?`${r}=${xl}`:e}function Cd(e,t){if(e&&t!==!1)return e.split(`&`).map(e=>Sd(e,t)).join(`&`)}function wd(e,t){if(!e||t===!1)return;let n=e.indexOf(`?`);return`${n===-1?``:e.slice(0,n+1)}${(n===-1?e:e.slice(n+1)).split(`&`).map(e=>e.includes(`=`)?Sd(e,t):e).join(`&`)}`}function Td(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?void 0:e.slice(n+1),a=r.indexOf(`?`),o=r;if(a!==-1){let e=Cd(r.slice(a+1),t);o=`${r.slice(0,a)}${e?`?${e}`:``}`}let s=i===void 0?void 0:wd(i,t);return s?`${o}#${s}`:o}function Ed(e){var t;return((t=e??N())==null?void 0:t.getDataCollectionOptions().urlQueryParams)??!0}function Dd(e,t){return e===void 0?void 0:Td(e,Ed(t))}function Od(e,t){return e?Cd(e,Ed(t)):void 0}function kd(e,t){return e?wd(e,Ed(t)):void 0}var Ad=`thismessage:/`;function jd(e){return`isRelative`in e}function Md(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Ad:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Nd(e){if(jd(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Pd(e){return(e==null?void 0:e.replace(/^\?/,``))||void 0}function Fd(e){return(e==null?void 0:e.replace(/^#/,``))||void 0}function Id(e,t){try{return new URL(e,t).hostname||void 0}catch{return}}function Ld(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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 Rd(e){return e.split(/[?#]/,1)[0]}function zd(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Bd(e,t){let n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return Hd(e,n)||Vd(e,r)}function Vd(e,t){return t?Wd(e)===Wd(t):!1}function Hd(e,t){let n=Md(e);return!n||jd(n)||!t?!1:Ud(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function Ud(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Wd(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function Gd(e,...t){let n=e.map((t,n)=>t??e.raw[n]),r=new String(String.raw({raw:n},...t));return r.__sentry_template_string__=n.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),r.__sentry_template_values__=t,r}var Kd=Gd;function qd(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Jd(e){var t;let n=e?da(e):(t=N())==null?void 0:t.getDsn();return n?`/${qd(aa(n))}`:void 0}function Yd(e){let t=(e!=null&&e.startsWith(`./`)?e.slice(1):e??``).replace(/\/$/,``);return!t||t.startsWith(`/`)?t:`/${t}`}function Xd(e){if(`aggregates`in e){var t;((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`})}else e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Zd(e){return Array.from(new Set(e))}function Qd(e){var t;if((t=e._metadata)!=null&&t.optionsSetByUser)return e;let{integrations:n}=e,r={...e._metadata,optionsSetByUser:Object.keys(e).filter(e=>e!==`_metadata`).sort()};return Array.isArray(n)&&(r.integrationsSetByUser=Zd(n.map(e=>e.name))),{...e,_metadata:r,...typeof n==`function`&&{integrations:e=>{let t=new Set(e),i=n(e),a=Array.isArray(i)?i:[i],o=new Set,s=new Set;for(let e of a)o.add(e.name),!t.has(e)&&!e.isDefaultInstance&&s.add(e.name);let c=new Set;for(let e of t)o.has(e.name)||c.add(e.name);return r.integrationsSetByUser=Array.from(s),c.size&&(r.removedDefaultIntegrations=Array.from(c).sort()),a}}}}function $d(e,t,n=[t],i=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=n.map(e=>({name:`${i}:@sentry/${e}`,version:r})),a.version=r)}function ef(e={}){let n=e.client||N();if(!gu()||!n)return{};let r=en(i());if(r.getTraceData)return r.getTraceData(e);let a=e.scope||j(),o=e.span||I(),s=go(o)&&!$a(n.getOptions());if(!o&&ln())return{};let c=o&&!s?Ta(o):tf(a),l=Qi(o?xo(o):bo(n,a));if(!pa.test(c))return t&&y.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let u={"sentry-trace":c,baggage:l};return e.propagateTraceparent&&(u.traceparent=o&&!s?Ea(o):nf(a)),u}function tf(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ga(t,r,n)}function nf(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return _a(t,r,n)}var rf=new WeakMap;function af(e){let t=`${e.flags.replace(/[gy]/g,``)}${e.ignoreCase?``:`i`}`;if(t===e.flags)return e;let n=rf.get(e);if(n)return n;let r=new RegExp(e.source,t);return rf.set(e,r),r}function of(e,t,n=!1){let r=e.toLowerCase();for(let i of t)if(be(i)){let e=i.toLowerCase();if(n?r===e:r.includes(e))return!0}else if(we(i)&&af(i).test(e))return!0;return!1}var sf=100;function cf(e,n){let r=N(),i=M();if(!r)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:o=sf}=r.getOptions();if(o<=0)return;let s={timestamp:Ct(),...e},c=a?No(t?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":``,()=>u(()=>a(s,n)),()=>null):s;c!==null&&(r.emit&&r.emit(`beforeAddBreadcrumb`,c,n),i.addBreadcrumb(c,o))}var lf=`FunctionToString`,uf=new WeakMap,df=L((()=>({name:lf,setupOnce(){let e=Function.prototype.toString,t=Function.prototype.call.bind(e),n=Function.prototype.call.bind(Object.prototype.hasOwnProperty);try{Function.prototype.toString=function(){let e;try{uf.has(N())&&n(this,`__sentry_original__`)&&(e=je(this))}catch{}return t(e??this)}}catch{}},setup(e){uf.set(e,!0)}}))),ff=[/^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$/,/Java object is gone$/],pf=`EventFilters`,mf=L((e={})=>{let t;return{name:pf,setup(n){t=hf(e,n.getOptions())},processEvent(n,r,i){return t||=hf(e,i.getOptions()),gf(n,t)?null:n}}});function hf(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ff],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function gf(e,n){if(!e.type){if(_f(e,n.ignoreErrors))return t&&y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ft(e)}`),!0;if(Cf(e))return t&&y.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ft(e)}`),!0;if(yf(e,n.denyUrls))return t&&y.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ft(e)}.\nUrl: ${Sf(e)}`),!0;if(!bf(e,n.allowUrls))return t&&y.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ft(e)}.\nUrl: ${Sf(e)}`),!0}else if(e.type===`transaction`&&vf(e,n.ignoreTransactions))return t&&y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ft(e)}`),!0;return!1}function _f(e,t){return t!=null&&t.length?Hl(e).some(e=>ot(e,t)):!1}function vf(e,t){if(!(t!=null&&t.length))return!1;let n=e.transaction;return n?ot(n,t):!1}function yf(e,t){if(!(t!=null&&t.length))return!1;let n=Sf(e);return n?ot(n,t):!1}function bf(e,t){if(!(t!=null&&t.length))return!0;let n=Sf(e);return!n||ot(n,t)}function xf(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Sf(e){try{var n,r;let t=(n=[...((r=e.exception)==null?void 0:r.values)??[]].reverse().find(e=>{var t,n;return((t=e.mechanism)==null?void 0:t.parent_id)===void 0&&((n=e.stacktrace)==null||(n=n.frames)==null?void 0:n.length)}))==null||(n=n.stacktrace)==null?void 0:n.frames;return t?xf(t):null}catch{return t&&y.error(`Cannot extract url for event ${ft(e)}`),null}}function Cf(e){var t;return(t=e.exception)!=null&&(t=t.values)!=null&&t.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function wf(e,t,n,r,i,a){var o;if(!((o=i.exception)!=null&&o.values)||!a||!D(a.originalException))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Tf(e,t,r,a.originalException,n,i.exception.values,s,0))}function Tf(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(D(r[i])){Of(o,s,r);let a=e(t,r[i]),l=c.length;kf(a,i,l,s),c=Tf(e,t,n,r[i],i,[a,...c],a,l)}return Ef(r)&&r.errors.forEach((a,l)=>{if(c.length<n+1&&D(a)){Of(o,s,r);let u=e(t,a),d=c.length;kf(u,`errors[${l}]`,d,s),c=Tf(e,t,n,a,i,[u,...c],u,d)}}),Df(r)&&[`error`,`suppressed`].forEach(a=>{let l=r[a];if(c.length<n+1&&D(l)){Of(o,s,r);let u=e(t,l),d=c.length;kf(u,a,d,s),c=Tf(e,t,n,l,i,[u,...c],u,d)}}),c}function Ef(e){return Array.isArray(e.errors)}function Df(e){return`error`in e&&`suppressed`in e}function Of(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Ef(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function kf(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Af(e){return D(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function jf(e){let t=Mf(e.message);return Af(e)?`${t} (${e.__sentry_fetch_url_host__})`:t}function Mf(e){if(typeof e==`string`)return e;if(e==null)return``;if(O(e))return String(e);if(k(e)||Array.isArray(e)){let t=tt(e,``);if(t)return t}return Xe(void 0,e)}var Nf=new Map,Pf=new Set;function Ff(e){if(n._sentryModuleMetadata)for(let t of Object.keys(n._sentryModuleMetadata)){let r=n._sentryModuleMetadata[t];if(Pf.has(t))continue;Pf.add(t);let i=e(t);for(let e of i.reverse())if(e.filename){Nf.set(e.filename,r);break}}}function If(e,t){return Ff(e),Nf.get(t)}function Lf(e,t){var n;(n=t.exception)==null||(n=n.values)==null||n.forEach(t=>{var n;(n=t.stacktrace)==null||(n=n.frames)==null||n.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=If(e,t.filename);n&&(t.module_metadata=n)})})}function Rf(e){var t;(t=e.exception)==null||(t=t.values)==null||t.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{delete e.module_metadata})})}var zf=L(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{Zo(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Rf(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{t.type||Lf(e.getOptions().stackParser,t)})}})),Bf=new Set([]);function Vf(e){let t=`console`,n=se(t,e);return E(t,Wf),n}function Hf(e){for(let t of e)Bf.add(t);return()=>{for(let t of e)Bf.delete(t)}}var Uf=new Set;function Wf(){`console`in n&&s.forEach(function(e){!Uf.has(e)&&e in n.console&&(Uf.add(e),Oe(n.console,e,function(r){return l[e]=r,function(...r){let i=r[0],a=l[e],o=Bf.size&&typeof i==`string`&&ot(i,Bf);o||ce(`console`,{args:r,level:e}),(!o||t&&y.isEnabled())&&(a==null||a.apply(n.console,r))}}))})}function Gf(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Kf=`CaptureConsole`,qf=L(((e={})=>{let t=e.levels||s,r=e.handled??!0;return{name:Kf,setup(e){`console`in n&&Vf(({args:n,level:i})=>{N()===e&&t.includes(i)&&Jf(n,i,r)})}}}));function Jf(e,t,n){let r=Gf(t),i=Error(),a={level:Gf(t),extra:{arguments:e}};dn(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,mt(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${it(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){eu(s,a);return}let c=it(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var Yf=`Dedupe`,Xf=L((()=>{let e;return{name:Yf,processEvent(n){if(n.type)return n;try{if(Zf(n,e))return t&&y.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=n}}}));function Zf(e,t){return t?!!(Qf(e,t)||$f(e,t)):!1}function Qf(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!tp(e,t)||!ep(e,t))}function $f(e,t){let n=np(t),r=np(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!tp(e,t)||!ep(e,t))}function ep(e,t){let n=re(e),r=re(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function tp(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join(``)===r.join(``)}catch{return!1}}function np(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}var rp=`ExtraErrorData`,ip=L(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:rp,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return ap(e,r,t,n,a)}}}));function ap(e,t={},n,r,i){if(!t.originalException||!D(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=op(t.originalException,r,i);if(o){let t={...e.contexts},r=Ke(o,n);return k(r)&&(Ve(r),t[a]=r),{...e,contexts:t}}return e}function op(e,n,r){try{let t=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let n of Object.keys(e)){if(t.indexOf(n)!==-1)continue;let a=e[n];i[n]=D(a)||typeof a==`string`?r?nt(`${a}`,r):`${a}`:a}if(n&&e.cause!==void 0&&(i.cause=D(e.cause)?{[e.cause.name||e.cause.constructor.name]:op(e.cause,!1,r)}:e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=D(n)?n.toString():n}}return i}catch(e){t&&y.error(`Unable to extract extra data from the Error object:`,e)}return null}var sp=0,cp;function lp(e){let t=Math.floor(e*1e3);cp!==void 0&&t!==cp&&(sp=0);let n=sp;return sp++,cp=t,{key:ni,value:{value:n,type:`integer`}}}function up(e,t){return t?dn(t,()=>{let n=I(),r=n?wa(n):pn(t);return[n?xo(n):bo(e,t),r]}):[void 0,void 0]}var dp=5e3;function fp(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??dp;t>0&&(s=!0,o=Jo(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}function pp(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+hp(e.attributes)}function mp(e){let t=0;return e.message&&(t+=e.message.length*2),t+hp(e.attributes)}function hp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*gp(e[0]):O(e)?t+=gp(e):t+=100}),t}function gp(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function _p(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...ms()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function vp(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=aa(r)),Yo(a,[_p(e,i)])}var yp=1e3;function bp(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function xp(e,t){let n=Dp(),r=Ep(e);r===void 0?(fp(e,`afterCaptureMetric`,`flushMetrics`,pp,Tp),n.set(e,[t])):r.length>=yp?(Tp(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Sp(e,t,n){var r;let{release:i,environment:a}=t.getOptions(),o={...e.attributes};bp(o,Oi,n.id,!1),bp(o,Di,n.email,!1),bp(o,Ai,n.username,!1),bp(o,Jr,i),bp(o,Lr,a);let{name:s,version:c}=((r=t.getSdkMetadata())==null?void 0:r.sdk)??{};bp(o,Zr,s),bp(o,Qr,c);let l=t.getIntegrationByName(`Replay`),u=l==null?void 0:l.getReplayId(!0);return bp(o,Yr,u),u&&(l==null?void 0:l.getRecordingMode())===`buffer`&&bp(o,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:o}}function Cp(e,t,n,r){let[,i]=up(t,n),a=I(n),o=a?a.spanContext().traceId:i==null?void 0:i.trace_id,s=a?a.spanContext().spanId:void 0,c=A(),l=lp(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...rn(r),...rn(e.attributes,`skip-undefined`),[l.key]:l.value}}}function wp(e,n){let r=(n==null?void 0:n.scope)??j(),i=(n==null?void 0:n.captureSerializedMetric)??xp,a=(r==null?void 0:r.getClient())??N();if(!a){t&&y.warn(`No client available to capture metric.`);return}let{beforeSendMetric:o}=a.getOptions(),{user:s,attributes:c}=Eo(M(),r),l=Sp(e,a,s);a.emit(`processMetric`,l);let u=o?No(t?"The `beforeSendMetric` callback threw an error, dropping the metric:":``,()=>o(l),()=>Mo):l;if(u===Mo){a.recordDroppedEvent(`callback_error`,`trace_metric`,1);return}if(!u){a.recordDroppedEvent(`before_send`,`trace_metric`,1),t&&y.log("`beforeSendMetric` returned `null`, will not send metric.");return}let d=Cp(u,a,r,c);t&&y.log(`[Metric]`,d),i(a,d),a.emit(`afterCaptureMetric`,u)}function Tp(e,t){let n=t??Ep(e)??[];if(n.length===0)return;let r=e.getOptions(),i=vp(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Dp().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Ep(e){return Dp().get(e)}function Dp(){return o(`clientToMetricBufferMap`,()=>new WeakMap)}function Op(e,t,n,r){wp({type:e,name:t,value:n,unit:r==null?void 0:r.unit,attributes:r==null?void 0:r.attributes},{scope:r==null?void 0:r.scope})}function kp(e,t=1,n){Op(`counter`,e,t,n)}function Ap(e,t,n){Op(`gauge`,e,t,n)}function jp(e,t,n){Op(`distribution`,e,t,n)}var Mp={count:kp,gauge:Ap,distribution:jp},Np=new Set(`break catch const continue default delete else finally for function if instanceof let new switch throw try var while await return typeof void in case this null true false undefined`.split(` `)),Pp=/(?:\s|\/\/.*|\/\*[^]*?(?:\*\/|$))+|"(?:[^"\\]|\\.)*"?|'(?:[^'\\]|\\.)*'?|`|\.\.\.|\+\+|--|(\??\.#?|#)?([A-Za-z_$][\w$]*)(?=(\s*:)?)|\/(?:[^/\\\n[]|\\.|\[(?:[^\]\\\n]|\\.)*\])+\/\w*|\d[\w.]*|[^]/g,Fp=/(?:[^`\\$]|\\.|\$(?!\{))*(?:`|\$\{|$)/y,Ip=/(?:[\w$"'`)\]]|\+\+|--)$/,Lp=/\{\s*\[native code\]\s*\}\s*$/;function Rp(e){let t;try{t=Function.prototype.toString.call(e)}catch{return`unknown`}return Lp.test(t)?`native`:qd(zp(t).join(` `))}function zp(e){let t=[],n=[],r=``,i;for(Pp.lastIndex=0;i=Pp.exec(e);){let a=i[0],o=a[0];o<=` `||o===`/`&&(a[1]===`/`||a[1]===`*`)||(o==="`"||o===`}`&&n.pop()?(Fp.lastIndex=Pp.lastIndex,Fp.test(e),a=e.slice(i.index,Pp.lastIndex=Fp.lastIndex),a.endsWith("${")&&n.push(!0)):o===`{`?n.push(!1):i[2]?i[1]||Np.has(a)||i[3]&&(r===`{`||r===`,`)||(a=`_`):o===`/`&&a[1]&&Ip.test(r)&&(!Np.has(r)||r===`this`)&&(a=o,Pp.lastIndex=i.index+1),t.push(r=a))}return t}var Bp=L((()=>({name:`ExperimentalReportSdkConfig`,afterAllSetup(e){let n=new zt;n.setClient(e);let r=!1,i=()=>{if(!r){r=!0,clearTimeout(a);try{kp(`sdk.config`,1,{attributes:Up(e),scope:n})}catch(e){t&&y.warn(`Failed to report SDK configuration`,e)}}},a=Jo(setTimeout(i,0));e.on(`flush`,()=>{i(),Tp(e)})}})));function Vp(e,t=new Set){if(typeof e==`function`)return`[Function:${Rp(e)}]`;if(typeof e==`bigint`||typeof e==`symbol`)return`[${typeof e}:${qd(String(e))}]`;if(typeof e==`number`&&!Number.isFinite(e))return`[${e}]`;if(typeof e!=`object`||!e)return e;if(e instanceof RegExp)return e.toString();if(t.has(e))return`[Circular]`;if(!Array.isArray(e)&&!k(e))return`[${String(Object.prototype.toString.call(e)).slice(8,-1)}:${qd(String(e))}]`;let n=new Set(t).add(e);if(Array.isArray(e))return e.map(e=>Vp(e,n)??null);let r={};for(let t of Object.keys(e).sort()){let i=e[t];r[t]=i===void 0?`[undefined]`:Vp(i,n)}return r}var Hp=new Set([`dist`,`dsn`,`environment`,`integrations`,`release`,`serverName`]);function Up(e){let{sdk:t,optionsSetByUser:n=[],integrationsSetByUser:r,removedDefaultIntegrations:i}=e.getSdkMetadata()||{},a=e.getOptions(),o=`runtime`in a?a.runtime:ms()?{name:`browser`}:void 0,s=Object.fromEntries(Object.entries(a).filter(([e])=>n.includes(e)&&!Hp.has(e)));r&&(s.integrations=r.map(t=>{let n=e.getIntegrationByName(t);return Gp(t,n!=null&&n.isDefaultInstance||n==null?void 0:n._options,n==null?void 0:n._libraryOptions)})),k(s.initialScope)&&(s.initialScope=Wp(s.initialScope)),Array.isArray(s.defaultIntegrations)&&(s.defaultIntegrations=s.defaultIntegrations.map(e=>Gp(e.name,e._options,e._libraryOptions)));let c=JSON.stringify({version:4,sdk:Vp(t),runtime:Vp(o),...i&&{removed_default_integrations:i},options:Vp(s)});return{"sentry.sdk_config.hash":qd(c),"sentry.sdk_config.payload":c}}function Wp(e,t=new Set){if(!k(e)||t.has(e))return`[value]`;let n=new Set(t).add(e),r={};for(let t of Object.keys(e))r[t]=Wp(e[t],n);return r}function Gp(e,t,n=[]){if(t===void 0)return{name:e};if(!k(t))return{name:e,options:qp(t)};let r=Object.keys(t);if(!r.length)return{name:e};let i={};for(let e of r){let r=t[e];i[e]=n.includes(e)?Kp(r):qp(r)}return{name:e,options:i}}function Kp(e){return typeof e==`function`?`[Function]`:Jp(e)}function qp(e){return Array.isArray(e)?e.map(Jp):Jp(e)}function Jp(e){return typeof e!=`object`||!e||e instanceof RegExp?e:`[Object]`}function Yp(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var Xp=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Zp(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Xp.exec(t);return n?n.slice(1):[]}function Qp(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=Yp(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function $p(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 em(e,t){e=Qp(e).slice(1),t=Qp(t).slice(1);let n=$p(e.split(`/`)),r=$p(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function tm(e,t){let n=Zp(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var nm=`RewriteFrames`,rm=L((e={})=>{let t=e.root,r=e.prefix||`app:///`,i=`window`in n&&!!n.window,a=e.iteratee||im({isBrowser:i,root:t,prefix:r});function o(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}}))}}}catch{return e}}function s(e){var t;return{...e,frames:e==null||(t=e.frames)==null?void 0:t.map(e=>a(e))}}return{name:nm,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=o(t)),t}}});function im({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?em(t,e):tm(e)}`}return r}}var am=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],om=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],sm={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`},cm=[`select`,`insert`,`upsert`,`update`,`delete`];function lm(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function um(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function dm(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function fm(e,t){return dm(e,t)!==void 0}function pm(e,t){if(!e)return;if(typeof e.get==`function`)return e.get(t)??void 0;let n=e,r=t.toLowerCase(),i=Object.keys(n).find(e=>e.toLowerCase()===r);return i===void 0?void 0:n[i]}function mm(e,t={}){switch(e){case`GET`:case`QUERY`:return`select`;case`POST`:var n;return(n=pm(t,`Prefer`))!=null&&n.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function hm(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n!=null&&n.startsWith(`fts`)?`textSearch`:n!=null&&n.startsWith(`plfts`)?`textSearch[plain]`:n!=null&&n.startsWith(`phfts`)?`textSearch[phrase]`:n!=null&&n.startsWith(`wfts`)?`textSearch[websearch]`:n&&sm[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function gm(e,t=!1){return new Proxy(e,{apply(n,r,i){let a=`auth${t?`.admin`:``}.${e.name}`,o=N();return qs({name:o&&R(o)?a:`auth ${t?`(admin) `:``}${e.name}`,onlyIfParent:!0,attributes:{[P]:`auto.db.supabase`,[Wr]:`db`,[Un]:`postgresql`,[Hn]:a}},e=>Reflect.apply(n,r,i).then(t=>(Se(t)&&`error`in t&&t.error?(e.setStatus({code:2}),eu(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),eu(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function _m(e){let t=e.auth;if(t&&!um(e.auth)){for(let n of am){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=gm(r))}for(let n of om){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=gm(r,!0))}lm(e.auth)}}function vm(e,t){um(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r);return bm(i.constructor,t),i}}),lm(e.prototype.from))}function ym(e,t){um(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){var i;let a=cm,o=n,s=mm(o.method,o.headers);if(!a.includes(s)||!(o!=null&&(i=o.url)!=null&&i.pathname)||typeof o.url.pathname!=`string`)return Reflect.apply(e,n,r);let c=o.url.pathname.split(`/`),l=c.length>0?c[c.length-1]:``,u=[];for(let[e,t]of o.url.searchParams.entries())u.push(hm(e,t));let d=Object.create(null);if(k(o.body))for(let[e,t]of Object.entries(o.body))d[e]=t;let f=N(),p=t.sendOperationData??(f==null?void 0:f.getDataCollectionOptions().databaseQueryData)===!0,m=dm(o.body,d),h=s===`select`?``:`${s}${fm(o.body,d)?`(...) `:``}`,g=p?u.join(` `):u.length>0?`[redacted]`:``,_=[h.trimEnd(),g].filter(Boolean).join(` `),v=_?`${_} from(${l})`:`from(${l})`,y=f&&R(f)?`${s}${l?` ${l}`:``}`:v,b={"db.table":l,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":pm(o.headers,`X-Client-Info`),[Un]:`postgresql`,[Hn]:s,[P]:`auto.db.supabase`,[Wr]:`db`};return u.length&&p&&(b[`db.query`]=u),m!==void 0&&p&&(b[`db.body`]=m),qs({name:y,onlyIfParent:!0,attributes:b},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&Vi(t,e.status||500),t.end()),e!=null&&e.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};u.length&&p&&(n.query=u),m!==void 0&&p&&(n.body=m),eu(t,e=>(e.addEventProcessor(e=>(mt(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${s}`,message:v},r={};return u.length&&p&&(r.query=u),m!==void 0&&p&&(r.body=m),Object.keys(r).length&&(n.data=r),cf(n),e},e=>{throw t&&(Vi(t,500),t.end()),e}).then(...r))}}),lm(e.prototype.then))}function bm(e,n){for(let r of cm)um(e.prototype[r])||(e.prototype[r]=new Proxy(e.prototype[r],{apply(e,i,a){let o=Reflect.apply(e,i,a),s=o.constructor;return t&&y.log(`Instrumenting ${r} operation's PostgRESTFilterBuilder`),ym(s,n),o}}),lm(e.prototype[r]))}var xm=(e,n={})=>{e?(vm(e.constructor===Function?e:e.constructor,n),_m(e)):t&&y.warn(`Supabase integration was not installed because no Supabase client was provided.`)},Sm=`Supabase`,Cm=((e,t)=>({setupOnce(){xm(e,t)},name:Sm})),wm=L(e=>Cm(e.supabaseClient,{sendOperationData:e.sendOperationData})),Tm=10,Em=`ZodErrors`;function Dm(e){return D(e)&&(e.name===`ZodError`||e.name===`$ZodError`)&&Array.isArray(e.issues)}function Om(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,...`errors`in e?{errors:JSON.stringify(e.errors)}:{}}}function km(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function Am(e){let t=new Set;for(let n of e.issues){let e=km(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${nt(n.join(`, `),100)}`}function jm(e,t=!1,n,r){var i;if(!((i=n.exception)!=null&&i.values)||!r.originalException||!Dm(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Om);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:Am(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:`unknown`}}}}}var Mm=L(((e={})=>{let t=e.limit??Tm;return{name:Em,processEvent(n,r){return jm(t,e.saveZodIssuesAsAttachment,n,r)}}})),Nm=L(e=>{let t=e.ignoreSentryInternalFrames??!1;return{name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{Zo(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Rf(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{t.type||Lf(e.getOptions().stackParser,t)})},preprocessEvent(e){t&&(n._sentryWrappedDepth??0)>0&&(e.sdkProcessingMetadata={...e.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(n){var r,i;let a=t?((r=n.sdkProcessingMetadata)==null?void 0:r.insideSentryWrapped)===!0&&((i=n.exception)==null||(i=i.values)==null?void 0:i.length)===1:!1,o=Fm(n,t,a);if(o&&o[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;n.tags={...n.tags,third_party_code:!0}}return n}}});function Pm(e,t,n){if(t!==0)return!1;if(n&&Im(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(zm))return!1;if(e.pre_context){var r;let t=e.pre_context.length;for(let n=0;n<t;n++)if((r=e.pre_context[n])!=null&&r.includes(Rm))return!0}return!1}function Fm(e,t,n){let r=re(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!Pm(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(Lm)).map(e=>e.slice(Lm.length)):[])}function Im(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var Lm=`_sentryBundlerPluginAppKey:`,Rm=`Attempt to invoke user-land function`,zm=`fn.apply(this, wrappedArguments)`,Bm=`Console`,Vm=L((e={})=>{let t=new Set(e.levels||s);return{name:Bm,setup(n){let r=Vf(({args:e,level:r})=>{N()===n&&t.has(r)&&Hm(r,e)});if(n.registerCleanup(r),e.filter){let t=Hf(e.filter);n.registerCleanup(t)}}}});function Hm(e,t){let n={category:`console`,data:{arguments:t,logger:`console`},level:Gf(e),message:Um(t)};if(e===`assert`){if(t[0]===!1){let e=t.slice(1);n.message=e.length>0?`Assertion failed: ${Um(e)}`:`Assertion failed`,n.data.arguments=e}else return}cf(n,{input:t,level:e})}function Um(e){return`util`in n&&typeof n.util.format==`function`?n.util.format(...e):it(e,` `)}var Wm=`flag.evaluation.`;function Gm(e){if(e.type)return e;let 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 Km(e,t,n=100){let r=j().getScopeData().contexts;r.flags||={values:[]},qm(r.flags.values,e,t,n)}function qm(e,n,r,i){if(typeof r!=`boolean`)return;if(e.length>i){t&&y.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${i}`);return}let a=e.findIndex(e=>e.flag===n);a!==-1&&e.splice(a,1),e.length===i&&e.shift(),e.push({flag:n,result:r})}function Jm(e,t,n=10){if(typeof t!=`boolean`)return;let r=I();if(!r)return;let i=Ma(r).data;(`${Wm}${e}`in i||Object.keys(i).filter(e=>e.startsWith(Wm)).length<n)&&r.setAttribute(`${Wm}${e}`,t)}var Ym=L(()=>({name:`FeatureFlags`,processEvent(e,t,n){return Gm(e)},addFeatureFlag(e,t){Km(e,t),Jm(e,t)}})),Xm=L(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&Oe(t,`isOn`,Zm),typeof t.getFeatureValue==`function`&&Oe(t,`getFeatureValue`,Zm)},processEvent(e,t,n){return Gm(e)}}));function Zm(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(Km(n,r),Jm(n,r)),r}}var Qm=`ConversationId`,$m=L((()=>({name:Qm,setup(e){e.on(`spanStart`,e=>{let t=j().getScopeData(),n=M().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=Ma(e);if(!(t!=null&&t.startsWith(`gen_ai.`))&&!n[`ai.operationId`]&&!(i!=null&&i.startsWith(`ai.`)))return;e.setAttribute(Jn,r)}})}})));function eh(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=$a()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(rh(n,e),th(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1,urlBase:u}=i??{},d=N(),f=!!I(),p=f||!!d&&R(d),m=s&&p?Js(sh(o,a,c,d,u)):new ho,h=dc(m)&&f?void 0:m;if(s&&!p&&(d==null||d.recordDroppedEvent(`no_parent_span`,`span`)),e.fetchData.__span=m.spanContext().spanId,r[m.spanContext().spanId]=m,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=nh(t,n,$a()&&p?h:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(d){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit(`beforeOutgoingRequestSpan`,m,t)}return m}function th(e,t,n){var r,i;n==null||(r=n.onRequestSpanEnd)==null||r.call(n,e,{headers:(i=t.response)==null?void 0:i.headers,error:t.error})}function nh(e,t,n,r){let i=ef({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(De(e)?e.headers:void 0);if(!c)return{"sentry-trace":a,...o&&{baggage:o},...s&&{traceparent:s}};if(ah(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?ih(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}if(oh(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&ih(e[1]));return o&&!t&&e.push([`baggage`,o]),e}{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>ih(e)):ih(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,...i.length>0&&{baggage:i.join(`,`)}});return r&&s&&!t&&(u.traceparent=s),u}}function rh(e,t){if(t.response){var n;Vi(e,t.response.status);let r=(n=t.response)==null||(n=n.headers)==null?void 0:n.get(`content-length`);if(r){let t=parseInt(r);t>0&&e.setAttribute(hr,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function ih(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Xi))}function ah(e){return typeof Headers<`u`&&Ee(e,Headers)}function oh(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function sh(e,t,n,r,i){let a=!!r&&R(r),o=Id(e,i);if(e.startsWith(`data:`)){let i=zd(e);return{name:a?t:`${t} ${i}`,attributes:ch(e,void 0,t,n,r,o)}}let s=Md(e),c=s?Nd(s):e;return{name:a?o?`${t} ${o}`:t:`${t} ${c}`,attributes:ch(e,s,t,n,r,o,i)}}function ch(e,t,n,r,i,a,o){let s={[xi]:Dd(zd(e),i),type:`fetch`,[ir]:n,[P]:r,[Wr]:cl,[Vr]:`client`,[yi]:a};if(t){if(!jd(t))s[xi]=Dd(zd(t.href),i),s[oi]=t.hostname,s[si]=t.port?Number(t.port):void 0,s[Si]=t.pathname,s[wi]=t.protocol.replace(/:$/,``);else if(o)try{let t=new URL(e,o);s[Si]=t.pathname,s[wi]=t.protocol.replace(/:$/,``)}catch{}s[Ci]=Od(Pd(t.search),i),s[bi]=kd(Fd(t.hash),i)}return s}var lh=n;function uh(){if(!(`fetch`in lh))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function dh(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fh(){if(typeof EdgeRuntime==`string`)return!0;if(!uh())return!1;if(dh(lh.fetch))return!0;let e=!1,n=lh.document;if(n&&typeof n.createElement==`function`)try{var r;let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t),(r=t.contentWindow)!=null&&r.fetch&&(e=dh(t.contentWindow.fetch)),n.head.removeChild(t)}catch(e){t&&y.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function ph(e){let t=`fetch`,n=se(t,e);return E(t,()=>hh()),n}function mh(e){let t=`fetch-body-resolved`,n=se(t,e);return E(t,()=>hh(_h)),n}function hh(e){(!ms()||fh())&&Oe(n,`fetch`,function(t){return new Proxy(t,{apply(t,r,i){let a=Error(),{method:o,url:s}=bh(i),c={args:i,fetchData:{method:o,url:s},startTimestamp:A()*1e3,virtualError:a,headers:xh(i)};return e||ce(`fetch`,{...c}),Reflect.apply(t,n,i).then(async t=>(e?e(t):ce(`fetch`,{...c,endTimestamp:A()*1e3,response:t}),t),e=>{var t;ce(`fetch`,{...c,endTimestamp:A()*1e3,error:e}),D(e)&&e.stack===void 0&&(e.stack=a.stack,ke(e,`framesToPop`,1));let r=((t=N())==null?void 0:t.getOptions().enhanceFetchErrorMessages)??`always`;if(r!==!1&&D(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{var i;let t=new URL(c.fetchData.url,(i=n.location)==null?void 0:i.href).host;t&&(r===`always`?e.message=`${e.message} (${t})`:ke(e,`__sentry_fetch_url_host__`,t))}catch{}throw e})}})})}async function gh(e,t){if(e!=null&&e.body){let n=e.body,r=n.getReader(),i=Jo(setTimeout(()=>{n.cancel().then(null,()=>{})},9e4)),a=!0;for(;a;){let e;try{e=Jo(setTimeout(()=>{n.cancel().then(null,()=>{})},5e3));let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function _h(e){let t;try{t=e.clone()}catch{return}gh(t,()=>{ce(`fetch-body-resolved`,{endTimestamp:A()*1e3,response:e})})}function vh(e,t){return Se(e)&&!!e[t]}function yh(e){return typeof e==`string`?e:e?vh(e,`url`)?e.url:e.toString?e.toString():``:``}function bh(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:yh(t),method:vh(n,`method`)?String(n.method).toUpperCase():De(t)&&vh(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:yh(t),method:vh(t,`method`)?String(t.method).toUpperCase():`GET`}}function xh(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(De(t))return new Headers(t.headers)}catch{}}function Sh(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ch=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){let t=this._cache.get(e);if(t!==void 0)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){if(this._cache.delete(e),this._cache.size>=this._maxSize){let e=this._cache.keys().next().value;this._cache.delete(e)}this._cache.set(e,t)}remove(e){let t=this._cache.get(e);return t&&this._cache.delete(e),t}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let e=[];return this._cache.forEach(t=>e.push(t)),e}};function wh(e,t={},n=j()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=(n==null?void 0:n.getClient())||N();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var Th={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Eh(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...ms()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Dh(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=aa(r)),Yo(a,[Eh(e,i)])}var Oh=100;function kh(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Ah(e,t){let n=Ph(),r=Nh(e);r===void 0?(fp(e,`afterCaptureLog`,`flushLogs`,mp,Mh),n.set(e,[t])):r.length>=Oh?(Mh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function jh(e,n=j(),r=Ah){var i;let a=(n==null?void 0:n.getClient())??N();if(!a){t&&y.warn(`No client available to capture log.`);return}let{release:o,environment:s,beforeSendLog:c}=a.getOptions(),[,l]=up(a,n),d={...e.attributes},{user:{id:f,email:p,username:m},attributes:h}=Eo(M(),n);kh(d,Oi,f,!1),kh(d,Di,p,!1),kh(d,Ai,m,!1),kh(d,Jr,o),kh(d,Lr,s);let{name:g,version:_}=((i=a.getSdkMetadata())==null?void 0:i.sdk)??{};kh(d,Zr,g),kh(d,Qr,_);let v=a.getIntegrationByName(`Replay`),b=v==null?void 0:v.getReplayId(!0);kh(d,Yr,b),b&&(v==null?void 0:v.getRecordingMode())===`buffer`&&kh(d,`sentry._internal.replay_is_buffering`,!0);let x=e.message;if(xe(x)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=x;t!=null&&t.length&&(d[Ur]=e),t.forEach((e,t)=>{d[`sentry.message.parameter.${t}`]=e})}let S=I(n);kh(d,ii,S==null?void 0:S.spanContext().spanId);let C={...e,attributes:d};a.emit(`beforeCaptureLog`,C);let w=c?No(t?"The `beforeSendLog` callback threw an error, dropping the log:":``,()=>u(()=>c(C)),()=>Mo):C;if(w===Mo){a.recordDroppedEvent(`callback_error`,`log_item`,1);return}if(!w){a.recordDroppedEvent(`before_send`,`log_item`,1),t&&y.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:ee,message:T,attributes:te={},severityNumber:ne}=w,re=A(),ie=lp(re);r(a,{timestamp:re,level:ee,body:Ih(String(T)),trace_id:l==null?void 0:l.trace_id,severity_number:ne??Th[ee],attributes:Fh({...rn(h),...rn(te,!0),[ie.key]:ie.value})}),a.emit(`afterCaptureLog`,w)}function Mh(e,t){let n=t??Nh(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Dh(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ph().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Nh(e){return Ph().get(e)}function Ph(){return o(`clientToLogBufferMap`,()=>new WeakMap)}function Fh(e){let t={};for(let[n,r]of Object.entries(e)){let e=Ih(n);t[e]=r.type===`string`?{...r,value:Ih(r.value)}:r}return t}function Ih(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function Lh(e,t,n,r,i){jh({level:e,message:t,attributes:n,severityNumber:i},r)}function Rh(e,t,{scope:n}={}){Lh(`trace`,e,t,n)}function zh(e,t,{scope:n}={}){Lh(`debug`,e,t,n)}function Bh(e,t,{scope:n}={}){Lh(`info`,e,t,n)}function Vh(e,t,{scope:n}={}){Lh(`warn`,e,t,n)}function Hh(e,t,{scope:n}={}){Lh(`error`,e,t,n)}function Uh(e,t,{scope:n}={}){Lh(`fatal`,e,t,n)}var Wh={trace:Rh,debug:zh,info:Bh,warn:Vh,error:Hh,fatal:Uh,fmt:Kd};function Gh(e,t,r){return`util`in n&&typeof n.util.format==`function`?n.util.format(...e):Kh(e,t,r)}function Kh(e,t,n){return e.map(e=>O(e)?String(e):JSON.stringify(Ke(e,t,n))).join(` `)}function qh(e){return/%[sdifocO]/.test(e)}function Jh(e,t){let n={};return n[Ur]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var Yh=`ConsoleLogs`,Xh={[P]:`auto.log.console`},Zh=L(((e={})=>{let t=e.levels||s;return{name:Yh,setup(e){let{normalizeDepth:n=3,normalizeMaxBreadth:r=1e3}=e.getOptions(),i=Vf(({args:i,level:a})=>{if(N()!==e||!t.includes(a))return;let o=i[0],s=i.slice(1);if(a===`assert`){o||jh({level:`error`,message:s.length>0?`Assertion failed: ${Gh(s,n,r)}`:`Assertion failed`,attributes:Xh});return}let c=a===`log`,l={...Xh};if(k(o)){Object.assign(l,Ke(o,n,r));let e=typeof i[1]==`string`?2:1;i.slice(e).forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=Ke(e,n,r)})}else if(s.length>0&&typeof o==`string`&&!qh(o)){let e=Jh(o,s);for(let[t,i]of Object.entries(e))l[t]=t.startsWith(`sentry.message.parameter.`)?Ke(i,n,r):i}jh({level:c?`info`:a,message:Gh(i,n,r),severityNumber:c?10:void 0,attributes:l})});e.registerCleanup(i)}}})),Qh=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function $h(e={}){let t=new Set(e.levels??Qh),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||N();if(!u)return;let d=ng(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=Ke(t,f,p);m[P]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=ig(rg(o,f,p),f,p);h!=null&&h.attributes&&Object.assign(m,h.attributes),jh({level:d,message:(h==null?void 0:h.message)||a||o&&Gh(o,f,p)||``,attributes:m})}}}var eg={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`},tg={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function ng(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=eg[e];if(t)return t}if(typeof t==`number`){let e=tg[t];if(e)return e}return`info`}function rg(e,t,n){if(!(e!=null&&e.length))return{message:``};let r=Gh(e,t,n),i=e[0];if(k(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!qh(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function ig(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=Jh(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?Ke(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=Ke(e,t,n)});return{message:r,attributes:{...Ke(i,t,n),...s}}}var ag=-1,og=()=>ag,sg=e=>{addEventListener(`pageshow`,t=>{t.persisted&&(ag=t.timeStamp,e(t))},!0)},cg=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`)(t.value,n),e(t)))}},lg=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},ug=()=>{let e=performance.getEntriesByType(`navigation`)[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},dg=()=>{var e;return((e=ug())==null?void 0:e.activationStart)??0},fg=-1,pg=new Set,mg=()=>document.visibilityState!==`hidden`||document.prerendering?1/0:0,hg=e=>{if(document.visibilityState===`hidden`){if(e.type===`visibilitychange`)for(let e of pg)e();isFinite(fg)||(fg=e.type===`visibilitychange`?e.timeStamp:0,removeEventListener(`prerenderingchange`,hg,!0))}},gg=(e=!1)=>{if(e&&(fg=1/0),fg<0){var t;let e=dg();fg=(document.prerendering||(t=globalThis.performance.getEntriesByType(`visibility-state`).find(t=>t.name===`hidden`&&t.startTime>=e))==null?void 0:t.startTime)??mg(),addEventListener(`visibilitychange`,hg,!0),addEventListener(`prerenderingchange`,hg,!0),sg(()=>{setTimeout(()=>{fg=mg()})})}return{get firstHiddenTime(){return fg},onHidden(e){pg.add(e)}}},_g=(e,t=-1,n,r=0,i,a,o)=>{let s=ug(),c=(s==null?void 0:s.navigationId)||0,l=`navigate`;return n?l=n:og()>=0?l=`back-forward-cache`:s&&(document.prerendering||dg()>0?l=`prerender`:document.wasDiscarded?l=`restore`:s.type&&(l=s.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:l,navigationId:r||c,navigationInteractionId:i,navigationURL:a||(s==null?void 0:s.name),navigationStartTime:o||0}},vg=new WeakMap;function yg(e,t){let n=vg.get(t);return n||(n=new WeakMap,vg.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var bg=class{constructor(){e(this,`t`,void 0),e(this,`i`,0),e(this,`o`,[])}h(e){var t;if(e.hadRecentInput)return;let n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),(t=this.t)==null||t.call(this,e)}},xg=(e,t,n={})=>{try{let r=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(r.length>0){let e=new PerformanceObserver(e=>{queueMicrotask(()=>{let n=e.getEntries();r.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(let t of r)e.observe({type:t,buffered:!0,...n});return e}}catch{}},Sg=e=>{var t,n;return((t=globalThis.PerformanceObserver)==null||(t=t.supportedEntryTypes)==null?void 0:t.includes(`soft-navigation`))&&typeof((n=globalThis.PerformanceSoftNavigation)==null||(n=n.prototype)==null?void 0:n.getLargestInteractionContentfulPaint)==`function`&&e&&e.reportSoftNavs},Cg=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){let t=e.keys().next().value;t!==void 0&&e.delete(t)}},wg=e=>{let t=!1;return()=>{t||=(e(),!0)}},Tg=class{constructor(){e(this,`l`,void 0)}},Eg=e=>{document.prerendering?addEventListener(`prerenderingchange`,e,!0):e()},Dg=[1800,3e3],Og=(e,t={})=>{let n=Sg(t);Eg(()=>{let r=yg(t,Tg),i=gg(),a,o=_g(`FCP`),s=xg([`paint`],e=>{for(let t of e)t.name===`first-contentful-paint`&&(s.disconnect(),t.startTime<i.firstHiddenTime&&(o.value=Math.max(t.startTime-dg(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,a(!0)))});s&&(a=cg(e,o,Dg,t.reportAllChanges),sg(n=>{o=_g(`FCP`,-1,`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,og()),a=cg(e,o,Dg,t.reportAllChanges),lg(()=>{o.value=performance.now()-n.timeStamp,a(!0)})})),n&&xg([`soft-navigation`],n=>{n.forEach(n=>{r.l&&n.navigationId&&Cg(r.l,n),o=_g(`FCP`,Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0),`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),a=cg(e,o,Dg,t.reportAllChanges),a(!0)})},t)})},kg=[.1,.25],Ag=(e,t={})=>{let n=gg();Og(wg(()=>{let r,i=_g(`CLS`,0),a=yg(t,bg),o=(n,o,s,c,l)=>{i=_g(`CLS`,0,n,o,s,c,l),a.i=0,r=cg(e,i,kg,t.reportAllChanges)},s=(e=!1)=>{a.i>i.value&&(i.value=a.i,i.entries=a.o),r(e)},c=e=>{s(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.h(t);s()},u=[`layout-shift`];Sg(t)&&u.push(`soft-navigation`);let d=xg(u,l);d&&(r=cg(e,i,kg,t.reportAllChanges),n.onHidden(()=>{l(d.takeRecords()),r(!0)}),sg(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,og()),lg(r)}),setTimeout(r))}))},jg=0,Mg=1/0,Ng=0,Pg=e=>{for(let t of e)t.interactionId&&(Mg=Math.min(Mg,t.interactionId),Ng=Math.max(Ng,t.interactionId),jg=Ng?(Ng-Mg)/7+1:0)},Fg,Ig=()=>Fg?jg:performance.interactionCount??0,Lg=()=>{`interactionCount`in performance||Fg||(Fg=xg([`event`],Pg,{durationThreshold:0}))},Rg=class{constructor(){e(this,`u`,0),e(this,`v`,[]),e(this,`m`,new Map),e(this,`p`,void 0),e(this,`T`,void 0)}_(){return Ig()-this.u}M(){this.u=Ig(),this.v.length=0,this.m.clear()}L(e){let t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||n!==-1||e!==`soft-navigation`&&e!==`back-forward-cache`?this.v[n]:{P:8,id:-1,entries:[]}}h(e){var t;if((t=this.p)==null||t.call(this,e),!e.interactionId)return;let n=this.v.at(-1),r=this.m.get(e.interactionId);if(r||this.v.length<10||e.duration>n.P){var i;if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.m.set(r.id,r),this.v.push(r)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){let e=this.v.splice(10);for(let t of e)this.m.delete(t.id)}(i=this.T)==null||i.call(this,r)}}},zg=e=>{let t=`requestIdleCallback`in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState===`hidden`)e();else{let i=wg(e),a=-1,o=()=>{r(a),i()};addEventListener(`visibilitychange`,o,{once:!0,capture:!0}),a=n(()=>{removeEventListener(`visibilitychange`,o,{capture:!0}),i()},{timeout:t})}},Bg=[200,500],Vg=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!(`interactionId`in PerformanceEventTiming.prototype))return;let n=gg();Eg(()=>{Lg();let r,i=_g(`INP`),a=yg(t,Rg),o=(n,o,s,c,l)=>{a.M(),i=_g(`INP`,-1,n,o,s,c,l),r=cg(e,i,Bg,t.reportAllChanges)},s=()=>{let e=a.L(i.navigationType);e&&e.P!==i.value&&(i.value=e.P,i.entries=e.entries,r())},c=e=>{s(),r(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=(e,t=!1)=>{zg(()=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.h(t);s(),t&&r(!0)})},u=[`event`,`first-input`];Sg(t)&&u.push(`soft-navigation`);let d=xg(u,l,{...t,durationThreshold:t.durationThreshold??40});r=cg(e,i,Bg,t.reportAllChanges),d&&(n.onHidden(()=>{l(d.takeRecords(),!0)}),sg(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,og())}))})},Hg=class{constructor(){e(this,`p`,void 0),e(this,`l`,void 0)}h(e){var t;(t=this.p)==null||t.call(this,e)}},Ug=[2500,4e3],Wg=(e,t={})=>{let n=!1,r=Sg(t);Eg(()=>{let i,a=gg(),o=_g(`LCP`),s=yg(t,Hg),c=(r,s,c,l,u)=>{o=_g(`LCP`,-1,r,s,c,l,u),i=cg(e,o,Ug,t.reportAllChanges),n=!1,r===`soft-navigation`&&(a=gg(!0))},l=e=>{var t;s.l&&e.navigationId&&Cg(s.l,e),n||i(!0),c(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime);let r=(t=e.getLargestInteractionContentfulPaint)==null?void 0:t.call(e);r&&u([r])},u=e=>{t.reportAllChanges||r||(e=e.slice(-1));for(let t of e){if(!t)continue;if(t.entryType===`soft-navigation`){l(t);continue}let e=0,r=[],c=t.startTime;if(t.entryType===`largest-contentful-paint`)e=Math.max(t.startTime-dg(),0),s.h(t),r=[t];else if(t.entryType===`interaction-contentful-paint`){var n;let i=t;if(!o.navigationId||`interactionId`in i&&i.interactionId!=o.navigationInteractionId)continue;c=((n=i.largestContentfulPaint)==null?void 0:n.renderTime)||0,e=Math.max(c-t.startTime,0),i.largestContentfulPaint&&(s.h(i.largestContentfulPaint),r=[i.largestContentfulPaint])}c<a.firstHiddenTime&&(o.value=e,o.entries=r,i())}},d=[`largest-contentful-paint`];r&&d.push(`interaction-contentful-paint`,`soft-navigation`);let f=xg(d,u);if(f){i=cg(e,o,Ug,t.reportAllChanges);let a=[`keydown`,`click`,`visibilitychange`],s=e=>{if(e.isTrusted&&!n){let e=o.id;zg(()=>{if(!n){if(!r){f.disconnect();for(let e of a)removeEventListener(e,s,{capture:!0})}e===o.id&&(n=!0,i(!0))}})}};for(let e of a)addEventListener(e,s,{capture:!0});sg(r=>{c(`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,og()),i=cg(e,o,Ug,t.reportAllChanges),lg(()=>{o.value=performance.now()-r.timeStamp,n=!0,i(!0)})})}})},Gg=[800,1800],Kg=e=>{document.prerendering?Eg(()=>Kg(e)):document.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>Kg(e),!0)},qg=(e,t={})=>{let n=Sg(t),r=_g(`TTFB`),i=cg(e,r,Gg,t.reportAllChanges);Kg(()=>{let a=ug();if(a){let o=a.responseStart;r.value=Math.max(o-dg(),0),r.entries=[a],i(!0),sg(()=>{r=_g(`TTFB`,0,`back-forward-cache`,r.navigationId,r.navigationInteractionId,r.navigationURL,og()),i=cg(e,r,Gg,t.reportAllChanges),i(!0)}),n&&xg([`soft-navigation`],n=>{n.forEach(n=>{n.navigationId&&(r=_g(`TTFB`,0,`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),r.entries=[n],i=cg(e,r,Gg,t.reportAllChanges),i(!0))})},t)}})},Jg=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Yg={},Xg={},Zg,Qg,$g,e_,t_,n_={},r_=!1,i_=!1;function a_(){r_=!0}function o_(){i_=!0}function s_(e,t=!1){return b_(`cls`,e,h_,Zg,t)}function c_(e,t=!1){return b_(`lcp`,e,g_,Qg,t)}function l_(e){return b_(`ttfb`,e,__,$g)}function u_(e){return b_(`fcp`,e,v_,t_)}function d_(e){return b_(`inp`,e,y_,e_)}function f_(e,t){return S_(e,t),Xg[e]||(x_(e),Xg[e]=!0),C_(e,t)}function p_(e,t){let n=Yg[e];if(n!=null&&n.length)for(let r of n)try{r(t)}catch(t){Jg&&y.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ne(r)}\nError:`,t)}}function m_(e){return t=>{(i_||t.navigationType!==`back-forward-cache`)&&e(t)}}function h_(){if(`at`in Array.prototype)return Ag(m_(e=>{p_(`cls`,{metric:e}),Zg=e}),{reportAllChanges:!r_&&!i_,reportSoftNavs:r_})}function g_(){return Wg(m_(e=>{p_(`lcp`,{metric:e}),Qg=e}),{reportAllChanges:!r_&&!i_,reportSoftNavs:r_})}function __(){return qg(m_(e=>{p_(`ttfb`,{metric:e}),$g=e}))}function v_(){return Og(m_(e=>{p_(`fcp`,{metric:e}),t_=e}))}function y_(){return Vg(m_(e=>{p_(`inp`,{metric:e}),e_=e}),{reportSoftNavs:r_})}function b_(e,t,n,r,i=!1){return S_(e,t),Xg[e]||(Xg[e]=!0,Promise.resolve().then(()=>{n_[e]=n()})),r&&t({metric:r}),C_(e,t,i)}function x_(e){let t={type:e,buffered:!0};e===`event`&&(t.durationThreshold=0);try{PerformanceObserver.supportedEntryTypes.includes(e)&&new PerformanceObserver(t=>{Promise.resolve().then(()=>{p_(e,{entries:t.getEntries()})})}).observe(t)}catch{}}function S_(e,t){Yg[e]=Yg[e]||[],Yg[e].push(t)}function C_(e,t,n=!1){return()=>{var r;n&&((r=n_[e])==null||r.call(n_));let i=Yg[e];if(!i)return;let a=i.indexOf(t);a!==-1&&i.splice(a,1)}}function w_(e){return`duration`in e}var z=n,T_=5,E_=5,D_,O_,k_,A_=new Ch(T_),j_=new Ch(T_),M_=!1;function N_(e,t){return Math.abs(e-t)<=E_}function P_(){try{var e;return PerformanceObserver.supportedEntryTypes.includes(`soft-navigation`)&&typeof((e=z.PerformanceSoftNavigation)==null||(e=e.prototype)==null?void 0:e.getLargestInteractionContentfulPaint)==`function`}catch{return!1}}function F_(e){if(M_||!P_())return;M_=!0;let t=e=>{e.isTrusted&&(k_=e.timeStamp)};z.addEventListener(`click`,t,{capture:!0,passive:!0}),z.addEventListener(`keydown`,t,{capture:!0,passive:!0}),e.on(`spanStart`,e=>{var t;if(((t=F(e).attributes)==null?void 0:t[`sentry.op`])!==`navigation`)return;D_=void 0;let n=k_;n!=null&&((O_==null?void 0:O_.interactionTimestamp)===n?(A_.set(O_.interactionId,e),O_=void 0):D_={span:e,interactionTimestamp:n})});let n=({entries:e})=>{for(let t of e){if(!w_(t)||!t.interactionId)continue;let e=D_;e&&N_(t.startTime,e.interactionTimestamp)?(A_.set(t.interactionId,e.span),D_=void 0):A_.get(t.interactionId)||k_!=null&&N_(t.startTime,k_)&&(O_={interactionId:t.interactionId,interactionTimestamp:k_})}};f_(`event`,n),f_(`first-input`,n),f_(`soft-navigation`,({entries:e})=>{for(let t of e){let e=A_.get(t.interactionId);e?(j_.set(t.navigationId,e),e.setAttribute(yn,t.navigationId)):Jg&&y.log(`[SoftNav] No navigation span found for soft navigation ${t.navigationId}`,t)}})}function I_(e){return e.navigationType===`soft-navigation`?j_.get(e.navigationId)||(e.navigationInteractionId==null?void 0:A_.get(e.navigationInteractionId)):void 0}function L_(e){return typeof e==`number`&&isFinite(e)}function R_(e,t,n,{...r}){let i=Ma(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Xs(e,()=>{let e=_c({startTime:t,...r});return e&&e.end(n),e})}function z_(){return z.addEventListener&&z.performance}function B_(e){return e/1e3}function V_(e){let t=`unknown`,n=`unknown`,r=``;for(let 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 H_(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function U_(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=V_(e.nextHopProtocol);t[Ar]=r,t[kr]=n}if(kt(e.startTime)===void 0)return t;let n=t=>t&&kt(t,e.startTime);return W_({...t,[or]:n(e.redirectStart),[ar]:n(e.redirectEnd),[pr]:n(e.workerStart),[rr]:n(e.fetchStart),[nr]:n(e.domainLookupStart),[tr]:n(e.domainLookupEnd),[er]:n(e.connectStart),[dr]:n(e.secureConnectionStart),[$n]:n(e.connectEnd),[sr]:n(e.requestStart),[lr]:n(e.responseStart),[cr]:n(e.responseEnd),[fr]:e.responseStart==null?void 0:B_(e.responseStart)})}function W_(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var G_=0x7fffffff,K_=0,q_=0;function J_(){f_(`longtask`,({entries:e})=>{let t=I();if(!t)return;let{attributes:n,start_timestamp:r}=F(t);for(let i of e){let e=kt(i.startTime);if(!e)continue;let a=B_(i.duration);n[`sentry.op`]===`navigation`&&r&&e<r||R_(t,e,e+a,{name:fl,op:$c,attributes:{[P]:`auto.ui.browser.metrics`}})}})}function Y_(){new PerformanceObserver(e=>{let t=I();if(t)for(let n of e.getEntries()){let e=kt(n.startTime);if(!e||!n.scripts[0])continue;let{start_timestamp:r,attributes:{[Wr]:i}}=F(t);if(i===`navigation`&&r&&e<r)continue;let a=B_(n.duration),o={[P]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts.reduce((e,t)=>t.duration>e.duration?t:e);o[wn]=s,o[Tn]=c,l&&(o[In]=l),u&&(o[Ln]=u),d!==-1&&(o[En]=d),R_(t,e,e+a,{name:fl,op:el,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function X_(e,t){let{spanStreamingEnabled:n}=t,r=Q_(e,K_,(t,r,i)=>{switch(t.entryType){case`navigation`:e1(e,t,n);break;case`paint`:$_(e,t,r,i)}});r!==void 0&&(K_=r,s1(e,n))}function Z_(e,t){let{spanStreamingEnabled:n,ignoreResourceSpans:r}=t,i=Q_(e,q_,(t,i,a)=>{t.entryType===`resource`&&o1(e,t,t.name,i,a,r,n)});i!==void 0&&(q_=i)}function Q_(e,t,n){let r=z_();if(!(r!=null&&r.getEntries))return;let i=r.getEntries(),{attributes:a,start_timestamp:o}=F(e);return i.slice(t).forEach(e=>{let t=kt(e.startTime);if(!t)return;let r=B_(Math.max(0,e.duration));a[`sentry.op`]===`navigation`&&o&&t<o||n(e,t,r)}),Math.max(i.length-1,0)}function $_(e,t,n,r){R_(e,n,n+r,{name:t.name,attributes:{[Wr]:Hc,[P]:`auto.resource.browser.metrics`,[xn]:t.name}})}function e1(e,t,n){r1(e,t,`unloadEvent`,n),r1(e,t,`redirect`,n),r1(e,t,`domContentLoadedEvent`,n),r1(e,t,`loadEvent`,n),r1(e,t,`connect`,n),r1(e,t,`secureConnection`,n),r1(e,t,`fetch`,n),r1(e,t,`domainLookup`,n),a1(e,t,n)}function t1(e,t){return kt(t,e.startTime)}var n1={secureConnection:Jc,fetch:Yc,domainLookup:Xc,unloadEvent:Uc,redirect:Wc,connect:qc,domContentLoadedEvent:Gc,loadEvent:Kc};function r1(e,t,n,r){let i=t[i1(n)],a=t[`${n}Start`];if(!a||!i)return;let o=n1[n],s=Dd(t.name);R_(e,t1(t,a),t1(t,i),{name:r?_l[o]:s,attributes:{[Wr]:o,[P]:`auto.ui.browser.metrics`,[xi]:s,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function i1(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function a1(e,t,n){let r=t1(t,t.requestStart),i=t1(t,t.responseEnd),a=t1(t,t.responseStart);if(t.responseEnd){let o=Dd(t.name);R_(e,r,i,{name:n?_l[Zc]:o,attributes:{[Wr]:Zc,[P]:`auto.ui.browser.metrics`,[xi]:o}}),R_(e,a,i,{name:n?_l[Qc]:o,attributes:{[Wr]:Qc,[P]:`auto.ui.browser.metrics`,[xi]:o}})}}function o1(e,t,n,r,i,a,o){var s;if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let c=t.initiatorType?`resource.${t.initiatorType}`:Vc;if(a!=null&&a.includes(c))return;let l={[P]:`auto.resource.browser.metrics`},u=Ld(n);u.protocol&&(l[wi]=u.protocol.split(`:`).pop());let d=(s=u.host)==null?void 0:s.replace(/^.*@/,``);d&&(l[oi]=d);let f=d==null?void 0:d.replace(/:\d+$/,``);f&&(l[yi]=f),l[ur]=n.includes(z.location.origin);let p=Dd(n);l[xi]=p,c1(t,l,[[`responseStatus`,vr],[`transferSize`,_r],[`encodedBodySize`,hr],[`decodedBodySize`,mr],[`renderBlockingStatus`,Pr],[`deliveryType`,gr]]);let m={...l,...U_(t)};R_(e,r,r+i,{name:o?f||`Resource`:p.replace(z.location.origin,``),op:c,attributes:m})}function s1(e,t){let n=z.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?Er:qn,r.effectiveType),r.type&&e.setAttribute(t?Or:Rn,r.type),L_(r.rtt)&&(t?e.setAttribute(Dr,r.rtt):F(e).attributes[`sentry.op`]===`pageload`&&Is(`connection.rtt`,r.rtt,`millisecond`))),L_(n.deviceMemory)&&(t?e.setAttribute(Gn,n.deviceMemory):e.setAttribute(Wn,`${n.deviceMemory} GB`)),L_(n.hardwareConcurrency)&&(t?e.setAttribute(Kn,n.hardwareConcurrency):e.setAttribute(Qn,String(n.hardwareConcurrency)))}function c1(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<G_||typeof i==`string`)&&(t[r]=i)})}var l1=80,u1={};try{typeof Node<`u`&&(u1.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(u1.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,u1.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,u1.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,u1.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(u1.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function d1(e,t,n){let r=u1[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function f1(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=Array.isArray(t)?void 0:t.maskAttributeFn,l=!Array.isArray(t)&&t.maxStringLength||l1;for(;n&&i++<5&&(o=p1(n,s,c),!(o===`html`||i>1&&a+r.length*3+o.length>=l));)r.push(o),a+=o.length,n=d1(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function p1(e,t,n){let r=[],i=d1(e,`tagName`);if(!i)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=d1(e,`dataset`);if(t){if(t.sentryComponent)return n?n(`data-sentry-component`,t.sentryComponent,e):t.sentryComponent;if(t.sentryElement)return n?n(`data-sentry-element`,t.sentryElement,e):t.sentryElement}}r.push(i.toLowerCase());let a=t!=null&&t.length?t.filter(t=>d1(e,`getAttribute`,t)).map(t=>[t,d1(e,`getAttribute`,t)]):null;if(a!=null&&a.length)a.forEach(([t,i])=>{r.push(`[${t}="${n&&i?n(t,i,e):i}"]`)});else{let t=d1(e,`id`);t&&r.push(`#${n?n(`id`,t,e):t}`);let i=d1(e,`className`);if(i&&be(i)){let t=(n?n(`class`,i,e):i).split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let i=d1(e,`getAttribute`,t);i&&r.push(`[${t}="${n?n(t,i,e):i}"]`)}return r.join(``)}function m1(e,t,n){z.document&&z.addEventListener(e,t,n)}function h1(e,t,n){z.document&&z.removeEventListener(e,t,n)}var g1=(e=!0)=>{var t,n;let r=(t=z.performance)==null||(n=t.getEntriesByType)==null?void 0:n.call(t,`navigation`)[0];if(!e||r&&r.responseStart>0&&r.responseStart<performance.now())return r},_1=()=>{var e;return((e=g1())==null?void 0:e.activationStart)??0},v1=e=>{m1(`visibilitychange`,t=>{var n;((n=z.document)==null?void 0:n.visibilityState)===`hidden`&&e(t)},{capture:!0})},y1=-1,b1=new Set,x1=()=>{var e,t;return((e=z.document)==null?void 0:e.visibilityState)===`hidden`&&!((t=z.document)!=null&&t.prerendering)?0:1/0},S1=e=>{var t;if(((t=z.document)==null?void 0:t.visibilityState)===`hidden`&&y1>-1){if(e.type===`visibilitychange`)for(let e of b1)e();isFinite(y1)||(y1=e.type===`visibilitychange`?e.timeStamp:0,h1(`prerenderingchange`,S1,!0))}},C1=()=>{if(z.document&&y1<0){var e;let t=_1();y1=(z.document.prerendering||(e=globalThis.performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`&&e.startTime>t)[0])==null?void 0:e.startTime)??x1(),m1(`visibilitychange`,S1,!0),m1(`prerenderingchange`,S1,!0)}return{get firstHiddenTime(){return y1},onHidden(e){b1.add(e)}}},w1=e=>{var t;let n=z.requestIdleCallback||z.setTimeout;if(((t=z.document)==null?void 0:t.visibilityState)===`hidden`)e();else{let t=!1,r=()=>{t||=(e(),!0)};m1(`visibilitychange`,r,{once:!0,capture:!0}),n(()=>{r(),h1(`visibilitychange`,r,{capture:!0})})}};function T1(e){return e!=null&&e>0&&e<=6e4}function E1(e,t){let n=g1();if(!n)return;let r=n.activationStart||0,i=Math.max(n.responseStart-r,0);if(i>e)return;let a=i,o=i;if(/^https?:/.test(t.url)){let n=z.performance.getEntriesByType(`resource`).find(e=>e.name===t.url);if(!n)return;let s=(n.requestStart||n.startTime)-r;a=Math.min(Math.max(s,i),e),o=Math.min(Math.max(n.responseEnd-r,a),e)}return{[Nn]:a-i,[Pn]:o-a,[Mn]:e-o}}var D1=10;function O1({match:e,merge:t,latency:n}){let r=[],i=t=>{for(let n=r.length-1;n>=0;n--)if(e(r[n],t))return r[n]};return{get:i,add(e,a){let o=i(e);if(o)t(o,e);else if(r.push(a()),r.length>20){let e=r.slice().sort((e,t)=>n(t)-n(e)).slice(0,D1);r=r.filter((t,n)=>n>=r.length-D1||e.includes(t))}}}}var k1=O1({match:(e,t)=>e.interactionId===t.interactionId,merge:(e,t)=>{e.latency=Math.max(e.latency,t.duration)},latency:e=>e.latency}),A1=O1({match:(e,t)=>Math.abs(t.startTime+t.duration-e.renderTime)<=8,merge:(e,t)=>{e.startTime=Math.min(e.startTime,t.startTime),e.processingStart=Math.min(e.processingStart,t.processingStart),e.processingEnd=Math.max(e.processingEnd,t.processingEnd)},latency:e=>e.renderTime-e.startTime}),j1=40,M1=new Map,N1={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 P1(e){return e!=null&&e.interactionId?k1.get(e):void 0}function F1(){let e=Object.keys(N1);ms()&&e.forEach(e=>{z.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=f1(t),r=Math.round(e.timeStamp);if(n&&n!==`<unknown>`&&!M1.has(r)&&(M1.set(r,n),M1.size>50)){let e=M1.keys().next().value;e!==void 0&&M1.delete(e)}}function n(e){let t=Math.round(e.startTime),n=M1.get(t);if(!n)for(let e=-5;e<=5;e++){let r=M1.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=I(),r=t&&Ka(t);e.forEach(e=>{if(!w_(e))return;e.duration>=j1&&A1.add(e,()=>({startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:e.startTime+e.duration}));let t=e.interactionId;t&&k1.add(e,()=>({span:r,elementName:e.target?f1(e.target):n(e),interactionId:t,latency:e.duration}))})};f_(`event`,r),f_(`first-input`,r)}function I1(e){let t=e&&A1.get(e);if(!t)return;let n=Math.max(t.processingStart,e.startTime),r=Math.max(e.startTime+e.duration,n),i=Math.min(Math.max(t.processingEnd,n),r);return{[Dn]:n-e.startTime,[kn]:i-n,[On]:r-i}}var L1={},R1,z1,B1;function V1({trackCls:e,trackLcp:t}){if(z_()&&At()){let n=t?U1():void 0,r=e?H1():void 0,i=W1(),a=G1(),o=K1();return()=>{i(),a(),o(),n==null||n(),r==null||r()}}return()=>void 0}function H1(){return s_(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(L1.cls={value:e.value,unit:``},z1=t)},!0)}function U1(){return c_(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&T1(e.value)&&(L1.lcp={value:e.value,unit:`millisecond`},R1=t)},!0)}function W1(){return l_(({metric:e})=>{B1=e.navigationType,e.entries[e.entries.length-1]&&(L1.ttfb={value:e.value,unit:`millisecond`})})}function G1(){return u_(({metric:e})=>{B1=e.navigationType,L1.fcp={value:e.value,unit:`millisecond`}})}function K1(){return f_(`paint`,({entries:e})=>{let t=C1();for(let n of e)n.name===`first-paint`&&n.startTime<t.firstHiddenTime&&(L1.fp={value:n.startTime,unit:`millisecond`})})}function q1(e,t){var n;let r=At();if(!((n=z_())!=null&&n.getEntries)||!r){J1();return}let{spanStreamingEnabled:i,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:o}=t,s=B_(r);if(F(e).attributes[`sentry.op`]===`pageload`){if(Z1(L1),X1(L1),i){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),Jg&&y.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{L1[e]&&t(e,L1[e].value)}),L1[`ttfb.requestTime`]&&t(`ttfb.requestTime`,L1[`ttfb.requestTime`].value,Fn)}else a||delete L1.cls,o||delete L1.lcp,Object.entries(L1).forEach(([t,n])=>{Is(t,n.value,n.unit,e)}),Y1(e,t);B1&&e.setAttribute(bn,B1),e.setAttribute(i?Cn:Mr,s),e.setAttribute(i?Sn:jr,_1())}J1()}function J1(){R1=void 0,z1=void 0,B1=void 0,L1={}}function Y1(e,t){R1&&t.recordLcpOnPageloadSpan&&(R1.element&&e.setAttribute(br,f1(R1.element)),R1.id&&e.setAttribute(xr,R1.id),R1.url&&e.setAttribute(Tr,Dd(R1.url.trim()).slice(0,200)),R1.loadTime!=null&&e.setAttribute(Sr,R1.loadTime),R1.renderTime!=null&&e.setAttribute(Cr,R1.renderTime),e.setAttribute(wr,R1.size)),z1!=null&&z1.sources&&t.recordClsOnPageloadSpan&&z1.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,f1(t.node)))}function X1(e){let t=e.fp;t&&(t.value=Math.max(t.value-_1(),0))}function Z1(e){let t=g1(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Q1=`browser.bfcache.navigation`,$1=`browser.bfcache.not_restored`,e0=`browser.bfcache.reload.duration`,t0=`ui.element.load_time`,n0=`ui.element.render_time`,r0=`ElementTiming`,i0=L((()=>({name:r0,setup(){z_()&&At()&&f_(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={[P]:`auto.ui.browser.element_timing`,[mi]:n};r&&(o[hi]=r),e.id&&(o[pi]=e.id),e.element&&(o[gi]=e.element.tagName.toLowerCase()),e.url&&(o[_i]=Dd(e.url)),e.naturalWidth&&(o[vi]=e.naturalWidth),e.naturalHeight&&(o[fi]=e.naturalHeight),i>0&&Mp.distribution(n0,i,{unit:`millisecond`,attributes:o}),a>0&&Mp.distribution(t0,a,{unit:`millisecond`,attributes:o})}})}}))),a0=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function o0(){let e=z.navigator;return e!=null&&e.userAgent?a0.test(e.userAgent):!1}function s0(e,t=5){if(!n.HTMLElement)return null;let r=e;for(let e=0;e<t;e++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}var c0=`Interactions`,l0=L(((e={})=>({name:c0,setup(t){if(o0())return;let n={name:void 0,source:void 0,routeId:void 0,urlTemplate:void 0,httpRoute:void 0,urlPath:void 0,urlFull:void 0},r;function i(e){let{name:t,attributes:r}=F(e);n.name=t,n.source=r[`sentry.source`]||r[`sentry.segment.name.source`],n.routeId=r[Fr],n.urlTemplate=r[Ti],n.httpRoute=r[yr],n.urlPath=r[Si],n.urlFull=r[xi]}t.on(`spanStart`,e=>{u0(e)&&(r=e,i(e))}),t.on(`spanEnd`,e=>{e===r&&(r=void 0,i(e))}),d0(t,n,()=>r,e),f0(t)}})));function u0(e){if(Ka(e)!==e)return!1;let t=F(e).attributes[Wr];return t===`pageload`||t===`navigation`}function d0(e,t,n,r){if(!z.document)return;let i;addEventListener(`click`,()=>{if(n()){Jg&&y.warn(`[Tracing] Did not create ui.action.click span because a pageload or navigation span is in progress.`);return}if(i&&=(i.setAttribute(zr,`interactionInterrupted`),i.end(),void 0),!t.name){Jg&&y.warn(`[Tracing] Did not create ui.action.click span because the latest route name is missing.`);return}let a=R(e),o=t.routeId||t.urlTemplate||t.httpRoute,s=o||`Click`,c=!o||t.routeId?`custom`:`route`;i=Cc({name:a?s:t.name,attributes:{[Wr]:sl,[ti]:a?c:t.source||`url`,[P]:`auto.browser.interactions`,...a&&{"sentry.segment.name":s},[Fr]:t.routeId,[Ti]:t.urlTemplate,[yr]:t.httpRoute,[Si]:t.urlPath,...t.urlFull&&{"url.full":Dd(t.urlFull)}}},r)},{capture:!0})}function f0(e){f_(`event`,({entries:t})=>{let n=I();if(n){for(let r of t)if(r.name===`click`){let t=kt(r.startTime);if(!t)continue;let i=B_(r.duration),a=f1(r.target),o=s0(r.target),s={name:R(e)?o||`Click`:a,startTime:t,attributes:{[Wr]:tl,[P]:`auto.browser.interactions`,...a&&a!==`<unknown>`&&{"browser.web_vital.inp.target":a}}};o&&(s.attributes[di]=o),R_(n,t,t+i,s)}}})}var p0=`LongTasks`,m0=L(((e={})=>{let{enableLongTask:t=!0,enableLongAnimationFrame:r=!0}=e;return{name:p0,setup(){var e;o0()||(r&&n.PerformanceObserver&&(e=PerformanceObserver.supportedEntryTypes)!=null&&e.includes(`long-animation-frame`)?Y_():t&&J_())}}})),h0=`Resources`,g0=L(((e={})=>({name:h0,setup(t){o0()||t.on(`beforeIdleSpanEnd`,n=>{var r;let i=(r=F(n).attributes)==null?void 0:r[Wr];(i===`pageload`||i===`navigation`)&&Z_(n,{ignoreResourceSpans:e.ignoreResourceSpans,spanStreamingEnabled:R(t)})})}})));function _0(){try{var e;return((e=z.document)==null?void 0:e.location.href)??``}catch{return``}}var v0=new WeakMap;function y0(e,t=N()){t?(Jg&&b0(t)&&y.warn(`A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve.`),v0.set(t,e)):Jg&&y.warn(`Cannot set a route provider without a client.`)}function b0(e=N()){return e&&v0.get(e)}function x0(e,t=N()){let n=b0(t);if(!n)return;let r=typeof e==`string`?T0(e):e;if(r)return No(Jg?`Route provider threw while resolving a route:`:``,()=>n.resolveRoute(r)||void 0,()=>void 0)}function S0(e=N()){let t=b0(e);return No(Jg?`Route provider threw while resolving a route:`:``,()=>(t==null?void 0:t.resolveCurrentRoute())||void 0,()=>void 0)}function C0(e){return{resolveRoute:e,resolveCurrentRoute:()=>{let t=T0(_0());return t&&e(t)}}}function w0(e=50){let t=new Ch(e);return{...C0(e=>t.get(e.pathname)),record(e,n){e&&n&&t.set(e,n)}}}function T0(e){return e?Md(e,_0()||void 0):void 0}var E0=`UserTiming`,D0=L(((e={})=>({name:E0,setup(t){let n=z_();if(!(n!=null&&n.getEntries))return;let r=0;t.on(`beforeIdleSpanEnd`,t=>{var i;let{attributes:a,start_timestamp:o}=F(t),s=a[Wr];if(s!==`pageload`&&s!==`navigation`)return;let c=((i=g1(!1))==null?void 0:i.requestStart)??0,l=n.getEntries();for(let n of l.slice(r)){if(n.entryType!==`mark`&&n.entryType!==`measure`)continue;let r=kt(n.startTime);r&&(s===`navigation`&&o&&r<o||O0(t,n,r,kt(n.startTime+Math.max(0,n.duration),n.startTime),kt(c,n.startTime),e.ignore??[]))}r=l.length})}})));function O0(e,t,n,r,i,a){if(k0(t)||ot(t.name,a))return;let o=Math.max(n,i),s={[P]:`auto.browser.user_timing.${t.entryType}`};o!==n&&(s[`sentry.browser.measure_happened_before_request`]=!0,s[`sentry.browser.measure_start_time`]=o),A0(s,t),o<=r&&R_(e,o,r,{name:t.name,op:t.entryType,attributes:s})}function k0(e){if(e.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function A0(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&O(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(O(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function j0(e){var t;let{name:n,op:r,origin:i,metricName:a,value:o,attributes:s,parentSpan:c,startTime:l,endTime:u,standalone:d,softNavigationId:f,navigationType:p}=e,m=c&&Ka(c),h=m?F(m).name:j().getScopeData().transactionName,g={[P]:i,[Wr]:r,[Rr]:0,[`browser.web_vital.${a}.value`]:o,[ai]:h,[ei]:h,[Ei]:(t=z.navigator)==null?void 0:t.userAgent,...s};c&&F(c).attributes[`sentry.op`]===`pageload`&&(g[Gr]=c.spanContext().spanId),f!=null&&(g[yn]=f),p&&(g[bn]=p),d&&Object.assign(g,M0());let _=_c({name:n,attributes:g,startTime:l,parentSpan:c,experimental:d?{standalone:!0}:void 0});_&&_.end(u??l)}function M0(){var e;let t=(e=N())==null?void 0:e.getIntegrationByName(`Replay`),n=t==null?void 0:t.getReplayId(!0);return n?{[Yr]:n,"sentry._internal.replay_is_buffering":(t==null?void 0:t.getRecordingMode())===`buffer`||void 0}:{}}function N0(e,t){let n,r=!1;function i(){!r&&n&&t(n),r=!0}v1(()=>{i()});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t!=null&&t.isRedirect||(i(),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}var P0={click:tl,hover:nl,drag:rl,press:il},F0={click:pl,hover:ml,drag:hl,press:gl};function I0(e,t,n){let r;e.on(`afterStartPageLoadSpan`,e=>{r=e});let i;e.on(`spanStart`,e=>{let t=F(e).attributes;(t==null?void 0:t[`sentry.op`])===`navigation`&&t[`browser.navigation.type`]===`back-forward-cache`&&(i=e)}),t(({metric:e})=>{let t=I_(e);e.navigationType===`soft-navigation`?t?n(e,t,e.navigationId):Jg&&y.log(`[SoftNav] Dropping ${e.name} for uncorrelated soft navigation ${e.navigationId}`):e.navigationType===`back-forward-cache`?n(e,i,void 0):n(e,r,void 0)})}function L0(e,t=!1){if(!H_(`largest-contentful-paint`))return;if(t){I0(e,c_,(e,t,n)=>{let r=e.entries[e.entries.length-1];R0(e.value,r,t,n,e.navigationType,e.navigationStartTime)});return}let n=0,r,i,a=c_(({metric:e})=>{i=e.navigationType;let t=e.entries[e.entries.length-1];t&&T1(e.value)&&(n=e.value,r=t)},!0);N0(e,e=>{R0(n,r,e,void 0,i),a()})}function R0(e,t,n,r,i,a){if(!T1(e))return;Jg&&y.log(`Sending LCP span (${e})`);let o=a||0,s=kt(o)??B_(o),c=t?kt(t.startTime,o)??B_(t.startTime):s+B_(e),l=t?f1(t.element):void 0,u=t!=null&&t.element?s0(t.element):null,d=N(),f=d&&R(d)?u||`Largest contentful paint`:l??`Largest contentful paint`,p={};l&&(p[jn]=l),u&&(p[di]=u),t!=null&&t.id&&(p[`browser.web_vital.lcp.id`]=t.id),t!=null&&t.url&&(p[`browser.web_vital.lcp.url`]=Dd(t.url,d)),(t==null?void 0:t.loadTime)!=null&&(p[`browser.web_vital.lcp.load_time`]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(p[`browser.web_vital.lcp.render_time`]=t.renderTime),(t==null?void 0:t.size)!=null&&(p[`browser.web_vital.lcp.size`]=t.size),t&&i!==`soft-navigation`&&i!==`back-forward-cache`&&Object.assign(p,E1(e,t)),j0({name:f,op:al,origin:`auto.ui.browser.lcp`,metricName:`lcp`,value:e,attributes:p,parentSpan:n,startTime:s,endTime:c,softNavigationId:r,navigationType:i})}function z0(e,t=!1){if(!H_(`layout-shift`))return;if(t){I0(e,s_,(e,t,n)=>{let r=e.entries[e.entries.length-1];B0(e.value,r,t,n,e.navigationType,e.navigationStartTime)});return}let n=0,r,i,a=s_(({metric:e})=>{i=e.navigationType;let t=e.entries[e.entries.length-1];t&&(n=e.value,r=t)},!0);N0(e,e=>{B0(n,r,e,void 0,i),a()})}function B0(e,t,n,r,i,a){var o;Jg&&y.log(`Sending CLS span (${e})`);let s=kt((t==null?void 0:t.startTime)??a??0)??A(),c=t==null||(o=t.sources[0])==null?void 0:o.node,l=t?f1(c):void 0,u=c?s0(c):null,d=N(),f=d&&R(d)?u||`Layout shift`:l??`Layout shift`,p={};u&&(p[di]=u),t!=null&&t.sources&&t.sources.forEach((e,t)=>{p[`browser.web_vital.cls.source.${t+1}`]=f1(e.node)}),j0({name:f,op:ol,origin:`auto.ui.browser.cls`,metricName:`cls`,value:e,attributes:p,parentSpan:n,startTime:s,softNavigationId:r,navigationType:i})}function V0(e,t=!1){if(!z_()||!At())return;let n=!R(e);t?I0(e,d_,(e,t,r)=>{H0(e)&&W0(e.value,U0(e),n,t,r,e)}):d_(({metric:e})=>{H0(e)&&W0(e.value,U0(e),n,void 0,void 0,e)})}function H0(e){return e.value!=null&&B_(e.value)<=60}function U0(e){return e.entries.find(t=>t.duration===e.value&&N1[t.name])}function W0(e,t,n=!1,r,i,a){Jg&&y.log(`Sending INP span (${e})`);let o=kt((t==null?void 0:t.startTime)??(a==null?void 0:a.navigationStartTime)??0);if(!o)return;let s=B_(e),c=t&&N1[t.name],l=c||`click`,u=P1(t),d=I(),f=d?Ka(d):void 0,p=r||(u==null?void 0:u.span)||f,m=(u==null?void 0:u.elementName)||(t?f1(t.target):void 0),h=t!=null&&t.target?s0(t.target):null,g=N(),_=!!g&&R(g),v=F0[l],b=_?h||v:m??`Interaction to next paint`,x={[Rr]:(t==null?void 0:t.duration)??e};m&&m!==`<unknown>`&&(x[`browser.web_vital.inp.target`]=m),c&&(x[`browser.web_vital.inp.interaction_type`]=c),Object.assign(x,I1(t)),h&&(x[di]=h),j0({name:b,op:P0[l],origin:`auto.ui.browser.inp`,metricName:`inp`,value:e,attributes:x,startTime:o,endTime:o+s,navigationType:a==null?void 0:a.navigationType,parentSpan:p,standalone:n,softNavigationId:i})}var G0=1e3,K0,q0,J0;function Y0(e){return typeof e==`boolean`?e:!!(e!=null&&e.capture)}function X0(e){se(`dom`,e),E(`dom`,Z0)}function Z0(){if(!z.document)return;let e=ce.bind(null,`dom`),t=ev(e,!0);z.document.addEventListener(`click`,t,!1),z.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{var n,r;let i=(n=z[t])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(Oe(i,`addEventListener`,function(t){return function(n,r,i){if((n===`click`||n==`keypress`)&&r)try{let a=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},s=Y0(i);if(!o.handler){let r=ev(e);o.handler=r,o.capture=s,t.call(this,n,r,o.capture)}let c=o[s?`captureListeners`:`bubbleListeners`];c.has(r)||(typeof i==`object`&&(i!=null&&i.once||i!=null&&i.signal)?o.sticky=!0:(c.add(r),o.listenerCount++))}catch{}return t.call(this,n,r,i)}}),Oe(i,`removeEventListener`,function(e){return function(t,n,r){if((t===`click`||t==`keypress`)&&n)try{let i=this.__sentry_instrumentation_handlers__||{},a=i[t];a!=null&&a[Y0(r)?`captureListeners`:`bubbleListeners`].delete(n)&&(!--a.listenerCount&&!a.sticky&&(e.call(this,t,a.handler,a.capture),a.handler=void 0,delete i[t]),Object.keys(i).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Q0(e){if(e.type!==q0)return!1;try{if(!e.target||e.target._sentryId!==J0)return!1}catch{}return!0}function $0(e,t){return e===`keypress`?t!=null&&t.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function ev(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=tv(n);if($0(n.type,r))return;ke(n,`_sentryCaptured`,!0),r&&!r._sentryId&&ke(r,`_sentryId`,ut());let i=n.type===`keypress`?`input`:n.type;Q0(n)||(e({event:n,name:i,global:t}),q0=n.type,J0=r?r._sentryId:void 0),clearTimeout(K0),K0=z.setTimeout(()=>{J0=void 0,q0=void 0},G0)}}function tv(e){try{return e.target}catch{return null}}var nv;function rv(){return`history`in z&&!!z.history}function iv(e){let t=`history`;se(t,e),E(t,av)}function av(){if(z.addEventListener(`popstate`,()=>{let e=z.location.href,t=nv;nv=e,t!==e&&ce(`history`,{from:t,to:e})}),!rv())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=nv,i=ov(String(n));if(nv=i,r===i)return e.apply(this,t);ce(`history`,{from:r,to:i})}return e.apply(this,t)}}Oe(z.history,`pushState`,e),Oe(z.history,`replaceState`,e)}function ov(e){try{return new URL(e,z.location.origin).toString()}catch{return e}}var sv={};function cv(e){let t=sv[e];if(t)return t;let n=z[e];if(dh(n))return sv[e]=n.bind(z);let r=z.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Jg&&y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(sv[e]=n.bind(z))}function lv(e){sv[e]=void 0}function uv(...e){try{return cv(`setTimeout`)(...e)}catch(t){Jg&&y.warn(`Could not use native setTimeout implementation, falling back to window.setTimeout: `,t);let n=z.setTimeout.bind(z);return sv.setTimeout=n,n(...e)}}var dv=`__sentry_xhr_v3__`;function fv(e){se(`xhr`,e),E(`xhr`,pv)}function pv(){if(!z.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=A()*1e3,a=be(n[0])?n[0].toUpperCase():void 0,o=mv(n[1]);if(!a||o===void 0)return e.apply(t,n);t[dv]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[dv];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ce(`xhr`,{endTimestamp:A()*1e3,startTimestamp:i,xhr:t,virtualError:r}),r=void 0,t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[dv];return a&&be(r)&&be(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[dv];return r&&(n[0]!==void 0&&(r.body=n[0]),ce(`xhr`,{startTimestamp:A()*1e3,xhr:t})),e.apply(t,n)}})}function mv(e){if(be(e))return e;try{return e.toString()}catch{}}var hv=Symbol.for(`sentry__originalRequestBody`);function gv(e){return new URLSearchParams(e).toString()}function _v(e,t=y){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[gv(e)];if(!e)return[void 0]}catch(n){return Jg&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Jg&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function vv(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){let t=e[0][hv];return t===void 0?void 0:t}}function yv(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Jg&&y.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
5
+ `).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function bv(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}function xv(e){try{let t=z.location.origin,n=String(e);return(n.startsWith(`//`)?new URL(`${t}${n}`):new URL(n,t)).toString()}catch{return e}}var B=n,Sv=0,Cv=[];function wv(e){if(Sv>0)return!0;let t=e?Cv.findIndex(t=>Ev(t,e)):-1;return t!==-1&&(Cv.splice(t,1),!0)}function Tv(e){Cv.push(e),setTimeout(()=>{let t=Cv.indexOf(e);t!==-1&&Cv.splice(t,1)})}function Ev(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function Dv(){Sv++,setTimeout(()=>{Sv--})}function Ov(e,t={}){function r(e){return typeof e==`function`}if(!r(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(je(e))return e}catch{return e}let i=function(...r){n._sentryWrappedDepth=(n._sentryWrappedDepth||0)+1;try{let n=r.map(e=>Ov(e,t));return e.apply(this,n)}catch(e){throw Dv(),dn(n=>{n.addEventProcessor(e=>(t.mechanism&&(pt(e,void 0,void 0),mt(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),eu(e)}),e}finally{n._sentryWrappedDepth=(n._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}Ae(i,e),ke(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function kv(e){let t=_0(),{referrer:n}=B.document||{},{userAgent:r}=B.navigator||{};return{url:t,headers:{...n&&{Referer:Dd(n,e)},...r&&{"User-Agent":r}}}}var Av=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`userTimingIntegration`,`interactionsIntegration`,`moduleMetadataIntegration`],jv={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function Mv(e){return jv[e]||e.replace(`Integration`,``).toLowerCase()}var Nv=B;async function Pv(e,t){let n=Av.includes(e)?Mv(e):void 0,r=Nv.Sentry=Nv.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=Fv(n),o=B.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=B.document.currentScript,l=B.document.body||B.document.head||(c==null?void 0:c.parentElement);if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function Fv(e){var t;let n=((t=N())==null||(t=t.getOptions())==null?void 0:t.cdnBaseUrl)||`https://browser.sentry-cdn.com`;return new URL(`/${r}/${e}.min.js`,n).toString()}var Iv=n,V=Iv.document,Lv=Iv.navigator,Rv=`Report a Bug`,zv=`Cancel`,Bv=`Send Bug Report`,Vv=`Confirm`,Hv=`Report a Bug`,Uv=`your.email@example.org`,Wv=`Email`,Gv=`What's the bug? What did you expect?`,Kv=`Description`,qv=`Your Name`,Jv=`Name`,Yv=`Thank you for your report!`,Xv=`(required)`,Zv=`Add a screenshot`,Qv=`Remove screenshot`,$v=`Highlight`,ey=`Hide`,ty=`Remove`,ny=`Unable to submit feedback with empty message`,ry=`No client setup, cannot send feedback.`,iy=`Unable to determine if Feedback was correctly sent.`,ay=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,oy=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,sy=`widget`,cy=5e3,ly={ERROR_EMPTY_MESSAGE:ny,ERROR_NO_CLIENT:ry,ERROR_TIMEOUT:iy,ERROR_FORBIDDEN:ay,ERROR_GENERIC:oy};function uy(e,t){return(t==null?void 0:t[e])??ly[e]}function dy(e,t){return Error(uy(e,t))}var fy=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw dy(`ERROR_EMPTY_MESSAGE`,n);let r=N();if(!r)throw dy(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&j().setTags(e.tags);let i=wh({source:`api`,url:py(),...e},t);return new Promise((e,t)=>{let a=setTimeout(()=>{o(),t(dy(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s!=null&&s.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):(s==null?void 0:s.statusCode)===403?t(dy(`ERROR_FORBIDDEN`,n)):t(dy(`ERROR_GENERIC`,n))})})};function py(){try{return Iv.document.location.href}catch{return``}}var my=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function hy(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Lv.userAgent)||/Macintosh/i.test(Lv.userAgent)&&Lv.maxTouchPoints&&Lv.maxTouchPoints>1||!isSecureContext)}function gy(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{var n,r;(n=t.onFormOpen)==null||n.call(t),(r=e.onFormOpen)==null||r.call(e)},onFormClose:()=>{var n,r;(n=t.onFormClose)==null||n.call(t),(r=e.onFormClose)==null||r.call(e)},onSubmitSuccess:(n,r)=>{var i,a;(i=t.onSubmitSuccess)==null||i.call(t,n,r),(a=e.onSubmitSuccess)==null||a.call(e,n,r)},onSubmitError:n=>{var r,i;(r=t.onSubmitError)==null||r.call(t,n),(i=e.onSubmitError)==null||i.call(e,n)},onFormSubmitted:()=>{var n,r;(n=t.onFormSubmitted)==null||n.call(t),(r=e.onFormSubmitted)==null||r.call(e)},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function _y(e){let t=V.createElement(`style`);return t.textContent=`
6
+ .widget__actor {
7
+ position: fixed;
8
+ z-index: var(--z-index);
9
+ margin: var(--page-margin);
10
+ inset: var(--actor-inset);
11
+
12
+ display: flex;
13
+ align-items: center;
14
+ gap: 8px;
15
+ padding: 16px;
16
+
17
+ font-family: inherit;
18
+ font-size: var(--font-size);
19
+ font-weight: 600;
20
+ line-height: 1.14em;
21
+ text-decoration: none;
22
+
23
+ background: var(--actor-background, var(--background));
24
+ border-radius: var(--actor-border-radius, 1.7em/50%);
25
+ border: var(--actor-border, var(--border));
26
+ box-shadow: var(--actor-box-shadow, var(--box-shadow));
27
+ color: var(--actor-color, var(--foreground));
28
+ fill: var(--actor-color, var(--foreground));
29
+ cursor: pointer;
30
+ opacity: 1;
31
+ transition: transform 0.2s ease-in-out;
32
+ transform: translate(0, 0) scale(1);
33
+ }
34
+ .widget__actor[aria-hidden="true"] {
35
+ opacity: 0;
36
+ pointer-events: none;
37
+ visibility: hidden;
38
+ transform: translate(0, 16px) scale(0.98);
39
+ }
40
+
41
+ .widget__actor:hover {
42
+ background: var(--actor-hover-background, var(--background));
43
+ filter: var(--interactive-filter);
44
+ }
45
+
46
+ .widget__actor svg {
47
+ width: 1.14em;
48
+ height: 1.14em;
49
+ }
50
+
51
+ @media (max-width: 600px) {
52
+ .widget__actor span {
53
+ display: none;
54
+ }
55
+ }
56
+ `,e&&t.setAttribute(`nonce`,e),t}function vy(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}var yy=20,by=`http://www.w3.org/2000/svg`;function xy(){let e=e=>Iv.document.createElementNS(by,e),t=vy(e(`svg`),{width:`${yy}`,height:`${yy}`,viewBox:`0 0 ${yy} ${yy}`,fill:`var(--actor-color, var(--foreground))`}),n=vy(e(`g`),{clipPath:`url(#clip0_57_80)`}),r=vy(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);let i=e(`defs`),a=vy(e(`clipPath`),{id:`clip0_57_80`}),o=vy(e(`rect`),{width:`${yy}`,height:`${yy}`,fill:`white`});return a.appendChild(o),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(o),t}function Sy({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=V.createElement(`button`);if(i.type=`button`,i.className=`widget__actor`,i.ariaHidden=`false`,i.ariaLabel=t||e||`Report a Bug`,i.appendChild(xy()),e){let t=V.createElement(`span`);t.appendChild(V.createTextNode(e)),i.appendChild(t)}let a=_y(r);return{el:i,appendToDom(){n.appendChild(a),n.appendChild(i)},removeFromDom(){i.remove(),a.remove()},show(){i.ariaHidden=`false`},hide(){i.ariaHidden=`true`}}}var Cy=`rgba(88, 74, 192, 1)`,wy={foreground:`#2b2233`,background:`#ffffff`,accentForeground:`white`,accentBackground:Cy,successColor:`#268d75`,errorColor:`#df3338`,border:`1.5px solid rgba(41, 35, 47, 0.13)`,inputBorder:`1.5px solid rgba(41, 35, 47, 0.6)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(95%)`},Ty={foreground:`#ebe6ef`,background:`#29232f`,accentForeground:`white`,accentBackground:Cy,successColor:`#2da98c`,errorColor:`#f55459`,border:`1.5px solid rgba(235, 230, 239, 0.15)`,inputBorder:`1.5px solid rgba(235, 230, 239, 0.6)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(150%)`};function Ey(e){return`
57
+ --foreground: ${e.foreground};
58
+ --background: ${e.background};
59
+ --accent-foreground: ${e.accentForeground};
60
+ --accent-background: ${e.accentBackground};
61
+ --success-color: ${e.successColor};
62
+ --error-color: ${e.errorColor};
63
+ --border: ${e.border};
64
+ --input-border: ${e.inputBorder};
65
+ --box-shadow: ${e.boxShadow};
66
+ --outline: ${e.outline};
67
+ --interactive-filter: ${e.interactiveFilter};
68
+ `}function Dy({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=V.createElement(`style`);return i.textContent=`
69
+ :host {
70
+ --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
71
+ --font-size: 14px;
72
+ --z-index: 100000;
73
+
74
+ --page-margin: 16px;
75
+ --inset: auto 0 0 auto;
76
+ --actor-inset: var(--inset);
77
+
78
+ font-family: var(--font-family);
79
+ font-size: var(--font-size);
80
+
81
+ ${e===`system`?``:`color-scheme: only ${e};`}
82
+
83
+ ${Ey(e===`dark`?{...Ty,...t}:{...wy,...n})}
84
+ }
85
+
86
+ ${e===`system`?`
87
+ @media (prefers-color-scheme: dark) {
88
+ :host {
89
+ color-scheme: only dark;
90
+
91
+ ${Ey({...Ty,...t})}
92
+ }
93
+ }`:``}
94
+ `,r&&i.setAttribute(`nonce`,r),i}var Oy=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>L((({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=Zv,cancelButtonLabel:b=zv,confirmButtonLabel:x=Vv,emailLabel:S=Wv,emailPlaceholder:C=Uv,formTitle:w=Hv,isRequiredLabel:ee=Xv,messageLabel:T=Kv,messagePlaceholder:te=Gv,nameLabel:ne=Jv,namePlaceholder:re=qv,removeScreenshotButtonLabel:ie=Qv,submitButtonLabel:ae=Bv,successMessageText:oe=Yv,triggerLabel:se=Rv,triggerAriaLabel:E=``,highlightToolText:ce=$v,hideToolText:le=ey,removeHighlightText:ue=ty,errorEmptyMessageText:de=ny,errorNoClientText:fe=ry,errorTimeoutText:pe=iy,errorForbiddenText:me=ay,errorGenericText:he=oy,onFormOpen:D,onFormClose:ge,onSubmitSuccess:_e,onSubmitError:ve,onFormSubmitted:ye}={})=>{let be={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:se,triggerAriaLabel:E,cancelButtonLabel:b,submitButtonLabel:ae,confirmButtonLabel:x,formTitle:w,emailLabel:S,emailPlaceholder:C,messageLabel:T,messagePlaceholder:te,nameLabel:ne,namePlaceholder:re,successMessageText:oe,isRequiredLabel:ee,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:ie,highlightToolText:ce,hideToolText:le,removeHighlightText:ue,errorEmptyMessageText:de,errorNoClientText:fe,errorTimeoutText:pe,errorForbiddenText:me,errorGenericText:he,onFormClose:ge,onFormOpen:D,onSubmitError:ve,onSubmitSuccess:_e,onFormSubmitted:ye},xe=null,O=null,k=[],Se=e=>{if(!xe){let t=V.createElement(`div`);t.id=String(e.id),V.body.appendChild(t),xe=t.attachShadow({mode:`open`}),O=Dy(e),xe.appendChild(O)}return xe},Ce=async r=>{let i=r.enableScreenshot&&hy(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),fo(a)}catch{throw my&&y.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),fo(o))}catch{my&&y.error(`[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.`)}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>fy(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{var e;l==null||l.close(),(e=r.onFormClose)==null||e.call(r)},onFormSubmitted:()=>{var e;l==null||l.close(),(e=r.onFormSubmitted)==null||e.call(r)}},screenshotIntegration:o,sendFeedback:c,shadow:Se(r)});return l},we=(e,t={})=>{let n=gy(be,t),r=typeof e==`string`?V.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw my&&y.error(`[Feedback] Unable to attach to target element`),Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await Ce({...n,onFormSubmitted:()=>{var e;i==null||i.removeFromDom(),(e=n.onFormSubmitted)==null||e.call(n)}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{k=k.filter(e=>e!==o),i==null||i.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return k.push(o),o},Te=(e={})=>{let t=gy(be,e),n=Se(t),r=Sy({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return we(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){ms()&&be.autoInject&&(V.readyState===`loading`?V.addEventListener(`DOMContentLoaded`,()=>Te().appendToDom()):Te().appendToDom())},attachTo:we,createWidget(e={}){let t=Te(gy(be,e));return t.appendToDom(),t},async createForm(e={}){return Ce(gy(be,e))},setTheme(e){if(be.colorScheme=e,xe){let e=Dy(be);O?xe.replaceChild(e,O):xe.prepend(e),O=e}},remove(){if(xe){var e;(e=xe.parentElement)==null||e.remove(),xe=null,O=null}k.forEach(e=>e()),k=[]}}}));function ky(){var e;return(e=N())==null?void 0:e.getIntegrationByName(`Feedback`)}var Ay,H,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy={},Wy=[],Gy=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ky=Array.isArray;function qy(e,t){for(var n in t)e[n]=t[n];return e}function Jy(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function U(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Ay.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Yy(e,o,r,i,null)}function Yy(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++jy,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(a),a}function Xy(e){return e.children}function Zy(e,t){this.props=e,this.context=t}function Qy(e,t){if(t==null)return e.__?Qy(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`?Qy(e):null}function $y(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=qy({},t);a.__v=t.__v+1,H.vnode&&H.vnode(a),u2(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Qy(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,f2(r,a,i),t.__e=t.__=null,a.__e!=n&&e2(a)}}function e2(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),e2(e)}function t2(e){(!e.__d&&(e.__d=!0)&&My.push(e)&&!n2.__r++||Ny!=H.debounceRendering)&&((Ny=H.debounceRendering)||Py)(n2)}function n2(){try{for(var e,t=1;My.length;)My.length>t&&My.sort(Fy),e=My.shift(),t=My.length,$y(e)}finally{My.length=n2.__r=0}}function r2(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||Wy,v=t.length;for(c=i2(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||Uy,p.__i=d,g=u2(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&h2(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=a2(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function i2(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=Yy(null,o,null,null,null):Ky(o)?o=e.__k[a]=Yy(Xy,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=Yy(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=o2(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Qy(s)),g2(s,s));return r}function a2(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=a2(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=Qy(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function o2(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function s2(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Gy.test(t)?n:n+`px`}function c2(e,t,n,r,i){var a,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||s2(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||s2(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(zy,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[Ry]=r[Ry]:(n[Ry]=By,e.addEventListener(t,a?Hy:Vy,a)):e.removeEventListener(t,a?Hy:Vy,a);else{if(i==`http://www.w3.org/2000/svg`)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!=`popover`&&t in e)try{e[t]=n??``;break e}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function l2(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Ly]==null)t[Ly]=By++;else if(t[Ly]<n[Ry])return;return n(H.event?H.event(t):t)}}}function u2(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=H.__b)&&u(t);e:if(typeof T==`function`){d=o.length;try{if(v=t.props,y=T.prototype&&T.prototype.render,b=(u=T.contextType)&&r[u.__c],x=u?b?b.props.value:u.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new T(v,x):(t.__c=f=new Zy(v,x),f.constructor=T,f.render=_2),b&&b.sub(f),f.state||(f.state={}),f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&T.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=qy({},f.__s)),qy(f.__s,T.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&T.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&T.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Wy.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f),s=Qy(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=H.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),Wy.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(r=qy(qy({},r),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=u!=null&&u.type===Xy&&u.key==null?p2(u.props.children):u,s=r2(e,Ky(w)?w:[w],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__E=f.__=null)}catch(e){if(o.length=d,t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a!=null&&(a[a.indexOf(s)]=null),t.__e=s}else if(a!=null)for(ee=a.length;ee--;)Jy(a[ee])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||d2(t),H.__e(e,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=m2(n.__e,t,n,r,i,a,o,c,l);return(u=H.diffed)&&u(t),128&t.__u?void 0:s}function d2(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(d2))}function f2(e,t,n){for(var r=0;r<n.length;r++)h2(n[r],n[++r],n[++r]);H.__c&&H.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){H.__e(e,t.__v)}})}function p2(e){return typeof e!=`object`||!e||e.__b>0?e:Ky(e)?e.map(p2):e.constructor===void 0?qy({},e):null}function m2(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||Uy,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&=(H.__m&&H.__m(t,a),!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=v==`textarea`&&_.defaultValue!=null?null:a&&Ay.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||c2(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||c2(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),r2(t.type==`template`?e.content:e,Ky(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Qy(n,0),s,c),a!=null)for(l=a.length;l--;)Jy(a[l]);s&&v!=`textarea`||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&c2(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&c2(e,l,h,g[l],i))}return e}function h2(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){H.__e(e,n)}}function g2(e,t,n){var r,i;if(H.unmount&&H.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||h2(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){H.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&g2(r[i],t,n||typeof e.type!=`function`);n||Jy(e.__e),e.__c=e.__=e.__e=void 0}function _2(e,t,n){return this.constructor(e,n)}function v2(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),H.__&&H.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],u2(t,e=(!r&&n||t).__k=U(Xy,null,[e]),i||Uy,Uy,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Ay.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),f2(a,e,o),e.props.children=null}Ay=Wy.slice,H={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},jy=0,Zy.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=qy({},this.state);typeof e==`function`&&(e=e(qy({},n),this.props)),e&&qy(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),t2(this))},Zy.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),t2(this))},Zy.prototype.render=Xy,My=[],Py=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Fy=function(e,t){return e.__v.__b-t.__v.__b},n2.__r=0,Iy=Math.random().toString(8),Ly=`__d`+Iy,Ry=`__a`+Iy,zy=/(PointerCapture)$|Capture$/i,By=0,Vy=l2(!1),Hy=l2(!0);var y2=Object.defineProperty,b2=((e,t)=>{let n=Object.setPrototypeOf({},null);for(var r in e)y2(n,r,{get:e[r],enumerable:!0});return t&1||y2(n,Symbol.toStringTag,{value:`Module`}),t&2?n:Object.preventExtensions(n)})({useCallback:()=>B2,useContext:()=>V2,useDebugValue:()=>H2,useEffect:()=>F2,useErrorBoundary:()=>U2,useId:()=>W2,useImperativeHandle:()=>R2,useLayoutEffect:()=>I2,useMemo:()=>z2,useReducer:()=>P2,useRef:()=>L2,useState:()=>N2}),x2,W,S2,C2,w2=0,T2=[],G=H,E2=G.__b,D2=G.__r,O2=G.diffed,k2=G.__c,A2=G.unmount,j2=G.__;function M2(e,t){G.__h&&G.__h(W,e,w2||t),w2=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N2(e){return w2=1,P2(Z2,e)}function P2(e,t,n){var r=M2(x2++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Z2(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};W.__f=!0;var a=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},W.shouldComponentUpdate=i}return r.__N||r.__}function F2(e,t){var n=M2(x2++,3);!G.__s&&X2(n.__H,t)&&(n.__=e,n.u=t,W.__H.__h.push(n))}function I2(e,t){var n=M2(x2++,4);!G.__s&&X2(n.__H,t)&&(n.__=e,n.u=t,W.__h.push(n))}function L2(e){return w2=5,z2(function(){return{current:e}},[])}function R2(e,t,n){w2=6,I2(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function z2(e,t){var n=M2(x2++,7);return X2(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function B2(e,t){return w2=8,z2(function(){return e},t)}function V2(e){var t=W.context[e.__c],n=M2(x2++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(W)),t.props.value):e.__}function H2(e,t){G.useDebugValue&&G.useDebugValue(t?t(e):e)}function U2(e){var t=M2(x2++,10),n=N2();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function W2(){var e=M2(x2++,11);if(!e.__){for(var t=W.__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 G2(){for(var e;e=T2.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(J2),t.__h.some(Y2),t.__h=[]}catch(n){t.__h=[],G.__e(n,e.__v)}}}G.__b=function(e){W=null,E2&&E2(e)},G.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),j2&&j2(e,t)},G.__r=function(e){D2&&D2(e),x2=0;var t=(W=e.__c).__H;t&&(S2===W?(t.__h=[],W.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(J2),t.__h.some(Y2),t.__h=[],x2=0)),S2=W},G.diffed=function(e){O2&&O2(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(T2.push(t)!==1&&C2===G.requestAnimationFrame||((C2=G.requestAnimationFrame)||q2)(G2)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),S2=W=null},G.__c=function(e,t){t.some(function(e){try{e.__h.some(J2),e.__h=e.__h.filter(function(e){return!e.__||Y2(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],G.__e(n,e.__v)}}),k2&&k2(e,t)},G.unmount=function(e){A2&&A2(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{J2(e)}catch(e){t=e}}),n.__H=void 0,t&&G.__e(t,n.__v))};var K2=typeof requestAnimationFrame==`function`;function q2(e){var t,n=function(){clearTimeout(r),K2&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);K2&&(t=requestAnimationFrame(n))}function J2(e){var t=W,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),W=t}function Y2(e){var t=W;e.__c=e.__(),W=t}function X2(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Z2(e,t){return typeof t==`function`?t(e):t}function Q2(){return U(`svg`,{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`},U(`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`}))}function $2({options:e}){return U(`h2`,{class:`dialog__header`},U(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?U(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`},U(Q2,null)):null)}function e4(e,t){let 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 t4(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function n4({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:b,nameLabel:x,namePlaceholder:S,submitButtonLabel:C,isRequiredLabel:w}=e,[ee,T]=N2(!1),[te,ne]=N2(null),[re,ie]=N2(!1),ae=l==null?void 0:l.input,[oe,se]=N2(null),E=B2(e=>{se(e),ie(!1)},[]),ce=B2(e=>{let t=e4(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:x});return t.length>0?ne(`Please enter in the following required fields: ${t.join(`, `)}`):ne(null),t.length===0},[m,g,_,v,x]);return U(`form`,{class:`form`,onSubmit:B2(async e=>{T(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&re?l.value():void 0),r={name:t4(t,`name`),email:t4(t,`email`),message:t4(t,`message`),attachments:n?[n]:void 0};if(!ce(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:sy,tags:u},{attachments:r.attachments}))}catch(e){my&&y.error(e);let t=e;ne(t.message),o(t)}}finally{T(!1)}},[l&&re,a,o])},ae&&re?U(ae,{onError:E}):null,U(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:ee},U(`div`,{class:`form__top`},te?U(`div`,{class:`form__error-container`},te):null,c?U(`label`,{for:`name`,class:`form__label`},U(r4,{label:x,isRequiredLabel:w,isRequired:_}),U(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:S,required:_,type:`text`})):U(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?U(`label`,{for:`email`,class:`form__label`},U(r4,{label:m,isRequiredLabel:w,isRequired:g}),U(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):U(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),U(`label`,{for:`message`,class:`form__label`},U(r4,{label:v,isRequiredLabel:w,isRequired:!0}),U(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:b,required:!0,rows:5})),ae?U(`label`,{for:`screenshot`,class:`form__label`},U(`button`,{class:`btn btn--default`,disabled:ee,type:`button`,onClick:()=>{se(null),ie(e=>!e)}},re?f:d),oe?U(`div`,{class:`form__error-container`},oe.message):null):null),U(`div`,{class:`btn-group`},U(`button`,{class:`btn btn--primary`,disabled:ee,type:`submit`},C),U(`button`,{class:`btn btn--default`,disabled:ee,type:`button`,onClick:r},p))))}function r4({label:e,isRequired:t,isRequiredLabel:n}){return U(`span`,{class:`form__label__text`},e,t&&U(`span`,{class:`form__label__text--required`},n))}function i4(){return U(`svg`,{width:`16`,height:`17`,viewBox:`0 0 16 17`,fill:`inherit`},U(`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`}),U(`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`}))}function a4({open:e,onFormSubmitted:t,...n}){let r=n.options,[i,a]=N2(null),o=L2(null);I2(()=>{let t=o.current;if(e&&t&&!t.open){var n;try{t.showModal()}catch{t.setAttribute(`open`,``)}(n=t.querySelector(`[autofocus]`))==null||n.focus()}return()=>{typeof(t==null?void 0:t.close)==`function`?t.close():t==null||t.removeAttribute(`open`)}},[e,i]),I2(()=>()=>{i&&clearTimeout(i)},[i]);let s=B2(()=>{i&&(clearTimeout(i),a(null)),t()},[i]),c=B2((e,r)=>{n.onSubmitSuccess(e,r),a(setTimeout(()=>{t(),a(null)},cy))},[t]);return U(Xy,null,i?U(`div`,{class:`success__position`,onClick:s},U(`div`,{class:`success__content`},r.successMessageText,U(`span`,{class:`success__icon`},U(i4,null)))):U(`dialog`,{class:`dialog`,ref:o,"aria-label":r.formTitle,onClick:r.onFormClose,onCancel:e=>{var t;e.preventDefault(),(t=r.onFormClose)==null||t.call(r)},onKeyDown:e=>{if(e.key===`Escape`){var t;e.preventDefault(),(t=r.onFormClose)==null||t.call(r)}}},U(`div`,{class:`dialog__position`},U(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},U($2,{options:r}),U(n4,{...n,onSubmitSuccess:c})))))}var o4=`
95
+ .dialog {
96
+ position: fixed;
97
+ z-index: var(--z-index);
98
+ margin: 0;
99
+ inset: 0;
100
+
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ padding: 0;
105
+ height: 100vh;
106
+ width: 100vw;
107
+ max-height: none;
108
+ max-width: none;
109
+
110
+ color: var(--dialog-color, var(--foreground));
111
+ fill: var(--dialog-color, var(--foreground));
112
+ line-height: 1.75em;
113
+
114
+ background-color: rgba(0, 0, 0, 0.05);
115
+ border: none;
116
+ inset: 0;
117
+ opacity: 1;
118
+ transition: opacity 0.2s ease-in-out;
119
+ }
120
+
121
+ .dialog::backdrop {
122
+ background: transparent;
123
+ }
124
+
125
+ .dialog__position {
126
+ position: fixed;
127
+ z-index: var(--z-index);
128
+ inset: var(--dialog-inset);
129
+ padding: var(--page-margin);
130
+ display: flex;
131
+ max-height: calc(100vh - (2 * var(--page-margin)));
132
+ }
133
+ @media (max-width: 600px) {
134
+ .dialog__position {
135
+ inset: var(--page-margin);
136
+ padding: 0;
137
+ }
138
+ }
139
+
140
+ .dialog__position:has(.editor) {
141
+ inset: var(--page-margin);
142
+ padding: 0;
143
+ }
144
+
145
+ .dialog:not([open]) {
146
+ opacity: 0;
147
+ pointer-events: none;
148
+ visibility: hidden;
149
+ }
150
+ .dialog:not([open]) .dialog__content {
151
+ transform: translate(0, -16px) scale(0.98);
152
+ }
153
+
154
+ .dialog__content {
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: 16px;
158
+ padding: var(--dialog-padding, 24px);
159
+ max-width: 100%;
160
+ width: 100%;
161
+ max-height: 100%;
162
+ overflow: auto;
163
+
164
+ background: var(--dialog-background, var(--background));
165
+ border-radius: var(--dialog-border-radius, 20px);
166
+ border: var(--dialog-border, var(--border));
167
+ box-shadow: var(--dialog-box-shadow, var(--box-shadow));
168
+ transform: translate(0, 0) scale(1);
169
+ transition: transform 0.2s ease-in-out;
170
+ }
171
+
172
+ `,s4=`
173
+ .dialog__header {
174
+ display: flex;
175
+ gap: 4px;
176
+ justify-content: space-between;
177
+ font-weight: var(--dialog-header-weight, 600);
178
+ margin: 0;
179
+ }
180
+ .dialog__title {
181
+ align-self: center;
182
+ width: var(--form-width, 272px);
183
+ }
184
+
185
+ @media (max-width: 600px) {
186
+ .dialog__title {
187
+ width: auto;
188
+ }
189
+ }
190
+
191
+ .dialog__position:has(.editor) .dialog__title {
192
+ width: auto;
193
+ }
194
+
195
+
196
+ .brand-link {
197
+ display: inline-flex;
198
+ }
199
+ .brand-link:focus-visible {
200
+ outline: var(--outline);
201
+ }
202
+ `,c4=`
203
+ .form {
204
+ display: flex;
205
+ overflow: auto;
206
+ flex-direction: row;
207
+ gap: 16px;
208
+ flex: 1 0;
209
+ }
210
+
211
+ .form fieldset {
212
+ border: none;
213
+ margin: 0;
214
+ padding: 0;
215
+ }
216
+
217
+ .form__right {
218
+ flex: 0 0 auto;
219
+ display: flex;
220
+ overflow: auto;
221
+ flex-direction: column;
222
+ justify-content: space-between;
223
+ gap: 20px;
224
+ width: var(--form-width, 100%);
225
+ }
226
+
227
+ .dialog__position:has(.editor) .form__right {
228
+ width: var(--form-width, 272px);
229
+ }
230
+
231
+ .form__top {
232
+ display: flex;
233
+ flex-direction: column;
234
+ gap: 8px;
235
+ }
236
+
237
+ .form__error-container {
238
+ color: var(--error-color);
239
+ fill: var(--error-color);
240
+ width: 0;
241
+ min-width: 100%;
242
+ overflow-wrap: break-word;
243
+ }
244
+
245
+ .form__label {
246
+ display: flex;
247
+ flex-direction: column;
248
+ gap: 4px;
249
+ margin: 0px;
250
+ }
251
+
252
+ .form__label__text {
253
+ display: flex;
254
+ gap: 4px;
255
+ align-items: center;
256
+ }
257
+
258
+ .form__label__text--required {
259
+ font-size: 0.85em;
260
+ }
261
+
262
+ .form__input {
263
+ font-family: inherit;
264
+ line-height: inherit;
265
+ background: transparent;
266
+ box-sizing: border-box;
267
+ border: var(--input-border, var(--border));
268
+ border-radius: var(--input-border-radius, 6px);
269
+ color: var(--input-color, inherit);
270
+ fill: var(--input-color, inherit);
271
+ font-size: var(--input-font-size, inherit);
272
+ font-weight: var(--input-font-weight, 500);
273
+ padding: 6px 12px;
274
+ }
275
+
276
+ .form__input::placeholder {
277
+ opacity: 0.65;
278
+ color: var(--input-placeholder-color, inherit);
279
+ filter: var(--interactive-filter);
280
+ }
281
+
282
+ .form__input:focus-visible {
283
+ outline: var(--input-focus-outline, var(--outline));
284
+ }
285
+
286
+ .form__input--textarea {
287
+ font-family: inherit;
288
+ resize: vertical;
289
+ }
290
+
291
+ .error {
292
+ color: var(--error-color);
293
+ fill: var(--error-color);
294
+ }
295
+ `,l4=`
296
+ .btn-group {
297
+ display: grid;
298
+ gap: 8px;
299
+ }
300
+
301
+ .btn {
302
+ line-height: inherit;
303
+ border: var(--button-border, var(--border));
304
+ border-radius: var(--button-border-radius, 6px);
305
+ cursor: pointer;
306
+ font-family: inherit;
307
+ font-size: var(--button-font-size, inherit);
308
+ font-weight: var(--button-font-weight, 600);
309
+ padding: var(--button-padding, 6px 16px);
310
+ }
311
+ .btn[disabled] {
312
+ opacity: 0.6;
313
+ pointer-events: none;
314
+ }
315
+
316
+ .btn--primary {
317
+ color: var(--button-primary-color, var(--accent-foreground));
318
+ fill: var(--button-primary-color, var(--accent-foreground));
319
+ background: var(--button-primary-background, var(--accent-background));
320
+ border: var(--button-primary-border, var(--border));
321
+ border-radius: var(--button-primary-border-radius, 6px);
322
+ font-weight: var(--button-primary-font-weight, 500);
323
+ }
324
+ .btn--primary:hover {
325
+ color: var(--button-primary-hover-color, var(--accent-foreground));
326
+ fill: var(--button-primary-hover-color, var(--accent-foreground));
327
+ background: var(--button-primary-hover-background, var(--accent-background));
328
+ filter: var(--interactive-filter);
329
+ }
330
+ .btn--primary:focus-visible {
331
+ background: var(--button-primary-hover-background, var(--accent-background));
332
+ filter: var(--interactive-filter);
333
+ outline: var(--button-primary-focus-outline, var(--outline));
334
+ }
335
+
336
+ .btn--default {
337
+ color: var(--button-color, var(--foreground));
338
+ fill: var(--button-color, var(--foreground));
339
+ background: var(--button-background, var(--background));
340
+ border: var(--button-border, var(--border));
341
+ border-radius: var(--button-border-radius, 6px);
342
+ font-weight: var(--button-font-weight, 500);
343
+ }
344
+ .btn--default:hover {
345
+ color: var(--button-color, var(--foreground));
346
+ fill: var(--button-color, var(--foreground));
347
+ background: var(--button-hover-background, var(--background));
348
+ filter: var(--interactive-filter);
349
+ }
350
+ .btn--default:focus-visible {
351
+ background: var(--button-hover-background, var(--background));
352
+ filter: var(--interactive-filter);
353
+ outline: var(--button-focus-outline, var(--outline));
354
+ }
355
+ `,u4=`
356
+ .success__position {
357
+ position: fixed;
358
+ inset: var(--dialog-inset);
359
+ padding: var(--page-margin);
360
+ z-index: var(--z-index);
361
+ }
362
+ .success__content {
363
+ background: var(--success-background, var(--background));
364
+ border: var(--success-border, var(--border));
365
+ border-radius: var(--success-border-radius, 1.7em/50%);
366
+ box-shadow: var(--success-box-shadow, var(--box-shadow));
367
+ font-weight: var(--success-font-weight, 600);
368
+ color: var(--success-color);
369
+ fill: var(--success-color);
370
+ padding: 12px 24px;
371
+ line-height: 1.75em;
372
+
373
+ display: grid;
374
+ align-items: center;
375
+ grid-auto-flow: column;
376
+ gap: 6px;
377
+ cursor: default;
378
+ }
379
+
380
+ .success__icon {
381
+ display: flex;
382
+ }
383
+ `;function d4(e){let t=V.createElement(`style`);return t.textContent=`
384
+ :host {
385
+ --dialog-inset: var(--inset);
386
+ }
387
+
388
+ ${o4}
389
+ ${s4}
390
+ ${c4}
391
+ ${l4}
392
+ ${u4}
393
+ `,e&&t.setAttribute(`nonce`,e),t}function f4(){let e=j().getUser(),t=M().getUser(),n=un().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var p4=L((()=>({name:`FeedbackModal`,setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,a=e.useSentryUser,o=f4(),s=V.createElement(`div`),c=d4(e.styleNonce),l=``,u=!1,d=null,f=()=>{let e=d;d=null,Promise.resolve().then(()=>{let t=V.activeElement;!u&&(!t||t===V.body||t===i.host)&&e instanceof HTMLElement&&e.focus()})},p=()=>{u&&(u=!1,V.body.style.overflow=l),g(!1)},m={get el(){return s},appendToDom(){!i.contains(c)&&!i.contains(s)&&(i.appendChild(c),i.appendChild(s))},removeFromDom(){m.close(),v2(null,s),s.remove(),c.remove()},open(){var t,n,r;if(!u){for(d=V.activeElement;d!=null&&(t=d.shadowRoot)!=null&&t.activeElement;)d=d.shadowRoot.activeElement;l=V.body.style.overflow,u=!0,g(!0),(n=e.onFormOpen)==null||n.call(e),(r=N())==null||r.emit(`openFeedbackWidget`),V.body.style.overflow=`hidden`}},close(){p(),f()}},h=t==null?void 0:t.createInput({h:U,hooks:b2,dialog:m,options:e}),g=t=>{v2(U(a4,{options:e,screenshotInput:h,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(a&&(o==null?void 0:o[a.name])||``),defaultEmail:String(a&&(o==null?void 0:o[a.email])||``),onFormClose:()=>{var t;m.close(),(t=e.onFormClose)==null||t.call(e)},onSubmit:n,onSubmitSuccess:(t,n)=>{var r;p(),(r=e.onSubmitSuccess)==null||r.call(e,t,n)},onSubmitError:t=>{var n;(n=e.onSubmitError)==null||n.call(e,t)},onFormSubmitted:()=>{var t;(t=e.onFormSubmitted)==null||t.call(e)},open:t}),s)};return m}})));function m4({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 h4(e){let t=V.createElement(`style`),n=`#1A141F`,r=`#302735`;return t.textContent=`
394
+ .editor {
395
+ display: flex;
396
+ flex-grow: 1;
397
+ flex-direction: column;
398
+ }
399
+
400
+ .editor__image-container {
401
+ justify-items: center;
402
+ padding: 15px;
403
+ position: relative;
404
+ height: 100%;
405
+ border-radius: var(--menu-border-radius, 6px);
406
+
407
+ background-color: ${n};
408
+ background-image: repeating-linear-gradient(
409
+ -145deg,
410
+ transparent,
411
+ transparent 8px,
412
+ ${n} 8px,
413
+ ${n} 11px
414
+ ),
415
+ repeating-linear-gradient(
416
+ -45deg,
417
+ transparent,
418
+ transparent 15px,
419
+ ${r} 15px,
420
+ ${r} 16px
421
+ );
422
+ }
423
+
424
+ .editor__canvas-container {
425
+ width: 100%;
426
+ height: 100%;
427
+ position: relative;
428
+ display: flex;
429
+ align-items: center;
430
+ justify-content: center;
431
+ }
432
+
433
+ .editor__canvas-container > * {
434
+ object-fit: contain;
435
+ position: absolute;
436
+ }
437
+
438
+ .editor__tool-container {
439
+ padding-top: 8px;
440
+ display: flex;
441
+ justify-content: center;
442
+ }
443
+
444
+ .editor__tool-bar {
445
+ display: flex;
446
+ gap: 8px;
447
+ }
448
+
449
+ .editor__tool {
450
+ display: flex;
451
+ padding: 8px 12px;
452
+ justify-content: center;
453
+ align-items: center;
454
+ border: var(--button-border, var(--border));
455
+ border-radius: var(--button-border-radius, 6px);
456
+ background: var(--button-background, var(--background));
457
+ color: var(--button-color, var(--foreground));
458
+ }
459
+
460
+ .editor__tool--active {
461
+ background: var(--button-primary-background, var(--accent-background));
462
+ color: var(--button-primary-color, var(--accent-foreground));
463
+ }
464
+
465
+ .editor__rect {
466
+ position: absolute;
467
+ z-index: 2;
468
+ }
469
+
470
+ .editor__rect button {
471
+ opacity: 0;
472
+ position: absolute;
473
+ top: -12px;
474
+ right: -12px;
475
+ cursor: pointer;
476
+ padding: 0;
477
+ z-index: 3;
478
+ border: none;
479
+ background: none;
480
+ }
481
+
482
+ .editor__rect:hover button {
483
+ opacity: 1;
484
+ }
485
+ `,e&&t.setAttribute(`nonce`,e),t}function g4({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}var _4=2,v4=300;function y4(e,t){return new Promise(n=>{let r=setTimeout(n,t),i=e,a=()=>{--i,i>0?Iv.requestAnimationFrame(a):(clearTimeout(r),n())};Iv.requestAnimationFrame(a)})}function b4({hooks:e}){function t(){let[t,n]=e.useState(Iv.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(Iv.devicePixelRatio)},t=matchMedia(`(resolution: ${Iv.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n(),await y4(_4,v4);let e=await Lv.mediaDevices.getDisplayMedia({video:{width:Iv.innerWidth*o,height:Iv.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=V.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function x4(e,t,n){switch(e.type){case`highlight`:t.save(),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),t.restore();break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h)}}function S4(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function C4(e,t){S4(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function w4(e,t,n){S4(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{x4(e,r,t)})})}function T4({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=b4({hooks:t}),o=g4({h:e}),s=m4({h:e}),c=h4(i.styleNonce).textContent,l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=V.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(S4(r.canvas,{alpha:!1},e=>{let n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),Iv.addEventListener(`resize`,e),()=>{Iv.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{S4(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),C4(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),S4(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),w4(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),C4(n,r.canvas),S4(V.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,w4(e,v,u),C4(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:(e.clientX-t.x)/g,y:(e.clientY-t.y)/g,w:0,h:0},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{S4(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),w4(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),V.removeEventListener(`mousemove`,i),V.removeEventListener(`mouseup`,o)};V.addEventListener(`mousemove`,i),V.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce},c),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{S4(V.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var E4=L((()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=V.createElement(`canvas`);return{input:T4({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}}))),D4=`sentry.replay_id`,O4=`sentry.segment.name.source`,K=n,k4=`sentryReplaySession`,A4=`replay_event`,j4=`Unable to send Replay`,M4=3e5,N4=9e5,P4=5e3,F4=5500,I4=6e4,L4=5e3,R4=15e4,z4=5e3,B4=3e3,V4=2e7,H4=4999,U4=5e4,W4=36e5,G4=Object.defineProperty,K4=(e,t,n)=>t in e?G4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q4=(e,t,n)=>K4(e,typeof t==`symbol`?t:t+``,n),J4=(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))(J4||{});function Y4(e){return e.nodeType===e.ELEMENT_NODE}function X4(e){let t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Z4(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function Q4(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 $4(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let 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 e3(e){try{let t=e.rules||e.cssRules;return t?Q4(Array.from(t,n3).join(``)):null}catch{return null}}function t3(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function n3(e){let t;if(i3(e))try{t=e3(e.styleSheet)||$4(e)}catch{}else if(a3(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=t3(e)),n&&(t=r3(t)),n||r)return t}return t||e.cssText}function r3(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function i3(e){return`styleSheet`in e}function a3(e){return`selectorText`in e}var o3=class{constructor(){q4(this,`idNodeMap`,new Map),q4(this,`nodeMetaMap`,new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e)),Y4(e)&&e.shadowRoot&&this.removeNodeFromMap(e.shadowRoot)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function s3(){return new o3}function c3({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 l3({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function u3(e){return e.toLowerCase()}function d3(e){return e.toUpperCase()}var f3=`__rrweb_original__`;function p3(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=f3 in i?i[f3]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function m3(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?u3(t):null}function h3(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function g3(e,t){var n;let r;try{r=new URL(e,t??window.location.href)}catch{return null}return((n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i))==null?void 0:n[1])??null}var _3={};function v3(e){let t=_3[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return _3[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return _3[e]=r}function y3(...e){return v3(`setTimeout`)(...e)}function b3(...e){return v3(`clearTimeout`)(...e)}function x3(e){try{return e.contentDocument}catch{}}function S3(e){try{return e.contentWindow}catch{}}var C3=1,w3=RegExp(`[^a-z0-9-_:]`);function T3(){return C3++}function E3(e){if(e instanceof HTMLFormElement)return`form`;let t=u3(e.tagName);return w3.test(t)?`div`:t}function D3(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var O3,k3,A3=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,j3=/^(?:[a-z+]+:)?\/\//i,M3=/^www\..*/i,N3=/^(data:)([^,]*),(.*)/i;function P3(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function F3(e,t){return(e||``).replace(A3,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(j3.test(s)||M3.test(s)||N3.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${D3(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var I3=/^[^ \t\n\r\u000c]+/,L3=/^[, \t\n\r\u000c]+/;function R3(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(L3),!(n>=t.length);){let a=r(I3);if(a.slice(-1)===`,`)a=B3(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=B3(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var z3=new WeakMap;function B3(e,t){return!t||t.trim()===``?t:H3(e,t)}function V3(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function H3(e,t){let n=z3.get(e);if(n||(n=e.createElement(`a`),z3.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function U3(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return B3(e,r);if(n===`srcset`)return R3(e,r);if(n===`style`){let t=F3(r,H3(e));return o&&o.size>0&&(t=P3(t,o)),t}return t===`object`&&n===`data`?B3(e,r):typeof a==`function`?a(n,r,i):r}function W3(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function G3(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 n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function K3(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function q3(e,t,n=1/0,r=0){return e?X4(e)?q3(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:q3(e.parentNode,t,n,r+1):-1}function J3(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(K3(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Y3(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=q3(o,J3(r,i)),c<0)return!0;s=q3(o,J3(t,n),c>=0?c:1/0)}else{if(s=q3(o,J3(t,n)),s<0)return!1;c=q3(o,J3(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function X3(e,t,n){let r=S3(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=y3(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{b3(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return y3(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Z3(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=y3(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{b3(a),r=!0,t()})}function Q3(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=$3(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:J4.Document,childNodes:[]}:{type:J4.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:J4.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return n6(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return e6(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:J4.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:J4.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function $3(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function e6(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{var g;e.nextSibling||e.previousSibling||(g=e.parentNode.sheet)!=null&&g.cssRules&&(f=e3(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=F3(f,H3(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let _=Y3(e,r,a,i,o,n);return!p&&!m&&!h&&f&&_&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||_)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=l3({isMasked:Y3(e,r,a,i,o,c3({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:J4.Text,textContent:f||``,isStyle:p,rootId:u}}var t6=new WeakSet;function n6(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=G3(e,r,i,a),S=E3(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!W3(S,r.name,r.value)&&(C[r.name]=U3(n,S,u3(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=e3(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=F3(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=e3(e.sheet);t&&(C._cssText=F3(t,H3(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=m3(t),r=h3(t,d3(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&(r||C.value)){let e=Y3(t,g,v,_,y,c3({type:n,tagName:d3(S),maskInputOptions:s}));C.value=l3({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f)try{if(e.__context===`2d`)p3(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}catch(t){t6.has(e)||(t6.add(e),console.warn(`Cannot record canvas pixels! Error: ${t}`))}if(S===`img`&&d){O3||(O3=n.createElement(`canvas`),k3=O3.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{O3.width=t.naturalWidth,O3.height=t.naturalHeight,k3.drawImage(t,0,0),C.rr_dataURL=O3.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!x3(e)&&(C.rr_src=C.src),delete C.src);let ee;try{customElements.get(S)&&(ee=!0)}catch{}return{type:J4.Element,tagName:S,attributes:C,childNodes:[],isSVG:V3(e)||void 0,needBlock:x,rootId:h,isCustom:ee}}function q(e){return e==null?``:e.toLowerCase()}function r6(e,t){return!!(t.comment&&e.type===J4.Comment||e.type===J4.Element&&(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`&&g3(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)===`application-name`||q(e.attributes.rel)===`icon`||q(e.attributes.rel)===`apple-touch-icon`||q(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(q(e.attributes.name)===`robots`||q(e.attributes.name)===`googlebot`||q(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(q(e.attributes.name)===`author`||q(e.attributes.name)===`generator`||q(e.attributes.name)===`framework`||q(e.attributes.name)===`publisher`||q(e.attributes.name)===`progid`||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(q(e.attributes.name)===`google-site-verification`||q(e.attributes.name)===`yandex-verification`||q(e.attributes.name)===`csrf-token`||q(e.attributes.name)===`p:domain_verify`||q(e.attributes.name)===`verify-v1`||q(e.attributes.name)===`verification`||q(e.attributes.name)===`shopify-checkout-api-token`))))}function i6(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:ee,onStylesheetLoad:T,stylesheetLoadTimeout:te=5e3,keepIframeSrcFn:ne=()=>!1,newlyAddedElement:re=!1,ignoreCSSAttributes:ie}=t,{preserveWhiteSpace:ae=!0}=t,oe=Q3(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ne,newlyAddedElement:re,ignoreCSSAttributes:ie});if(!oe)return console.warn(e,`not serialized`),null;let se;se=r.hasNode(e)?r.getId(e):r6(oe,v)||!ae&&oe.type===J4.Text&&!oe.isStyle&&!oe.textContent.trim().length?-2:T3();let E=Object.assign(oe,{id:se});if(r.add(e,E),se===-2)return null;S&&S(e);let ce=!f;if(E.type===J4.Element){ce&&=!E.needBlock;let t=e.shadowRoot;t&&Z4(t)&&(E.isShadowHost=!0)}if((E.type===J4.Document||E.type===J4.Element)&&ce){v.headWhitespace&&E.type===J4.Element&&E.tagName===`head`&&(ae=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:ee,onStylesheetLoad:T,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie},re=e.childNodes?Array.from(e.childNodes):[];for(let e of re){let n=i6(e,t);n&&E.childNodes.push(n)}if(Y4(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=i6(n,t);r&&(Z4(e.shadowRoot)&&(r.isShadow=!0),E.childNodes.push(r))}}if(e.parentNode&&X4(e.parentNode)&&Z4(e.parentNode)&&(E.isShadow=!0),E.type===J4.Element&&E.tagName===`iframe`&&!E.needBlock&&X3(e,()=>{let t=x3(e);if(t&&C){let n=i6(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});n&&C(e,n)}},w),E.type===J4.Element&&E.tagName===`img`&&!e.complete&&E.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&ee)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&ee(t,E,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return E.type===J4.Element&&E.tagName===`link`&&typeof E.attributes.rel==`string`&&(E.attributes.rel===`stylesheet`||E.attributes.rel===`preload`&&typeof E.attributes.href==`string`&&g3(E.attributes.href)===`css`)&&Z3(e,()=>{if(T){let t=i6(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});t&&T(e,t)}},te),E.type===J4.Element&&delete E.needBlock,E}function a6(e,t){let{mirror:n=new o3,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:T,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ne=new Set([])}=t||{};return i6(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions: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,hidden:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,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:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:ee,stylesheetLoadTimeout:T,keepIframeSrcFn:te,newlyAddedElement:!1,ignoreCSSAttributes:ne})}function o6(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var s6=`Please stop import mirror directly. Instead of that,\r
486
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
487
+ or you can use record.mirror to access the mirror instance during recording.`,c6={map:{},getId(){return console.error(s6),-1},getNode(){return console.error(s6),null},removeNodeFromMap(){console.error(s6)},has(){return console.error(s6),!1},reset(){console.error(s6)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(c6=new Proxy(c6,{get(e,t,n){return t===`map`&&console.error(s6),Reflect.get(e,t,n)}}));function l6(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(F6(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=P6(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function u6(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){P6(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>u6(e,t,a||{},!0)}function d6(e,t,n){try{if(!(t in e))return()=>{};let 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 f6=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(f6=()=>new Date().getTime());function p6(e){var t,n,r,i;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset===void 0?(a==null?void 0:a.documentElement.scrollLeft)||(a==null||(t=a.body)==null||(t=t.parentElement)==null?void 0:t.scrollLeft)||(a==null||(n=a.body)==null?void 0:n.scrollLeft)||0:e.pageXOffset,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset===void 0?(a==null?void 0:a.documentElement.scrollTop)||(a==null||(r=a.body)==null||(r=r.parentElement)==null?void 0:r.scrollTop)||(a==null||(i=a.body)==null?void 0:i.scrollTop)||0:e.pageYOffset}}function m6(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function h6(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g6(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function _6(e,t,n,r,i){if(!e)return!1;let a=g6(e);if(!a)return!1;let o=J3(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=q3(a,o),c=-1;return s<0?!1:(r&&(c=q3(a,J3(null,r))),s>-1&&c<0||s<c)}function v6(e,t){return t.getId(e)!==-1}function y6(e,t){return t.getId(e)===-2}function b6(e,t){if(X4(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||b6(e.parentNode,t):!0}function x6(e){return!!e.changedTouches}function S6(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=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function C6(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function w6(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function T6(e){return!!(e!=null&&e.shadowRoot)}var E6=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 n=t===void 0?this.id++: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 D6(e){var t;let n=null;return((t=e.getRootNode)==null||(t=t.call(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function O6(e){let t=e,n;for(;n=D6(t);)t=n;return t}function k6(e){let t=e.ownerDocument;if(!t)return!1;let n=O6(e);return t.contains(n)}function A6(e){let t=e.ownerDocument;return t?t.contains(e)||k6(e):!1}var j6={};function M6(e){let t=j6[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return j6[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return j6[e]=r}function N6(...e){return M6(`requestAnimationFrame`)(...e)}function P6(...e){return M6(`setTimeout`)(...e)}function F6(...e){return M6(`clearTimeout`)(...e)}function I6(e){let t=[];for(let n of e)try{n()}catch(e){t.push(e)}return t}var J=(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))(J||{}),Y=(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))(Y||{}),L6=(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))(L6||{}),R6=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(R6||{}),z6=(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))(z6||{}),B6;function V6(e){B6=e}function H6(){B6=void 0}for(var X=e=>B6?((...t)=>{try{return e(...t)}catch(e){if(B6&&B6(e)===!0)return()=>{};throw e}}):e,U6=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,W6=typeof Uint8Array>`u`?[]:new Uint8Array(256),G6=0;G6<U6.length;G6++)W6[U6.charCodeAt(G6)]=G6;var K6=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function q6(e){try{return e.contentDocument}catch{}}function J6(e){try{return e.contentWindow}catch{}}var Y6=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function X6(e){return`__ln`in e}var Z6=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&X6(e.previousSibling)){let 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&&X6(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},Q6=(e,t)=>`${e}@${t}`,$6=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;let e=[],t=new Set,n=new Z6,r=e=>{let t=e,n=-2;for(;n===-2;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!A6(i))return;let a=X4(i.parentNode)?this.mirror.getId(D6(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=i6(i,{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:e=>{C6(e,this.mirror)&&!_6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),w6(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),T6(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(_6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=J6(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;){let e=this.mapRemoves.shift();this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e)}for(let e of this.movedSet)(!tb(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)!rb(this.droppedSet,e)&&!tb(this.removes,e,this.mirror)||rb(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.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(o))},this.processMutation=e=>{if(!y6(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!_6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Y3(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,g6(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=m3(t),i=t.tagName;r=h3(t,i,n);let a=c3({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=l3({isMasked:Y3(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(_6(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(!q6(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`),!W3(t.tagName,n)&&(i.attributes[n]=U3(this.doc,u3(t.tagName),u3(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==((n==null?void 0:n.getPropertyValue(e))||``)||a!==((n==null?void 0:n.getPropertyPriority(e))||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(_6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=X4(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);_6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||y6(t,this.mirror)||!v6(t,this.mirror)||(this.addedSet.has(t)?(eb(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||b6(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Q6(n,r)]?eb(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:X4(e.target)&&Z4(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(y6(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[Q6(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),T6(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,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`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new Y6(this.doc)}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()}release(e){for(e.forEach(e=>{e.type===`childList`&&e.removedNodes.forEach(e=>this.mapRemoves.push(e))});this.mapRemoves.length;){let e=this.mapRemoves.shift();A6(e)||(this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e))}}};function eb(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(t=>eb(e,t))}function tb(e,t,n){return e.length!==0&&nb(e,t,n)}function nb(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function rb(e,t){return e.size!==0&&ib(e,t)}function ib(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:ib(e,n):!1}var ab=[];function ob(e){[...ab].forEach(e)}var sb=new WeakMap;function cb(e){try{if(`composedPath`in e){let 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 lb(e,t){var n,r;let i=new $6;ab.push(i),i.init(e);let a=window.MutationObserver||window.__rrMutationObserver,o=(n=window)==null||(n=n.Zone)==null||(r=n.__symbol__)==null?void 0:r.call(n,`MutationObserver`);o&&window[o]&&(a=window[o]);let{onMutation:s,blockClass:c,blockSelector:l,unblockSelector:u}=e,d={isBlocked:e=>_6(e,c,l,u,!0)},f=new a(X(e=>{let t=e;if(s){let n=s(e,d);if(n===!1)return;Array.isArray(n)&&(t=n)}i.processMutations(t)}));return f.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),sb.set(f,i),f}function ub(e){let t=e.takeRecords();e.disconnect();let n=sb.get(e);if(n){n.release(t);let r=ab.indexOf(n);r!==-1&&ab.splice(r,1),sb.delete(e)}}function db({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=l6(X(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=X(l6(X(e=>{let t=cb(e),{clientX:n,clientY:i}=x6(e)?e.changedTouches[0]:e;s||=f6(),o.push({x:n,y:i,id:r.getId(t),timeOffset:f6()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?Y.Drag:e instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),i,{trailing:!1})),u=[o6(`mousemove`,l,n),o6(`touchmove`,l,n),o6(`drag`,l,n)];return X(()=>{u.forEach(e=>e())})}function fb({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=cb(o);if(_6(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=R6.Mouse;break;case`touch`:c=R6.Touch;break;case`pen`:c=R6.Pen}c===R6.Touch?L6[t]===L6.MouseDown?u=`TouchStart`:L6[t]===L6.MouseUp&&(u=`TouchEnd`):R6.Pen}else x6(o)&&(c=R6.Touch);c===null?L6[t]===L6.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===R6.Touch||u.startsWith(`Mouse`)&&c===R6.Mouse)&&(c=null));let d=x6(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;X(e)({type:L6[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(L6).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=u3(e),r=u(e);if(window.PointerEvent)switch(L6[e]){case L6.MouseDown:case L6.MouseUp:n=n.replace(`mouse`,`pointer`);break;case L6.TouchStart:case L6.TouchEnd:return}c.push(o6(n,r,t))}),X(()=>{c.forEach(e=>e())})}function pb({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return o6(`scroll`,X(l6(X(o=>{let s=cb(o);if(!s||_6(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=p6(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function mb({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return o6(`resize`,X(l6(X(()=>{let t=m6(),i=h6();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var hb=[`INPUT`,`TEXTAREA`,`SELECT`],gb=new WeakMap;function _b({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=cb(e),u=e.isTrusted,g=n&&d3(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||hb.indexOf(g)<0||_6(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=m3(n),b=h3(v,g,y),x=!1,S=c3({maskInputOptions:c,tagName:g,type:y}),C=Y3(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=l3({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=l3({isMasked:C,element:e,value:h3(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=gb.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){gb.set(t,r);let i=n.getId(t);X(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>o6(e,X(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>u6(e[0],e[1],{set(){X(g)({target:this,isTrusted:!1})}},!1,y))),X(()=>{v.forEach(e=>e())})}function vb(e){let t=[];function n(e,t){if(Ob(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||Ob(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||Ob(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||Ob(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function yb(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function bb({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:X((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=yb(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=yb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=yb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=yb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};kb(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(kb(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),kb(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),kb(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:X((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=yb(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...vb(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:X((r,i,a)=>{let[o]=a,{id:s,styleId:c}=yb(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...vb(i),o]}]}),r.apply(i,a)})})}),X(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function xb({mirror:e,stylesheetManager:t},n){var r,i;let a=null;a=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let o=n.nodeName===`#document`?(r=n.defaultView)==null?void 0:r.Document:(i=n.ownerDocument)==null||(i=i.defaultView)==null?void 0:i.ShadowRoot,s=o!=null&&o.prototype?Object.getOwnPropertyDescriptor(o==null?void 0:o.prototype,`adoptedStyleSheets`):void 0,c=Object.getOwnPropertyDescriptor(n,`adoptedStyleSheets`);if(a===null||a===-1||!o||!s||(c==null?void 0:c.configurable)===!1||!Object.isExtensible(n))return()=>{};let l=!0,u=function(e){var n;if((n=s.set)==null||n.call(this,e),l&&a!==null&&a!==-1)try{t.adoptStyleSheets(e,a)}catch{}};return Object.defineProperty(n,"adoptedStyleSheets",{configurable:!0,enumerable:s.enumerable,get(){var e;return(e=s.get)==null?void 0:e.call(this)},set:u}),X(()=>{var e;l=!1,((e=Object.getOwnPropertyDescriptor(n,`adoptedStyleSheets`))==null?void 0:e.set)===u&&(c?Reflect.defineProperty(n,"adoptedStyleSheets",c):Reflect.deleteProperty(n,`adoptedStyleSheets`))})}function Sb({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:X((i,o,s)=>{var c;let[l,u,d]=s;if(n.has(l))return a.apply(o,[l,u,d]);let{id:f,styleId:p}=yb((c=o.parentRule)==null?void 0:c.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:l,value:u,priority:d},index:vb(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:X((i,a,s)=>{var c;let[l]=s;if(n.has(l))return o.apply(a,[l]);let{id:u,styleId:d}=yb((c=a.parentRule)==null?void 0:c.parentStyleSheet,t,r.styleMirror);return(u&&u!==-1||d&&d!==-1)&&e({id:u,styleId:d,remove:{property:l},index:vb(a.parentRule)}),i.apply(a,s)})}),X(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cb({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=X(o=>l6(X(a=>{let s=cb(a);if(!s||_6(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[o6(`play`,s(z6.Play),o),o6(`pause`,s(z6.Pause),o),o6(`seeked`,s(z6.Seeked),o),o6(`volumechange`,s(z6.VolumeChange),o),o6(`ratechange`,s(z6.RateChange),o)];return X(()=>{c.forEach(e=>e())})}function wb({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=d6(t.fonts,`add`,function(t){return function(n){return P6(X(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),X(()=>{r.forEach(e=>e())})}function Tb(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=X(()=>{let e=t.getSelection();if(!e||s&&e!=null&&e.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);_6(o,r,i,a,!0)||_6(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),o6(`selectionchange`,c)}function Eb({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:d6(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function Db(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=lb(e,e.doc));let i=db(e),a=fb(e),o=pb(e),s=mb(e,{win:n}),c=_b(e),l=Cb(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=bb(e,{win:n}),d=xb(e,e.doc),f=Sb(e,{win:n}),e.collectFonts&&(p=wb(e)));let m=Tb(e),h=Eb(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return X(()=>{let e=I6([()=>ob(e=>e.reset()),()=>r==null?void 0:r.disconnect(),i,a,o,s,c,l,u,d,f,p,m,h,...g]);if(e.length>0)throw e[0]})}function Ob(e){return window[e]!==void 0}function kb(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var Ab=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}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}},jb=class{constructor(){this.crossOriginIframeMirror=new Ab(T3),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Mb=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ab(T3),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ab(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);let t=J6(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=J6(e))==null||n.addEventListener(`message`,this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e);let i=q6(e);i&&i.adoptedStyleSheets&&i.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(i.adoptedStyleSheets,this.mirror.getId(i))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case J.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:J.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return t;case J.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case J.IncrementalSnapshot:switch(t.data.source){case Y.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(t.data,e,[`id`]),t;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case Y.Font:return t;case Y.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case Y.AdoptedStyleSheet:var n;return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(n=t.data.styles)==null||n.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||typeof t[i]==`number`)&&(t[i]=Array.isArray(t[i])?e.getIds(n,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(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==J4.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},Nb=class{init(){}addShadowRoot(){}observeAttachShadow(){}removeShadowRootsFor(){}reset(){}},Pb=class{constructor(e){this.shadowDoms=new WeakSet,this.shadowRootTeardowns=new Map,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(!Z4(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=[];this.shadowRootTeardowns.set(e,n),this.bypassOptions.canvasManager.addShadowRoot(e);let r=lb({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(()=>ub(r)),n.push(pb({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),P6(()=>{this.shadowRootTeardowns.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),n.push(xb({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRoot(e){let t=this.shadowRootTeardowns.get(e);t&&(t.forEach(e=>{try{e()}catch{}}),this.shadowRootTeardowns.delete(e)),this.shadowDoms.delete(e)}removeShadowRootsFor(e){var t;if(this.shadowRootTeardowns.size!==0){if(T6(e)){let t=e.shadowRoot;this.shadowDoms.has(t)&&!A6(e)&&this.removeShadowRoot(t),this.removeShadowRootsFor(t)}(t=e.childNodes)==null||t.forEach(e=>this.removeShadowRootsFor(e))}}observeAttachShadow(e){let t=q6(e),n=J6(e);if(!t||!n)return;let r;try{r=n.Element}catch{return}r&&this.patchAttachShadow(r,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(d6(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&A6(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowRootTeardowns.forEach(e=>{e.forEach(e=>{try{e()}catch{}})}),this.shadowRootTeardowns=new Map,this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Fb=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new E6,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;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:n3(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Ib=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,N6(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Lb,Rb;try{if(Array.from([1],e=>e*2)[0]!==2){var zb;let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=((zb=e.contentWindow)==null?void 0:zb.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Bb=s3();function Vb(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:ee,recordDOM:T=!0,recordCanvas:te=!1,recordCrossOriginIframes:ne=!1,recordAfter:re=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ie=!1,collectFonts:ae=!1,inlineImages:oe=!1,plugins:se,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:le,onMutation:ue,getCanvasManager:de}=e;V6(le);let fe=!ne||window.parent===window,pe=!1;if(!fe)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(fe&&!t)throw Error(`emit function is required`);if(!fe&&!pe)return()=>{};ee!==void 0&&C.mousemove===void 0&&(C.mousemove=ee),Bb.reset();let me=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,hidden:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,he=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};S6();let D=0,ge=0,_e=0,ve=e=>{for(let t of se||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!pe&&(e=S(e)),e};Lb=(e,i)=>{var a;let o=e;if(o.timestamp=f6(),(a=ab[0])!=null&&a.isFrozen()&&o.type!==J.FullSnapshot&&(o.type!==J.IncrementalSnapshot||o.data.source!==Y.Mutation)&&ob(e=>e.unfreeze()),fe)t==null||t(ve(o),i);else if(pe){let e={type:`rrweb`,event:ve(o),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(o.type===J.FullSnapshot)D=o.timestamp,ge=0,_e=0;else if(o.type===J.IncrementalSnapshot){if(o.data.source===Y.Mutation&&o.data.isAttachIframe)return;ge++;let e=r&&ge>=r,t=n&&D&&o.timestamp-D>n;(e||t)&&Te(!0)}};let ye=e=>{Lb({type:J.IncrementalSnapshot,data:{source:Y.Mutation,...e}})},be=e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.Scroll,...e}}),xe=e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.CanvasMutation,...e}}),O=new Fb({mutationCb:ye,adoptedStyleSheetCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...e}})}),k=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new jb:new Mb({mirror:Bb,mutationCb:ye,stylesheetManager:O,recordCrossOriginIframes:ne,wrappedEmit:Lb});for(let e of se||[])e.getMirror&&e.getMirror({nodeMirror:Bb,crossOriginIframeMirror:k.crossOriginIframeMirror,crossOriginIframeStyleMirror:k.crossOriginIframeStyleMirror});let Se=new Ib,Ce=Hb(de,{mirror:Bb,win:window,mutationCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.CanvasMutation,...e}}),recordCanvas:te,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:le}),we=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Nb:new Pb({mutationCb:ye,scrollCb:be,bypassOptions:{onMutation:ue,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:me,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:te,inlineImages:oe,sampling:C,slimDOMOptions:he,iframeManager:k,stylesheetManager:O,canvasManager:Ce,keepIframeSrcFn:E,processedNodeManager:Se,ignoreCSSAttributes:ce},mirror:Bb}),Te=(e=!1)=>{if(!T)return;Lb({type:J.Meta,data:{href:window.location.href,width:h6(),height:m6()}},e),O.reset(),we.init(),ob(e=>e.lock());let t=!1;try{let e=a6(document,{mirror:Bb,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:me,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:he,dataURLOptions:w,recordCanvas:te,inlineImages:oe,onSerialize:e=>{C6(e,Bb)&&k.addIframe(e),w6(e,Bb)&&O.trackLinkElement(e),T6(e)&&we.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{k.attachIframe(e,t);let n=J6(e);n&&Ce.addWindow(n),we.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{O.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{ye({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:E,ignoreCSSAttributes:ce});if(!e)return console.warn(`Failed to snapshot the document`);Lb({type:J.FullSnapshot,data:{node:e,initialOffset:p6(window)}}),t=!0}finally{if(!t){if(_e++,n){let e=Math.min(1e3*2**(_e-1),n);D=f6()-n+e}ge=0}ob(e=>e.unlock())}document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&O.adoptStyleSheets(document.adoptedStyleSheets,Bb.getId(document))};Rb=Te;try{let e=[],t=e=>{var t;return X(Db)({onMutation:ue,mutationCb:ye,mousemoveCb:(e,t)=>Lb({type:J.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.MouseInteraction,...e}}),scrollCb:be,viewportResizeCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.ViewportResize,...e}}),inputCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.Input,...e}}),mediaInteractionCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.MediaInteraction,...e}}),styleSheetRuleCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...e}}),styleDeclarationCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...e}}),canvasMutationCb:xe,fontCb:e=>Lb({type:J.IncrementalSnapshot,data:{source:Y.Font,...e}}),selectionCb:e=>{Lb({type:J.IncrementalSnapshot,data:{source:Y.Selection,...e}})},customElementCb:e=>{Lb({type:J.IncrementalSnapshot,data:{source:Y.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:me,inlineStylesheet:m,sampling:C,recordDOM:T,recordCanvas:te,inlineImages:oe,userTriggeredOnInput:ie,collectFonts:ae,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:E,blockSelector:a,unblockSelector:o,slimDOMOptions:he,dataURLOptions:w,mirror:Bb,iframeManager:k,stylesheetManager:O,shadowDomManager:we,processedNodeManager:Se,canvasManager:Ce,ignoreCSSAttributes:ce,plugins:(se==null||(t=se.filter(e=>e.observer))==null?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Lb({type:J.Plugin,data:{plugin:e.name,payload:t}})})))||[]},{})};k.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Te(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(o6(`DOMContentLoaded`,()=>{Lb({type:J.DomContentLoaded,data:{}}),re===`DOMContentLoaded`&&n()})),e.push(o6(`load`,()=>{Lb({type:J.Load,data:{}}),re===`load`&&n()},window))),()=>{let t=I6([...e,()=>Se.destroy(),()=>{Rb=void 0},H6]);if(t.length>0)throw t[0]}}catch(e){console.warn(e)}}Vb.mirror=Bb,Vb.takeFullSnapshot=function(e){if(!Rb)throw Error(`please take full snapshot after start recording`);Rb(e)};function Hb(e,t){try{return e?e(t):new K6}catch{return console.warn(`Unable to initialize CanvasManager`),new K6}}var Ub;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(Ub||={});function Wb(e){return e>9999999999?e:e*1e3}function Gb(e){return e>9999999999?e/1e3:e}function Kb(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:J.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:Ke(t,10,1e3)}}),t.category===`console`)))}var qb=`button,a`;function Jb(e){return e.closest(qb)||e}function Yb(e){let t=Xb(e);return!t||!(t instanceof Element)?t:Jb(t)}function Xb(e){return Zb(e)?e.target:e}function Zb(e){return Se(e)&&`target`in e}var Qb;function $b(e){return Qb||(Qb=[],e8()),Qb.push(e),()=>{let t=Qb?Qb.indexOf(e):-1;t>-1&&Qb.splice(t,1)}}function e8(){Oe(K,`open`,function(e){return function(...t){if(Qb)try{Qb.forEach(e=>e())}catch{}return e.apply(K,t)}})}var t8=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function n8(e,t,n){e.handleClick(t,n)}var r8=class{constructor(e,t,n=Kb){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(){let e=$b(()=>{this._lastMutation=s8()}),t=()=>{this._clicks=[],this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)};K.addEventListener(`pagehide`,t),this._teardown=()=>{e(),K.removeEventListener(`pagehide`,t),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(a8(t,this._ignoreSelector)||!o8(e))return;let n={timestamp:Gb(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Gb(e)}registerScroll(e=Date.now()){this._lastScroll=Gb(e)}registerClick(e){let t=Jb(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=s8();this._clicks.forEach(n=>{n.mutationAfter===void 0&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),n.scrollAfter===void 0&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter!==void 0&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter!==void 0&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:K.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i)}else if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:K.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=uv(()=>this._checkClicks(),1e3)}},i8=[`A`,`BUTTON`,`INPUT`];function a8(e,t){return!!(!i8.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 o8(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function s8(){return Date.now()/1e3}function c8(e,t){try{if(!l8(t))return;let{source:n}=t.data;if(t8.has(n)&&e.registerMutation(t.timestamp),n===Y.Scroll&&e.registerScroll(t.timestamp),u8(t)){let{type:n,id:r}=t.data,i=Vb.mirror.getNode(r);i instanceof HTMLElement&&n===L6.Click&&e.registerClick(i)}}catch{}}function l8(e){return e.type===3}function u8(e){return e.data.source===Y.MouseInteraction}function d8(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var f8=(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))(f8||{}),p8=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]),m8=new Set([...p8,`data-sentry-element`]);function h8(e){let t={};for(let n in e)if(p8.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return!t[`data-sentry-component`]&&e[`data-sentry-element`]&&(t[`data-sentry-component`]=e[`data-sentry-element`]),t}var g8=e=>t=>{if(!e.isEnabled())return;let n=v8(t,e.getMaskAttributeFn());if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i!=null&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&n8(e.clickDetector,n,Yb(t.event)),Kb(e,n)};function _8(e,t){let n=Vb.mirror.getId(e),r=n&&Vb.mirror.getNode(n),i=r&&Vb.mirror.getMeta(r),a=i&&b8(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===f8.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:h8(a.attributes)}}:{}}}function v8(e,t){let{target:n,message:r}=y8(e,t);return d8({category:`ui.${e.name}`,..._8(n,r)})}function y8(e,t){let n=e.name===`click`,r,i=null;try{i=n?Yb(e.event):Xb(e.event),r=f1(i,{maxStringLength:200,maskAttributeFn:t})||`<unknown>`}catch{r=`<unknown>`}return{target:i,message:r}}function b8(e){return e.type===f8.Element}function x8(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=S8(t,e.getMaskAttributeFn());n&&Kb(e,n)}function S8(e,t){let{metaKey:n,shiftKey:r,ctrlKey:i,altKey:a,key:o,target:s}=e;if(!s||C8(s)||!o)return null;let c=n||i||a,l=o.length===1;if(!c&&l)return null;let u=f1(s,{maxStringLength:200,maskAttributeFn:t})||`<unknown>`;return d8({category:`ui.keyDown`,message:u,data:{..._8(s,u).data,metaKey:n,shiftKey:r,ctrlKey:i,altKey:a,key:o}})}function C8(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var w8={resource:j8,paint:k8,navigation:A8};function T8(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function E8(e){return e.map(D8).filter(Boolean)}function D8(e){let t=w8[e.entryType];return t?t(e):null}function O8(e,t=e){return kt(e,t)}function k8(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=O8(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function A8(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:O8(p),end:O8(a,p),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function j8(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:O8(a),end:O8(i,a),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function M8(e){let t=e.entries[e.entries.length-1];return I8(e,`largest-contentful-paint`,t!=null&&t.element?[t.element]:void 0)}function N8(e){return e.sources!==void 0}function P8(e){let t=[],n=[];for(let r of e.entries)if(N8(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=Vb.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return I8(e,`cumulative-layout-shift`,n,t)}function F8(e){let t=e.entries[e.entries.length-1];return I8(e,`interaction-to-next-paint`,t!=null&&t.target?[t.target]:void 0)}function I8(e,t,n,r){var i;let a=e.value,o=e.rating,s=O8(((i=e.entries[e.entries.length-1])==null?void 0:i.startTime)??(e.navigationStartTime??0)+a);return{type:`web-vital`,name:t,start:s,end:s,data:{value:a,size:a,rating:o,nodeIds:n?n.map(e=>Vb.mirror.getId(e)):void 0,attributions:r}}}function L8(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(f_(e,n))}),r.push(c_(T8(M8,e)),s_(T8(P8,e)),d_(T8(F8,e))),()=>{r.forEach(e=>e())}}var Z=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,R8="var e=Uint8Array,t=Uint16Array,n=Int32Array,r=new e([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 e([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]),a=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=function(e,r){for(var i=new t(31),a=0;a<31;++a)i[a]=r+=1<<e[a-1];for(var o=new n(i[30]),a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return{b:i,r:o}},s=o(r,2),c=s.b,l=s.r;c[28]=258,l[258]=28;for(var u=o(i,0).r,d=new t(32768),f=0;f<32768;++f){var p=(f&43690)>>1|(f&21845)<<1;p=(p&52428)>>2|(p&13107)<<2,p=(p&61680)>>4|(p&3855)<<4,d[f]=((p&65280)>>8|(p&255)<<8)>>1}for(var m=(function(e,n,r){for(var i=e.length,a=0,o=new t(n);a<i;++a)e[a]&&++o[e[a]-1];var s=new t(n);for(a=1;a<n;++a)s[a]=s[a-1]+o[a-1]<<1;var c;if(r){c=new t(1<<n);var l=15-n;for(a=0;a<i;++a)if(e[a])for(var u=a<<4|e[a],f=n-e[a],p=s[e[a]-1]++<<f,m=p|(1<<f)-1;p<=m;++p)c[d[p]>>l]=u}else for(c=new t(i),a=0;a<i;++a)e[a]&&(c[a]=d[s[e[a]-1]++]>>15-e[a]);return c}),h=new e(288),f=0;f<144;++f)h[f]=8;for(var f=144;f<256;++f)h[f]=9;for(var f=256;f<280;++f)h[f]=7;for(var f=280;f<288;++f)h[f]=8;for(var g=new e(32),f=0;f<32;++f)g[f]=5;var _=m(h,9,0),v=m(g,5,0),y=function(e){return(e+7)/8|0},b=function(t,n,r){return(n==null||n<0)&&(n=0),(r==null||r>t.length)&&(r=t.length),new e(t.subarray(n,r))},x=[`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`],S=function(e,t,n){var r=Error(t||x[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,S),!n)throw r;return r},C=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},w=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},T=function(n,r){for(var i=[],a=0;a<n.length;++a)n[a]&&i.push({s:a,f:n[a]});var o=i.length,s=i.slice();if(!o)return{t:k,l:0};if(o==1){var c=new e(i[0].s+1);return c[i[0].s]=1,{t:c,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var l=i[0],u=i[1],d=0,f=1,p=2;for(i[0]={s:-1,f:l.f+u.f,l,r:u};f!=o-1;)l=i[i[d].f<i[p].f?d++:p++],u=i[d!=f&&i[d].f<i[p].f?d++:p++],i[f++]={s:-1,f:l.f+u.f,l,r:u};for(var m=s[0].s,a=1;a<o;++a)s[a].s>m&&(m=s[a].s);var h=new t(m+1),g=E(i[f-1],h,0);if(g>r){var a=0,_=0,v=g-r,y=1<<v;for(s.sort(function(e,t){return h[t.s]-h[e.s]||e.f-t.f});a<o;++a){var b=s[a].s;if(h[b]>r)_+=y-(1<<g-h[b]),h[b]=r;else break}for(_>>=v;_>0;){var x=s[a].s;h[x]<r?_-=1<<r-h[x]++-1:++a}for(;a>=0&&_;--a){var S=s[a].s;h[S]==r&&(--h[S],++_)}g=r}return{t:new e(h),l:g}},E=function(e,t,n){return e.s==-1?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},ee=function(e){for(var n=e.length;n&&!e[--n];);for(var r=new t(++n),i=0,a=e[0],o=1,s=function(e){r[i++]=e},c=1;c<=n;++c)if(e[c]==a&&c!=n)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=e[c]}return{c:r.subarray(0,i),n}},D=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},te=function(e,t,n){var r=n.length,i=y(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},O=function(e,n,o,s,c,l,u,d,f,p,y){C(n,y++,o),++c[256];for(var b=T(c,15),x=b.t,S=b.l,E=T(l,15),O=E.t,ne=E.l,k=ee(x),A=k.c,j=k.n,M=ee(O),N=M.c,P=M.n,F=new t(19),I=0;I<A.length;++I)++F[A[I]&31];for(var I=0;I<N.length;++I)++F[N[I]&31];for(var L=T(F,7),R=L.t,z=L.l,B=19;B>4&&!R[a[B-1]];--B);var V=p+5<<3,H=D(c,h)+D(l,g)+u,U=D(c,x)+D(l,O)+u+14+3*B+D(F,R)+2*F[16]+3*F[17]+7*F[18];if(f>=0&&V<=H&&V<=U)return te(n,y,e.subarray(f,f+p));var W,G,K,q;if(C(n,y,1+(U<H)),y+=2,U<H){W=m(x,S,0),G=x,K=m(O,ne,0),q=O;var re=m(R,z,0);C(n,y,j-257),C(n,y+5,P-1),C(n,y+10,B-4),y+=14;for(var I=0;I<B;++I)C(n,y+3*I,R[a[I]]);y+=3*B;for(var J=[A,N],Y=0;Y<2;++Y)for(var X=J[Y],I=0;I<X.length;++I){var Z=X[I]&31;C(n,y,re[Z]),y+=R[Z],Z>15&&(C(n,y,X[I]>>5&127),y+=X[I]>>12)}}else W=_,G=h,K=v,q=g;for(var I=0;I<d;++I){var Q=s[I];if(Q>255){var Z=Q>>18&31;w(n,y,W[Z+257]),y+=G[Z+257],Z>7&&(C(n,y,Q>>23&31),y+=r[Z]);var $=Q&31;w(n,y,K[$]),y+=q[$],$>3&&(w(n,y,Q>>5&8191),y+=i[$])}else w(n,y,W[Q]),y+=G[Q]}return w(n,y,W[256]),y+G[256]},ne=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),k=new e(0),A=function(a,o,s,c,d,f){var p=f.z||a.length,m=new e(c+p+5*(1+Math.ceil(p/7e3))+d),h=m.subarray(c,m.length-d),g=f.l,_=(f.r||0)&7;if(o){_&&(h[0]=f.r>>3);for(var v=ne[o-1],x=v>>13,S=v&8191,C=(1<<s)-1,w=f.p||new t(32768),T=f.h||new t(C+1),E=Math.ceil(s/3),ee=2*E,D=function(e){return(a[e]^a[e+1]<<E^a[e+2]<<ee)&C},k=new n(25e3),A=new t(288),j=new t(32),M=0,N=0,P=f.i||0,F=0,I=f.w||0,L=0;P+2<p;++P){var R=D(P),z=P&32767,B=T[R];if(w[z]=B,T[R]=z,I<=P){var V=p-P;if((M>7e3||F>24576)&&(V>423||!g)){_=O(a,h,0,k,A,j,N,F,L,P-L,_),F=M=N=0,L=P;for(var H=0;H<286;++H)A[H]=0;for(var H=0;H<30;++H)j[H]=0}var U=2,W=0,G=S,K=z-B&32767;if(V>2&&R==D(P-K))for(var q=Math.min(x,V)-1,re=Math.min(32767,P),J=Math.min(258,V);K<=re&&--G&&z!=B;){if(a[P+U]==a[P+U-K]){for(var Y=0;Y<J&&a[P+Y]==a[P+Y-K];++Y);if(Y>U){if(U=Y,W=K,Y>q)break;for(var X=Math.min(K,Y-2),Z=0,H=0;H<X;++H){var Q=P-K+H&32767,$=Q-w[Q]&32767;$>Z&&(Z=$,B=Q)}}}z=B,B=w[z],K+=z-B&32767}if(W){k[F++]=268435456|l[U]<<18|u[W];var ie=l[U]&31,ae=u[W]&31;N+=r[ie]+i[ae],++A[257+ie],++j[ae],I=P+U,++M}else k[F++]=a[P],++A[a[P]]}}for(P=Math.max(P,I);P<p;++P)k[F++]=a[P],++A[a[P]];_=O(a,h,g,k,A,j,N,F,L,P-L,_),g||(f.r=_&7|h[_/8|0]<<3,_-=7,f.h=T,f.p=w,f.i=P,f.w=I)}else{for(var P=f.w||0;P<p+g;P+=65535){var oe=P+65535;oe>=p&&(h[_/8|0]=g,oe=p),_=te(h,_+1,a.subarray(P,oe))}f.i=p}return b(m,0,c+y(_)+d)},j=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),M=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=j[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},N=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},P=function(t,n,r,i,a){if(!a&&(a={l:1},n.dictionary)){var o=n.dictionary.subarray(-32768),s=new e(o.length+t.length);s.set(o),s.set(t,o.length),t=s,a.w=o.length}return A(t,n.level==null?6:n.level,n.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,r,i,a)},F=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},I=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&F(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},L=function(e){return 10+(e.filename?e.filename.length+1:0)},R=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=N();i.p(t.dictionary),F(e,2,i.d())}},z=function(){function t(t,n){if(typeof t==`function`&&(n=t,t={}),this.ondata=n,this.o=t||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new e(98304),this.o.dictionary){var r=this.o.dictionary.subarray(-32768);this.b.set(r,32768-r.length),this.s.i=32768-r.length}}return t.prototype.p=function(e,t){this.ondata(P(e,this.o,0,0,this.s),t)},t.prototype.push=function(t,n){this.ondata||S(5),this.s.l&&S(4);var r=t.length+this.s.z;if(r>this.b.length){if(r>2*this.b.length-32768){var i=new e(r&-32768);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;this.b.set(t.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(t.subarray(a),32768),this.s.z=t.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(t,this.s.z),this.s.z+=t.length;this.s.l=n&1,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=k)},t.prototype.flush=function(t){if(this.ondata||S(5),this.s.l&&S(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,t){var n=new e(6);n[0]=this.s.r>>3;var r=te(n,this.s.r,k);this.s.r=0,this.ondata(n.subarray(0,r>>3),!1)}},t}();function B(e,t){t||(t={});var n=M(),r=e.length;n.p(e);var i=P(e,t,L(t),8),a=i.length;return I(i,t),F(i,a-8,n.d()),F(i,a-4,r),i}var V=function(){function e(e,t){this.c=N(),this.v=1,z.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),z.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=P(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(R(n,this.o),this.v=0),t&&F(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(e){z.prototype.flush.call(this,e)},e}(),H=typeof TextEncoder<`u`&&new TextEncoder,U=typeof TextDecoder<`u`&&new TextDecoder;try{U.decode(k,{stream:!0})}catch{}var W=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||S(5),this.d&&S(4),this.ondata(G(e),this.d=t||!1)},e}();function G(t,n){if(n){for(var r=new e(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(H)return H.encode(t);for(var a=t.length,o=new e(t.length+(t.length>>1)),s=0,c=function(e){o[s++]=e},i=0;i<a;++i){if(s+5>o.length){var l=new e(s+8+(a-i<<1));l.set(o),o=l}var u=t.charCodeAt(i);u<128||n?c(u):u<2048?(c(192|u>>6),c(128|u&63)):u>55295&&u<57344?(u=65536+(u&0xffc00)|t.charCodeAt(++i)&1023,c(240|u>>18),c(128|u>>12&63),c(128|u>>6&63),c(128|u&63)):(c(224|u>>12),c(128|u>>6&63),c(128|u&63))}return b(o,0,s)}var K=class{constructor(){this._init()}clear(){this._init()}addEvent(e){if(!e)throw Error(`Adding invalid event`);let t=this._hasEvents?`,`:``;this.stream.push(t+e),this._hasEvents=!0}finish(){this.stream.push(`]`,!0);let e=re(this._deflatedData);return this._init(),e}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new V,this.deflate.ondata=(e,t)=>{this._deflatedData.push(e)},this.stream=new W((e,t)=>{this.deflate.push(e,t)}),this.stream.push(`[`)}};function q(e){return B(G(e))}function re(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}const J=new K,Y={clear:()=>{J.clear()},addEvent:e=>J.addEvent(e),finish:()=>J.finish(),compress:e=>q(e)};function X(e){let t=e.data.method,n=e.data.id,r=e.data.arg;if(t in Y&&typeof Y[t]==`function`)try{let e=Y[t](r);postMessage({id:n,method:t,success:!0,response:e})}catch(e){postMessage({id:n,method:t,success:!1,response:e.message}),console.error(e)}}addEventListener(`message`,X),postMessage({id:void 0,method:`init`,success:!0,response:void 0});";function z8(){let e=new Blob([R8],{type:`text/javascript`});return URL.createObjectURL(e)}var B8=[`log`,`warn`,`error`],V8=`[Replay] `;function H8(e,t=`info`){cf({category:`console`,data:{logger:`replay`},level:t,message:`${V8}${e}`},{level:t})}function U8(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Z?(B8.forEach(e=>{n[e]=(...n)=>{y[e](V8,...n),t&&H8(n.join(``),Gf(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),y.error(V8,r),e?eu(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&H8(r,`error`)},n.infoTick=(...e)=>{y.log(V8,...e),t&&setTimeout(()=>H8(e[0]),0)}):B8.forEach(e=>{n[e]=()=>void 0}),n}var Q=U8(),W8=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${V4}.`)}},G8=class extends Error{constructor(){super(`Worker destroyed`)}},K8=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){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new W8;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:Wb(e)}},q8=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);n&&n.method===t.method&&(this._pending.delete(t.id),t.success?n.resolve(t.response):(Z&&Q.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`))))},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Z&&Q.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Z&&Q.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.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(){Z&&Q.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(new G8)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},J8=class{constructor(e){this._worker=new q8(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){let t=Wb(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>2e7?Promise.reject(new W8):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Z&&Q.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},Y8=class{constructor(e){this._fallback=new K8,this._compression=new J8(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){Z&&Q.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){if(e instanceof G8)return;Z&&Q.exception(e,`Failed to add events when switching buffers.`)}}};function X8({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=Z8(t);if(e)return e}return Z&&Q.log(`Using simple buffer`),new K8}function Z8(e){try{let t=e||Q8();return t?(Z&&Q.log(`Using compression worker${e?` from ${e}`:``}`),new Y8(new Worker(t))):void 0}catch(e){Z&&Q.exception(e,`Failed to create compression worker`)}}function Q8(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?z8():``}function $8(){try{return`sessionStorage`in K&&!!K.sessionStorage}catch{return!1}}function ex(e){tx(),e.session=void 0}function tx(){if($8())try{K.sessionStorage.removeItem(k4)}catch{}}function nx(e){return e!==void 0&&Math.random()<e}function rx(e){if($8())try{K.sessionStorage.setItem(k4,JSON.stringify(e))}catch{}}function ix(e){let t=Date.now();return{id:e.id||ut(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function ax(e,t){return nx(e)?`session`:t?`buffer`:!1}function ox({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=ix({sampled:ax(e,t),previousSessionId:r});return n&&rx(i),i}function sx(){if(!$8())return null;try{let e=K.sessionStorage.getItem(k4);if(!e)return null;let t=JSON.parse(e);return Z&&Q.infoTick(`Loading existing session`),ix(t)}catch{return null}}function cx(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function lx(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return cx(e.started,t,r)||cx(e.lastActivity,n,r)}function ux(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!lx(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function dx({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&sx();return i?ux(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Z&&Q.infoTick(`Session in sessionStorage is expired, creating new one...`),ox(r,{previousSessionId:i.id})):i:(Z&&Q.infoTick(`Creating new session`),ox(r,{previousSessionId:n}))}function fx(e){return e.type===J.Custom}function px(e,t,n){return gx(e,t)?(hx(e,t,n),!0):!1}function mx(e,t,n){return gx(e,t)?hx(e,t,n):Promise.resolve(null)}async function hx(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=_x(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof W8,a=n?`eventBufferOverflow`:`eventBufferError`,o=N();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function gx(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Wb(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Z&&Q.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function _x(e,t){try{if(typeof t==`function`&&fx(e))return t(e)}catch(e){return Z&&Q.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var vx=100;function yx(e,t,n){let r=e.getContext();t&&r.traceIds.size<vx&&r.traceIds.add(t),n&&r.segmentNames.size<vx&&r.segmentNames.add(n)}function bx(e){return t=>{e.isEnabled()&&yx(e,t.trace_id,t.name||void 0)}}function xx(e){return!e.type}function Sx(e){return e.type===`transaction`}function Cx(e){return e.type===`replay_event`}function wx(e){return e.type===`feedback`}function Tx(e){return(t,n)=>{if(!e.isEnabled()||!xx(t)&&!Sx(t))return;let r=n.statusCode;!r||r<200||r>=300||(Sx(t)?Ex(e,t):Dx(e,t))}}function Ex(e,t){var n;yx(e,(n=t.contexts)==null||(n=n.trace)==null?void 0:n.trace_id,t.transaction)}function Dx(e,t){var n;let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!((n=t.tags)!=null&&n.replayId))return;let{beforeErrorSampling:i}=e.getOptions();(typeof i!=`function`||i(t))&&uv(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function Ox(e){return t=>{e.isEnabled()&&xx(t)&&kx(e,t)}}function kx(e,t){var n;let r=(n=t.exception)==null||(n=n.values)==null||(n=n[0])==null?void 0:n.value;typeof r==`string`&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Kb(e,d8({category:`replay.hydrate-error`,data:{url:_0()}}))}function Ax(e){let t=N();t&&t.on(`beforeAddBreadcrumb`,t=>jx(e,t))}function jx(e,t){if(!e.isEnabled()||!Px(t))return;let n=Mx(t);n&&Kb(e,n)}function Mx(e){return!Px(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?Nx(e):d8(e)}function Nx(e){var t;let n=(t=e.data)==null?void 0:t.arguments;if(!Array.isArray(n)||n.length===0)return d8(e);let r=!1,i=n.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>5e3?(r=!0,`${e.slice(0,z4)}…`):e;if(typeof e==`object`)try{let t=Ke(e,7);return JSON.stringify(t).length>5e3?(r=!0,`${JSON.stringify(t,null,2).slice(0,z4)}…`):t}catch{}return e});return d8({...e,data:{...e.data,arguments:i,...r?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function Px(e){return!!e.category}function Fx(e,t){var n,r;return e.type||!((n=e.exception)!=null&&(n=n.values)!=null&&n.length)?!1:!!((r=t.originalException)!=null&&r.__rrweb__)}function Ix(){let e=j().getPropagationContext().dsc;e&&delete e.replay_id;let t=I();if(t){let e=xo(t);delete e.replay_id}}function Lx(e){let t=j().getPropagationContext().dsc;t&&(t.replay_id=e);let n=I();if(n){let t=xo(n);t.replay_id=e}}function Rx(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:J.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1))}function zx(e,t){var n;return e.recordingMode!==`buffer`||t.message===`Unable to send Replay`||!t.exception||t.type||(n=t.sdkProcessingMetadata)!=null&&n.hasDefaultSyntheticStacktrace?!1:nx(e.getOptions().errorSampleRate)}function Bx(e){return Object.assign((t,n)=>{var r;if(e.session&&ux(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Ix(),!e.isEnabled()||e.isPaused())return t;if(Cx(t))return delete t.breadcrumbs,t;if(!xx(t)&&!Sx(t)&&!wx(t))return t;if(!e.checkAndHandleExpiredSession())return Ix(),t;if(wx(t)){let n=e.getSessionId(),r=t.contexts.feedback.replay_id;return r&&r!==n||(e.flush(),t.contexts.feedback.replay_id=n,Rx(e,t)),t}if(Fx(t,n)&&!e.getOptions()._experiments.captureExceptions)return Z&&Q.log(`Ignoring error from rrweb internals`,t),null;let i=zx(e,t);if((i||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&e.recordingMode===`buffer`&&((r=e.session)==null?void 0:r.sampled)===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&rx(t)}return t},{id:`Replay`})}function Vx(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:J.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function Hx(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function Ux(e){return t=>{if(!e.isEnabled())return;let n=Hx(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Vx(e,[n]),!1)))}}function Wx(e,t){return Z&&e.getOptions()._experiments.traceInternals?!1:Bd(t,N())}function Gx(e,t){e.isEnabled()&&t!==null&&(Wx(e,t.name)||e.addUpdate(()=>(Vx(e,[t]),!0)))}function Kx(e){if(!e)return;let 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){let n=gv(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function qx(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Jx(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function Yx(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function Xx(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function Zx(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=$x(n);return r.body=i,a!=null&&a.length&&(r._meta={warnings:a}),r}function Qx(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function $x(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>R4,n=e5(e);if(t){let t=e.slice(0,R4);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}…`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function e5(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function t5(e,t){return ot(n5(e),t)}function n5(e,t=K.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(K.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function r5(e,t,n){try{let r=Yx(`resource.fetch`,await a5(e,t,n));Gx(n.replay,r)}catch(e){Z&&Q.exception(e,`Failed to capture fetch breadcrumb`)}}function i5(e,t){let{input:n,response:r}=t,i=Kx(n?vv(n):void 0),a=r?qx(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function a5(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=t5(o,n.networkDetailAllowUrls)&&!t5(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?o5(n,t.input,l):Xx(l),response:await s5(d,n,t.response,u)}}function o5({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?d5(n,t):{};if(!e)return Zx(i,r,void 0);let[a,o]=_v(vv(n),Q),s=Zx(i,r,a);return o?Jx(s,o):s}async function s5(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Xx(i);let a=r?u5(r.headers,n):{};if(!r||!t&&i!==void 0)return Zx(a,i,void 0);let[o,s]=await l5(r),c=c5(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?Jx(c,s):c}function c5(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e!=null&&e.length&&n===void 0?Kx(e):n;return r?t?Zx(i,a,e):Zx(i,a,void 0):Xx(a)}catch(e){return Z&&Q.exception(e,`Failed to serialize response body`),Zx(i,n,void 0)}}async function l5(e){let t=p5(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await m5(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Z&&Q.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Z&&Q.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function u5(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function d5(e,t){return e.length===1&&typeof e[0]!=`string`?f5(e[0],t):e.length===2?f5(e[1],t):{}}function f5(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?u5(n,t):Array.isArray(n)?{}:Qx(n,t):{}}function p5(e){try{return e.clone()}catch(e){Z&&Q.exception(e,`Failed to clone response body`)}}function m5(e){return new Promise((t,n)=>{let r=uv(()=>n(Error(`Timeout while trying to read response body`)),500);h5(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function h5(e){return e.text()}async function g5(e,t,n){try{let r=Yx(`resource.xhr`,v5(e,t,n));Gx(n.replay,r)}catch(e){Z&&Q.exception(e,`Failed to capture xhr breadcrumb`)}}function _5(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=Kx(r),a=n.getResponseHeader(`content-length`)?qx(n.getResponseHeader(`content-length`)):x5(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function v5(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!t5(c,n.networkDetailAllowUrls)||t5(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:Xx(d),response:Xx(f)};let p=s[dv],m=p?Qx(p.request_headers,n.networkRequestHeaders):{},h=Qx(yv(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?_v(o,Q):[void 0],[v,y]=n.networkCaptureBodies?y5(s):[void 0],b=Zx(m,d,g),x=Zx(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?Jx(b,_):b,response:y?Jx(x,y):x}}function y5(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return b5(e.response,e.responseType)}catch(e){t.push(e)}return Z&&Q.warn(`Failed to get xhr response body`,...t),[void 0]}function b5(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&Se(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Z&&Q.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Z&&Q.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function x5(e,t){try{return Kx(t===`json`&&Se(e)?JSON.stringify(e):e)}catch{return}}function S5(e){let t=N();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>C5(s,e,t))}catch{}}function C5(e,t,n){if(t.data)try{w5(t)&&E5(n)&&(_5(t,n),g5(t,n,e)),T5(t)&&D5(n)&&(i5(t,n),r5(t,n,e))}catch(e){Z&&Q.exception(e,`Error when enriching network breadcrumb`)}}function w5(e){return e.category===`xhr`}function T5(e){return e.category===`fetch`}function E5(e){return e==null?void 0:e.xhr}function D5(e){return(e==null?void 0:e.input)!==void 0}function O5(e){let t=N();if(X0(g8(e)),iv(Ux(e)),Ax(e),S5(e),_u(Bx(e)),t){t.on(`beforeSendEvent`,Ox(e)),t.on(`afterSendEvent`,Tx(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,bx(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t});let n;t.on(`beforeSendFeedback`,async(t,r)=>{var i;let a=(i=t.contexts)==null?void 0:i.feedback;if(!(r!=null&&r.includeReplay)||!a)return;if(a.source===`widget`&&n){a.replay_id=n,n=void 0;return}let o=e.getSessionId();e.isEnabled()&&o&&(a.source===`api`&&await e.sendBufferedReplayOrFlush(),a.replay_id=o)}),t.on(`openFeedbackWidget`,async()=>{n=void 0,await e.sendBufferedReplayOrFlush(),n=e.isEnabled()?e.getSessionId():void 0})}}async function k5(e){try{return await Promise.all(Vx(e,[A5(K.performance.memory)]))}catch{return[]}}function A5(e){let{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 j5(e,t,n){return wc(e,t,{...n,setTimeoutImpl:uv})}var M5=n.navigator;function N5(){return/iPhone|iPad|iPod/i.test((M5==null?void 0:M5.userAgent)??``)||/Macintosh/i.test((M5==null?void 0:M5.userAgent)??``)&&M5!=null&&M5.maxTouchPoints&&(M5==null?void 0:M5.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function P5(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){Z&&Q.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,F5(n),e.clickDetector&&c8(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!px(e,n,i))return!0;if(!i)return!1;let t=e.session;if(L5(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Z&&Q.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&rx(t))}return t!=null&&t.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function F5(e){let t=e.data;if(e.type===J.IncrementalSnapshot&&t&&typeof t==`object`&&`source`in t&&t.source===Y.Mutation&&`attributes`in t&&Array.isArray(t.attributes))for(let e of t.attributes){let t=Vb.mirror.getNode(e.id),n=t&&Vb.mirror.getMeta(t);if(!t||(n==null?void 0:n.type)!==f8.Element)continue;let r={...n.attributes},i=!1;for(let[t,n]of Object.entries(e.attributes))m8.has(t)&&(n===null?delete r[t]:r[t]=n,i=!0);i&&Vb.mirror.add(t,{...n,attributes:r})}}function I5(e){let t=e.getOptions();return{type:J.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 L5(e,t){var n;t&&((n=e.session)==null?void 0:n.segmentId)===0&&px(e,I5(e),!1)}function R5(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function z5(e,t,n,r){return Yo(ls(e,cs(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function B5({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
488
+ `;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function V5({client:e,scope:t,replayId:n,event:r}){var i;let a={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,a);let o=await Ul(e.getOptions(),r,a,t,e,M());if(!o)return null;e.emit(`postprocessEvent`,o,a),o.platform=o.platform||`javascript`;let{name:s,version:c,settings:l}=((i=e.getSdkMetadata())==null?void 0:i.sdk)||{};return o.sdk={...o.sdk,name:s||`sentry.javascript.unknown`,version:c||`0.0.0`,settings:l},o}async function H5({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=B5({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=N(),p=j(),m=f==null?void 0:f.getTransport(),h=f==null?void 0:f.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await V5({scope:p,client:f,replayId:t,event:{type:A4,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return Z&&Q.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=z5(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(j4);try{t.cause=e}catch{}throw t}let y=Pu({},v);if(Nu(y,`replay`))throw new W5(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new U5(v.statusCode);return v}var U5=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},W5=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},G5=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function K5(e,t={count:0,interval:L4}){let{recordingData:n,onError:r}=e;if(n.length)try{return await H5(e),!0}catch(n){if(n instanceof U5||n instanceof W5)throw n;if(ru(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=3){let e=Error(`${j4} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{uv(async()=>{try{await K5(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var q5=`__THROTTLED`,J5=`__SKIPPED`;function Y5(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?J5:q5}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var X5=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:M4,sessionIdleExpire:N4},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=j5(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Y5((e,t)=>mx(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(B4,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new r8(this,i)),Z){let t=e._experiments;Q.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{K.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=d8({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=d8({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{x8(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}getMaskAttributeFn(){return this._recordingOptions.maskAttributeFn}handleException(e){Z&&Q.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Z&&Q.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Z&&Q.exception(Error(`Unable to initialize and create session`)))}start(){if(this._isEnabled&&this.recordingMode===`session`){Z&&Q.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Z&&Q.log("Buffering is in progress, call `flush()` to save the replay");return}Z&&Q.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=dx({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){Z&&Q.log("Buffering is in progress, call `flush()` to save the replay");return}Z&&Q.infoTick(`Starting replay in buffer mode`);let e=dx({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{let e=this._canvas;this._stopRecording=Vb({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:I4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:P5(this),...N5(),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(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){var n,r;if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let i=t??`manual`;(n=N())==null||n.emit(`replayEnd`,{sessionId:(r=this.session)==null?void 0:r.id,reason:i});try{var a;Z&&Q.log(`Stopping Replay triggered by ${i}`),Ix(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),(a=this.eventBuffer)==null||a.destroy(),this.eventBuffer=null,ex(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Z&&Q.log(`Pausing replay`))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Z&&Q.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();Z&&Q.log(`Converting buffer to session`),await this.flushImmediate();let 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(),Lx(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode!==`buffer`&&this._isEnabled&&t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume()}else 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){var t,n;if(!(e&&((t=this.session)==null?void 0:t.sampled)===!1))return(n=this.session)==null?void 0:n.id}checkAndHandleExpiredSession(){var e;if(this._lastActivity&&cx(this._lastActivity,this.timeouts.sessionIdlePause)&&((e=this.session)==null?void 0:e.sampled)===`session`)this.pause();else return!!this._checkSession()}setInitialState(){let e=`${K.location.pathname}${K.location.hash}${K.location.search}`,t=`${K.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){let n=this._throttledAddEvent(e,t);if(n===`__THROTTLED`){let e=d8({category:`replay.throttled`});this.addUpdate(()=>!px(this,{type:5,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||I(),t=e&&Ka(e);if(!t)return;let n=F(t),r=n.attributes[O4];if(r&&[`route`,`custom`].includes(r))return n.name}_initializeRecording(){var e;this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=X8({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&((e=N())==null||e.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode})),this.startRecording(),this.recordingMode===`session`&&this.session&&Lx(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=dx({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;let e=this.session;return!ux(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{K.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),K.addEventListener(`blur`,this._handleWindowBlur),K.addEventListener(`focus`,this._handleWindowFocus),K.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(O5(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=L8(this)}_removeListeners(){try{K.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),K.removeEventListener(`blur`,this._handleWindowBlur),K.removeEventListener(`focus`,this._handleWindowFocus),K.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(ux(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?Ix():(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Z&&Q.log(`Document has become active, but session has expired`))}_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:J.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=E8(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(Vx(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){var e;let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t)Z&&Q.error(`No session or eventBuffer found to flush.`);else if(await this._addPerformanceEntries(),(e=this.eventBuffer)!=null&&e.hasEvents&&(await k5(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new G5;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await K5({replayId:t,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=N();if(t){let n;n=e instanceof W5?`ratelimit_backoff`:e instanceof G5?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Z&&Q.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Z&&Q.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Z&&Q.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&rx(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t!=null&&t.length&&e.some(e=>{let n=R5(e.target),r=t.join(`,`);return n==null?void 0:n.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=d8({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return!a||(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1)}};function Z5(e,t){return[...e,...t].join(`,`)}function Q5({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:Z5(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:Z5(t,[]),blockSelector:Z5(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:Z5(r,[]),ignoreSelector:Z5(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function $5({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var e7=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,t7=[`content-length`,`content-type`,`accept`],n7=Symbol.for(`sentry__originalRequestBody`),r7=!1,i7=!1;function a7(){if(typeof Request>`u`||i7)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return(n==null?void 0:n.body)!=null&&(r[n7]=n.body),r};t.prototype=e.prototype,n.Request=t,i7=!0}catch{}}var o7=L((e=>new s7(e))),s7=class{constructor({flushMinDelay:e=P4,flushMaxDelay:t=F4,minReplayDuration:n=H4,maxReplayDuration:r=W4,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:ee=[],maskFn:T,beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie=!1}={}){this.name=`Replay`;let ae=Q5({mask:b,unmask:S,block:C,unblock:w,ignore:ee});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>$5({maskAttributes:x,maskAllText:c,privacyOptions:ae,key:e,value:t,el:n}),...ae,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,U4),maxReplayDuration:Math.min(r,W4),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:l7(v),networkResponseHeaders:l7(y),beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${e7}`:e7,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&ms())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return r7}set _isInitialized(e){r7=e}afterAllSetup(e){ms()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&a7(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:(e==null?void 0:e.flush)??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){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){var e;if((e=this._replay)!=null&&e.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(Uo(e,{[D4]:t}),this.getRecordingMode()===`buffer`&&Uo(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=c7(this._initialOptions,e);this._replay=new X5({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function c7(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=fa(n.replaysSessionSampleRate),a=fa(n.replaysOnErrorSampleRate);return i==null&&a==null&&u(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function l7(e){return[...t7,...e.map(e=>e.toLowerCase())]}function u7(){var e;return(e=N())==null?void 0:e.getIntegrationByName(`Replay`)}function d7(e){let t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function f7(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function p7(e,t,n=1/0,r=0){return e?d7(e)?p7(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:p7(e.parentNode,t,n,r+1):-1}function m7(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(f7(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var h7=`Please stop import mirror directly. Instead of that,\r
489
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
490
+ or you can use record.mirror to access the mirror instance during recording.`,g7={map:{},getId(){return console.error(h7),-1},getNode(){return console.error(h7),null},removeNodeFromMap(){console.error(h7)},has(){return console.error(h7),!1},reset(){console.error(h7)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(g7=new Proxy(g7,{get(e,t,n){return t===`map`&&console.error(h7),Reflect.get(e,t,n)}}));function _7(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){w7(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>_7(e,t,a||{},!0)}function v7(e,t,n){try{if(!(t in e))return()=>{};let 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,Date.now().toString();function y7(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function b7(e,t,n,r,i){if(!e)return!1;let a=y7(e);if(!a)return!1;let o=m7(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=p7(a,o),c=-1;return s<0?!1:(r&&(c=p7(a,m7(null,r))),s>-1&&c<0||s<c)}var x7={};function S7(e){let t=x7[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return x7[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return x7[e]=r}function C7(...e){return S7(`requestAnimationFrame`)(...e)}function w7(...e){return S7(`setTimeout`)(...e)}var T7=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(T7||{}),E7;function D7(e){E7=e}for(var O7=e=>E7?((...t)=>{try{return e(...t)}catch(e){if(E7&&E7(e)===!0)return()=>{};throw e}}):e,k7=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,A7=typeof Uint8Array>`u`?[]:new Uint8Array(256),j7=0;j7<k7.length;j7++)A7[k7.charCodeAt(j7)]=j7;var M7=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=k7[t[n]>>2],i+=k7[(t[n]&3)<<4|t[n+1]>>4],i+=k7[(t[n+1]&15)<<2|t[n+2]>>6],i+=k7[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},N7=new Map;function P7(e,t){let n=N7.get(e);return n||(n=new Map,N7.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var F7=(e,t,n)=>{if(!e||!(R7(e,t)||typeof e==`object`))return;let r=P7(n,e.constructor.name),i=r.indexOf(e);return i===-1&&(i=r.length,r.push(e)),i};function I7(e,t,n){if(e instanceof Array)return e.map(e=>I7(e,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:M7(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[I7(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:`HTMLImageElement`,src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[I7(e.data,t,n),e.width,e.height]}:R7(e,t)||typeof e==`object`?{rr_type:e.constructor.name,index:F7(e,t,n)}:e}var L7=(e,t,n)=>e.map(e=>I7(e,t,n)),R7=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function z7(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=v7(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return b7(this.canvas,n,r,i,!0)||w7(()=>{let n=L7(o,t,this);e(this.canvas,{type:T7[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=_7(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:T7[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}var B7=new Set(`beginPath.closePath.moveTo.lineTo.arc.arcTo.ellipse.bezierCurveTo.quadraticCurveTo.rect.roundRect.save.restore.translate.rotate.scale.transform.setTransform.resetTransform.setLineDash.clip.getImageData.measureText.isPointInPath.isPointInStroke.getTransform.getLineDash.getContextAttributes.isContextLost.createLinearGradient.createRadialGradient.createConicGradient.createPattern.createImageData`.split(`.`));function V7(e,t,n){let r=[],i=n.CanvasRenderingContext2D.prototype;for(let n of Object.getOwnPropertyNames(i))if(!B7.has(n))try{if(typeof i[n]!=`function`)continue;r.push(v7(i,n,function(n){return function(){let r=this.canvas;return r&&r!==t.canvas&&(t.canvas=r,e(r)),n.apply(this,arguments)}}))}catch{}return()=>{r.forEach(e=>e())}}function H7(e){return e===`experimental-webgl`?`webgl`:e}function U7(e,t,n,r,i){let a=[];try{let o=v7(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!b7(this,t,n,r,!0)){let e=H7(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e)){if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function W7(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=v7(e,o,function(e){return function(...c){let l=e.apply(this,c);if(F7(l,s,this),`tagName`in this.canvas&&!b7(this.canvas,r,i,a,!0)){let e=L7(c,s,this),r={type:t,property:o,args:e};n(this.canvas,r)}return l}});c.push(l)}catch{let r=_7(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function G7(e,t,n,r,i,a){let o=[];return o.push(...W7(t.WebGLRenderingContext.prototype,T7.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...W7(t.WebGL2RenderingContext.prototype,T7.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var K7=`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 q7(){let e=new Blob([K7]);return URL.createObjectURL(e)}var J7=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.canvas2DState=new WeakMap,this.lastDrawnCanvas={canvas:null},this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&D7(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||O7(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){var e;this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,(e=this.worker)==null||e.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){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;this.windowsSet.has(e)||(o?(this.windowsSet.add(e),this.windows.push(new WeakRef(e))):(O7(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=U7(e,n,r,i,!0),a=V7(e=>{let t=this.canvas2DState.get(e);t?t.dirty=!0:this.canvas2DState.set(e,{dirty:!0,width:0,height:0})},this.lastDrawnCanvas,e);this.restoreHandlers.push(()=>{t(),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){t!=null&&t.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),e):C7(t=>this.takeSnapshot(t,e))}initFPSWorker(){let{getTrustedScriptURL:e}=this.options,t=q7(),n=new Worker(e?e(t):t);return n.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:T7[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},n}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,void 0,!0),e=C7(t)};e=C7(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=U7(e,t,n,r,!1),a=z7(this.processMutation.bind(this),e,t,n,r),o=G7(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{b7(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n=!1){let{sampling:r,blockClass:i,blockSelector:a,unblockSelector:o,dataURLOptions:s,maxCanvasSize:c}=this.options,l=1e3/(r===`all`?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=e,(t?[t]:this.getCanvasElements(i,a,o)).forEach(e=>{let t=this.mirror.getId(e);if(!e.width||!e.height){let t=this.canvas2DState.get(e);t&&(t.dirty=!0)}if(this.mirror.hasNode(e)&&e.width&&e.height&&!this.snapshotInProgressMap.get(t)){if(n){if(typeof e.checkVisibility==`function`&&!e.checkVisibility())return;let t=this.canvas2DState.get(e);if(t){if(!t.dirty&&t.width===e.width&&t.height===e.height)return;t.dirty=!1,this.lastDrawnCanvas.canvas===e&&(this.lastDrawnCanvas.canvas=null),t.width=e.width,t.height=e.height}}this.snapshotInProgressMap.set(t,!0),createImageBitmap(e).then(n=>{var r;(r=this.worker)==null||r.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:s,maxCanvasSize:c},[n])}).catch(n=>{O7(()=>{this.snapshotInProgressMap.delete(t);let r=this.canvas2DState.get(e);throw r&&(r.dirty=!0),n})()})}}),!0)}startPendingCanvasMutationFlusher(){C7(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,C7(e)};C7(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),C7(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},Y7={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}}},X7=`ReplayCanvas`,Z7=1280,Q7=L(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Z7):Z7,n?Math.min(n,Z7):Z7]},i,a,o=new Promise(e=>a=e);return{name:X7,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new J7({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...Y7[e||`medium`]||Y7.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}})),$7=Oy({lazyLoadIntegration:Pv}),e9=Oy({getModalIntegration:()=>p4,getScreenshotIntegration:()=>E4});function t9(e,t){let n=i9(e,t),r={type:l9(t),value:u9(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function n9(e,t,n,r){var i;let a=(i=N())==null?void 0:i.getOptions().normalizeDepth,o=_9(t),s={__serialized__:Je(t,a)};if(o)return{exception:{values:[t9(e,o)]},extra:s};let c={exception:{values:[{type:Ce(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:h9(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=i9(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function r9(e,t){return{exception:{values:[t9(e,t)]}}}function i9(e,t){let n=t.stacktrace||t.stack||``,r=o9(t),i=s9(t);try{return e(n,r,i)}catch{}return[]}var a9=/Minified React error #\d+;/i;function o9(e){return e&&a9.test(e.message)?1:0}function s9(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function c9(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function l9(e){let t=e==null?void 0:e.name;return!t&&c9(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function u9(e){let t=e==null?void 0:e.message;return c9(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?jf(t.error):jf(e):`No error message`}function d9(e,t,n,r){let i=p9(e,t,(n==null?void 0:n.syntheticException)||void 0,r);return mt(i),i.level=`error`,n!=null&&n.event_id&&(i.event_id=n.event_id),Al(i)}function f9(e,t,n=`info`,r,i){let a=m9(e,t,(r==null?void 0:r.syntheticException)||void 0,i);return a.level=n,r!=null&&r.event_id&&(a.event_id=r.event_id),Al(a)}function p9(e,t,n,r,i){let a;if(_e(t)&&t.error)return r9(e,t.error);if(ve(t)||ye(t)){let i=t;if(`stack`in t){var o;a=r9(e,t);let i=(o=a.exception)==null||(o=o.values)==null?void 0:o[0];if(r&&n&&i&&!i.stacktrace){let t=i9(e,n);t.length&&(i.stacktrace={frames:t},mt(a,{synthetic:!0}))}}else{let t=i.name||(ve(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=m9(e,o,n,r),pt(a,o)}return a}if(D(t))return r9(e,t);if(k(t)||Ce(t))return a=n9(e,t,n,i),mt(a,{synthetic:!0}),a;let s=String(t);return a=m9(e,s,n,r),pt(a,s,void 0),mt(a,{synthetic:!0}),a}function m9(e,t,n,r){let i={};if(r&&n){let r=i9(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),mt(i,{synthetic:!0})}if(xe(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function h9(e,{isUnhandledRejection:t}){let n=Pe(e),r=t?`promise rejection`:`exception`;return _e(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ce(e)?`Event \`${g9(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function g9(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function _9(e){return Object.values(e).find(D)}var $=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function v9(e){let{tunnel:t,dsn:n,transportOptions:r}=e;if(!t)return{tunnel:t,transportOptions:r};if(typeof t==`string`)return{tunnel:t,transportOptions:b9(t)?y9(r):r};let i=t===!0?{}:t,a=n&&da(n),o=i.path??(a&&Jd(a));if(!o)return{tunnel:void 0,transportOptions:r};let s=`${Yd(i.basePath)}${o}${i.trailingSlash?`/`:``}`;return $&&y.log(`Tunneling events to "${s}"`),{tunnel:s,transportOptions:y9(r)}}function y9(e){return{...e,headers:{"Content-Type":`application/x-sentry-envelope`,...e==null?void 0:e.headers}}}function b9(e){var t,n;let r=Md(e,(t=B.location)==null?void 0:t.href);return r?jd(r)||r.origin===((n=B.location)==null?void 0:n.origin):!1}var x9=class extends nd{constructor(e){var t;let n=S9({...e,...v9(e)});$d(n,`browser`,[`browser`],B.SENTRY_SDK_SOURCE||fs()),super(n),n.routeProvider&&y0(n.routeProvider,this),this._unhandledSessionStatus=`unhandled`;let{userInfo:r}=this.getDataCollectionOptions();(t=n._metadata)!=null&&t.sdk&&(n._metadata.sdk.settings={infer_ip:r?`auto`:`never`,...n._metadata.sdk.settings});let{sendClientReports:i}=this._options,a=()=>{A()},o=[[B.document,`visibilitychange`,()=>{a(),B.document.visibilityState===`hidden`&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[B.document,`freeze`,a],[B.document,`resume`,a],[B,`pagehide`,a],[B,`pageshow`,a]];o.forEach(([e,t,n])=>{var r;return e==null||(r=e.addEventListener)==null?void 0:r.call(e,t,n)}),this.on(`close`,()=>o.forEach(([e,t,n])=>{var r;return e==null||(r=e.removeEventListener)==null?void 0:r.call(e,t,n)})),r&&this.on(`beforeSendSession`,Xd)}eventFromException(e,t){return d9(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return f9(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 S9(e){return{sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e,release:e.release??C9()}}function C9(){var e;return typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:w9()??((e=B.SENTRY_RELEASE)==null?void 0:e.id)}function w9(){var e,t;return((e=B.document)==null||(t=e.querySelector)==null||(t=t.call(e,`meta[name="sentry-release"]`))==null?void 0:t.getAttribute(`content`))||void 0}var T9=40;function E9(e,t=cv(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw lv(`fetch`),e}finally{n-=a,r--}}return Iu(e,i,ku(e.bufferSize||T9))}function D9(){let e=N();e?e.getIntegrationByName(`BrowserProfiling`)?e.emit(`startUIProfiler`):$&&y.warn(`BrowserProfiling integration is not available`):$&&y.warn(`No Sentry client available, profiling is not started`)}function O9(){let e=N();e?e.getIntegrationByName(`BrowserProfiling`)?e.emit(`stopUIProfiler`):$&&y.warn(`ProfilingIntegration is not available`):$&&y.warn(`No Sentry client available, profiling is not started`)}var k9={startProfiler:D9,stopProfiler:O9},A9=10,j9=20,M9=30,N9=40,P9=50;function F9(e,t,n,r){let 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 I9=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,L9=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?![^(]*\) )(?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,R9=/\((\S*)(?::(\d+))(?::(\d+))\)/,z9=/at (.+?) ?\(data:(.+?),/,B9=[M9,e=>{let t=e.match(z9);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=I9.exec(e);if(n){let[,e,t,r]=n;return F9(e,`?`,+t,+r)}let r=L9.exec(e);if(r){var i;if(((i=r[2])==null?void 0:i.indexOf(`eval`))===0){let e=R9.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Q9(r[1]||`?`,r[2]);return F9(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],V9=/^\s*(.*?)(?:\(([^()]*)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,H9=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,U9=[P9,e=>{let t=V9.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=H9.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Q9(n,e),F9(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],W9=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,G9=[N9,e=>{let t=W9.exec(e);return t?F9(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],K9=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,q9=[A9,e=>{let t=K9.exec(e);return t?F9(t[2],t[3]||`?`,+t[1]):void 0}],J9=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Y9=[j9,e=>{let t=J9.exec(e);return t?F9(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],X9=[B9,U9],Z9=C(...X9),Q9=(e,t)=>{let 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 $9(e,{metadata:t,tunnel:n,dsn:r}){return Yo({event_id:e.event_id,sent_at:new Date().toISOString(),...(t==null?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:aa(r)}},[eS(e)])}function eS(e){return[{type:`user_report`},e]}var tS=1024,nS=`Breadcrumbs`,rS=L(((e={})=>{let t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:nS,setup(e){t.dom&&X0(aS(e,t.dom)),t.xhr&&fv(oS(e)),t.fetch&&ph(sS(e)),t.history&&iv(cS(e)),t.sentry&&e.on(`beforeSendEvent`,iS(e))}}}));function iS(e){return function(t){N()===e&&cf({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:ft(t)},{event:t})}}function aS(e,t){return function(n){if(N()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>tS&&($&&y.warn(`\`dom.maxStringLength\` cannot exceed ${tS}, but a value of ${o} was configured. Sentry will use ${tS} instead.`),o=tS),typeof a==`string`&&(a=[a]);try{let e=n.event,t=uS(e)?e.target:e;r=f1(t,{keyAttrs:a,maxStringLength:o}),i=s0(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),cf(s,{event:n.event,name:n.name,global:n.global})}}function oS(e){return function(t){if(N()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[dv];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:lS(o,e),status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Sh(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),cf(d,u)}}function sS(e){return function(t){if(N()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`)){if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:{...t.fetchData,url:lS(t.fetchData.url,e)},level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),cf(a,i)}else{let i=t.response,a={...t.fetchData,url:lS(t.fetchData.url,e),status_code:i==null?void 0:i.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Sh(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),cf(s,o)}}}}function cS(e){return function(t){if(N()!==e)return;let n=t.from,r=t.to,i=Ld(B.location.href),a=n?Ld(n):void 0,o=Ld(r);a!=null&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),cf({category:`navigation`,data:{from:Dd(n),to:Dd(r)}})}}function lS(e,t){var n;let r=e===``?(n=B.location)==null?void 0:n.href:void 0;return Dd(r?r.split(`#`)[0]??``:e,t)}function uS(e){return!!e&&!!e.target}var dS=`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(`,`),fS=`BrowserApiErrors`,pS=L(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:fS,setupOnce(){t.setTimeout&&Oe(B,`setTimeout`,mS),t.setInterval&&Oe(B,`setInterval`,mS),t.requestAnimationFrame&&Oe(B,`requestAnimationFrame`,hS),t.XMLHttpRequest&&`XMLHttpRequest`in B&&Oe(XMLHttpRequest.prototype,`send`,gS);let e=t.eventTarget;e&&(Array.isArray(e)?e:dS).forEach(e=>_S(e,t))}}}));function mS(e){return function(...t){return t[0]=Ov(t[0],{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ne(e)}`}}),e.apply(this,t)}}function hS(e){return function(t){return e.apply(this,[Ov(t,{mechanism:{data:{handler:ne(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function gS(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Oe(n,e,function(t){let n={mechanism:{data:{handler:ne(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=je(t);return r&&(n.mechanism.data.handler=ne(r)),Ov(t,n)})}),e.apply(this,t)}}function _S(e,t){var n,r;let i=(n=B[e])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(Oe(i,`addEventListener`,function(n){return function(r,i,a){try{vS(i)&&(i.handleEvent=Ov(i.handleEvent,{mechanism:{data:{handler:ne(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&yS(this,r,i),n.apply(this,[r,Ov(i,{mechanism:{data:{handler:ne(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Oe(i,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function vS(e){return typeof e.handleEvent==`function`}function yS(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var bS=L((e={})=>{let t=e.lifecycle??`page`;return{name:`BrowserSession`,setupOnce(){if(B.document===void 0){$&&y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}vu({ignoreDuration:!0});let e=!1;w1(()=>{e||=(xu(),!0)});let n=M(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();((r==null?void 0:r.id)!==(n==null?void 0:n.id)||(r==null?void 0:r.ip_address)!==(n==null?void 0:n.ip_address))&&(r=n,e&&xu())}),t===`route`&&iv(({from:t,to:n})=>{t!==n&&(vu({ignoreDuration:!0}),xu(),e=!0)})}}}),xS=`CultureContext`,SS=L((()=>({name:xS,preprocessEvent(e){var t;let n=CS();n&&(e.contexts={...e.contexts,culture:{...n,...(t=e.contexts)==null?void 0:t.culture}})},processSegmentSpan(e){let t=CS();t&&Uo(e,{[Bn]:t.locale,[Vn]:t.timezone,[zn]:t.calendar})}})));function CS(){try{let e=B.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var wS=`GlobalHandlers`,TS=L(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:wS,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ES(e),jS(`onerror`)),t.onunhandledrejection&&(DS(e),jS(`onunhandledrejection`))}}}));function ES(e){ue(t=>{let{stackParser:n,attachStacktrace:r}=MS();if(N()!==e||wv(t))return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=AS(p9(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,nu(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function DS(e){pe(t=>{let{stackParser:n,attachStacktrace:r}=MS();if(N()!==e||wv())return;let i=OS(t),a=O(i)?kS(i):p9(n,i,void 0,r,!0);a.level=`error`,nu(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function OS(e){if(O(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 kS(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function AS(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:NS(t)??_0(),function:`?`,in_app:!0}),e}function jS(e){$&&y.log(`Global Handler attached: ${e}`)}function MS(){var e;return((e=N())==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function NS(e){if(be(e)&&e.length!==0)return e.startsWith(`data:`)?`<${zd(e,!1)}>`:e}var PS=L(()=>({name:`HttpContext`,preprocessEvent(e,t,n){var r;if(!B.navigator&&!B.location&&!B.document)return;let{url:i,headers:a}=kv(n),o=n.getDataCollectionOptions().httpHeaders.request,s=Object.entries(((r=e.request)==null?void 0:r.headers)??{}).filter(([e])=>!(e in a)),c={...El(a,o),...Object.fromEntries(s)};e.request={url:Dd(i,n),...e.request,...Object.keys(c).length>0?{headers:c}:{headers:void 0}}},processSpan(e,t){var n;if(!B.navigator&&!B.location&&!B.document)return;let r=kv(t),i=El(r.headers,t.getDataCollectionOptions().httpHeaders.request),a=i.Referer,{hostname:o,protocol:s}=B.location||{};Uo(e,{[Ei]:i[`User-Agent`],[Br]:s===`file:`||o===`localhost`||o===`127.0.0.1`||o===`[::1]`||!!(o!=null&&o.endsWith(`.localhost`)),...e.is_segment&&{"url.full":((n=e.attributes)==null?void 0:n[`sentry.op`])===`http.client`?void 0:Dd(r.url),"http.request.header.referer":a?[a]:void 0}})}})),FS=`cause`,IS=5,LS=`LinkedErrors`,RS=L(((e={})=>{let t=e.limit||IS,n=e.key||FS;return{name:LS,preprocessEvent(e,r,i){wf(t9,i.getOptions().stackParser,n,t,e,r)}}})),zS=/^HTML(\w*)Element$/;function BS(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(bv(e)){let t=VS(e);if(zS.test(t))return`[HTMLElement: ${f1(e)}]`}}function VS(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function HS(){return US()?($&&u(()=>{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 US(){var e;if(B.window===void 0)return!1;let t=B;if(t.nw||!((e=t.chrome||t.browser)!=null&&(e=e.runtime)!=null&&e.id))return!1;let n=_0();return!(B===B.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function WS(e){return[mf(),df(),$m(),pS(),rS(),Vm(),TS(),RS(),Xf(),PS(),SS(),bS()]}function GS(e={}){let t=Qd(e),n=!t.skipBrowserExtensionCheck&&HS(),r=t.defaultIntegrations==null?WS(t):t.defaultIntegrations,i=so({integrations:t.integrations,defaultIntegrations:r}),a={...t,...v9(t),enabled:!n&&t.enabled,stackParser:w(t.stackParser||Z9),integrations:i,transport:t.transport||E9};return Ge(BS),od(x9,a)}function KS(){}function qS(e){e()}function JS(e={}){var t;let n=B.document,r=(n==null?void 0:n.head)||(n==null?void 0:n.body);if(!r){$&&y.error(`[showReportDialog] Global document not defined`);return}let i=j(),a=(t=N())==null?void 0:t.getDsn();if(!a){$&&y.error(`[showReportDialog] DSN not configured`);return}let o={...e,user:{...i.getUser(),...e.user},eventId:e.eventId||fu()},{onLoad:s,onClose:c,onError:l}=o;if(!o.eventId){$&&y.error(`[showReportDialog] No event ID`),l==null||l(Error(`No event ID to show the report dialog for`));return}let u=B.document.createElement(`script`);if(u.async=!0,u.crossOrigin=`anonymous`,u.src=Eu(a,o),s&&(u.onload=s),l&&(u.onerror=()=>{l(Error(`Failed to load the report dialog script`))}),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{B.removeEventListener(`message`,e)}};B.addEventListener(`message`,e),u.addEventListener(`error`,()=>{B.removeEventListener(`message`,e)})}r.appendChild(u)}var YS=n;function XS(){return`ReportingObserver`in YS}var ZS=`ReportingObserver`,QS=new WeakMap,$S=L(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(QS.has(N()))for(let t of e)dn(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}tu(`${n}: ${r}`)})}return{name:ZS,setupOnce(){XS()&&new YS.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){QS.set(e,!0)}}})),eC=`HttpClient`,tC=L(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:eC,setup(e){lC(e,t),uC(e,t)}}}));function nC(e,t,n,r,i){if(dC(e,n.status,n.url)){let e=pC(t,r),a,o,s,c,l=mC();if(l.requestHeaders!==!1&&(a=El(aC(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=El(aC(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;t&&(s=xd(t,l.cookies,`cookie`));let r=n.headers.get(`Set-Cookie`)||void 0;r&&(c=xd(r,l.cookies,`set-cookie`))}nu(fC({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function rC(e,t,n,r,i){if(dC(e,t.status,t.responseURL)){let e,a,o,s=mC();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;e&&(a=xd(e,s.cookies,`set-cookie`))}catch{}if(s.responseHeaders!==!1)try{o=El(oC(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=El(r,s.requestHeaders)),nu(fC({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function iC(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function aC(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function oC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
491
+ `).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function sC(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function cC(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function lC(e,t){ph(n=>{if(N()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&nC(t,s,r,c,a||o)})}function uC(e,t){`XMLHttpRequest`in n&&fv(n=>{if(N()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[dv];if(!o)return;let{method:s,request_headers:c}=o;try{rC(t,a,s,c,r||i)}catch(e){$&&y.warn(`Error while extracting response event form XHR response`,e)}})}function dC(e,t,n){return cC(e.failedRequestStatusCodes,t)&&sC(e.failedRequestTargets,n)&&!Bd(n,N())}function fC(e){let t=N(),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}`,a={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:iC(e.responseHeaders)}}};return mt(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function pC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function mC(){let e=N();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let{cookies:t,httpHeaders:n}=e.getDataCollectionOptions();return{cookies:t,requestHeaders:n.request,responseHeaders:n.response}}var hC=n,gC=5,_C=`ContextLines`,vC=L(((e={})=>({name:_C,processEvent(t,n,r){return yC(t,e.frameContextLines??(r==null?void 0:r.getDataCollectionOptions().frameContextLines)??gC)}})));function yC(e,t){var n;let r=hC.document,i=hC.location&&Rd(hC.location.href);if(!r||!i)return e;let a=(n=e.exception)==null?void 0:n.values;if(!(a!=null&&a.length))return e;let o=r.documentElement.innerHTML;if(!o)return e;let s=[`<!DOCTYPE html>`,`<html>`,...o.split(`
492
+ `),`</html>`];return a.forEach(e=>{let n=e.stacktrace;n!=null&&n.frames&&(n.frames=n.frames.map(e=>bC(e,s,i,t)))}),e}function bC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||_t(t,e,r),e}var xC=`GraphQLClient`,SC=(e=>({name:xC,setup(t){CC(t,e),wC(t,e)}}));function CC(e,t){e.on(`beforeOutgoingRequestSpan`,(n,r)=>{let i=F(n).attributes;if(i[`sentry.op`]!==`http.client`)return;let a=i[xi],o=i[`http.request.method`]||i[`http.method`];if(!be(a)||!be(o))return;let{endpoints:s}=t,c=ot(a,s),l=DC(r);if(c&&l){let t=jC(l);if(t){R(e)||n.updateName(`${o} ${a} (${EC(t)})`);let{operationName:r,operationType:i}=TC(t);n.setAttribute(Xn,r),n.setAttribute(Zn,i),kC(t)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Yn,t.query),AC(t)&&(n.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),n.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function wC(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(n,r)=>{let{category:i,type:a,data:o}=n;if(a===`http`&&(i===`fetch`||i===`xhr`)){let n=o==null?void 0:o.url,{endpoints:i}=t,a=ot(n,i),s=DC(r);if(a&&o&&s){let t=jC(s);!o.graphql&&t&&(o[`graphql.operation`]=EC(t),kC(t)&&e.getDataCollectionOptions().graphQL.document===!0&&(o[Yn]=t.query),AC(t)&&(o[`graphql.persisted_query.hash.sha256`]=t.extensions.persistedQuery.sha256Hash,o[`graphql.persisted_query.version`]=t.extensions.persistedQuery.version))}}})}function TC(e){if(AC(e))return{operationName:e.operationName,operationType:void 0};if(kC(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=OC(t);return{operationName:r,operationType:i}}return{operationName:void 0,operationType:void 0}}function EC(e){if(AC(e))return`persisted ${e.operationName}`;if(kC(e)){let{operationName:t,operationType:n}=TC(e);return t?`${n} ${t}`:`${n}`}return`unknown`}function DC(e){let t=`xhr`in e,n;if(t){let t=e.xhr[dv];n=t&&_v(t.body)[0]}else n=_v(vv(e.input))[0];return n}function OC(e){let 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]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function kC(e){return Se(e)&&typeof e.query==`string`}function AC(e){return Se(e)&&typeof e.operationName==`string`&&Se(e.extensions)&&Se(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function jC(e){try{let t=JSON.parse(e);return kC(t)||AC(t)?t:void 0}catch{return}}var MC=L(SC),NC=L((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){var s;if(!(r instanceof HTMLElement))continue;let o=s0(r,1)||void 0,c=r.tagName.toLowerCase();if(t.includes(c))continue;let l=((s=e.onElement)==null?void 0:s.call(e,{element:r,componentName:o,tagName:c,depth:a}))||{};if(l===`skip`)continue;if(l===`children`){n(r,i,a+1);continue}let{x:u,y:d,width:f,height:p}=r.getBoundingClientRect(),m={identifier:r.id||void 0,type:o||c,visible:!0,alpha:1,height:p,width:f,x:u,y:d,...l};m.children=[],n(r,m.children,a+1),i.push(m)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{var i,a;if(t.type!==void 0||((i=e.shouldAttach)==null?void 0:i.call(e,t,r))===!1)return t;let o={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(((a=e.rootElement)==null?void 0:a.call(e))||B.document.body,o.windows);let s={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(o)};return r.attachments=r.attachments||[],r.attachments.push(s),t}}});function PC(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function FC(e){try{var t;return new URL(e,(t=B.location)==null?void 0:t.href).href}catch{return}}function IC(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function LC(e){try{return new Headers(e)}catch{return}}var RC={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function zC(e,t){let n={...RC,...t};n.traceFetch&&BC(e,n),n.traceXHR&&VC(e,n)}function BC(e,t){let{enableHTTPTimings:n=!0,onRequestSpanStart:r,onRequestSpanEnd:i}=t,{shouldCreateSpan:a,shouldAttachHeadersWithTargets:o,spans:s,propagateTraceparent:c}=HC(e,t);ph(t=>{var l;let u=eh(t,a,o,s,{propagateTraceparent:c,onRequestSpanEnd:i,urlBase:(l=B.location)==null?void 0:l.href});if(u){var d;let i=FC(t.fetchData.url),a=i?(d=Ld(i).host)==null?void 0:d.replace(/^.*@/,``):void 0,o=i?zd(i):void 0;u.setAttributes({[xi]:Dd(o),[oi]:a}),n&&WC(u,e),r==null||r(u,{headers:t.headers})}})}function VC(e,t){let{enableHTTPTimings:n=!0,onRequestSpanStart:r,onRequestSpanEnd:i}=t,{shouldCreateSpan:a,shouldAttachHeadersWithTargets:o,spans:s,propagateTraceparent:c}=HC(e,t);fv(t=>{let l=KC(t,a,o,s,c,i);if(l){var u;n&&WC(l,e),r==null||r(l,{headers:LC((u=t.xhr.__sentry_xhr_v3__)==null?void 0:u.request_headers)})}})}function HC(e,{shouldCreateSpanForRequest:t,tracePropagationTargets:n}){return{shouldCreateSpan:typeof t==`function`?t:()=>!0,shouldAttachHeadersWithTargets:e=>GC(e,n),spans:{},propagateTraceparent:e.getOptions().propagateTraceparent}}var UC=300;function WC(e,t){let n=F(e).attributes[xi];if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(R(t)){let t=e.end.bind(e);e.end=e=>{let n=e??A(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,UC)}}let i=f_(`resource`,({entries:t})=>{t.forEach(t=>{IC(t)&&t.name.endsWith(n)&&(e.setAttributes(U_(t)),r())})})}function GC(e,t){let n=_0();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?of(r.toString(),t)||a&&of(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?of(e,t):n}}function KC(e,t,n,r,i,a){var o;let s=e.xhr,c=s==null?void 0:s[dv];if(!s||s.__sentry_own_request__||!c)return;let{url:l,method:u}=c,d=$a()&&t(l);if(e.endTimestamp){let t=s.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(d&&c.status_code!==void 0&&(Vi(n,c.status_code),n.end(),a==null||a(n,{headers:LC(yv(s)),error:e.error})),delete r[t]);return}let f=FC(l),p=Ld(f||l),m=f?zd(f):void 0,h=zd(Rd(l)),g=N(),_=!!I(),v=_||!!g&&R(g),y=p==null||(o=p.host)==null?void 0:o.replace(/^.*@/,``),b=Id(f||l),x=b?`${u} ${b}`:u,S=d&&v?_c({name:g&&R(g)?x:`${u} ${h}`,attributes:{type:`xhr`,[ir]:u,[xi]:Dd(m),[oi]:y,[yi]:b,[P]:`auto.http.browser`,[Wr]:cl,[Vr]:`client`,[Si]:y?(p==null?void 0:p.path)||`/`:void 0,[wi]:y?p==null?void 0:p.protocol:void 0,[Ci]:Od(Pd(p==null?void 0:p.search)),[bi]:kd(Fd(p==null?void 0:p.hash))}}):new ho,C=dc(S)&&_?void 0:S;return d&&!v&&(g==null||g.recordDroppedEvent(`no_parent_span`,`span`)),s.__sentry_xhr_span_id__=S.spanContext().spanId,r[s.__sentry_xhr_span_id__]=S,n(l)&&qC(s,$a()&&v?C:void 0,i),g&&g.emit(`beforeOutgoingRequestSpan`,S,e),S}function qC(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=ef({span:t,propagateTraceparent:n});r&&JC(e,r,i,a)}function JC(e,t,n,r){var i;let a=(i=e.__sentry_xhr_v3__)==null?void 0:i.request_headers;if(!(a!=null&&a[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!(a!=null&&a.traceparent)&&e.setRequestHeader(`traceparent`,r),n){let t=a==null?void 0:a.baggage;t&&PC(t)||e.setRequestHeader(`baggage`,n)}}catch{}}var YC=`WebVitals`,XC=L((e={})=>{let{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,i=new Set(t);return{name:YC,setup(e){let t=R(e),a=n&&t&&P_(),o=r&&t,s=a||o;a&&(a_(),F_(e)),o&&o_();let c=!t&&!i.has(`cls`),l=!t&&!i.has(`lcp`),u=V1({trackCls:c,trackLcp:l,client:e}),d=new WeakSet;e.on(`afterStartPageLoadSpan`,e=>{d.add(e)}),e.on(`spanEnd`,e=>{d.delete(e)&&(u(),q1(e,{recordClsOnPageloadSpan:c,recordLcpOnPageloadSpan:l,spanStreamingEnabled:t}))}),t&&(i.has(`lcp`)||L0(e,s),i.has(`cls`)||z0(e,s)),i.has(`inp`)||V0(e,s)},afterAllSetup(){i.has(`inp`)||F1()}}});function ZC(){B.document?B.document.addEventListener(`visibilitychange`,()=>{let e=I();if(!e)return;let t=Ka(e);if(B.document.hidden&&t){let e=`cancelled`,{attributes:{[Wr]:n},status:r}=F(t);$&&y.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r===`ok`&&t.setStatus({code:2,message:e}),t.setAttribute(Ir,`document.hidden`),t.end()}}):$&&y.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var QC=`sentry_previous_trace`,$C=`sentry.previous_trace`;function ew(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?rw():void 0;e.on(`spanStart`,e=>{if(Ka(e)!==e)return;let t=j().getPropagationContext();i=tw(i,e,t),r&&nw(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=j(),n=t.getPropagationContext();a&&n.parentSpanId?a=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(iw(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=iw(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[Mi]:i.sampleRate})})}function tw(e,t,n){let r=F(t);function i(){try{var e;let t=Number(r.attributes[`sentry.sample_rate`]??((e=n.dsc)==null?void 0:e.sample_rate));return Number.isNaN(t)?0:t}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&($&&y.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.attributes[Wr],...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Hr]:`previous_trace`}}),t.setAttribute($C,`${o.traceId}-${o.spanId}-${+!!iw(o)}`)),a)}function nw(e){try{B.sessionStorage.setItem(QC,JSON.stringify(e))}catch(e){$&&y.warn(`Could not store previous trace in sessionStorage`,e)}}function rw(){try{var e;let t=(e=B.sessionStorage)==null?void 0:e.getItem(QC);return JSON.parse(t)}catch{return}}function iw(e){return e.traceFlags===1}var aw=L(((e={})=>{let{storage:t=`in-memory`,consistentTraceSampling:n=!1}=e;return{name:`LinkedTraces`,setup(e){o0()||ew(e,{linkPreviousTrace:t,consistentTraceSampling:n})}}})),ow=`FetchTracing`,sw=L(((e={})=>({name:ow,setup(t){o0()||BC(t,{...e,tracePropagationTargets:t.getOptions().tracePropagationTargets})}}))),cw=`XhrTracing`,lw=L(((e={})=>({name:cw,setup(t){o0()||VC(t,{...e,tracePropagationTargets:t.getOptions().tracePropagationTargets})}}))),uw=`BrowserTracing`,dw={...vc,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,detectRedirects:!0,enableReportPageLoaded:!1},fw={enableInp:!0,enableLongTask:!0,enableLongAnimationFrame:!0,traceFetch:!0,traceXHR:!0,linkPreviousTrace:`in-memory`},pw=L(((e={})=>{`enableElementTiming`in e&&u(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let{enableInp:t,webVitals:n,enableLongTask:r,enableLongAnimationFrame:i,ignoreResourceSpans:a,traceFetch:o,traceXHR:s,shouldCreateSpanForRequest:c,enableHTTPTimings:l,onRequestSpanStart:d,onRequestSpanEnd:f,linkPreviousTrace:p,consistentTraceSampling:m}={...fw,...e};return hw(e,e=>{if(!e.addIntegration)return;let u=(n==null?void 0:n.ignore)??[];e.addIntegration(XC({...n,ignore:t||u.includes(`inp`)?u:[...u,`inp`]})),(r||i)&&e.addIntegration(m0({enableLongTask:r,enableLongAnimationFrame:i})),e.addIntegration(g0({ignoreResourceSpans:a}));let h={shouldCreateSpanForRequest:c,enableHTTPTimings:l,onRequestSpanStart:d,onRequestSpanEnd:f};o&&e.addIntegration(sw(h)),s&&e.addIntegration(lw(h)),p!==`off`&&e.addIntegration(aw({storage:p,consistentTraceSampling:m}))})})),mw=L(((e={})=>hw(e)));function hw(e,t){let n=B.document,{beforeStartSpan:r,idleTimeout:i,finalTimeout:a,childSpanTimeout:o,markBackgroundSpan:s,instrumentPageLoad:c,instrumentNavigation:l,instrumentBfcacheRestore:u,detectRedirects:d,enableReportPageLoaded:f}={...dw,...e},p=o0(),m,h;function g(e,t,s=!0,c){let l=t.op===`pageload`,u=t.name,d=r?r(t):t,p=Md(c||_0()),m={[Si]:p==null?void 0:p.pathname,...p&&!jd(p)&&{"url.full":Dd(p.href)},...d.attributes};if(u!==d.name&&(m[ti]=`custom`),d.attributes=m,!s){let e=Ct();_c({...d,startTime:e}).end(e);return}let g=Cc(d,{idleTimeout:i,finalTimeout:a,childSpanTimeout:o,disableAutoFinish:l,trimIdleSpanEndTimestamp:!f});l&&f&&(h=g),Sw(e,g);function _(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,g),n.removeEventListener(`readystatechange`,_))}l&&!f&&n&&(n.addEventListener(`readystatechange`,_),_())}return{name:uw,setup(e){var t;if(p){$&&y.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Qa(),d&&n){let e=()=>{m=A()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function r(){let t=xw(e);t&&!F(t).end_timestamp&&($&&y.log(`[Tracing] Finishing current active span with op: ${F(t).attributes[`sentry.op`]}`),t.setAttribute(zr,`cancelled`),t.end())}e.on(`beforeIdleSpanEnd`,t=>{if(xw(e)!==t)return;X_(t,{spanStreamingEnabled:R(e)}),Sw(e,void 0);let n=j(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:t.spanContext().traceId,sampled:La(t),dsc:xo(t)}),h===t&&(h=void 0)}),e.on(`startNavigationSpan`,(t,n)=>{if(N()!==e)return;if(n!=null&&n.isRedirect){$&&y.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),g(e,{op:Bc,...t},!1,n.url);return}m=void 0,r();let i=j();i.setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:$a()?void 0:Lt()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),g(e,{op:zc,...t,parentSpan:null},!0,n==null?void 0:n.url)}),e.on(`startPageLoadSpan`,(t,n={})=>{if(N()!==e)return;r();let i=ha(n.sentryTrace||vw(`sentry-trace`)||yw(`sentry-trace`),n.baggage||vw(`baggage`)||yw(`baggage`)),a=j();a.setPropagationContext(i),$a()||(a.getPropagationContext().propagationSpanId=Lt());let o=kv(e);a.setSDKProcessingMetadata({normalizedRequest:{...o,url:Dd(o.url,e)}}),g(e,{op:Rc,...t})}),e.on(`endPageloadSpan`,()=>{f&&h&&(h.setAttribute(zr,`reportPageLoaded`),h.end())}),(t=B.addEventListener)==null||t.call(B,`pagehide`,()=>{let t=xw(e);t&&!F(t).end_timestamp&&(t.setAttribute(`sentry.idle_span_finish_reason`,`documentHidden`),t.end()),e.flush()})},afterAllSetup(e){if(p)return;mc(e),t==null||t(e);let n=_0();if(B.location){var r;c&&gw(e,{name:R(e)?ul:B.location.pathname,attributes:{[ti]:`url`,[P]:`auto.pageload.browser`}}),l&&iv(({to:t,from:r})=>{if(r===void 0&&n!==void 0&&n.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Md(t),a=xw(e),o=a&&d&&ww(a,m);_w(e,{name:R(e)?dl:(i==null?void 0:i.pathname)||B.location.pathname,attributes:{[ti]:`url`,[P]:`auto.navigation.browser`}},{url:t,isRedirect:o})}),u&&((r=B.addEventListener)==null||r.call(B,`pageshow`,t=>{var r,i;t.persisted&&(n=void 0,_w(e,{name:R(e)?`Navigation`:((r=B.location)==null?void 0:r.pathname)||`/`,attributes:{"sentry.segment.name.source":`url`,"sentry.origin":`auto.navigation.browser.bfcache`,"browser.navigation.type":`back-forward-cache`}},{url:(i=B.location)==null?void 0:i.href}))}))}s&&ZC()}}}function gw(e,t,n){var r;let i=t.name===ul;j().setTransactionName(i?(r=B.location)==null?void 0:r.pathname:t.name);let a=At(),o={...t,startTime:t.startTime??(a?a/1e3:void 0)};e.emit(`startPageLoadSpan`,o,n);let s=xw(e);return s&&e.emit(`afterStartPageLoadSpan`,s),s}function _w(e,t,n){var r,i;let{url:a,isRedirect:o}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:o,url:a}),e.emit(`startNavigationSpan`,t,{isRedirect:o,url:a});let s=j(),c=t.name===dl;return s.setTransactionName(c?a&&((r=Md(a))==null?void 0:r.pathname)||((i=B.location)==null?void 0:i.pathname):t.name),a&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...kv(e),url:Dd(a,e)}}),xw(e)}function vw(e){var t;return((t=B.document)==null||(t=t.querySelector(`meta[name=${e}]`))==null?void 0:t.getAttribute(`content`))||void 0}function yw(e){var t,n;return(t=B.performance)==null||(n=t.getEntriesByType)==null||(n=n.call(t,`navigation`)[0])==null||(n=n.serverTiming)==null||(n=n.find(t=>t.name===e))==null?void 0:n.description}var bw=`_sentry_idleSpan`;function xw(e){return e[bw]}function Sw(e,t){ke(e,bw,t)}var Cw=1.5;function ww(e,t){let n=F(e),r=Ct();return!(r-n.start_timestamp>Cw||t&&r-t<=Cw)}function Tw(e=N()){e==null||e.emit(`endPageloadSpan`)}function Ew(e){let t=I();if(t===e)return;let n=j();e.end=new Proxy(e.end,{apply(e,r,i){return xa(n,t),Reflect.apply(e,r,i)}}),xa(n,e)}var Dw=new WeakMap,Ow=new WeakMap,kw=9e4,Aw=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],jw=L(()=>({name:`FetchStreamPerformance`,setup(e){mh(e=>{if(e.response){let t=Dw.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=Ow.get(e.response);n&&clearTimeout(n)}}}),ph(t=>{if(t.endTimestamp&&t.response){var n,r,i,a,o;let s=((n=t.response.headers)==null?void 0:n.get(`content-type`))||``;if((r=t.response.headers)!=null&&r.get(`content-length`)||!Aw.some(e=>s.startsWith(e)))return;let c=((i=t.fetchData)==null?void 0:i.url)||``,l=((a=t.fetchData)==null?void 0:a.method)||`GET`,u=Md(c),d=c.startsWith(`data:`)?zd(c):u?Nd(u):c,f=Id(c,(o=B.location)==null?void 0:o.href),p=f?`${l} ${f}`:l,m=_c({name:R(e)?p:`${l} ${d}`,startTime:t.endTimestamp,attributes:{[xi]:Dd(zd(c)),[yi]:f,[ir]:l,type:`fetch`,[Wr]:ll,[P]:`auto.http.browser.stream`}});Dw.set(t.response,m);let h=setTimeout(()=>{m.isRecording()&&m.end()},kw);Ow.set(t.response,h)}})}})),Mw=`BfcacheMetrics`,Nw=L((e={})=>{let t=Lw(e.maxReasons);return{name:Mw,setupOnce(){var e;if(!B.addEventListener||!((e=B.performance)!=null&&e.getEntriesByType)){$&&y.log(`[${Mw}] Browser APIs unavailable, skipping instrumentation.`);return}function n(e){let n=Iw();if(e.persisted){Pw(`hit`,0,n);return}let r=B.performance.getEntriesByType(`navigation`)[0];if((r==null?void 0:r.type)!==`back_forward`)return;let i=Rw(r.notRestoredReasons,t);Pw(`miss`,i.length,n),typeof r.duration==`number`&&r.duration>0&&Mp.distribution(e0,r.duration,{unit:`millisecond`,attributes:Bw({[ei]:n})}),i.forEach(e=>Fw(e,n))}B.addEventListener(`pageshow`,n,!0)}}});function Pw(e,t,n){Mp.count(Q1,1,{attributes:Bw({[_n]:e,[gn]:t||void 0,[ei]:n})})}function Fw({reason:e,frame:t},n){Mp.count($1,1,{attributes:Bw({[vn]:e,[hn]:t,[ei]:n})})}function Iw(){var e;return S0()||j().getScopeData().transactionName||((e=B.location)==null?void 0:e.pathname)}function Lw(e){return e==null?1/0:e<1?($&&y.warn(`[${Mw}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1):e}function Rw(e,t){let n=[];return!e||t<=0||zw(e,`top`,n,t),n}function zw(e,t,n,r){var i,a;n.length>=r||((i=e.reasons)==null||i.forEach(e=>{if(n.length>=r)return;let i=typeof e==`string`?e:e.reason;i&&n.push({reason:i,frame:t})}),(a=e.children)==null||a.forEach(e=>{zw(e,`child`,n,r)}))}function Bw(e){return e[P]=`auto.browser.bfcache`,e}function Vw(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Hw(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Vw(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function Uw(e){return Vw(e.getAllKeys())}function Ww(e,t,n){return e(e=>Uw(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),Vw(e.transaction)}))}function Gw(e,t,n){return e(e=>Uw(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),Vw(e.transaction)}))}function Kw(e){return e(e=>Uw(e).then(t=>{let n=t[0];if(n!=null)return Vw(e.get(n)).then(t=>(e.delete(n),Vw(e.transaction).then(()=>t)))}))}function qw(e){let t;function n(){return t??=Hw(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=ts(t);await Ww(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=ts(t);await Gw(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await Kw(n());if(e)return rs(e)}catch{}}}}function Jw(e){return t=>{let n=e({...t,createStore:qw});return B.addEventListener(`online`,async e=>{await n.flush()}),n}}function Yw(e=E9){return Jw(dd(e))}var Xw=`window`in n&&n.window===n&&typeof importScripts>`u`,Zw=`0`,Qw=Xw?`main`:`worker`;function $w(e,t,n){var r;if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let i=tT(e),a=t.getOptions(),o=(r=t.getSdkMetadata)==null||(r=r.call(t))==null?void 0:r.sdk;return{chunk_id:ut(),client_sdk:{name:(o==null?void 0:o.name)??`sentry.javascript.browser`,version:(o==null?void 0:o.version)??`0.0.0`},profiler_id:n||ut(),platform:`javascript`,version:`2`,release:a.release??``,environment:a.environment??`production`,debug_meta:{images:nT(e.resources)},profile:i}}function eT(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);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`};let 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(e){return{reason:`unknown validation error: ${e}`}}}function tT(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=e.stacks.length,i=[];for(let t=0;t<e.samples.length;t++){let a=e.samples[t];if(!a)continue;let o=a.stackId??r;o===r&&(n[r]??(n[r]=[]));let s=kt(a.timestamp);i[t]={stack_id:o,thread_id:Zw,timestamp:s}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Zw]:{name:Qw}}}}function nT(e){var t;let n=(t=N())==null||(t=t.getOptions())==null?void 0:t.stackParser;return n?Bl(n,e):[]}function rT(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?($&&y.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?($&&y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}var iT=!1,aT=3e4;function oT(e){return typeof e==`function`}function sT(){let e=B.Profiler;if(!oT(e)){$&&y.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(aT/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{$&&(y.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),y.log(`[Profiling] Disabling profiling for current user session.`)),iT=!0}}function cT(e){if(iT)return $&&y.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 $&&y.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return rT(t)?t?Math.random()<=t:($&&y.log(`[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0`),!1):($&&y.warn(`[Profiling] Discarding profile because of invalid profileSessionSampleRate.`),!1)}function lT(e){e.setAttribute(li,Zw),e.setAttribute(ui,Qw)}var uT=6e4,dT=3e5,fT=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){let t=e.getOptions().profileLifecycle,n=cT(e.getOptions());$&&y.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||$&&y.log(`[Profiling] Session not sampled. Skipping lifecycle profiler initialization.`),this._profilerId=ut(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&lT(e)})}start(){this._lifecycleMode===`trace`?$&&y.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.'):this._isRunning?$&&y.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op."):this._sessionSampled?this._beginProfiling():$&&y.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.")}stop(){this._lifecycleMode===`trace`?$&&y.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.'):this._isRunning?this._endProfiling():$&&y.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.")}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled||!e.isRecording())return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&($&&y.log(`[Profiling] Detected already active root span during setup. Active root spans now:`,n),this._beginProfiling()),this._isRunning&&lT(e)}_beginProfiling(){this._isRunning||(this._isRunning=!0,$&&y.log(`[Profiling] Started profiling with profiler ID:`,this._profilerId),un().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),this._profiler?this._startPeriodicChunking():($&&y.log(`[Profiling] Failed to start JS Profiler; stopping.`),this._resetProfilerInfo()))}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{$&&y.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode===`manual`&&un().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled){$&&y.log(`[Profiling] Span not profiled because of negative sampling decision for user session.`);return}if(e!==Ka(e))return;if(!e.isRecording()){$&&y.log(`[Profiling] Discarding profile because root span was not sampled.`);return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&($&&y.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on(`spanEnd`,e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;$&&y.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),n===0&&(this._collectCurrentChunk().catch(e=>{$&&y.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,un().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),dT);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){var e;if(((e=this._profiler)==null?void 0:e.stopped)===!1)return;let t=sT();t?this._profiler=t:$&&y.log(`[Profiling] Failed to start JS Profiler.`)}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{$&&y.error(`[Profiling] Failed to collect current profile chunk during periodic chunking:`,e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},uT))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&($&&y.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(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=$w(await e.stop(),this._client,this._profilerId),n=eT(t);if(`reason`in n){$&&y.log(`[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):`,n.reason);return}this._sendProfileChunk(t),$&&y.log(`[Profiling] Collected browser profile chunk.`)}catch(e){$&&y.log(`[Profiling] Error while stopping JS Profiler for chunk:`,e)}}_sendProfileChunk(e){var t;let n=this._client,r=cs((t=n.getSdkMetadata)==null?void 0:t.call(n)),i=n.getDsn(),a=n.getOptions().tunnel,o=Yo({event_id:ut(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&i&&{dsn:aa(i)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);n.sendEnvelope(o).then(null,e=>{$&&y.error(`Error while sending profile chunk envelope:`,e)})}},pT=`BrowserProfiling`,mT=L((()=>({name:pT,setup(e){let t=e.getOptions(),n=new fT;t.profileLifecycle||=`manual`;let r=I(),i=r&&Ka(r),a=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),a===`manual`)n.initialize(e);else if(a===`trace`){if(!$a(t)){$&&y.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),B.setTimeout(()=>{let e=I(),t=e&&Ka(e);t&&n.notifyRootSpanActive(t)},0)}}}))),hT=`SpotlightBrowser`,gT=[{op:tl,name:`#sentry-spotlight`},{op:tl,attributes:{[An]:`#sentry-spotlight`}}],_T=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:hT,setup:()=>{$&&y.log(`Using Sidecar URL`,t)},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...gT]},afterAllSetup:e=>{vT(e,t)}}});function vT(e,t){let n=cv(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{r>3?$&&y.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r):n(t,{method:`POST`,body:ts(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,$&&y.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var yT=L(_T),bT=L(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return Gm(e)}}));function xT(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{Km(e,t.value),Jm(e,t.value)}}}var ST=L(()=>({name:`OpenFeature`,processEvent(e,t,n){return Gm(e)}})),CT=class{after(e,t){Km(t.flagKey,t.value),Jm(t.flagKey,t.value)}error(e,t,n){Km(e.flagKey,e.defaultValue),Jm(e.flagKey,e.defaultValue)}},wT=L(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){Oe(e.prototype,`isEnabled`,TT)},processEvent(e,t,n){return Gm(e)}}));function TT(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`?(Km(n,r),Jm(n,r)):$&&y.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var ET=(({growthbookClass:e})=>Xm({growthbookClass:e})),DT=L(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>{Km(e.gate.name,e.gate.value),Jm(e.gate.name,e.gate.value)})},processEvent(e,t,n){return Gm(e)}}));async function OT(){let e=N();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let 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 Zs(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var kT=`WebWorker`,AT=20,jT=L(({worker:e})=>({name:kT,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>MT(e))},addWorker:e=>MT(e)}));function MT(e){let t=[];e.addEventListener(`error`,({message:e,filename:n,lineno:r,colno:i})=>{let a=t.findIndex(t=>t.message===e&&t.url===n&&t.lineno===r&&t.colno===i);a!==-1&&(t.splice(0,a+1),Tv({msg:e,url:n,line:r,column:i}))}),e.addEventListener(`message`,e=>{if(LT(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&($&&y.log(`Sentry debugId web worker message received`,e.data),B._sentryDebugIds={...e.data._sentryDebugIds,...B._sentryDebugIds}),e.data._sentryModuleMetadata&&($&&y.log(`Sentry module metadata web worker message received`,e.data),B._sentryModuleMetadata={...e.data._sentryModuleMetadata,...B._sentryModuleMetadata}),e.data._sentryWasmImages){$&&y.log(`Sentry WASM images web worker message received`,e.data);let t=B._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>k(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));B._sentryWasmImages=[...t,...n]}if(e.data._sentryWorkerError){$&&y.log(`Sentry worker error message received`,e.data._sentryWorkerError);let{kind:n,message:r,url:i,lineno:a,colno:o}=e.data._sentryWorkerError;n===`error`&&t.push({message:r,url:i,lineno:a,colno:o})>AT&&t.shift(),NT(e.data._sentryWorkerError)}}})}function NT(e){let{reason:t,kind:n,name:r,filename:i,url:a,lineno:o,colno:s,plainError:c}=e,l=n!==`error`,u=c&&k(t)?IT(t):t;r&&D(u)&&u.name!==r&&ke(u,`name`,r);let d=N();if(!d)return;let{stackParser:f,attachStacktrace:p}=d.getOptions(),m=l&&O(u)?kS(u):p9(f,u,void 0,p,l);l||AS(m,a||i,o,s),m.level=`error`,i&&(m.contexts={...m.contexts,worker:{filename:i}}),nu(m,{originalException:u,mechanism:{handled:!1,type:l?`auto.browser.web_worker.onunhandledrejection`:`auto.browser.web_worker.onerror`}}),$&&y.log(`Captured worker ${l?`unhandled rejection`:`error`}`,u)}function PT({self:e}){Error.stackTraceLimit=50,e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0});let t=t=>{var n;let{reason:r}=t;$&&y.log(`[Sentry Worker] Forwarding ${t.kind} to parent`,t),FT(e,{...t,filename:(n=e.location)==null?void 0:n.href,name:D(r)?l9(r):void 0})};e.addEventListener(`error`,e=>{let{error:n,message:r,filename:i,lineno:a,colno:o}=e;t({kind:`error`,reason:n??r,message:r,url:i,lineno:a,colno:o})}),e.addEventListener(`unhandledrejection`,e=>{t({kind:`unhandledrejection`,reason:OS(e)})}),$&&y.log(`[Sentry Worker] Registered worker with error and unhandled rejection handling`)}function FT(e,t){try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:t});return}catch{}let{reason:n}=t,r=D(n),i=r?{message:u9(n),stack:n.stack}:Ke(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:i,plainError:r}})}catch{}}function IT(e){let t=Error(String(e.message));return t.stack=typeof e.stack==`string`?e.stack:void 0,t}function LT(e){if(!k(e)||e._sentryMessage!==!0)return!1;let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(k(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(k(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!k(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>k(e)&&typeof e.code_file==`string`)))}export{x9 as BrowserClient,fd as MULTIPLEXED_TRANSPORT_EXTRA_KEY,CT as OpenFeatureIntegrationHook,r as SDK_VERSION,Ni as SEMANTIC_ATTRIBUTE_SENTRY_OP,Pi as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,ji as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,zt as Scope,B as WINDOW,cf as addBreadcrumb,_u as addEventProcessor,fo as addIntegration,Nw as bfcacheMetricsIntegration,Ac as bindScopeToEmitter,rS as breadcrumbsIntegration,pS as browserApiErrorsIntegration,mT as browserProfilingIntegration,bS as browserSessionIntegration,mw as browserTracingCoreIntegration,pw as browserTracingIntegration,xT as buildLaunchDarklyFlagUsedHandler,qf as captureConsoleIntegration,nu as captureEvent,eu as captureException,wh as captureFeedback,tu as captureMessage,xu as captureSession,B9 as chromeStackLineParser,mu as close,Vm as consoleIntegration,Zh as consoleLoggingIntegration,vC as contextLinesIntegration,Ys as continueTrace,w0 as createCachedRouteProvider,$h as createConsolaReporter,Iu as createTransport,C0 as createUrlRouteProvider,$9 as createUserFeedbackEnvelope,SS as cultureContextIntegration,Xf as dedupeIntegration,RC as defaultRequestInstrumentationOptions,X9 as defaultStackLineParsers,Z9 as defaultStackParser,OT as diagnoseSdkConnectivity,i0 as elementTimingIntegration,yu as endSession,mf as eventFiltersIntegration,d9 as eventFromException,f9 as eventFromMessage,t9 as exceptionFromError,Bp as experimentalReportSdkConfigIntegration,ip as extraErrorDataIntegration,Ym as featureFlagsIntegration,$7 as feedbackAsyncIntegration,e9 as feedbackIntegration,e9 as feedbackSyncIntegration,jw as fetchStreamPerformanceIntegration,sw as fetchTracingIntegration,pu as flush,KS as forceLoad,df as functionToStringIntegration,U9 as geckoStackLineParser,xv as getAbsoluteUrl,I as getActiveSpan,N as getClient,j as getCurrentScope,WS as getDefaultIntegrations,ky as getFeedback,un as getGlobalScope,M as getIsolationScope,u7 as getReplay,Ka as getRootSpan,b0 as getRouteProvider,Ga as getSpanDescendants,Bi as getSpanStatusFromHttpCode,ef as getTraceData,TS as globalHandlersIntegration,MC as graphqlClientIntegration,ET as growthbookIntegration,tC as httpClientIntegration,PS as httpContextIntegration,GS as init,zC as instrumentOutgoingRequests,xm as instrumentSupabaseClient,l0 as interactionsIntegration,o0 as isBotUserAgent,gu as isEnabled,hu as isInitialized,fu as lastEventId,bT as launchDarklyIntegration,Pv as lazyLoadIntegration,RS as linkedErrorsIntegration,aw as linkedTracesIntegration,Wh as logger,m0 as longTasksIntegration,Yw as makeBrowserOfflineTransport,E9 as makeFetchTransport,gd as makeMultiplexedTransport,Mp as metrics,zf as moduleMetadataIntegration,BS as normalizeStringifyValue,qS as onLoad,ST as openFeatureIntegration,q9 as opera10StackLineParser,Y9 as opera11StackLineParser,Gd as parameterize,Qa as registerSpanErrorInstrumentation,PT as registerWebWorker,Q7 as replayCanvasIntegration,o7 as replayIntegration,Tw as reportPageLoaded,$S as reportingObserverIntegration,S0 as resolveCurrentRoute,x0 as resolveRoute,g0 as resourcesIntegration,rm as rewriteFramesIntegration,fy as sendFeedback,Ew as setActiveSpanInBrowser,lu as setAttribute,cu as setAttributes,ru as setContext,du as setConversationId,cd as setCurrentClient,au as setExtra,iu as setExtras,Vi as setHttpStatus,Is as setMeasurement,y0 as setRouteProvider,su as setTag,ou as setTags,uu as setUser,JS as showReportDialog,Ts as spanStreamingIntegration,So as spanToBaggageHeader,F as spanToJSON,Ma as spanToStaticSpanJSON,Ta as spanToTraceHeader,yT as spotlightBrowserIntegration,_w as startBrowserTracingNavigationSpan,gw as startBrowserTracingPageLoadSpan,_c as startInactiveSpan,$s as startNewTrace,vu as startSession,hc as startSpan,gc as startSpanManual,DT as statsigIntegration,wm as supabaseIntegration,Zs as suppressTracing,Nm as thirdPartyErrorFilterIntegration,k9 as uiProfiler,wT as unleashIntegration,Ya as updateSpanName,D0 as userTimingIntegration,NC as viewHierarchyIntegration,XC as webVitalsIntegration,jT as webWorkerIntegration,G9 as winjsStackLineParser,Xs as withActiveSpan,fn as withIsolationScope,dn as withScope,Fo as withStaticSpan,Io as withStreamedSpan,lw as xhrTracingIntegration,Mm as zodErrorsIntegration};