@wix/cli-app 1.1.55 → 1.1.56
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.
- package/build/CreateVersionCommand-LU6LUBNT.js +269 -0
- package/build/{CreateVersionCommand-XTZT5DED.js.map → CreateVersionCommand-LU6LUBNT.js.map} +1 -1
- package/build/DevCommand-G2BIT4FY.js +1168 -0
- package/build/{DevCommand-Q5XLAGMG.js.map → DevCommand-G2BIT4FY.js.map} +1 -1
- package/build/GenerateCommand-XKWJ2FEG.js +12392 -0
- package/build/GenerateCommand-XKWJ2FEG.js.map +1 -0
- package/build/LogsCommand-HYGDI5KW.js +284 -0
- package/build/{LogsCommand-XJHE75L2.js.map → LogsCommand-HYGDI5KW.js.map} +1 -1
- package/build/PreviewCommand-6EMIKGQN.js +23 -0
- package/build/ServeCommand-YJ5RHQZ4.js +165 -0
- package/build/{ServeCommand-CPZOI7DC.js.map → ServeCommand-YJ5RHQZ4.js.map} +1 -1
- package/build/build-EC7LZLAY.js +3596 -0
- package/build/{build-D3GVJS75.js.map → build-EC7LZLAY.js.map} +1 -1
- package/build/build-Q5P6MZLW.js +97 -0
- package/build/{build-3RXHADZD.js.map → build-Q5P6MZLW.js.map} +1 -1
- package/build/chunk-3KMSVIRS.js +1323 -0
- package/build/{chunk-LJEYXY4V.js.map → chunk-3KMSVIRS.js.map} +1 -1
- package/build/chunk-FH6U3Y37.js +19 -0
- package/build/chunk-FH6U3Y37.js.map +1 -0
- package/build/chunk-GIUEJUXG.js +151 -0
- package/build/{chunk-6HSUK2A2.js.map → chunk-GIUEJUXG.js.map} +1 -1
- package/build/chunk-IJVKSYIY.js +222 -0
- package/build/chunk-IJVKSYIY.js.map +1 -0
- package/build/chunk-IMNXLCE5.js +51 -0
- package/build/{chunk-HDXLQ34N.js.map → chunk-IMNXLCE5.js.map} +1 -1
- package/build/chunk-IWDISZ2R.js +96 -0
- package/build/{chunk-K2A77MMN.js.map → chunk-IWDISZ2R.js.map} +1 -1
- package/build/chunk-JKI4MP27.js +32 -0
- package/build/{chunk-QOUZ6J7N.js.map → chunk-JKI4MP27.js.map} +1 -1
- package/build/chunk-JOVPQ7BW.js +183 -0
- package/build/{chunk-X4BLMM2K.js.map → chunk-JOVPQ7BW.js.map} +1 -1
- package/build/chunk-KCMEJP7H.js +897 -0
- package/build/{chunk-7VOKCPZP.js.map → chunk-KCMEJP7H.js.map} +1 -1
- package/build/chunk-NDFUPX6I.js +635 -0
- package/build/{chunk-GWU77DPO.js.map → chunk-NDFUPX6I.js.map} +1 -1
- package/build/chunk-NUUM6HPA.js +195 -0
- package/build/{chunk-C4SXZWXS.js.map → chunk-NUUM6HPA.js.map} +1 -1
- package/build/chunk-PYIAC2GK.js +66 -0
- package/build/{chunk-V4TR6DCM.js.map → chunk-PYIAC2GK.js.map} +1 -1
- package/build/chunk-QICLTOEP.js +46 -0
- package/build/{chunk-4BHNJVL2.js.map → chunk-QICLTOEP.js.map} +1 -1
- package/build/chunk-QLZPVGJV.js +29 -0
- package/build/{chunk-KG7BHEJG.js.map → chunk-QLZPVGJV.js.map} +1 -1
- package/build/chunk-QZOQAFHK.js +2197 -0
- package/build/chunk-QZOQAFHK.js.map +1 -0
- package/build/chunk-SP37PQ3I.js +38035 -0
- package/build/{chunk-N5D4TFKX.js.map → chunk-SP37PQ3I.js.map} +1 -1
- package/build/chunk-TSFNDZPX.js +39101 -0
- package/build/chunk-TSFNDZPX.js.map +1 -0
- package/build/chunk-TTW4MEC3.js +104 -0
- package/build/{chunk-FKBCPMYK.js.map → chunk-TTW4MEC3.js.map} +1 -1
- package/build/chunk-U4QPSXJP.js +45 -0
- package/build/{chunk-B4SDDVMV.js.map → chunk-U4QPSXJP.js.map} +1 -1
- package/build/chunk-WG365AHZ.js +23 -0
- package/build/{chunk-2FB5F5QF.js.map → chunk-WG365AHZ.js.map} +1 -1
- package/build/chunk-XU5JBKO6.js +29230 -0
- package/build/chunk-XU5JBKO6.js.map +1 -0
- package/build/cloudflare-runtime/entry.js +1 -1
- package/build/cloudflare-runtime/getRegisteredExtensions.js +1 -1
- package/build/devtools-YPSDP32D.js +3702 -0
- package/build/{devtools-4JFNYU2B.js.map → devtools-YPSDP32D.js.map} +1 -1
- package/build/esm-YQVNLOAI.js +22083 -0
- package/build/{esm-HBMYQBEO.js.map → esm-YQVNLOAI.js.map} +1 -1
- package/build/index.js +3252 -21
- package/build/index.js.map +1 -1
- package/build/platform-sdk/chunk-DGX4CFXG.js +2 -0
- package/build/platform-sdk/chunk-DGX4CFXG.js.map +1 -0
- package/build/platform-sdk/chunk-TN6HYRXL.js +2 -0
- package/build/platform-sdk/chunk-TN6HYRXL.js.map +1 -0
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/dashboard.js.map +1 -1
- package/build/platform-sdk/editor.js +5 -5
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/preview-HPJCC5SU.js +138 -0
- package/build/{preview-TM7JAWFS.js.map → preview-HPJCC5SU.js.map} +1 -1
- package/build/render-command-BJTVLIM5.js +117 -0
- package/build/{render-command-QEQ3L7OX.js.map → render-command-BJTVLIM5.js.map} +1 -1
- package/build/types.impl-CD4WWRUK.js +10 -0
- package/package.json +10 -5
- package/templates/custom-element/dependencies.json +1 -1
- package/templates/dashboard-modal/dependencies.json +1 -1
- package/templates/site-plugin/dependencies.json +1 -1
- package/build/CreateVersionCommand-XTZT5DED.js +0 -4
- package/build/DevCommand-Q5XLAGMG.js +0 -4
- package/build/GenerateCommand-HNFICZJA.js +0 -128
- package/build/GenerateCommand-HNFICZJA.js.map +0 -1
- package/build/LogsCommand-XJHE75L2.js +0 -4
- package/build/PreviewCommand-JKPFMGWV.js +0 -4
- package/build/ServeCommand-CPZOI7DC.js +0 -4
- package/build/build-3RXHADZD.js +0 -4
- package/build/build-D3GVJS75.js +0 -5
- package/build/chunk-2FB5F5QF.js +0 -4
- package/build/chunk-4BHNJVL2.js +0 -4
- package/build/chunk-5OZZ7R6I.js +0 -11
- package/build/chunk-5OZZ7R6I.js.map +0 -1
- package/build/chunk-6HSUK2A2.js +0 -4
- package/build/chunk-7VOKCPZP.js +0 -5
- package/build/chunk-B4SDDVMV.js +0 -4
- package/build/chunk-C4SXZWXS.js +0 -4
- package/build/chunk-FKBCPMYK.js +0 -11
- package/build/chunk-FMIXY6J5.js +0 -115
- package/build/chunk-FMIXY6J5.js.map +0 -1
- package/build/chunk-GWU77DPO.js +0 -4
- package/build/chunk-HDXLQ34N.js +0 -4
- package/build/chunk-JXE3LQ2S.js +0 -100
- package/build/chunk-JXE3LQ2S.js.map +0 -1
- package/build/chunk-K2A77MMN.js +0 -4
- package/build/chunk-KG7BHEJG.js +0 -4
- package/build/chunk-LJEYXY4V.js +0 -4
- package/build/chunk-N5D4TFKX.js +0 -280
- package/build/chunk-PCBMS46R.js +0 -4
- package/build/chunk-PCBMS46R.js.map +0 -1
- package/build/chunk-QOUZ6J7N.js +0 -4
- package/build/chunk-V4TR6DCM.js +0 -4
- package/build/chunk-WJTPY35F.js +0 -9
- package/build/chunk-WJTPY35F.js.map +0 -1
- package/build/chunk-X4BLMM2K.js +0 -4
- package/build/devtools-4JFNYU2B.js +0 -10
- package/build/esm-HBMYQBEO.js +0 -466
- package/build/platform-sdk/chunk-GZP4Z76C.js +0 -2
- package/build/platform-sdk/chunk-GZP4Z76C.js.map +0 -1
- package/build/platform-sdk/chunk-KGLNBMRO.js +0 -2
- package/build/platform-sdk/chunk-KGLNBMRO.js.map +0 -1
- package/build/preview-TM7JAWFS.js +0 -4
- package/build/render-command-QEQ3L7OX.js +0 -4
- package/build/types.impl-L2DPGJ77.js +0 -4
- /package/build/{PreviewCommand-JKPFMGWV.js.map → PreviewCommand-6EMIKGQN.js.map} +0 -0
- /package/build/{types.impl-L2DPGJ77.js.map → types.impl-CD4WWRUK.js.map} +0 -0
package/build/esm-HBMYQBEO.js
DELETED
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{h as f}from"./chunk-V4TR6DCM.js";f();f();f();f();f();f();var ju=Object.prototype.toString;function Ye(e){switch(ju.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return it(e,Error)}}function er(e,t){return ju.call(e)===`[object ${t}]`}function ni(e){return er(e,"ErrorEvent")}function ri(e){return er(e,"DOMError")}function Ks(e){return er(e,"DOMException")}function Fe(e){return er(e,"String")}function tr(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function In(e){return e===null||tr(e)||typeof e!="object"&&typeof e!="function"}function ot(e){return er(e,"Object")}function xn(e){return typeof Event<"u"&&it(e,Event)}function Xs(e){return typeof Element<"u"&&it(e,Element)}function Js(e){return er(e,"RegExp")}function ft(e){return!!(e&&e.then&&typeof e.then=="function")}function Zs(e){return ot(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function it(e,t){try{return e instanceof t}catch{return!1}}function jr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}f();function Ve(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function qr(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n}function wn(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{jr(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function qu(e,t,n=!1){return Fe(e)?Js(t)?t.test(e):Fe(t)?n?e===t:e.includes(t):!1:!1}function pt(e,t=[],n=!1){return t.some(r=>qu(e,r,n))}function ea(e,t,n=250,r,o,i,s){if(!i.exception||!i.exception.values||!s||!it(s.originalException,Error))return;let a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Qm(Qs(e,t,o,s.originalException,r,i.exception.values,a,0),n))}function Qs(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(it(r[o],Error)){Yu(s,a);let u=e(t,r[o]),d=c.length;Vu(u,o,d,a),c=Qs(e,t,n,r[o],o,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(it(u,Error)){Yu(s,a);let l=e(t,u),p=c.length;Vu(l,`errors[${d}]`,p,a),c=Qs(e,t,n,u,o,[l,...c],l,p)}}),c}function Yu(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Vu(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Qm(e,t){return e.map(n=>(n.value&&(n.value=Ve(n.value,t)),n))}f();f();f();var Ue="8.20.0";var A=globalThis;function cn(e,t,n){let r=n||A,o=r.__SENTRY__=r.__SENTRY__||{},i=o[Ue]=o[Ue]||{};return i[e]||(i[e]=t())}var nr=A,eh=80;function Ke(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],i=0,s=0,a=" > ",c=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||eh;for(;n&&i++<r&&(u=th(n,d),!(u==="html"||i>1&&s+o.length*c+u.length>=l));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function th(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(nr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let o=t&&t.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o&&o.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Fe(s)){let a=s.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let i=["aria-label","type","name","title","alt"];for(let s of i){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function Cn(){try{return nr.document.location.href}catch{return""}}function ta(e){return nr.document&&nr.document.querySelector?nr.document.querySelector(e):null}function Yr(e){if(!nr.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}f();f();var mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();var nh="Sentry Logger ",kn=["debug","info","warn","error","log","assert","trace"],rr={};function Xe(e){if(!("console"in A))return e();let t=A.console,n={},r=Object.keys(rr);r.forEach(o=>{let i=rr[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function rh(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return mt?kn.forEach(n=>{t[n]=(...r)=>{e&&Xe(()=>{A.console[n](`${nh}[${n}]:`,...r)})}}):kn.forEach(n=>{t[n]=()=>{}}),t}var g=rh();var oh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ih(e){return e==="http"||e==="https"}function Je(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function oi(e){let t=oh.exec(e);if(!t){Xe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",i="",s="",a=""]=t.slice(1),c="",u=a,d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Ku({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function Ku(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function sh(e){if(!mt)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(g.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?ih(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vr(e){let t=typeof e=="string"?oi(e):Ku(e);if(!(!t||!sh(t)))return t}f();var Ne=class extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};f();f();function ce(e,t,n){if(!(t in e))return;let r=e[t],o=n(r);typeof o=="function"&&ii(o,r),e[t]=o}function _e(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{mt&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ii(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,_e(e,"__sentry_original__",t)}catch{}}function Rn(e){return e.__sentry_original__}function ra(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function si(e){if(Ye(e))return{message:e.message,name:e.name,stack:e.stack,...Ju(e)};if(xn(e)){let t={type:e.type,target:Xu(e.target),currentTarget:Xu(e.currentTarget),...Ju(e)};return typeof CustomEvent<"u"&&it(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Xu(e){try{return Xs(e)?Ke(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ju(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function oa(e,t=40){let n=Object.keys(si(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Ve(r,t);for(let o=n.length;o>0;o--){let i=n.slice(0,o).join(", ");if(!(i.length>t))return o===n.length?i:Ve(i,t)}return""}function J(e){return na(e,new Map)}function na(e,t){if(ah(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let o of Object.keys(e))typeof e[o]<"u"&&(r[o]=na(e[o],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(o=>{r.push(na(o,t))}),r}return e}function ah(e){if(!ot(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}f();f();var st="?",Zu=/\(error: (.*)\)/,Qu=/captureMessage|captureException/;function ci(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let i=[],s=n.split(`
|
|
4
|
-
`);for(let a=r;a<s.length;a++){let c=s[a];if(c.length>1024)continue;let u=Zu.test(c)?c.replace(Zu,"$1"):c;if(!u.match(/\S*Error: /)){for(let d of t){let l=d(u);if(l){i.push(l);break}}if(i.length>=50+o)break}}return el(i.slice(o))}}function sa(e){return Array.isArray(e)?ci(...e):e}function el(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ai(t).function||"")&&t.pop(),t.reverse(),Qu.test(ai(t).function||"")&&(t.pop(),Qu.test(ai(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||ai(t).filename,function:n.function||st}))}function ai(e){return e[e.length-1]||{}}var ia="<anonymous>";function Ze(e){try{return!e||typeof e!="function"?ia:e.name||ia}catch{return ia}}function or(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var ui={},tl={};function Be(e,t){ui[e]=ui[e]||[],ui[e].push(t)}function He(e,t){tl[e]||(t(),tl[e]=!0)}function we(e,t){let n=e&&ui[e];if(n)for(let r of n)try{r(t)}catch(o){mt&&g.error(`Error while triggering instrumentation handler.
|
|
5
|
-
Type: ${e}
|
|
6
|
-
Name: ${Ze(r)}
|
|
7
|
-
Error:`,o)}}function Kr(e){let t="console";Be(t,e),He(t,ch)}function ch(){"console"in A&&kn.forEach(function(e){e in A.console&&ce(A.console,e,function(t){return rr[e]=t,function(...n){we("console",{args:n,level:e});let o=rr[e];o&&o.apply(A.console,n)}})})}f();f();var li=A;function di(){if(!("fetch"in li))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Jr(){if(typeof EdgeRuntime=="string")return!0;if(!di())return!1;if(Xr(li.fetch))return!0;let e=!1,t=li.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){mt&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function aa(){return"ReportingObserver"in li}f();var nl=1e3;function Pt(){return Date.now()/nl}function uh(){let{performance:e}=A;if(!e||!e.now)return Pt;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/nl}var Y=uh(),Zr,Se=(()=>{let{performance:e}=A;if(!e||!e.now){Zr="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return i||u?o<=c?(Zr="timeOrigin",e.timeOrigin):(Zr="navigationStart",s):(Zr="dateNow",r)})();function An(e){let t="fetch";Be(t,e),He(t,lh)}function lh(){Jr()&&ce(A,"fetch",function(e){return function(...t){let{method:n,url:r}=dh(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Y()*1e3};we("fetch",{...o});let i=new Error().stack;return e.apply(A,t).then(s=>{let a={...o,endTimestamp:Y()*1e3,response:s};return we("fetch",a),s},s=>{let a={...o,endTimestamp:Y()*1e3,error:s};throw we("fetch",a),Ye(s)&&s.stack===void 0&&(s.stack=i,_e(s,"framesToPop",1)),s})}})}function ca(e,t){return!!e&&typeof e=="object"&&!!e[t]}function rl(e){return typeof e=="string"?e:e?ca(e,"url")?e.url:e.toString?e.toString():"":""}function dh(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:rl(n),method:ca(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:rl(t),method:ca(t,"method")?String(t.method).toUpperCase():"GET"}}f();var fi=null;function Qr(e){let t="error";Be(t,e),He(t,fh)}function fh(){fi=A.onerror,A.onerror=function(e,t,n,r,o){return we("error",{column:r,error:o,line:n,msg:e,url:t}),fi&&!fi.__SENTRY_LOADER__?fi.apply(this,arguments):!1},A.onerror.__SENTRY_INSTRUMENTED__=!0}f();var pi=null;function eo(e){let t="unhandledrejection";Be(t,e),He(t,ph)}function ph(){pi=A.onunhandledrejection,A.onunhandledrejection=function(e){return we("unhandledrejection",e),pi&&!pi.__SENTRY_LOADER__?pi.apply(this,arguments):!0},A.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}f();f();f();function ua(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function la(){return"npm"}function ol(){return!ua()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ir(){return typeof window<"u"&&(!ol()||mh())}function mh(){return A.process!==void 0&&A.process.type==="renderer"}f();function il(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}f();function G(){let e=A,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function sl(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function wt(e){let{message:t,event_id:n}=e;if(t)return t;let r=sl(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function sr(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function at(e,t){let n=sl(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let i={...o&&o.data,...t.data};n.mechanism.data=i}}function da(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(s=>qr(s,0));let i=Math.min(r-1,o);t.context_line=qr(e[i],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(s=>qr(s,0))}function mi(e){if(e&&e.__sentry_captured__)return!0;try{_e(e,"__sentry_captured__",!0)}catch{}return!1}function to(e){return Array.isArray(e)?e:[e]}f();function Me(e,t=100,n=1/0){try{return fa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function hi(e,t=3,n=100*1024){let r=Me(e,t);return Sh(r)>n?hi(e,t-1,n):r}function fa(e,t,n=1/0,r=1/0,o=il()){let[i,s]=o;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=hh(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return fa("",m,c-1,r,o)}catch{}let d=Array.isArray(t)?[]:{},l=0,p=si(t);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(l>=r){d[m]="[MaxProperties ~]";break}let h=p[m];d[m]=fa(m,h,c-1,r,o),l++}return s(t),d}function hh(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(jr(t))return"[VueViewModel]";if(Zs(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Ze(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=gh(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function gh(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function _h(e){return~-encodeURI(e).split(/%..|./).length}function Sh(e){return _h(JSON.stringify(e))}f();function yh(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Eh=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function bh(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Eh.exec(t);return n?n.slice(1):[]}function pa(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=yh(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function al(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 ma(e,t){e=pa(e).slice(1),t=pa(t).slice(1);let n=al(e.split("/")),r=al(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function ha(e,t){let n=bh(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}f();f();var jt;(function(e){e[e.PENDING=0]="PENDING";let n=1;e[e.RESOLVED=n]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(jt||(jt={}));function $e(e){return new Ct(t=>{t(e)})}function un(e){return new Ct((t,n)=>{n(e)})}var Ct=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=jt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(jt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(jt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===jt.PENDING){if(ft(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===jt.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===jt.RESOLVED&&n[1](this._value),this._state===jt.REJECTED&&n[2](this._value),n[0]=!0)})}}};function ga(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function o(s){if(!n())return un(new Ne("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(s){return new Ct((a,c)=>{let u=t.length;if(!u)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(l=>{$e(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}f();function ht(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 _a(e){return e.split(/[?#]/,1)[0]}f();var cl=["fatal","error","warning","log","info","debug"];function no(e){return e==="warn"?"warning":cl.includes(e)?e:"log"}f();f();var ar="baggage",Sa="sentry-",ll=/^sentry-/,dl=8192;function ro(e){let t=fl(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(ll)){let s=o.slice(Sa.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function Nn(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Sa}${r}`]=o),n),{});return Th(t)}function fl(e){if(!(!e||!Fe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=ul(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):ul(e)}function ul(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Th(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>dl?(mt&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var pl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ml(e){if(!e)return;let t=e.match(pl);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 oo(e,t){let n=ml(e),r=ro(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{};return n?{traceId:o||G(),parentSpanId:i||G().substring(16),spanId:G().substring(16),sampled:s,dsc:r||{}}:{traceId:o||G(),spanId:G().substring(16)}}function Mn(e=G(),t=G().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}f();function Re(e,t=[]){return[e,t]}function ya(e,t){let[n,r]=e;return[n,[...r,t]]}function ct(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function _i(e,t){return ct(e,(n,r)=>t.includes(r))}function gi(e){return A.__SENTRY__&&A.__SENTRY__.encodePolyfill?A.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function vh(e){return A.__SENTRY__&&A.__SENTRY__.decodePolyfill?A.__SENTRY__.decodePolyfill(e):new TextDecoder().decode(e)}function cr(e){let[t,n]=e,r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[gi(r),i]:r.push(typeof i=="string"?gi(i):i)}for(let i of n){let[s,a]=i;if(o(`
|
|
8
|
-
${JSON.stringify(s)}
|
|
9
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Me(a))}o(c)}}return typeof r=="string"?r:Ih(r)}function Ih(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Ea(e){let t=typeof e=="string"?gi(e):e;function n(s){let a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(vh(n(s)))}let o=r(),i=[];for(;t.length;){let s=r(),a=typeof s.length=="number"?s.length:void 0;i.push([s,a?n(a):r()])}return[o,i]}function ba(e){return[{type:"span"},e]}function Ta(e){let t=typeof e.data=="string"?gi(e.data):e.data;return[J({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var xh={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Si(e){return xh[e]}function ur(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function io(e,t,n,r){let o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Je(r)},...o&&{trace:J({...o})}}}f();function va(e,t,n){let r=[{type:"client_report"},{timestamp:n||Pt(),discarded_events:e}];return Re(t?{dsn:t}:{},[r])}f();function yi(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function hl(e,t){return e[t]||e.all||0}function so(e,t,n=Date.now()){return hl(e,t)>n}function ao(e,{statusCode:t,headers:n},r=Date.now()){let o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+yi(s,r):t===429&&(o.all=r+60*1e3);return o}f();function Ia(e,t){return e??t()}f();function Ft(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}f();function qt(){return{traceId:G(),spanId:G().substring(16)}}f();var Ei=A;function xa(){let e=Ei.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ei&&!!Ei.history.pushState&&!!Ei.history.replaceState;return!t&&n}f();var M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();f();function gt(){return co(A),A}function co(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ue,t[Ue]=t[Ue]||{}}f();f();f();f();function gl(e){let t=Y(),n={sid:G(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>wh(n)};return e&&Yt(n,e),n}function Yt(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||Y(),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:G()),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 n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function _l(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Yt(e,n)}function wh(e){return J({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}})}f();var wa="_sentrySpan";function Ut(e,t){t?_e(e,wa,t):delete e[wa]}function On(e){return e[wa]}var Ch=100,Ca=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=qt()}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},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._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Ut(t,On(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Yt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,o]=n instanceof Qe?[n.getScopeData(),n.getRequestSession()]:ot(n)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Ut(this,void 0),this._attachments=[],this._propagationContext=qt(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Ch;if(r<=0)return this;let o={timestamp:Pt(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:On(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:G();if(!this._client)return g.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r&&r.event_id?r.event_id:G();if(!this._client)return g.warn("No client configured on scope - will not capture message!"),o;let i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:G();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},Qe=Ca;function Sl(){return cn("defaultCurrentScope",()=>new Qe)}function yl(){return cn("defaultIsolationScope",()=>new Qe)}var ka=class{constructor(t,n){let r;t?r=t:r=new Qe;let o;n?o=n:o=new Qe,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return ft(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function lr(){let e=gt(),t=co(e);return t.stack=t.stack||new ka(Sl(),yl())}function kh(e){return lr().withScope(e)}function Rh(e,t){let n=lr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function El(e){return lr().withScope(()=>e(lr().getIsolationScope()))}function bl(){return{withIsolationScope:El,withScope:kh,withSetScope:Rh,withSetIsolationScope:(e,t)=>El(t),getCurrentScope:()=>lr().getScope(),getIsolationScope:()=>lr().getIsolationScope()}}function Vt(e){let t=co(e);return t.acs?t.acs:bl()}f();function U(){let e=gt();return Vt(e).getCurrentScope()}function Z(){let e=gt();return Vt(e).getIsolationScope()}function dr(){return cn("globalScope",()=>new Qe)}function Ae(...e){let t=gt(),n=Vt(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function Ra(...e){let t=gt(),n=Vt(t);if(e.length===2){let[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function x(){return U().getClient()}f();var Aa="_sentryMetrics";function uo(e){let t=e[Aa];if(!t)return;let n={};for(let[,[r,o]]of t)(n[r]||(n[r]=[])).push(J(o));return n}function Tl(e,t,n,r,o,i,s){let c=e[Aa]||(e[Aa]=new Map),u=`${t}:${n}@${o}`,d=c.get(s);if(d){let[,l]=d;c.set(s,[u,{min:Math.min(l.min,r),max:Math.max(l.max,r),count:l.count+=1,sum:l.sum+=r,tags:l.tags}])}else c.set(s,[u,{min:r,max:r,count:1,sum:r,tags:i}])}f();var Oe="sentry.source",fr="sentry.sample_rate",kt="sentry.op",ue="sentry.origin",pr="sentry.idle_span_finish_reason",mr="sentry.measurement_unit",hr="sentry.measurement_value",Na="sentry.profile_id",lo="sentry.exclusive_time";f();function Ma(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:"unknown_error"}}function gr(e,t){e.setAttribute("http.response.status_code",t);let n=Ma(t);n.message!=="unknown_error"&&e.setStatus(n)}var bi=0,Da=1;function Il(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:a}=F(e);return J({parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:s,origin:a})}function La(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=F(e);return J({parent_span_id:r,span_id:t,trace_id:n})}function _r(e){let{traceId:t,spanId:n}=e.spanContext(),r=_t(e);return Mn(t,n,r)}function Rt(e){return typeof e=="number"?vl(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?vl(e.getTime()):Y()}function vl(e){return e>9999999999?e/1e3:e}function F(e){if(Oh(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(Mh(e)){let{attributes:r,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return J({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:Rt(o),timestamp:Rt(s)||void 0,status:Ti(c),op:r[kt],origin:r[ue],_metrics_summary:uo(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Mh(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Oh(e){return typeof e.getSpanJSON=="function"}function _t(e){let{traceFlags:t}=e.spanContext();return t===Da}function Ti(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var Dn="_sentryChildSpans",Oa="_sentryRootSpan";function vi(e,t){let n=e[Oa]||e;_e(t,Oa,n),e[Dn]?e[Dn].add(t):_e(e,Dn,new Set([t]))}function xl(e,t){e[Dn]&&e[Dn].delete(t)}function ln(e){let t=new Set;function n(r){if(!t.has(r)&&_t(r)){t.add(r);let o=r[Dn]?Array.from(r[Dn]):[];for(let i of o)n(i)}}return n(e),Array.from(t)}function K(e){return e[Oa]||e}function Q(){let e=gt(),t=Vt(e);return t.getActiveSpan?t.getActiveSpan():On(U())}function wl(e,t,n,r,o,i){let s=Q();s&&Tl(s,e,t,n,r,o,i)}var Cl=!1;function Sr(){Cl||(Cl=!0,Qr(Pa),eo(Pa))}function Pa(){let e=Q(),t=e&&K(e);if(t){let n="internal_error";M&&g.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:2,message:n})}}Pa.tag="sentry_tracingErrorCallback";f();var kl="_sentryScope",Rl="_sentryIsolationScope";function Al(e,t,n){e&&(_e(e,Rl,n),_e(e,kl,t))}function Fa(e){return{scope:e[kl],isolationScope:e[Rl]}}f();function Nl(){Sr()}f();f();function et(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||Dh();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}function Dh(){let e=x();return e&&e.getOptions()}f();var We=class{constructor(t={}){this._traceId=t.traceId||G(),this._spanId=t.spanId||G().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:bi}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}};f();f();function fo(e,t,n=()=>{}){let r;try{r=e()}catch(o){throw t(o),n(),o}return Lh(r,t,n)}function Lh(e,t,n){return ft(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}f();f();var Xt="production";var Ml="_frozenDsc";function Ua(e,t){_e(e,Ml,t)}function dn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=J({environment:n.environment||Xt,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function De(e){let t=x();if(!t)return{};let n=dn(F(e).trace_id||"",t),r=K(e),o=r[Ml];if(o)return o;let i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),a=s&&ro(s);if(a)return a;let c=F(r),u=c.data||{},d=u[fr];d!=null&&(n.sample_rate=`${d}`);let l=u[Oe],p=c.description;return l!=="url"&&p&&(n.transaction=p),n.sampled=String(_t(r)),t.emit("createDsc",n,r),n}function Ol(e){let t=De(e);return Nn(t)}f();function Dl(e){if(!M)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=F(e),{spanId:o}=e.spanContext(),i=_t(e),s=K(e),a=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){let{op:d,description:l}=F(s);u.push(`root ID: ${s.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c}
|
|
10
|
-
${u.join(`
|
|
11
|
-
`)}`)}function Ll(e){if(!M)return;let{description:t="< unknown name >",op:n="< unknown op >"}=F(e),{spanId:r}=e.spanContext(),i=K(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;g.log(s)}f();f();function fn(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){M&&g.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function Pl(e,t){if(!et(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;let r=fn(n);return r===void 0?(M&&g.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(M&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(M&&g.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,r])}f();f();function Ph(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Fl(e,t,n,r){let o=ur(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Je(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Re(i,[s])}function Ul(e,t,n,r){let o=ur(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Ph(e,n&&n.sdk);let s=io(e,o,r,t);return delete e.sdkProcessingMetadata,Re(s,[[{type:i},e]])}function Bl(e,t){function n(d){return!!d.trace_id&&!!d.public_key}let r=De(e[0]),o=t&&t.getDsn(),i=t&&t.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&o&&{dsn:Je(o)}},a=t&&t.getOptions().beforeSendSpan,c=a?d=>a(F(d)):d=>F(d),u=[];for(let d of e){let l=c(d);l&&u.push(ba(l))}return Re(s,u)}f();function Ii(e,t,n){let r=Q(),o=r&&K(r);o&&o.addEvent(e,{[hr]:t,[mr]:n})}function xi(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let r=n.attributes||{},o=r[mr],i=r[hr];typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}var Hl=1e3,yr=class{constructor(t={}){this._traceId=t.traceId||G(),this._spanId=t.spanId||G().substring(16),this._startTime=t.startTimestamp||Y(),this._attributes={},this.setAttributes({[ue]:"manual",[kt]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Da:bi}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Rt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=Rt(t),Ll(this),this._onSpanEnded())}getSpanJSON(){return J({data:this._attributes,description:this._name,op:this._attributes[kt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ti(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ue],_metrics_summary:uo(this),profile_id:this._attributes[Na],exclusive_time:this._attributes[lo],measurements:xi(this._events),is_segment:this._isStandaloneSpan&&K(this)===this||void 0,segment_id:this._isStandaloneSpan?K(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){M&&g.log("[Tracing] Adding an event to span:",t);let o=$l(n)?n:r||Y(),i=$l(n)?{}:n||{},s={name:t,time:Rt(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=x();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===K(this)))return;if(this._isStandaloneSpan){this._sampled?Uh(Bl([this],t)):(M&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}let r=this._convertSpanToTransaction();r&&(Fa(this).scope||U()).captureEvent(r)}_convertSpanToTransaction(){if(!Wl(F(this)))return;this._name||(M&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=Fa(this),o=(t||U()).getClient()||x();if(this._sampled!==!0){M&&g.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),o&&o.recordDroppedEvent("sample_rate","transaction");return}let s=ln(this).filter(l=>l!==this&&!Fh(l)).map(l=>F(l)).filter(Wl),a=this._attributes[Oe],c={contexts:{trace:Il(this)},spans:s.length>Hl?s.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,Hl):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...J({dynamicSamplingContext:De(this)})},_metrics_summary:uo(this),...a&&{transaction_info:{source:a}}},u=xi(this._events);return u&&Object.keys(u).length&&(M&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}};function $l(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Wl(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Fh(e){return e instanceof yr&&e.isStandaloneSpan()}function Uh(e){let t=x();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}let r=t.getTransport();r&&r.send(e).then(null,o=>{M&&g.error("Error while sending span:",o)})}var zl="__SENTRY_SUPPRESS_TRACING__";function jl(e,t){let n=Ci();if(n.startSpan)return n.startSpan(e,t);let r=Ha(e),{forceTransaction:o,parentSpan:i}=e;return Ae(e.scope,()=>Vl(i)(()=>{let a=U(),c=$a(a),d=e.onlyIfParent&&!c?new We:Ba({parentSpan:c,spanArguments:r,forceTransaction:o,scope:a});return Ut(a,d),fo(()=>t(d),()=>{let{status:l}=F(d);d.isRecording()&&(!l||l==="ok")&&d.setStatus({code:2,message:"internal_error"})},()=>d.end())}))}function wi(e,t){let n=Ci();if(n.startSpanManual)return n.startSpanManual(e,t);let r=Ha(e),{forceTransaction:o,parentSpan:i}=e;return Ae(e.scope,()=>Vl(i)(()=>{let a=U(),c=$a(a),d=e.onlyIfParent&&!c?new We:Ba({parentSpan:c,spanArguments:r,forceTransaction:o,scope:a});Ut(a,d);function l(){d.end()}return fo(()=>t(d,l),()=>{let{status:p}=F(d);d.isRecording()&&(!p||p==="ok")&&d.setStatus({code:2,message:"internal_error"})})}))}function Le(e){let t=Ci();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Ha(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>Ae(e.scope,s):o!==void 0?s=>Ln(o,s):s=>s())(()=>{let s=U(),a=$a(s);return e.onlyIfParent&&!a?new We:Ba({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}var ql=({sentryTrace:e,baggage:t},n)=>Ae(r=>{let o=oo(e,t);return r.setPropagationContext(o),n()});function Ln(e,t){let n=Ci();return n.withActiveSpan?n.withActiveSpan(e,t):Ae(r=>(Ut(r,e||void 0),t(r)))}function Yl(e){return Ae(t=>(t.setPropagationContext(qt()),M&&g.info(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Ln(null,e)))}function Ba({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!et())return new We;let o=Z(),i;if(e&&!n)i=Bh(e,r,t),vi(e,i);else if(e){let s=De(e),{traceId:a,spanId:c}=e.spanContext(),u=_t(e);i=Gl({traceId:a,parentSpanId:c,...t},r,u),Ua(i,s)}else{let{traceId:s,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};i=Gl({traceId:s,parentSpanId:c,...t},r,u),a&&Ua(i,a)}return Dl(i),Al(i,r,o),i}function Ha(e){let n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let r={...n};return r.startTimestamp=Rt(e.startTime),delete r.startTime,r}return n}function Ci(){let e=gt();return Vt(e)}function Gl(e,t,n){let r=x(),o=r&&r.getOptions()||{},{name:i="",attributes:s}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[zl]?[!1]:Pl(o,{name:i,parentSampled:n,attributes:s,transactionContext:{name:i,parentSampled:n}}),u=new yr({...e,attributes:{[Oe]:"custom",...e.attributes},sampled:a});return c!==void 0&&u.setAttribute(fr,c),r&&r.emit("spanStart",u),u}function Bh(e,t,n){let{spanId:r,traceId:o}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[zl]?!1:_t(e),s=i?new yr({...n,parentSpanId:r,traceId:o,sampled:i}):new We({traceId:o});vi(e,s);let a=x();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function $a(e){let t=On(e);if(!t)return;let n=x();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?K(t):t}function Vl(e){return e!==void 0?t=>Ln(e,t):t=>t()}var Er={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Hh="heartbeatFailed",$h="idleTimeout",Wh="finalTimeout",Gh="externalFinish";function ki(e,t={}){let n=new Map,r=!1,o,i=Gh,s=!t.disableAutoFinish,a=[],{idleTimeout:c=Er.idleTimeout,finalTimeout:u=Er.finalTimeout,childSpanTimeout:d=Er.childSpanTimeout,beforeSpanEnd:l}=t,p=x();if(!p||!et())return new We;let m=U(),h=Q(),y=zh(e);y.end=new Proxy(y.end,{apply(E,T,C){l&&l(y);let[D,...k]=C,N=D||Y(),H=Rt(N),ne=ln(y).filter(W=>W!==y);if(!ne.length)return w(H),Reflect.apply(E,T,[H,...k]);let re=ne.map(W=>F(W).timestamp).filter(W=>!!W),be=re.length?Math.max(...re):void 0,$=F(y).start_timestamp,Ie=Math.min($?$+u/1e3:1/0,Math.max($||-1/0,Math.min(H,be||1/0)));return w(Ie),Reflect.apply(E,T,[Ie,...k])}});function v(){o&&(clearTimeout(o),o=void 0)}function b(E){v(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=$h,y.end(E))},c)}function I(E){o=setTimeout(()=>{!r&&s&&(i=Hh,y.end(E))},d)}function P(E){v(),n.set(E,!0);let T=Y();I(T+d/1e3)}function O(E){if(n.has(E)&&n.delete(E),n.size===0){let T=Y();b(T+c/1e3)}}function w(E){r=!0,n.clear(),a.forEach(H=>H()),Ut(m,h);let T=F(y),{start_timestamp:C}=T;if(!C)return;(T.data||{})[pr]||y.setAttribute(pr,i),g.log(`[Tracing] Idle span "${T.op}" finished`);let k=ln(y).filter(H=>H!==y),N=0;k.forEach(H=>{H.isRecording()&&(H.setStatus({code:2,message:"cancelled"}),H.end(E),M&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(H,void 0,2)));let ne=F(H),{timestamp:re=0,start_timestamp:be=0}=ne,$=be<=E,Ie=(u+c)/1e3,W=re-be<=Ie;if(M){let fe=JSON.stringify(H,void 0,2);$?W||g.log("[Tracing] Discarding span since it finished after idle span final timeout",fe):g.log("[Tracing] Discarding span since it happened after idle span was finished",fe)}(!W||!$)&&(xl(y,H),N++)}),N>0&&y.setAttribute("sentry.idle_span_discarded_spans",N)}return a.push(p.on("spanStart",E=>{if(r||E===y||F(E).timestamp)return;ln(y).includes(E)&&P(E.spanContext().spanId)})),a.push(p.on("spanEnd",E=>{r||O(E.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",E=>{E===y&&(s=!0,b(),n.size&&I())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(y.setStatus({code:2,message:"deadline_exceeded"}),i=Wh,y.end())},u),y}function zh(e){let t=Le(e);return Ut(U(),t),M&&g.log("[Tracing] Started span is an idle span"),t}f();f();f();function Ri(e,t,n,r=0){return new Ct((o,i)=>{let s=e[r];if(t===null||typeof s!="function")o(t);else{let a=s({...t},n);M&&s.id&&a===null&&g.log(`Event processor "${s.id}" dropped event`),ft(a)?a.then(c=>Ri(e,c,n,r+1).then(o)).then(null,i):Ri(e,a,n,r+1).then(o).then(null,i)}})}f();function Kl(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;jh(e,t),r&&Vh(e,r),Kh(e,n),qh(e,o),Yh(e,i)}function Wa(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:p,transactionName:m,span:h}=t;po(e,"extra",n),po(e,"tags",r),po(e,"user",o),po(e,"contexts",i),po(e,"sdkProcessingMetadata",a),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...p}}function po(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function jh(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=J(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let u=J(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});let d=J(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});let l=J(i);l&&Object.keys(l).length&&(e.contexts={...l,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function qh(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Yh(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Vh(e,t){e.contexts={trace:La(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:De(t),...e.sdkProcessingMetadata};let n=K(t),r=F(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Kh(e,t){e.fingerprint=e.fingerprint?to(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function mo(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||G(),timestamp:t.timestamp||Pt()},u=n.integrations||e.integrations.map(v=>v.name);Xh(c,e),Qh(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Jh(c,e.stackParser);let d=tg(r,n.captureContext);n.mechanism&&at(c,n.mechanism);let l=o?o.getEventProcessors():[],p=dr().getScopeData();if(i){let v=i.getScopeData();Wa(p,v)}if(d){let v=d.getScopeData();Wa(p,v)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),Kl(c,p);let h=[...l,...p.eventProcessors];return Ri(h,c,n).then(v=>(v&&Zh(v),typeof s=="number"&&s>0?eg(v,s,a):v))}function Xh(e,t){let{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Xt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=Ve(e.message,i));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ve(s.value,i));let a=e.request;a&&a.url&&(a.url=Ve(a.url,i))}var Xl=new WeakMap;function Jh(e,t){let n=A._sentryDebugIds;if(!n)return;let r,o=Xl.get(t);o?r=o:(r=new Map,Xl.set(t,r));let i=Object.entries(n).reduce((s,[a,c])=>{let u,d=r.get(a);d?u=d:(u=t(a),r.set(a,u));for(let l=u.length-1;l>=0;l--){let p=u[l];if(p.filename){s[p.filename]=c;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Zh(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Qh(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function eg(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Me(o.data,t,n)}}))},...e.user&&{user:Me(e.user,t,n)},...e.contexts&&{contexts:Me(e.contexts,t,n)},...e.extra&&{extra:Me(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Me(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Me(o.data,t,n)}}))),r}function tg(e,t){if(!t)return e;let n=e?e.clone():new Qe;return n.update(t),n}function Jl(e){if(e)return ng(e)?{captureContext:e}:og(e)?{captureContext:e}:e}function ng(e){return e instanceof Qe||typeof e=="function"}var rg=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function og(e){return Object.keys(e).some(t=>rg.includes(t))}function Jt(e,t){return U().captureException(e,Jl(t))}function Pn(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return U().captureMessage(e,n,r)}function Bt(e,t){return U().captureEvent(e,t)}function br(e,t){Z().setContext(e,t)}function Ai(e){Z().setExtras(e)}function Ni(e,t){Z().setExtra(e,t)}function Mi(e){Z().setTags(e)}function Oi(e,t){Z().setTag(e,t)}function Di(e){Z().setUser(e)}function Li(){return Z().lastEventId()}async function Zl(e){let t=x();return t?t.flush(e):(M&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Ql(e){let t=x();return t?t.close(e):(M&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function ed(){return!!x()}function Pi(e){Z().addEventProcessor(e)}function Fn(e){let t=x(),n=Z(),r=U(),{release:o,environment:i=Xt}=t&&t.getOptions()||{},{userAgent:s}=A.navigator||{},a=gl({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&Yt(c,{status:"exited"}),Un(),n.setSession(a),r.setSession(a),a}function Un(){let e=Z(),t=U(),n=t.getSession()||e.getSession();n&&_l(n),td(),e.setSession(),t.setSession()}function td(){let e=Z(),t=U(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function ho(e=!1){if(e){Un();return}td()}f();var ig="7";function nd(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sg(e){return`${nd(e)}${e.projectId}/envelope/`}function ag(e,t){return ra({sentry_key:e.publicKey,sentry_version:ig,...t&&{sentry_client:`${t.name}/${t.version}`}})}function go(e,t,n){return t||`${sg(e)}?${ag(e,n)}`}function Ga(e,t){let n=Vr(e);if(!n)return"";let r=`${nd(n)}embed/error-page/`,o=`dsn=${Je(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}f();f();var rd=[];function cg(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function za(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=to(n(t)):r=t;let o=cg(r),i=o.findIndex(s=>s.name==="Debug");if(i>-1){let[s]=o.splice(i,1);o.push(s)}return o}function od(e,t){let n={};return t.forEach(r=>{r&&qa(e,r,n)}),n}function ja(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function qa(e,t,n){if(n[t.name]){M&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,rd.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),rd.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}M&&g.log(`Integration installed: ${t.name}`)}function id(e){let t=x();if(!t){M&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}var sd="Not capturing exception because it's already been captured.",_o=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Vr(t.dsn):M&&g.warn("No DSN provided, client will not send events."),this._dsn){let n=go(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){let o=G();if(mi(t))return M&&g.log(sd),o;let i={event_id:o,...n};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(t,n,r,o){let i={event_id:G(),...r},s=tr(t)?t:String(t),a=In(t)?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,n,r){let o=G();if(n&&n.originalException&&mi(n.originalException))return M&&g.log(sd),o;let i={event_id:o,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?M&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Yt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):$e(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];qa(this,t,this._integrations),n||ja(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Ul(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of n.attachments||[])r=ya(r,Ta(i));let o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let n=Fl(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){let o=`${t}:${n}`;M&&g.log(`Adding outcome: "${o}"`),this._outcomes[o]=(this._outcomes[o]||0)+1}}on(t,n){let r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{let o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(M&&g.error("Error while sending event:",n),n)):(M&&g.error("Transport disabled"),$e({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=od(this,t),ja(this,t)}_updateSessionFromEvent(t,n){let r=!1,o=!1,i=n.exception&&n.exception.values;if(i){o=!0;for(let c of i){let u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Yt(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ct(n=>{let r=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o=Z()){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),mo(i,t,n,r,this,o).then(a=>{if(a===null)return a;let c={...o.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:d,spanId:l,parentSpanId:p,dsc:m}=c;a.contexts={trace:J({trace_id:d,span_id:l,parent_span_id:p}),...a.contexts};let h=m||dn(d,this);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(o=>o.event_id,o=>{if(M){let i=o;i.logLevel==="log"?g.log(i.message):g.warn(i)}})}_processEvent(t,n,r){let o=this.getOptions(),{sampleRate:i}=o,s=Ya(t),a=ad(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof i>"u"?void 0:fn(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),un(new Ne(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,m).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",l,t),new Ne("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;let v=lg(this,o,h,n);return ug(v,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",l,t),Ya(t)){let I=1+(t.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+I}throw new Ne(`${u} returned \`null\`, will not send event.`,"log")}let y=r&&r.getSession();!s&&y&&this._updateSessionFromEvent(y,h);let v=h.transaction_info;if(s&&v&&h.transaction!==t.transaction){let b="custom";h.transaction_info={...v,source:b}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof Ne?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new Ne(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
12
|
-
Reason: ${h}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){M&&g.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){M&&g.log("No outcomes to send");return}if(!this._dsn){M&&g.log("No dsn provided, will not send outcomes");return}M&&g.log("Sending outcomes:",t);let n=va(t,this._options.tunnel&&Je(this._dsn));this.sendEnvelope(n)}};function ug(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ft(e))return e.then(r=>{if(!ot(r)&&r!==null)throw new Ne(n);return r},r=>{throw new Ne(`${t} rejected with ${r}`)});if(!ot(e)&&e!==null)throw new Ne(n);return e}function lg(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t;if(ad(n)&&o)return o(n,r);if(Ya(n)){if(n.spans&&s){let a=[];for(let c of n.spans){let u=s(c);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(i)return i(n,r)}return n}function ad(e){return e.type===void 0}function Ya(e){return e.type==="transaction"}f();function Va(e,t){t.debug===!0&&(M?g.enable():Xe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),U().update(t.initialScope);let r=new e(t);return Ka(r),r.init(),r}function Ka(e){U().setClient(e)}f();var dg=64;function Fi(e,t,n=ga(e.bufferSize||dg)){let r={},o=s=>n.drain(s);function i(s){let a=[];if(ct(s,(l,p)=>{let m=Si(p);if(so(r,m)){let h=cd(l,p);e.recordDroppedEvent("ratelimit_backoff",m,h)}else a.push(l)}),a.length===0)return $e({});let c=Re(s[0],a),u=l=>{ct(c,(p,m)=>{let h=cd(p,m);e.recordDroppedEvent(l,Si(m),h)})},d=()=>t({body:cr(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&M&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=ao(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof Ne)return M&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),$e({});throw l})}return{send:i,flush:o}}function cd(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}f();var ud=100,ld=5e3,fg=36e5;function Xa(e){function t(...n){M&&g.info("[Offline]:",...n)}return n=>{let r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");let o=n.createStore(n),i=ld,s;function a(l,p,m){return _i(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,m):!0}function c(l){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;let p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),d(p,!0).catch(m=>{t("Failed to retry sending",m)}))},l),typeof s!="number"&&s.unref&&s.unref()}function u(){s||(c(i),i=Math.min(i*2,fg))}async function d(l,p=!1){if(!p&&_i(l,["replay_event","replay_recording"]))return await o.push(l),c(ud),{};try{let m=await r.send(l),h=ud;if(m){if(m.headers&&m.headers["retry-after"])h=yi(m.headers["retry-after"]);else if(m.headers&&m.headers["x-sentry-rate-limits"])h=6e4;else if((m.statusCode||0)>=400)return m}return c(h),i=ld,m}catch(m){if(await a(l,m,i))return p?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&u(),{send:d,flush:l=>r.flush(l)}}}f();function dd(e,t){let n;return ct(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function pg(e,t){return n=>{let r=e(n);return{...r,send:async o=>{let i=dd(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}}}}function mg(e,t){return Re(t?{...e[0],dsn:t}:e[0],e[1])}function fd(e,t){return n=>{let r=e(n),o=new Map;function i(c,u){let d=u?`${c}:${u}`:c,l=o.get(d);if(!l){let p=oi(c);if(!p)return;let m=go(p,n.tunnel);l=u?pg(e,u)({...n,url:m}):e({...n,url:m}),o.set(d,l)}return[c,l]}async function s(c){function u(m){let h=m&&m.length?m:["event"];return dd(c,h)}let d=t({envelope:c,getEvent:u}).map(m=>typeof m=="string"?i(m,void 0):i(m.dsn,m.release)).filter(m=>!!m),l=d.length?d:[["",r]];return(await Promise.all(l.map(([m,h])=>h.send(mg(c,m)))))[0]}async function a(c){let u=[...o.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:s,flush:a}}}f();function So(e,t){let n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return gg(e,n)||hg(e,r)}function hg(e,t){return t?pd(e)===pd(t):!1}function gg(e,t){return t?e.includes(t.host):!1}function pd(e){return e[e.length-1]==="/"?e.slice(0,-1):e}f();function md(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}f();function Ja(e,t,n=[t],r="npm"){let o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ue})),version:Ue}),e._metadata=o}f();var _g=100;function tt(e,t){let n=x(),r=Z();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=_g}=n.getOptions();if(i<=0)return;let a={timestamp:Pt(),...e},c=o?Xe(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}f();var hd,Sg="FunctionToString",gd=new WeakMap,yg=()=>({name:Sg,setupOnce(){hd=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Rn(this),n=gd.has(x())&&t!==void 0?t:this;return hd.apply(n,e)}}catch{}},setup(e){gd.set(e,!0)}}),Ui=yg;f();var Eg=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],bg="InboundFilters",Tg=(e={})=>({name:bg,processEvent(t,n,r){let o=r.getOptions(),i=vg(e,o);return Ig(t,i)?null:t}}),Hi=Tg;function vg(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Eg],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Ig(e,t){return t.ignoreInternal&&Ag(e)?(M&&g.warn(`Event dropped due to being internal Sentry Error.
|
|
13
|
-
Event: ${wt(e)}`),!0):xg(e,t.ignoreErrors)?(M&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
14
|
-
Event: ${wt(e)}`),!0):Mg(e)?(M&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
15
|
-
Event: ${wt(e)}`),!0):wg(e,t.ignoreTransactions)?(M&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
16
|
-
Event: ${wt(e)}`),!0):Cg(e,t.denyUrls)?(M&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
17
|
-
Event: ${wt(e)}.
|
|
18
|
-
Url: ${Bi(e)}`),!0):kg(e,t.allowUrls)?!1:(M&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
19
|
-
Event: ${wt(e)}.
|
|
20
|
-
Url: ${Bi(e)}`),!0)}function xg(e,t){return e.type||!t||!t.length?!1:Rg(e).some(n=>pt(n,t))}function wg(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?pt(n,t):!1}function Cg(e,t){if(!t||!t.length)return!1;let n=Bi(e);return n?pt(n,t):!1}function kg(e,t){if(!t||!t.length)return!0;let n=Bi(e);return n?pt(n,t):!0}function Rg(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function Ag(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Ng(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 Bi(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Ng(t):null}catch{return M&&g.error(`Cannot extract url for event ${wt(e)}`),null}}function Mg(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}f();f();var Sd=new Map,_d=new Set;function Og(e){if(A._sentryModuleMetadata)for(let t of Object.keys(A._sentryModuleMetadata)){let n=A._sentryModuleMetadata[t];if(_d.has(t))continue;_d.add(t);let r=e(t);for(let o of r.reverse())if(o.filename){Sd.set(o.filename,n);break}}}function Dg(e,t){return Og(e),Sd.get(t)}function $i(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(let r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;let o=Dg(e,r.filename);o&&(r.module_metadata=o)}})}catch{}}function Wi(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(let n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}var yd=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{ct(t,(n,r)=>{if(r==="event"){let o=Array.isArray(n)?n[1]:void 0;o&&(Wi(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;let n=e.getOptions().stackParser;$i(n,t)})}});f();var Lg="CaptureConsole",Pg=(e={})=>{let t=e.levels||kn;return{name:Lg,setup(n){"console"in A&&Kr(({args:r,level:o})=>{x()!==n||!t.includes(o)||Fg(r,o)})}}},Ed=Pg;function Fg(e,t){let n={level:no(t),extra:{arguments:e}};Ae(r=>{if(r.addEventProcessor(s=>(s.logger="console",at(s,{handled:!1,type:"console"}),s)),t==="assert"){if(!e[0]){let s=`Assertion failed: ${wn(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),Pn(s,n)}return}let o=e.find(s=>s instanceof Error);if(o){Jt(o,n);return}let i=wn(e," ");Pn(i,n)})}f();var Ug="Debug",Bg=(e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:Ug,setup(n){n.on("beforeSendEvent",(r,o)=>{if(t.debugger)debugger;Xe(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),o&&Object.keys(o).length&&console.log(JSON.stringify(o,null,2))):(console.log(r),o&&Object.keys(o).length&&console.log(o))})})}}},bd=Bg;f();var Hg="Dedupe",$g=()=>{let e;return{name:Hg,processEvent(t){if(t.type)return t;try{if(Wg(t,e))return M&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Gi=$g;function Wg(e,t){return t?!!(Gg(e,t)||zg(e,t)):!1}function Gg(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Id(e,t)||!vd(e,t))}function zg(e,t){let n=Td(t),r=Td(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Id(e,t)||!vd(e,t))}function vd(e,t){let n=or(e),r=or(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Id(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Td(e){return e.exception&&e.exception.values&&e.exception.values[0]}f();var jg="ExtraErrorData",qg=(e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:jg,processEvent(r,o,i){let{maxValueLength:s=250}=i.getOptions();return Yg(r,o,t,n,s)}}},xd=qg;function Yg(e,t={},n,r,o){if(!t.originalException||!Ye(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,s=Vg(t.originalException,r,o);if(s){let a={...e.contexts},c=Me(s,n);return ot(c)&&(_e(c,"__sentry_skip_normalization__",!0),a[i]=c),{...e,contexts:a}}return e}function Vg(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(let i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;let s=e[i];o[i]=Ye(s)||typeof s=="string"?Ve(`${s}`,n):s}if(t&&e.cause!==void 0&&(o.cause=Ye(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){let i=e.toJSON();for(let s of Object.keys(i)){let a=i[s];o[s]=Ye(a)?a.toString():a}}return o}catch(r){M&&g.error("Unable to extract extra data from the Error object:",r)}return null}f();var Kg="RewriteFrames",wd=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in A&&A.window!==void 0,o=e.iteratee||Xg({isBrowser:r,root:t,prefix:n});function i(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a&&a.frames&&a.frames.map(c=>o(c))}}return{name:Kg,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=i(c)),c}}};function Xg({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){let s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){let s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?ma(t,s):ha(s);r.filename=`${n}${a}`}return r}}f();var Jg="SessionTiming",Zg=()=>{let e=Y()*1e3;return{name:Jg,processEvent(t){let n=Y()*1e3;return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},Cd=Zg;f();var Qg=10,e_="ZodErrors";function t_(e){return Ye(e)&&e.name==="ZodError"&&Array.isArray(e.errors)}function n_(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function r_(e){let t=new Set;for(let r of e.issues)r.path&&r.path[0]&&t.add(r.path[0]);let n=Array.from(t);return`Failed to validate keys: ${Ve(n.join(", "),100)}`}function o_(e,t,n){return!t.exception||!t.exception.values||!n||!n.originalException||!t_(n.originalException)||n.originalException.issues.length===0?t:{...t,exception:{...t.exception,values:[{...t.exception.values[0],value:r_(n.originalException)},...t.exception.values.slice(1)]},extra:{...t.extra,"zoderror.issues":n.originalException.errors.slice(0,e).map(n_)}}}var i_=(e={})=>{let t=e.limit||Qg;return{name:e_,processEvent(n,r){return o_(t,n,r)}}},kd=i_;f();var Ad=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{ct(n,(r,o)=>{if(o==="event"){let i=Array.isArray(r)?r[1]:void 0;i&&(Wi(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;let r=t.getOptions().stackParser;$i(r,n)})},processEvent(t){let n=s_(t);if(n){let r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function s_(e){let t=or(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Rd)).map(r=>r.slice(Rd.length)):[])}var Rd="_sentryBundlerPluginAppKey:";f();f();var zi="c",ji="g",Tr="s",qi="d";function Nd(e,t){let n=cn("globalMetricsAggregators",()=>new WeakMap),r=n.get(e);if(r)return r;let o=new t(e);return e.on("flush",()=>o.flush()),e.on("close",()=>o.close()),n.set(e,o),o}function Yi(e,t,n,r,o={}){let i=o.client||x();if(!i)return;let s=Q(),a=s?K(s):void 0,c=a&&F(a).description,{unit:u,tags:d,timestamp:l}=o,{release:p,environment:m}=i.getOptions(),h={};p&&(h.release=p),m&&(h.environment=m),c&&(h.transaction=c),M&&g.log(`Adding value of ${r} to ${t} metric ${n}`),Nd(i,e).add(t,n,r,u,{...h,...d},l)}function a_(e,t,n=1,r){Yi(e,zi,t,Qa(n),r)}function Za(e,t,n,r){Yi(e,qi,t,Qa(n),r)}function c_(e,t,n,r="second",o){if(typeof n=="function"){let i=Y();return wi({op:"metrics.timing",name:t,startTime:i,onlyIfParent:!0},s=>fo(()=>n(),()=>{},()=>{let a=Y(),c=a-i;Za(e,t,c,{...o,unit:"second"}),s.end(a)}))}Za(e,t,n,{...o,unit:r})}function u_(e,t,n,r){Yi(e,Tr,t,n,r)}function l_(e,t,n,r){Yi(e,ji,t,Qa(n),r)}var Bn={increment:a_,distribution:Za,set:u_,gauge:l_,timing:c_,getMetricsAggregatorForClient:Nd};function Qa(e){return typeof e=="string"?parseInt(e):e}f();f();function Md(e,t,n,r){let o=Object.entries(J(r)).sort((i,s)=>i[0].localeCompare(s[0]));return`${e}${t}${n}${o}`}function Od(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t>>>0}function Dd(e){let t="";for(let n of e){let r=Object.entries(n.tags),o=r.length>0?`|#${r.map(([i,s])=>`${i}:${s}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${o}|T${n.timestamp}
|
|
21
|
-
`}return t}function Ld(e){return e.replace(/[^\w]+/gi,"_")}function Pd(e){return e.replace(/[^\w\-.]+/gi,"_")}function d_(e){return e.replace(/[^\w\-./]+/gi,"")}var f_=[[`
|
|
22
|
-
`,"\\n"],["\r","\\r"],[" ","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function p_(e){for(let[t,n]of f_)if(e===t)return n;return e}function m_(e){return[...e].reduce((t,n)=>t+p_(n),"")}function Fd(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=d_(n);t[r]=m_(String(e[n]))}return t}function Ud(e,t){g.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);let n=e.getDsn(),r=e.getSdkMetadata(),o=e.getOptions().tunnel,i=h_(t,n,r,o);e.sendEnvelope(i)}function h_(e,t,n,r){let o={sent_at:new Date().toISOString()};n&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(o.dsn=Je(t));let i=g_(e);return Re(o,[i])}function g_(e){let t=Dd(e);return[{type:"statsd",length:t.length},t]}f();var ec=class{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}},tc=class{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}},nc=class{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}},rc=class{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?Od(t):t).join(":")}},Bd={[zi]:ec,[ji]:tc,[qi]:nc,[Tr]:rc};f();var Zt=class{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),5e3)}add(t,n,r,o="none",i={},s=Y()){let a=Math.floor(s),c=Pd(n),u=Fd(i),d=Ld(o),l=Md(t,c,d,u),p=this._buckets.get(l),m=p&&t===Tr?p.metric.weight:0;p?(p.metric.add(r),p.timestamp<a&&(p.timestamp=a)):(p={metric:new Bd[t](r),timestamp:a,metricType:t,name:c,unit:d,tags:u},this._buckets.set(l,p));let h=typeof r=="string"?p.metric.weight-m:r;wl(t,c,h,d,i,l)}flush(){if(this._buckets.size===0)return;let t=Array.from(this._buckets.values());Ud(this._client,t),this._buckets.clear()}close(){clearInterval(this._interval),this.flush()}};f();function oc(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;let i=et()&&t(e.fetchData.url);if(e.endTimestamp&&i){let h=e.fetchData.__span;if(!h)return;let y=r[h];y&&(y_(y,e),delete r[h]);return}let s=U(),a=x(),{method:c,url:u}=e.fetchData,d=S_(u),l=d?ht(d).host:void 0,p=!!Q(),m=i&&p?Le({name:`${c} ${u}`,attributes:{url:u,type:"fetch","http.method":c,"http.url":d,"server.address":l,[ue]:o,[kt]:"http.client"}}):new We;if(e.fetchData.__span=m.spanContext().spanId,r[m.spanContext().spanId]=m,n(e.fetchData.url)&&a){let h=e.args[0];e.args[1]=e.args[1]||{};let y=e.args[1];y.headers=Hd(h,a,s,y,et()&&p?m:void 0)}return m}function Hd(e,t,n,r,o){let i=Z(),{traceId:s,spanId:a,sampled:c,dsc:u}={...i.getPropagationContext(),...n.getPropagationContext()},d=o?_r(o):Mn(s,a,c),l=Nn(u||(o?De(o):dn(s,t))),p=r.headers||(typeof Request<"u"&&it(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&it(p,Headers)){let m=new Headers(p);return m.append("sentry-trace",d),l&&m.append(ar,l),m}else if(Array.isArray(p)){let m=[...p,["sentry-trace",d]];return l&&m.push([ar,l]),m}else{let m="baggage"in p?p.baggage:void 0,h=[];return Array.isArray(m)?h.push(...m):m&&h.push(m),l&&h.push(l),{...p,"sentry-trace":d,baggage:h.length>0?h.join(","):void 0}}else return{"sentry-trace":d,baggage:l}}function S_(e){try{return new URL(e).href}catch{return}}function y_(e,t){if(t.response){gr(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}f();function Vi(e,t={},n=U()){let{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:J({contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c})},type:"feedback",level:"info",tags:u},l=n&&n.getClient()||x();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}f();function $d(){return{bindClient(e){U().setClient(e)},withScope:Ae,getClient:()=>x(),getScope:U,getIsolationScope:Z,captureException:(e,t)=>U().captureException(e,t),captureMessage:(e,t,n)=>U().captureMessage(e,t,n),captureEvent:Bt,addBreadcrumb:tt,setUser:Di,setTags:Mi,setTag:Oi,setExtra:Ni,setExtras:Ai,setContext:br,getIntegration(e){let t=x();return t&&t.getIntegrationByName(e.id)||null},startSession:Fn,endSession:Un,captureSession(e){if(e)return Un();E_()}}}var Wd=$d;function E_(){let e=U(),t=x(),n=e.getSession();t&&n&&t.captureSession(n)}f();var R=A,ic=0;function sc(){return ic>0}function b_(){ic++,setTimeout(()=>{ic--})}function Hn(e,t={},n){if(typeof e!="function")return e;try{let o=e.__sentry_wrapped__;if(o)return o;if(Rn(e))return e}catch{return e}let r=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=o.map(s=>Hn(s,t));return e.apply(this,i)}catch(i){throw b_(),Ae(s=>{s.addEventProcessor(a=>(t.mechanism&&(sr(a,void 0,void 0),at(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Jt(i)}),i}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}ii(r,e),_e(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}f();f();var B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();function Eo(e,t){let n=uc(e,t),r={type:t&&t.name,value:w_(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function T_(e,t,n,r){let o=x(),i=o&&o.getOptions().normalizeDepth,s=R_(t),a={__serialized__:hi(t,i)};if(s)return{exception:{values:[Eo(e,s)]},extra:a};let c={exception:{values:[{type:xn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:C_(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=uc(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function ac(e,t){return{exception:{values:[Eo(e,t)]}}}function uc(e,t){let n=t.stacktrace||t.stack||"",r=I_(t),o=x_(t);try{return e(n,r,o)}catch{}return[]}var v_=/Minified React error #\d+;/i;function I_(e){return e&&v_.test(e.message)?1:0}function x_(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function w_(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function lc(e,t,n,r){let o=n&&n.syntheticException||void 0,i=Ki(e,t,o,r);return at(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),$e(i)}function dc(e,t,n="info",r,o){let i=r&&r.syntheticException||void 0,s=cc(e,t,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),$e(s)}function Ki(e,t,n,r,o){let i;if(ni(t)&&t.error)return ac(e,t.error);if(ri(t)||Ks(t)){let s=t;if("stack"in t)i=ac(e,t);else{let a=s.name||(ri(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=cc(e,c,n,r),sr(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Ye(t)?ac(e,t):ot(t)||xn(t)?(i=T_(e,t,n,o),at(i,{synthetic:!0}),i):(i=cc(e,t,n,r),sr(i,`${t}`,void 0),at(i,{synthetic:!0}),i)}function cc(e,t,n,r){let o={};if(r&&n){let i=uc(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(tr(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function C_(e,{isUnhandledRejection:t}){let n=oa(e),r=t?"promise rejection":"exception";return ni(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:xn(e)?`Event \`${k_(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function k_(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function R_(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}f();function fc(e,{metadata:t,tunnel:n,dsn:r}){let o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Je(r)}},i=A_(e);return Re(o,[i])}function A_(e){return[{type:"user_report"},e]}var bo=class extends _o{constructor(t){let n={parentSpanIsAlwaysRootSpan:!0,...t},r=R.SENTRY_SDK_SOURCE||la();Ja(n,"browser",["browser"],r),super(n),n.sendClientReports&&R.document&&R.document.addEventListener("visibilitychange",()=>{R.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return lc(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return dc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){B&&g.warn("SDK not enabled, will not capture user feedback.");return}let n=fc(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}};f();f();f();f();var Pe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();var N_=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",St=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o||0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=N_(t.value,n),e(t)))}};f();f();var L=A;f();var Gd=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;f();f();var Qt=()=>L.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var pn=()=>{let e=Qt();return e&&e.activationStart||0};var yt=(e,t)=>{let n=Qt(),r="navigate";return n&&(L.document&&L.document.prerendering||pn()>0?r="prerender":L.document&&L.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Gd(),navigationType:r}};f();var nt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}};f();var mn=e=>{let t=n=>{(n.type==="pagehide"||L.document&&L.document.visibilityState==="hidden")&&e(n)};L.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))};f();var vr=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};f();f();var To=-1,M_=()=>{To=L.document.visibilityState==="hidden"&&!L.document.prerendering?0:1/0},Xi=e=>{L.document.visibilityState==="hidden"&&To>-1&&(To=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Xi,!0),removeEventListener("prerenderingchange",Xi,!0))},O_=()=>{addEventListener("visibilitychange",Xi,!0),addEventListener("prerenderingchange",Xi,!0)},hn=()=>(L.document&&To<0&&(M_(),O_()),{get firstHiddenTime(){return To}});f();var Ht=e=>{L.document&&L.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var D_=[1800,3e3],zd=(e,t={})=>{Ht(()=>{let n=hn(),r=yt("FCP"),o,s=nt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-pn(),0),r.entries.push(c),o(!0)))})});s&&(o=St(e,r,D_,t.reportAllChanges))})};var L_=[.1,.25],jd=(e,t={})=>{zd(vr(()=>{let n=yt("CLS",0),r,o=0,i=[],s=c=>{c.forEach(u=>{if(!u.hadRecentInput){let d=i[0],l=i[i.length-1];o&&d&&l&&u.startTime-l.startTime<1e3&&u.startTime-d.startTime<5e3?(o+=u.value,i.push(u)):(o=u.value,i=[u])}}),o>n.value&&(n.value=o,n.entries=i,r())},a=nt("layout-shift",s);a&&(r=St(e,n,L_,t.reportAllChanges),mn(()=>{s(a.takeRecords()),r(!0)}),setTimeout(r,0))}))};f();var P_=[100,300],qd=(e,t={})=>{Ht(()=>{let n=hn(),r=yt("FID"),o,i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),o(!0))},s=c=>{c.forEach(i)},a=nt("first-input",s);o=St(e,r,P_,t.reportAllChanges),a&&mn(vr(()=>{s(a.takeRecords()),a.disconnect()}))})};f();f();var Yd=0,pc=1/0,Ji=0,F_=e=>{e.forEach(t=>{t.interactionId&&(pc=Math.min(pc,t.interactionId),Ji=Math.max(Ji,t.interactionId),Yd=Ji?(Ji-pc)/7+1:0)})},mc,Vd=()=>mc?Yd:performance.interactionCount||0,Kd=()=>{"interactionCount"in performance||mc||(mc=nt("event",F_,{type:"event",buffered:!0,durationThreshold:0}))};var U_=[200,500],B_=0,Zd=()=>Vd()-B_,Xd=10,en=[],hc={},Jd=e=>{let t=en[en.length-1],n=hc[e.interactionId];if(n||en.length<Xd||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let r={id:e.interactionId,latency:e.duration,entries:[e]};hc[r.id]=r,en.push(r)}en.sort((r,o)=>o.latency-r.latency),en.splice(Xd).forEach(r=>{delete hc[r.id]})}},H_=()=>{let e=Math.min(en.length-1,Math.floor(Zd()/50));return en[e]},Qd=(e,t={})=>{Ht(()=>{Kd();let n=yt("INP"),r,o=s=>{s.forEach(c=>{c.interactionId&&Jd(c),c.entryType==="first-input"&&!en.some(d=>d.entries.some(l=>c.duration===l.duration&&c.startTime===l.startTime))&&Jd(c)});let a=H_();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=nt("event",o,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=St(e,n,U_,t.reportAllChanges),i&&("PerformanceEventTiming"in L&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),mn(()=>{o(i.takeRecords()),n.value<0&&Zd()>0&&(n.value=0,n.entries=[]),r(!0)}))})};f();var $_=[2500,4e3],ef={},tf=(e,t={})=>{Ht(()=>{let n=hn(),r=yt("LCP"),o,i=a=>{let c=a[a.length-1];c&&c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-pn(),0),r.entries=[c],o())},s=nt("largest-contentful-paint",i);if(s){o=St(e,r,$_,t.reportAllChanges);let a=vr(()=>{ef[r.id]||(i(s.takeRecords()),s.disconnect(),ef[r.id]=!0,o(!0))});["keydown","click"].forEach(c=>{L.document&&addEventListener(c,()=>setTimeout(a,0),!0)}),mn(a)}})};f();var W_=[800,1800],gc=e=>{L.document&&L.document.prerendering?Ht(()=>gc(e)):L.document&&L.document.readyState!=="complete"?addEventListener("load",()=>gc(e),!0):setTimeout(e,0)},nf=(e,t={})=>{let n=yt("TTFB"),r=St(e,n,W_,t.reportAllChanges);gc(()=>{let o=Qt();if(o){let i=o.responseStart;if(i<=0||i>performance.now())return;n.value=Math.max(i-pn(),0),n.entries=[o],r(!0)}})};var vo={},Zi={},rf,of,sf,af,cf;function Io(e,t=!1){return ko("cls",e,G_,rf,t)}function xo(e,t=!1){return ko("lcp",e,j_,sf,t)}function wo(e){return ko("fid",e,z_,of)}function _c(e){return ko("ttfb",e,q_,af)}function Co(e){return ko("inp",e,Y_,cf)}function At(e,t){return uf(e,t),Zi[e]||(V_(e),Zi[e]=!0),lf(e,t)}function Ir(e,t){let n=vo[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(o){Pe&&g.error(`Error while triggering instrumentation handler.
|
|
23
|
-
Type: ${e}
|
|
24
|
-
Name: ${Ze(r)}
|
|
25
|
-
Error:`,o)}}function G_(){return jd(e=>{Ir("cls",{metric:e}),rf=e},{reportAllChanges:!0})}function z_(){return qd(e=>{Ir("fid",{metric:e}),of=e})}function j_(){return tf(e=>{Ir("lcp",{metric:e}),sf=e},{reportAllChanges:!0})}function q_(){return nf(e=>{Ir("ttfb",{metric:e}),af=e})}function Y_(){return Qd(e=>{Ir("inp",{metric:e}),cf=e})}function ko(e,t,n,r,o=!1){uf(e,t);let i;return Zi[e]||(i=n(),Zi[e]=!0),r&&t({metric:r}),lf(e,t,o?i:void 0)}function V_(e){let t={};e==="event"&&(t.durationThreshold=0),nt(e,n=>{Ir(e,{entries:n})},t)}function uf(e,t){vo[e]=vo[e]||[],vo[e].push(t)}function lf(e,t,n){return()=>{n&&n();let r=vo[e];if(!r)return;let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function df(e){return"duration"in e}f();f();function Qi(e){return typeof e=="number"&&isFinite(e)}function $n(e,t,n,{...r}){let o=F(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Ln(e,()=>{let i=Le({startTime:t,...r});return i&&i.end(n),i})}function Ro(){return L&&L.addEventListener&&L.performance}function ye(e){return e/1e3}var K_=2147483647,ff=0,ke={},$t,Ao;function yc(){let e=Ro();if(e&&Se){e.mark&&L.performance.mark("sentry-tracing-init");let t=Z_(),n=X_(),r=J_(),o=Q_();return()=>{t(),n(),r(),o()}}return()=>{}}function Ec(){At("longtask",({entries:e})=>{for(let t of e){if(!Q())return;let n=ye(Se+t.startTime),r=ye(t.duration),o=Le({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[ue]:"auto.ui.browser.metrics"}});o&&o.end(n+r)}})}function bc(){new PerformanceObserver(t=>{for(let n of t.getEntries()){if(!Q()||!n.scripts[0])return;let r=ye(Se+n.startTime),o=ye(n.duration),i={[ue]:"auto.ui.browser.metrics"},s=n.scripts[0];if(s){let{invoker:c,invokerType:u,sourceURL:d,sourceFunctionName:l,sourceCharPosition:p}=s;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=u,d&&(i["code.filepath"]=d),l&&(i["code.function"]=l),p!==-1&&(i["browser.script.source_char_position"]=p)}let a=Le({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:i});a&&a.end(r+o)}}).observe({type:"long-animation-frame",buffered:!0})}function Tc(){At("event",({entries:e})=>{for(let t of e){if(!Q())return;if(t.name==="click"){let n=ye(Se+t.startTime),r=ye(t.duration),o={name:Ke(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[ue]:"auto.ui.browser.metrics"}},i=Yr(t.target);i&&(o.attributes["ui.component_name"]=i);let s=Le(o);s&&s.end(n+r)}}})}function X_(){return Io(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Pe&&g.log("[Measurements] Adding CLS"),ke.cls={value:e.value,unit:""},Ao=t)},!0)}function J_(){return xo(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Pe&&g.log("[Measurements] Adding LCP"),ke.lcp={value:e.value,unit:"millisecond"},$t=t)},!0)}function Z_(){return wo(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=ye(Se),r=ye(t.startTime);Pe&&g.log("[Measurements] Adding FID"),ke.fid={value:e.value,unit:"millisecond"},ke["mark.fid"]={value:n+r,unit:"second"}})}function Q_(){return _c(({metric:e})=>{e.entries[e.entries.length-1]&&(Pe&&g.log("[Measurements] Adding TTFB"),ke.ttfb={value:e.value,unit:"millisecond"})})}function vc(e){let t=Ro();if(!t||!L.performance.getEntries||!Se)return;Pe&&g.log("[Tracing] Adding & adjusting spans using Performance API");let n=ye(Se),r=t.getEntries(),{op:o,start_timestamp:i}=F(e);if(r.slice(ff).forEach(s=>{let a=ye(s.startTime),c=ye(Math.max(0,s.duration));if(!(o==="navigation"&&i&&n+a<i))switch(s.entryType){case"navigation":{tS(e,s,n);break}case"mark":case"paint":case"measure":{eS(e,s,a,c,n);let u=hn(),d=s.startTime<u.firstHiddenTime;s.name==="first-paint"&&d&&(Pe&&g.log("[Measurements] Adding FP"),ke.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&d&&(Pe&&g.log("[Measurements] Adding FCP"),ke.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{rS(e,s,s.name,a,c,n);break}}}),ff=Math.max(r.length-1,0),oS(e),o==="pageload"){sS(ke),["fcp","fp","lcp"].forEach(a=>{let c=ke[a];if(!c||!i||n>=i)return;let u=c.value,d=n+ye(u),l=Math.abs((d-i)*1e3),p=l-u;Pe&&g.log(`[Measurements] Normalized ${a} from ${u} to ${l} (${p})`),c.value=l});let s=ke["mark.fid"];s&&ke.fid&&($n(e,s.value,s.value+ye(ke.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ue]:"auto.ui.browser.metrics"}}),delete ke["mark.fid"]),"fcp"in ke||delete ke.cls,Object.entries(ke).forEach(([a,c])=>{Ii(a,c.value,c.unit)}),iS(e)}$t=void 0,Ao=void 0,ke={}}function eS(e,t,n,r,o){let i=Qt(),s=ye(i?i.requestStart:0),a=o+Math.max(n,s),c=o+n,u=c+r,d={[ue]:"auto.resource.browser.metrics"};return a!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),$n(e,a,u,{name:t.name,op:t.entryType,attributes:d}),a}function tS(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{es(e,t,r,n)}),es(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),es(e,t,"fetch",n,"cache","domainLookupStart"),es(e,t,"domainLookup",n,"DNS"),nS(e,t,n)}function es(e,t,n,r,o,i){let s=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!s||$n(e,r+ye(a),r+ye(s),{op:"browser",name:o||n,attributes:{[ue]:"auto.ui.browser.metrics"}})}function nS(e,t,n){let r=n+ye(t.requestStart),o=n+ye(t.responseEnd),i=n+ye(t.responseStart);t.responseEnd&&($n(e,r,o,{op:"browser",name:"request",attributes:{[ue]:"auto.ui.browser.metrics"}}),$n(e,i,o,{op:"browser",name:"response",attributes:{[ue]:"auto.ui.browser.metrics"}}))}function rS(e,t,n,r,o,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let s=ht(n),a={[ue]:"auto.resource.browser.metrics"};Sc(a,t,"transferSize","http.response_transfer_size"),Sc(a,t,"encodedBodySize","http.response_content_length"),Sc(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(a["url.scheme"]=s.protocol.split(":").pop()),s.host&&(a["server.address"]=s.host),a["url.same_origin"]=n.includes(L.location.origin);let c=i+r,u=c+o;$n(e,c,u,{name:n.replace(L.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function oS(e){let t=L.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Qi(n.rtt)&&(ke["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Qi(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Qi(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function iS(e){$t&&(Pe&&g.log("[Measurements] Adding LCP Data"),$t.element&&e.setAttribute("lcp.element",Ke($t.element)),$t.id&&e.setAttribute("lcp.id",$t.id),$t.url&&e.setAttribute("lcp.url",$t.url.trim().slice(0,200)),e.setAttribute("lcp.size",$t.size)),Ao&&Ao.sources&&(Pe&&g.log("[Measurements] Adding CLS Data"),Ao.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Ke(t.node))))}function Sc(e,t,n,r){let o=t[n];o!=null&&o<K_&&(e[r]=o)}function sS(e){let t=Qt();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(Pe&&g.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}f();var aS=1e3,pf,Ic,xc;function No(e){let t="dom";Be(t,e),He(t,cS)}function cS(){if(!L.document)return;let e=we.bind(null,"dom"),t=mf(e,!0);L.document.addEventListener("click",t,!1),L.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=L[n]&&L[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ce(r,"addEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){let l=mf(e);d.handler=l,o.call(this,i,l,a)}d.refCount++}catch{}return o.call(this,i,s,a)}}),ce(r,"removeEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(o.call(this,i,d.handler,a),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,s,a)}}))})}function uS(e){if(e.type!==Ic)return!1;try{if(!e.target||e.target._sentryId!==xc)return!1}catch{}return!0}function lS(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function mf(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=dS(n);if(lS(n.type,r))return;_e(n,"_sentryCaptured",!0),r&&!r._sentryId&&_e(r,"_sentryId",G());let o=n.type==="keypress"?"input":n.type;uS(n)||(e({event:n,name:o,global:t}),Ic=n.type,xc=r?r._sentryId:void 0),clearTimeout(pf),pf=L.setTimeout(()=>{xc=void 0,Ic=void 0},aS)}}function dS(e){try{return e.target}catch{return null}}f();var ts;function tn(e){let t="history";Be(t,e),He(t,fS)}function fS(){if(!xa())return;let e=L.onpopstate;L.onpopstate=function(...n){let r=L.location.href,o=ts;if(ts=r,we("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let o=r.length>2?r[2]:void 0;if(o){let i=ts,s=String(o);ts=s,we("history",{from:i,to:s})}return n.apply(this,r)}}ce(L.history,"pushState",t),ce(L.history,"replaceState",t)}f();var ns={};function rs(e){let t=ns[e];if(t)return t;let n=L[e];if(Xr(n))return ns[e]=n.bind(L);let r=L.document;if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){Pe&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(ns[e]=n.bind(L))}function os(e){ns[e]=void 0}function nn(...e){return rs("setTimeout")(...e)}f();var ut="__sentry_xhr_v3__";function Wn(e){let t="xhr";Be(t,e),He(t,pS)}function pS(){if(!L.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;ce(e,"open",function(t){return function(...n){let r=Y()*1e3,o=Fe(n[0])?n[0].toUpperCase():void 0,i=mS(n[1]);if(!o||!i)return t.apply(this,n);this[ut]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[ut];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={endTimestamp:Y()*1e3,startTimestamp:r,xhr:this};we("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ce(this,"onreadystatechange",function(a){return function(...c){return s(),a.apply(this,c)}}):this.addEventListener("readystatechange",s),ce(this,"setRequestHeader",function(a){return function(...c){let[u,d]=c,l=this[ut];return l&&Fe(u)&&Fe(d)&&(l.request_headers[u.toLowerCase()]=d),a.apply(this,c)}}),t.apply(this,n)}}),ce(e,"send",function(t){return function(...n){let r=this[ut];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let o={startTimestamp:Y()*1e3,xhr:this};return we("xhr",o),t.apply(this,n)}})}function mS(e){if(Fe(e))return e;try{return e.toString()}catch{}}f();var wc=[],is=new Map;function Cc(){if(Ro()&&Se){let t=hS();return()=>{t()}}return()=>{}}var hf={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 hS(){return Co(({metric:e})=>{let t=x();if(!t||e.value==null)return;let n=e.entries.find(E=>E.duration===e.value&&hf[E.name]);if(!n)return;let{interactionId:r}=n,o=hf[n.name],i=t.getOptions(),s=ye(Se+n.startTime),a=ye(e.value),c=U(),u=Q(),d=u?K(u):void 0,p=(r!=null?is.get(r):void 0)||d,m=p?F(p).description:c.getScopeData().transactionName,h=c.getUser(),y=t.getIntegrationByName("Replay"),v=y&&y.getReplayId(),b=h!==void 0?h.email||h.id||h.ip_address:void 0,I;try{I=c.getScopeData().contexts.profile.profile_id}catch{}let P=Ke(n.target),O=J({release:i.release,environment:i.environment,transaction:m,[lo]:e.value,[ue]:"auto.http.browser.inp",user:b||void 0,profile_id:I||void 0,replay_id:v||void 0,"user_agent.original":L.navigator&&L.navigator.userAgent}),w=Le({name:P,op:`ui.interaction.${o}`,attributes:O,startTime:s,experimental:{standalone:!0}});w.addEvent("inp",{[mr]:"millisecond",[hr]:e.value}),w.end(s+a)})}function kc(e){let t=({entries:n})=>{let r=Q(),o=r&&K(r);n.forEach(i=>{if(!df(i)||!o)return;let s=i.interactionId;if(s!=null&&!is.has(s)){if(wc.length>10){let a=wc.shift();is.delete(a)}wc.push(s),is.set(s,o)}})};At("event",t),At("first-input",t)}function Mo(e,t=rs("fetch")){let n=0,r=0;function o(i){let s=i.body.length;n+=s,r++;let a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return os("fetch"),un("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return os("fetch"),n-=s,r--,un(c)}}return Fi(e,o)}f();var gS=10,_S=20,SS=30,yS=40,ES=50;function xr(e,t,n,r){let o={filename:e,function:t==="<anonymous>"?st:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var bS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,TS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vS=/\((\S*)(?::(\d+))(?::(\d+))\)/,IS=e=>{let t=bS.exec(e);if(t){let[,r,o,i]=t;return xr(r,st,+o,+i)}let n=TS.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=vS.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[o,i]=yf(n[1]||st,n[2]);return xr(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},gf=[SS,IS],xS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,CS=e=>{let t=xS.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=wS.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||st;return[o,r]=yf(o,r),xr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},_f=[ES,CS],kS=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,RS=e=>{let t=kS.exec(e);return t?xr(t[2],t[1]||st,+t[3],t[4]?+t[4]:void 0):void 0},AS=[yS,RS],NS=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,MS=e=>{let t=NS.exec(e);return t?xr(t[2],t[3]||st,+t[1]):void 0},OS=[gS,MS],DS=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,LS=e=>{let t=DS.exec(e);return t?xr(t[5],t[3]||t[4]||st,+t[1],+t[2]):void 0},PS=[_S,LS],Sf=[gf,_f],Rc=ci(...Sf),yf=(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]:st,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};f();f();var ss=1024,FS="Breadcrumbs",US=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:FS,setup(n){t.console&&Kr($S(n)),t.dom&&No(HS(n,t.dom)),t.xhr&&Wn(WS(n)),t.fetch&&An(GS(n)),t.history&&tn(zS(n)),t.sentry&&n.on("beforeSendEvent",BS(n))}}},Ac=US;function BS(e){return function(n){x()===e&&tt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:wt(n)},{event:n})}}function HS(e,t){return function(r){if(x()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>ss&&(B&&g.warn(`\`dom.maxStringLength\` cannot exceed ${ss}, but a value of ${a} was configured. Sentry will use ${ss} instead.`),a=ss),typeof s=="string"&&(s=[s]);try{let u=r.event,d=jS(u)?u.target:u;o=Ke(d,{keyAttrs:s,maxStringLength:a}),i=Yr(d)}catch{o="<unknown>"}if(o.length===0)return;let c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),tt(c,{event:r.event,name:r.name,global:r.global})}}function $S(e){return function(n){if(x()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:no(n.level),message:wn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${wn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;tt(r,{input:n.args,level:n.level})}}function WS(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[ut];if(!r||!o||!i)return;let{method:s,url:a,status_code:c,body:u}=i,d={method:s,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o};tt({category:"xhr",data:d,type:"http"},l)}}function GS(e){return function(n){if(x()!==e)return;let{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o};tt({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=n.response,s={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:o};tt({category:"fetch",data:s,type:"http"},a)}}}function zS(e){return function(n){if(x()!==e)return;let r=n.from,o=n.to,i=ht(R.location.href),s=r?ht(r):void 0,a=ht(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),tt({category:"navigation",data:{from:r,to:o}})}}function jS(e){return!!e&&!!e.target}f();var qS=["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"],YS="BrowserApiErrors",VS=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:YS,setupOnce(){t.setTimeout&&ce(R,"setTimeout",Ef),t.setInterval&&ce(R,"setInterval",Ef),t.requestAnimationFrame&&ce(R,"requestAnimationFrame",KS),t.XMLHttpRequest&&"XMLHttpRequest"in R&&ce(XMLHttpRequest.prototype,"send",XS);let n=t.eventTarget;n&&(Array.isArray(n)?n:qS).forEach(JS)}}},Nc=VS;function Ef(e){return function(...t){let n=t[0];return t[0]=Hn(n,{mechanism:{data:{function:Ze(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function KS(e){return function(t){return e.apply(this,[Hn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ze(e)},handled:!1,type:"instrument"}})])}}function XS(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&ce(n,o,function(i){let s={mechanism:{data:{function:o,handler:Ze(i)},handled:!1,type:"instrument"}},a=Rn(i);return a&&(s.mechanism.data.handler=Ze(a)),Hn(i,s)})}),e.apply(this,t)}}function JS(e){let t=R,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ce(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=Hn(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ze(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[o,Hn(i,{mechanism:{data:{function:"addEventListener",handler:Ze(i),target:e},handled:!1,type:"instrument"}}),s])}}),ce(n,"removeEventListener",function(r){return function(o,i,s){let a=i;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}f();var ZS="GlobalHandlers",QS=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ZS,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(ey(n),bf("onerror")),t.onunhandledrejection&&(ty(n),bf("onunhandledrejection"))}}},Mc=QS;function ey(e){Qr(t=>{let{stackParser:n,attachStacktrace:r}=Tf();if(x()!==e||sc())return;let{msg:o,url:i,line:s,column:a,error:c}=t,u=oy(Ki(n,c||o,void 0,r,!1),i,s,a);u.level="error",Bt(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function ty(e){eo(t=>{let{stackParser:n,attachStacktrace:r}=Tf();if(x()!==e||sc())return;let o=ny(t),i=In(o)?ry(o):Ki(n,o,void 0,r,!0);i.level="error",Bt(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function ny(e){if(In(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 ry(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function oy(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,l=Fe(t)&&t.length>0?t:Cn();return c.length===0&&c.push({colno:u,filename:l,function:st,in_app:!0,lineno:d}),e}function bf(e){B&&g.log(`Global Handler attached: ${e}`)}function Tf(){let e=x();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}f();var Oc=()=>({name:"HttpContext",preprocessEvent(e){if(!R.navigator&&!R.location&&!R.document)return;let t=e.request&&e.request.url||R.location&&R.location.href,{referrer:n}=R.document||{},{userAgent:r}=R.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}});f();var iy="cause",sy=5,ay="LinkedErrors",cy=(e={})=>{let t=e.limit||sy,n=e.key||iy;return{name:ay,preprocessEvent(r,o,i){let s=i.getOptions();ea(Eo,s.stackParser,s.maxValueLength,n,t,r,o)}}},Dc=cy;function vf(e){return[Hi(),Ui(),Nc(),Ac(),Mc(),Dc(),Gi(),Oc()]}function uy(e={}){return{...{defaultIntegrations:vf(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:R.SENTRY_RELEASE&&R.SENTRY_RELEASE.id?R.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0},...e}}function ly(){let e=R,t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,o=R.location&&R.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:"],s=!!r&&R===R.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!s&&!a}function dy(e={}){let t=uy(e);if(ly()){Xe(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}B&&(di()||g.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));let n={...t,stackParser:sa(t.stackParser||Rc),integrations:za(t),transport:t.transport||Mo},r=Va(bo,n);return t.autoSessionTracking&&hy(),r}function fy(e={}){if(!R.document){B&&g.error("Global document not defined in showReportDialog call");return}let t=U(),n=t.getClient(),r=n&&n.getDsn();if(!r){B&&g.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){let a=Li();a&&(e.eventId=a)}let o=R.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Ga(r,e),e.onLoad&&(o.onload=e.onLoad);let{onClose:i}=e;if(i){let a=c=>{if(c.data==="__sentry_reportdialog_closed__")try{i()}finally{R.removeEventListener("message",a)}};R.addEventListener("message",a)}let s=R.document.head||R.document.body;s?s.appendChild(o):B&&g.error("Not injecting report dialog. No injection point found in HTML")}function py(){}function my(e){e()}function hy(){if(typeof R.document>"u"){B&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Fn({ignoreDuration:!0}),ho(),tn(({from:e,to:t})=>{e!==void 0&&e!==t&&(Fn({ignoreDuration:!0}),ho())})}function gy(e){let t=x();t&&t.captureUserFeedback(e)}f();var _y={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},If=R;async function Oo(e){let t=_y[e],n=If.Sentry=If.Sentry||{};if(!t)throw new Error(`Cannot lazy load integration: ${e}`);let r=n[e];if(typeof r=="function")return r;let o=Sy(t),i=R.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="origin";let s=new Promise((c,u)=>{i.addEventListener("load",()=>c()),i.addEventListener("error",u)});R.document.body.appendChild(i);try{await s}catch{throw new Error(`Error when loading integration: ${e}`)}let a=n[e];if(typeof a!="function")throw new Error(`Could not load integration: ${e}`);return a}function Sy(e){let t=x(),n=t&&t.getOptions(),r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Ue}/${e}.min.js`,r).toString()}f();var yy=A,Ey="ReportingObserver",xf=new WeakMap,by=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(xf.has(x()))for(let o of r)Ae(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}Pn(`${s}: ${a}`)})}return{name:Ey,setupOnce(){if(!aa())return;new yy.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){xf.set(r,!0)}}},Ty=by;f();var vy="HttpClient",Iy=(e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:vy,setup(n){Oy(n,t),Dy(n,t)}}},xy=Iy;function wy(e,t,n,r){if(kf(e,n.status,n.url)){let o=Ly(t,r),i,s,a,c;Af()&&([i,a]=wf("Cookie",o),[s,c]=wf("Set-Cookie",n));let u=Rf({url:o.url,method:o.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:a,responseCookies:c});Bt(u)}}function wf(e,t){let n=Ry(t.headers),r;try{let o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=Cf(o))}catch{B&&g.log(`Could not extract cookies from header ${e}`)}return[n,r]}function Cy(e,t,n,r){if(kf(e,t.status,t.responseURL)){let o,i,s;if(Af()){try{let c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=Cf(c))}catch{B&&g.log("Could not extract cookies from response headers")}try{s=Ay(t)}catch{B&&g.log("Could not extract headers from response")}o=r}let a=Rf({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:s,responseCookies:i});Bt(a)}}function ky(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Cf(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function Ry(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function Ay(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
26
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function Ny(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function My(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function Oy(e,t){Jr()&&An(n=>{if(x()!==e)return;let{response:r,args:o}=n,[i,s]=o;r&&wy(t,i,r,s)})}function Dy(e,t){"XMLHttpRequest"in A&&Wn(n=>{if(x()!==e)return;let r=n.xhr,o=r[ut];if(!o)return;let{method:i,request_headers:s}=o;try{Cy(t,r,i,s)}catch(a){B&&g.warn("Error while extracting response event form XHR response",a)}})}function kf(e,t,n){return My(e.failedRequestStatusCodes,t)&&Ny(e.failedRequestTargets,n)&&!So(n,x())}function Rf(e){let t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},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:ky(e.responseHeaders)}}};return at(n,{type:"http.client",handled:!1}),n}function Ly(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Af(){let e=x();return e?!!e.getOptions().sendDefaultPii:!1}f();var Lc=A,Py=7,Fy="ContextLines",Uy=(e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:Py;return{name:Fy,processEvent(n){return Hy(n,t)}}},By=Uy;function Hy(e,t){let n=Lc.document,r=Lc.location&&_a(Lc.location.href);if(!n||!r)return e;let o=e.exception&&e.exception.values;if(!o||!o.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(`
|
|
27
|
-
`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>$y(u,s,r,t)))}),e}function $y(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||da(t,e,r),e}f();var de=A,cu="sentryReplaySession",Wy="replay_event",uu="Unable to send Replay",Gy=3e5,zy=9e5,jy=5e3,qy=5500,Yy=6e4,Vy=5e3,Ky=3,Nf=15e4,as=5e3,Xy=3e3,Jy=300,lu=2e7,Zy=4999,Qy=15e3,Mf=36e5;function Bc(e,t){return e??t()}function Uo(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var Ce;(function(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"})(Ce||(Ce={}));function eE(e){return e.nodeType===e.ELEMENT_NODE}function Lo(e){let t=Uo([e,"optionalAccess",n=>n.host]);return Uo([t,"optionalAccess",n=>n.shadowRoot])===e}function Po(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function tE(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function nE(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 ds(e){try{let t=e.rules||e.cssRules;return t?tE(Array.from(t,Jf).join("")):null}catch{return null}}function Jf(e){let t;if(oE(e))try{t=ds(e.styleSheet)||nE(e)}catch{}else if(iE(e)&&e.selectorText.includes(":"))return rE(e.cssText);return t||e.cssText}function rE(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function oE(e){return"styleSheet"in e}function iE(e){return"selectorText"in e}var fs=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;let n=Uo([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Bc(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function sE(){return new fs}function ws({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 Bo({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Mr(e){return e.toLowerCase()}function Hc(e){return e.toUpperCase()}var Of="__rrweb_original__";function aE(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){let i=t.getImageData,s=Of in i?i[Of]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function du(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Mr(t):null}function ps(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Zf(e,t){let n;try{n=new URL(e,Bc(t,()=>window.location.href))}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(r);return Bc(Uo([o,"optionalAccess",i=>i[1]]),()=>null)}var Df={};function Qf(e){let t=Df[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return Df[e]=r.bind(window)}function $c(...e){return Qf("setTimeout")(...e)}function ep(...e){return Qf("clearTimeout")(...e)}var cE=1,uE=new RegExp("[^a-z0-9-_:]"),Ho=-2;function fu(){return cE++}function lE(e){if(e instanceof HTMLFormElement)return"form";let t=Mr(e.tagName);return uE.test(t)?"div":t}function dE(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var wr,Lf,fE=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pE=/^(?:[a-z+]+:)?\/\//i,mE=/^www\..*/i,hE=/^(data:)([^,]*),(.*)/i;function ms(e,t){return(e||"").replace(fE,(n,r,o,i,s,a)=>{let c=o||s||a,u=r||i||"";if(!c)return n;if(pE.test(c)||mE.test(c))return`url(${u}${c}${u})`;if(hE.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${dE(t)+c}${u})`;let d=t.split("/"),l=c.split("/");d.pop();for(let p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}var gE=/^[^ \t\n\r\u000c]+/,_E=/^[, \t\n\r\u000c]+/;function SE(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s,a=i.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}let o=[];for(;r(_E),!(n>=t.length);){let i=r(gE);if(i.slice(-1)===",")i=kr(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=kr(e,i);let a=!1;for(;;){let c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return o.join(", ")}function kr(e,t){if(!t||t.trim()==="")return t;let n=e.createElement("a");return n.href=t,n.href}function yE(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function pu(){let e=document.createElement("a");return e.href="",e.href}function tp(e,t,n,r,o,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?kr(e,r):n==="srcset"?SE(e,r):n==="style"?ms(r,pu()):t==="object"&&n==="data"?kr(e,r):typeof i=="function"?i(n,r,o):r)}function np(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function EE(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function bE(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Gn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Gn(e.parentNode,t,n,r+1)}function Rr(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(bE(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Or(e,t,n,r,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Gn(s,Rr(r,o)),c<0)return!0;a=Gn(s,Rr(t,n),c>=0?c:1/0)}else{if(a=Gn(s,Rr(t,n)),a<0)return!1;c=Gn(s,Rr(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function TE(e,t,n){let r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){let a=$c(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{ep(a),o=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return $c(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function vE(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;let i=$c(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{ep(i),r=!0,t()})}function IE(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:y,maskInputFn:v,dataURLOptions:b={},inlineImages:I,recordCanvas:P,keepIframeSrcFn:O,newlyAddedElement:w=!1}=t,E=xE(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ce.Document,childNodes:[],compatMode:e.compatMode}:{type:Ce.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ce.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return CE(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:v,dataURLOptions:b,inlineImages:I,recordCanvas:P,keepIframeSrcFn:O,newlyAddedElement:w,rootId:E,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p});case e.TEXT_NODE:return wE(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:h,maskInputFn:v,rootId:E});case e.CDATA_SECTION_NODE:return{type:Ce.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:Ce.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function xE(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function wE(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName,p=e.textContent,m=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,y=l==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||Uo([e,"access",b=>b.parentNode,"access",b=>b.sheet,"optionalAccess",b=>b.cssRules])&&(p=ds(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}p=ms(p,pu())}h&&(p="SCRIPT_PLACEHOLDER");let v=Or(e,r,i,o,s,n);if(!m&&!h&&!y&&p&&v&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(c.textarea||v)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){let b=ws({type:null,tagName:l,maskInputOptions:c});p=Bo({isMasked:Or(e,r,i,o,s,b),element:e,value:p,maskInputFn:u})}return{type:Ce.Text,textContent:p||"",isStyle:m,rootId:d}}function CE(e,t){let{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:y,maskAllText:v,maskTextClass:b,unmaskTextClass:I,maskTextSelector:P,unmaskTextSelector:O}=t,w=EE(e,r,o,i),E=lE(e),T={},C=e.attributes.length;for(let k=0;k<C;k++){let N=e.attributes[k];N.name&&!np(E,N.name,N.value)&&(T[N.name]=tp(n,E,Mr(N.name),N.value,e,c))}if(E==="link"&&s){let k=Array.from(n.styleSheets).find(H=>H.href===e.href),N=null;k&&(N=ds(k)),N&&(delete T.rel,delete T.href,T._cssText=ms(N,k.href))}if(E==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let k=ds(e.sheet);k&&(T._cssText=ms(k,pu()))}if(E==="input"||E==="textarea"||E==="select"||E==="option"){let k=e,N=du(k),H=ps(k,Hc(E),N),ne=k.checked;if(N!=="submit"&&N!=="button"&&H){let re=Or(k,b,P,I,O,ws({type:N,tagName:Hc(E),maskInputOptions:a}));T.value=Bo({isMasked:re,element:k,value:H,maskInputFn:u})}ne&&(T.checked=ne)}if(E==="option"&&(e.selected&&!a.select?T.selected=!0:delete T.selected),E==="canvas"&&p){if(e.__context==="2d")aE(e)||(T.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let k=e.toDataURL(d.type,d.quality),N=document.createElement("canvas");N.width=e.width,N.height=e.height;let H=N.toDataURL(d.type,d.quality);k!==H&&(T.rr_dataURL=k)}}if(E==="img"&&l){wr||(wr=n.createElement("canvas"),Lf=wr.getContext("2d"));let k=e,N=k.crossOrigin;k.crossOrigin="anonymous";let H=()=>{k.removeEventListener("load",H);try{wr.width=k.naturalWidth,wr.height=k.naturalHeight,Lf.drawImage(k,0,0),T.rr_dataURL=wr.toDataURL(d.type,d.quality)}catch(ne){console.warn(`Cannot inline img src=${k.currentSrc}! Error: ${ne}`)}N?T.crossOrigin=N:k.removeAttribute("crossorigin")};k.complete&&k.naturalWidth!==0?H():k.addEventListener("load",H)}if((E==="audio"||E==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),w){let{width:k,height:N}=e.getBoundingClientRect();T={class:T.class,rr_width:`${k}px`,rr_height:`${N}px`}}E==="iframe"&&!m(T.src)&&(!w&&!e.contentDocument&&(T.rr_src=T.src),delete T.src);let D;try{customElements.get(E)&&(D=!0)}catch{}return{type:Ce.Element,tagName:E,attributes:T,childNodes:[],isSVG:yE(e)||void 0,needBlock:w,rootId:y,isCustom:D}}function le(e){return e==null?"":e.toLowerCase()}function kE(e,t){if(t.comment&&e.type===Ce.Comment)return!0;if(e.type===Ce.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Zf(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(le(e.attributes.name).match(/^msapplication-tile(image|color)$/)||le(e.attributes.name)==="application-name"||le(e.attributes.rel)==="icon"||le(e.attributes.rel)==="apple-touch-icon"||le(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&le(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(le(e.attributes.property).match(/^(og|twitter|fb):/)||le(e.attributes.name).match(/^(og|twitter):/)||le(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(le(e.attributes.name)==="robots"||le(e.attributes.name)==="googlebot"||le(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(le(e.attributes.name)==="author"||le(e.attributes.name)==="generator"||le(e.attributes.name)==="framework"||le(e.attributes.name)==="publisher"||le(e.attributes.name)==="progid"||le(e.attributes.property).match(/^article:/)||le(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(le(e.attributes.name)==="google-site-verification"||le(e.attributes.name)==="yandex-verification"||le(e.attributes.name)==="csrf-token"||le(e.attributes.name)==="p:domain_verify"||le(e.attributes.name)==="verify-v1"||le(e.attributes.name)==="verification"||le(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ar(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:I,dataURLOptions:P={},inlineImages:O=!1,recordCanvas:w=!1,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C=5e3,onStylesheetLoad:D,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:H=!1}=t,{preserveWhiteSpace:ne=!0}=t,re=IE(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,dataURLOptions:P,inlineImages:O,recordCanvas:w,keepIframeSrcFn:N,newlyAddedElement:H});if(!re)return console.warn(e,"not serialized"),null;let be;r.hasNode(e)?be=r.getId(e):kE(re,I)||!ne&&re.type===Ce.Text&&!re.isStyle&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?be=Ho:be=fu();let $=Object.assign(re,{id:be});if(r.add(e,$),be===Ho)return null;E&&E(e);let Ie=!p;if($.type===Ce.Element){Ie=Ie&&!$.needBlock,delete $.needBlock;let W=e.shadowRoot;W&&Po(W)&&($.isShadowHost=!0)}if(($.type===Ce.Document||$.type===Ce.Element)&&Ie){I.headWhitespace&&$.type===Ce.Element&&$.tagName==="head"&&(ne=!1);let W={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:I,dataURLOptions:P,inlineImages:O,recordCanvas:w,preserveWhiteSpace:ne,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:N};for(let fe of Array.from(e.childNodes)){let je=Ar(fe,W);je&&$.childNodes.push(je)}if(eE(e)&&e.shadowRoot)for(let fe of Array.from(e.shadowRoot.childNodes)){let je=Ar(fe,W);je&&(Po(e.shadowRoot)&&(je.isShadow=!0),$.childNodes.push(je))}}return e.parentNode&&Lo(e.parentNode)&&Po(e.parentNode)&&($.isShadow=!0),$.type===Ce.Element&&$.tagName==="iframe"&&TE(e,()=>{let W=e.contentDocument;if(W&&T){let fe=Ar(W,{doc:W,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:I,dataURLOptions:P,inlineImages:O,recordCanvas:w,preserveWhiteSpace:ne,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:N});fe&&T(e,fe)}},C),$.type===Ce.Element&&$.tagName==="link"&&typeof $.attributes.rel=="string"&&($.attributes.rel==="stylesheet"||$.attributes.rel==="preload"&&typeof $.attributes.href=="string"&&Zf($.attributes.href)==="css")&&vE(e,()=>{if(D){let W=Ar(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:I,dataURLOptions:P,inlineImages:O,recordCanvas:w,preserveWhiteSpace:ne,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:D,stylesheetLoadTimeout:k,keepIframeSrcFn:N});W&&D(e,W)}},k),$}function RE(e,t){let{mirror:n=new fs,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOM:I=!1,dataURLOptions:P,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:T,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:k=()=>!1}=t||{};return Ar(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I,dataURLOptions:P,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:T,onStylesheetLoad:C,stylesheetLoadTimeout:D,keepIframeSrcFn:k,newlyAddedElement:!1})}function gn(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}function ze(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Cr=`Please stop import mirror directly. Instead of that,\r
|
|
28
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
29
|
-
or you can use record.mirror to access the mirror instance during recording.`,Pf={map:{},getId(){return console.error(Cr),-1},getNode(){return console.error(Cr),null},removeNodeFromMap(){console.error(Cr)},has(){return console.error(Cr),!1},reset(){console.error(Cr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Pf=new Proxy(Pf,{get(e,t,n){return t==="map"&&console.error(Cr),Reflect.get(e,t,n)}}));function $o(e,t,n={}){let r=null,o=0;return function(...i){let s=Date.now();!o&&n.leading===!1&&(o=s);let a=t-(s-o),c=this;a<=0||a>t?(r&&(LE(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Cs(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function rp(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){Cs(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>rp(e,t,i||{},!0)}function mu(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var hs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(hs=()=>new Date().getTime());function op(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:gn([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||gn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||gn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:gn([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||gn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||gn([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function ip(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ap(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ot(e,t,n,r,o){if(!e)return!1;let i=ap(e);if(!i)return!1;let s=Rr(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=Gn(i,s),c=-1;return a<0?!1:(r&&(c=Gn(i,Rr(null,r))),a>-1&&c<0?!0:a<c)}function AE(e,t){return t.getId(e)!==-1}function Pc(e,t){return t.getId(e)===Ho}function cp(e,t){if(Lo(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?cp(e.parentNode,t):!0:!0}function Wc(e){return!!e.changedTouches}function NE(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function up(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function lp(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Gc(e){return!!gn([e,"optionalAccess",t=>t.shadowRoot])}var zc=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Ia(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dp(e){let t=null;return gn([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function ME(e){let t=e,n;for(;n=dp(t);)t=n;return t}function OE(e){let t=e.ownerDocument;if(!t)return!1;let n=ME(e);return t.contains(n)}function fp(e){let t=e.ownerDocument;return t?t.contains(e)||OE(e):!1}var Ff={};function hu(e){let t=Ff[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return Ff[e]=r.bind(window)}function DE(...e){return hu("requestAnimationFrame")(...e)}function Cs(...e){return hu("setTimeout")(...e)}function LE(...e){return hu("clearTimeout")(...e)}var z=(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))(z||{}),j=(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))(j||{}),Ge=(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))(Ge||{}),rn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(rn||{});function PE(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}function Uf(e){return"__ln"in e}var jc=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=PE([n,"optionalAccess",o=>o.next])||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Uf(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Uf(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Bf=(e,t)=>`${e}@${t}`,qc=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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Set,r=new jc,o=c=>{let u=c,d=Ho;for(;d===Ho;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=c=>{if(!c.parentNode||!fp(c))return;let u=Lo(c.parentNode)?this.mirror.getId(dp(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);let l=Ar(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{up(p,this.mirror)&&this.iframeManager.addIframe(p),lp(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Gc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)Hf(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(let c of this.addedSet)!$f(this.droppedSet,c)&&!Hf(this.removes,c,this.mirror)||$f(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let u=this.mirror.getId(s.value.parentNode),d=o(s.value);u!==-1&&d!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){let d=u;if(u=u.previous,d){let l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{let m=d.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=m.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Pc(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Or(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ap(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){let s=du(n),a=n.tagName;o=ps(n,a,s);let c=ws({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=Or(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Bo({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!np(n.tagName,r)&&(i.attributes[r]=tp(this.doc,Mr(n.tagName),Mr(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=Lo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ot(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Pc(n,this.mirror)||!AE(n,this.mirror)||(this.addedSet.has(n)?(Yc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||cp(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Bf(r,o)]?Yc(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Lo(t.target)&&Po(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Pc(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Bf(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ot(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),Gc(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Yc(e,t){e.delete(t),t.childNodes.forEach(n=>Yc(e,n))}function Hf(e,t,n){return e.length===0?!1:pp(e,t,n)}function pp(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:pp(e,r,n)}function $f(e,t){return e.size===0?!1:mp(e,t)}function mp(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:mp(e,n):!1}var Fo;function FE(e){Fo=e}function UE(){Fo=void 0}var X=e=>Fo?(...n)=>{try{return e(...n)}catch(r){if(Fo&&Fo(r)===!0)return()=>{};throw r}}:e;function Mt(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var Nr=[];function jo(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 hp(e,t){let n=new qc;Nr.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,o=Mt([window,"optionalAccess",s=>s.Zone,"optionalAccess",s=>s.__symbol__,"optionalCall",s=>s("MutationObserver")]);o&&window[o]&&(r=window[o]);let i=new r(X(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function BE({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,c=$o(X(l=>{let p=Date.now()-a;e(s.map(m=>(m.timeOffset-=p,m)),l),s=[],a=null}),i),u=X($o(X(l=>{let p=jo(l),{clientX:m,clientY:h}=Wc(l)?l.changedTouches[0]:l;a||(a=hs()),s.push({x:m,y:h,id:r.getId(p),timeOffset:hs()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?j.Drag:l instanceof MouseEvent?j.MouseMove:j.TouchMove)}),o,{trailing:!1})),d=[ze("mousemove",u,n),ze("touchmove",u,n),ze("drag",u,n)];return X(()=>{d.forEach(l=>l())})}function HE({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],u=null,d=l=>p=>{let m=jo(p);if(Ot(m,r,o,i,!0))return;let h=null,y=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=rn.Mouse;break;case"touch":h=rn.Touch;break;case"pen":h=rn.Pen;break}h===rn.Touch?Ge[l]===Ge.MouseDown?y="TouchStart":Ge[l]===Ge.MouseUp&&(y="TouchEnd"):rn.Pen}else Wc(p)&&(h=rn.Touch);h!==null?(u=h,(y.startsWith("Touch")&&h===rn.Touch||y.startsWith("Mouse")&&h===rn.Mouse)&&(h=null)):Ge[l]===Ge.Click&&(h=u,u=null);let v=Wc(p)?p.changedTouches[0]:p;if(!v)return;let b=n.getId(m),{clientX:I,clientY:P}=v;X(e)({type:Ge[y],id:b,x:I,y:P,...h!==null&&{pointerType:h}})};return Object.keys(Ge).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=Mr(l),m=d(l);if(window.PointerEvent)switch(Ge[l]){case Ge.MouseDown:case Ge.MouseUp:p=p.replace("mouse","pointer");break;case Ge.TouchStart:case Ge.TouchEnd:return}c.push(ze(p,m,t))}),X(()=>{c.forEach(l=>l())})}function gp({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){let a=X($o(X(c=>{let u=jo(c);if(!u||Ot(u,r,o,i,!0))return;let d=n.getId(u);if(u===t&&t.defaultView){let l=op(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return ze("scroll",a,t)}function $E({viewportResizeCb:e},{win:t}){let n=-1,r=-1,o=X($o(X(()=>{let i=ip(),s=sp();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return ze("resize",o,t)}var WE=["INPUT","TEXTAREA","SELECT"],Wf=new WeakMap;function GE({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:y}){function v(T){let C=jo(T),D=T.isTrusted,k=C&&Hc(C.tagName);if(k==="OPTION"&&(C=C.parentElement),!C||!k||WE.indexOf(k)<0||Ot(C,r,o,i,!0))return;let N=C;if(N.classList.contains(s)||a&&N.matches(a))return;let H=du(C),ne=ps(N,k,H),re=!1,be=ws({maskInputOptions:c,tagName:k,type:H}),$=Or(C,p,h,m,y,be);(H==="radio"||H==="checkbox")&&(re=C.checked),ne=Bo({isMasked:$,element:C,value:ne,maskInputFn:u}),b(C,l?{text:ne,isChecked:re,userTriggered:D}:{text:ne,isChecked:re});let Ie=C.name;H==="radio"&&Ie&&re&&t.querySelectorAll(`input[type="radio"][name="${Ie}"]`).forEach(W=>{if(W!==C){let fe=Bo({isMasked:$,element:W,value:ps(W,k,H),maskInputFn:u});b(W,l?{text:fe,isChecked:!re,userTriggered:!1}:{text:fe,isChecked:!re})}})}function b(T,C){let D=Wf.get(T);if(!D||D.text!==C.text||D.isChecked!==C.isChecked){Wf.set(T,C);let k=n.getId(T);X(e)({...C,id:k})}}let P=(d.input==="last"?["change"]:["input","change"]).map(T=>ze(T,X(v),t)),O=t.defaultView;if(!O)return()=>{P.forEach(T=>T())};let w=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),E=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&P.push(...E.map(T=>rp(T[0],T[1],{set(){X(v)({target:this,isTrusted:!1})}},!1,O))),X(()=>{P.forEach(T=>T())})}function gs(e){let t=[];function n(r,o){if(cs("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||cs("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||cs("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||cs("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function _n(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function zE({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:X((d,l,p)=>{let[m,h]=p,{id:y,styleId:v}=_n(l,t,n.styleMirror);return(y&&y!==-1||v&&v!==-1)&&e({id:y,styleId:v,adds:[{rule:m,index:h}]}),d.apply(l,p)})});let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:X((d,l,p)=>{let[m]=p,{id:h,styleId:y}=_n(l,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,removes:[{index:m}]}),d.apply(l,p)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:X((d,l,p)=>{let[m]=p,{id:h,styleId:y}=_n(l,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replace:m}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:X((d,l,p)=>{let[m]=p,{id:h,styleId:y}=_n(l,t,n.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replaceSync:m}),d.apply(l,p)})}));let c={};us("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(us("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),us("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),us("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:X((p,m,h)=>{let[y,v]=h,{id:b,styleId:I}=_n(m.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||I&&I!==-1)&&e({id:b,styleId:I,adds:[{rule:y,index:[...gs(m),v||0]}]}),p.apply(m,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:X((p,m,h)=>{let[y]=h,{id:v,styleId:b}=_n(m.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,removes:[{index:[...gs(m),y]}]}),p.apply(m,h)})})}),X(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function _p({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let o=n.nodeName==="#document"?Mt([n,"access",s=>s.defaultView,"optionalAccess",s=>s.Document]):Mt([n,"access",s=>s.ownerDocument,"optionalAccess",s=>s.defaultView,"optionalAccess",s=>s.ShadowRoot]),i=Mt([o,"optionalAccess",s=>s.prototype])?Object.getOwnPropertyDescriptor(Mt([o,"optionalAccess",s=>s.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Mt([i,"access",s=>s.get,"optionalAccess",s=>s.call,"call",s=>s(this)])},set(s){let a=Mt([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,s)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),X(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function jE({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:X((a,c,u)=>{let[d,l,p]=u;if(n.has(d))return i.apply(c,[d,l,p]);let{id:m,styleId:h}=_n(Mt([c,"access",y=>y.parentRule,"optionalAccess",y=>y.parentStyleSheet]),t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,set:{property:d,value:l,priority:p},index:gs(c.parentRule)}),a.apply(c,u)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:X((a,c,u)=>{let[d]=u;if(n.has(d))return s.apply(c,[d]);let{id:l,styleId:p}=_n(Mt([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:gs(c.parentRule)}),a.apply(c,u)})}),X(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function qE({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){let a=X(u=>$o(X(d=>{let l=jo(d);if(!l||Ot(l,t,n,r,!0))return;let{currentTime:p,volume:m,muted:h,playbackRate:y}=l;e({type:u,id:o.getId(l),currentTime:p,volume:m,muted:h,playbackRate:y})}),i.media||500)),c=[ze("play",a(0),s),ze("pause",a(1),s),ze("seeked",a(2),s),ze("volumechange",a(3),s),ze("ratechange",a(4),s)];return X(()=>{c.forEach(u=>u())})}function YE({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,d){let l=new i(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};let s=mu(t.fonts,"add",function(a){return function(c){return Cs(X(()=>{let u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),X(()=>{r.forEach(a=>a())})}function VE(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,c=X(()=>{let u=t.getSelection();if(!u||a&&Mt([u,"optionalAccess",p=>p.isCollapsed]))return;a=u.isCollapsed||!1;let d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){let m=u.getRangeAt(p),{startContainer:h,startOffset:y,endContainer:v,endOffset:b}=m;Ot(h,r,o,i,!0)||Ot(v,r,o,i,!0)||d.push({start:n.getId(h),startOffset:y,end:n.getId(v),endOffset:b})}s({ranges:d})});return c(),ze("selectionchange",c)}function KE({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:mu(n.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function XE(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=hp(e,e.doc));let o=BE(e),i=HE(e),s=gp(e),a=$E(e,{win:n}),c=GE(e),u=qE(e),d=()=>{},l=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(d=zE(e,{win:n}),l=_p(e,e.doc),p=jE(e,{win:n}),e.collectFonts&&(m=YE(e)));let h=VE(e),y=KE(e),v=[];for(let b of e.plugins)v.push(b.observer(b.callback,n,b.options));return X(()=>{Nr.forEach(b=>b.reset()),Mt([r,"optionalAccess",b=>b.disconnect,"call",b=>b()]),o(),i(),s(),a(),c(),u(),d(),l(),p(),m(),h(),y(),v.forEach(b=>b())})}function cs(e){return typeof window[e]<"u"}function us(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Wo=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};function Gf(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}var Vc=class{constructor(){this.crossOriginIframeMirror=new Wo(fu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Kc=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Wo(fu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Gf([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case z.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:z.IncrementalSnapshot,data:{source:j.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case z.Meta:case z.Load:case z.DomContentLoaded:return!1;case z.Plugin:return n;case z.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case z.IncrementalSnapshot:switch(n.data.source){case j.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case j.Drag:case j.TouchMove:case j.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case j.ViewportResize:return!1;case j.MediaInteraction:case j.MouseInteraction:case j.Scroll:case j.CanvasMutation:case j.Input:return this.replaceIds(n.data,t,["id"]),n;case j.StyleSheetRule:case j.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case j.Font:return n;case j.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case j.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Gf([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(o=>{this.replaceStyleIds(o,t,["styleId"])})]),n}}return!1}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Ce.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Xc=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Jc=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Po(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let r=hp({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(gp({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Cs(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(_p({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(mu(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&fp(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},_s=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},Zc=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new zc,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Jf(a),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Qc=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){DE(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}},ve,Ss;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=Ft([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Nt=sE();function yn(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:y,maskInputOptions:v,slimDOMOptions:b,maskAttributeFn:I,maskInputFn:P,maskTextFn:O,maxCanvasSize:w=null,packFn:E,sampling:T={},dataURLOptions:C={},mousemoveWait:D,recordDOM:k=!0,recordCanvas:N=!1,recordCrossOriginIframes:H=!1,recordAfter:ne=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:re=!1,collectFonts:be=!1,inlineImages:$=!1,plugins:Ie,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:fe=new Set([]),errorHandler:je,onMutation:Tt,getCanvasManager:vt}=e;FE(je);let dt=H?window.parent===window:!0,Dt=!1;if(!dt)try{window.parent.document&&(Dt=!1)}catch{Dt=!0}if(dt&&!t)throw new Error("emit function is required");D!==void 0&&T.mousemove===void 0&&(T.mousemove=D),Nt.reset();let Kn=y===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:v!==void 0?v:{},Xn=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};NE();let Jn,Zn=0,Qn=ee=>{for(let xt of Ie||[])xt.eventProcessor&&(ee=xt.eventProcessor(ee));return E&&!Dt&&(ee=E(ee)),ee};ve=(ee,xt)=>{let V=ee;if(V.timestamp=hs(),Ft([Nr,"access",ge=>ge[0],"optionalAccess",ge=>ge.isFrozen,"call",ge=>ge()])&&V.type!==z.FullSnapshot&&!(V.type===z.IncrementalSnapshot&&V.data.source===j.Mutation)&&Nr.forEach(ge=>ge.unfreeze()),dt)Ft([t,"optionalCall",ge=>ge(Qn(V),xt)]);else if(Dt){let ge={type:"rrweb",event:Qn(V),origin:window.location.origin,isCheckout:xt};window.parent.postMessage(ge,"*")}if(V.type===z.FullSnapshot)Jn=V,Zn=0;else if(V.type===z.IncrementalSnapshot){if(V.data.source===j.Mutation&&V.data.isAttachIframe)return;Zn++;let ge=r&&Zn>=r,te=n&&Jn&&V.timestamp-Jn.timestamp>n;(ge||te)&&Vs(!0)}};let ae=ee=>{ve({type:z.IncrementalSnapshot,data:{source:j.Mutation,...ee}})},he=ee=>ve({type:z.IncrementalSnapshot,data:{source:j.Scroll,...ee}}),qe=ee=>ve({type:z.IncrementalSnapshot,data:{source:j.CanvasMutation,...ee}}),xe=ee=>ve({type:z.IncrementalSnapshot,data:{source:j.AdoptedStyleSheet,...ee}}),Te=new Zc({mutationCb:ae,adoptedStyleSheetCb:xe}),It=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Vc:new Kc({mirror:Nt,mutationCb:ae,stylesheetManager:Te,recordCrossOriginIframes:H,wrappedEmit:ve});for(let ee of Ie||[])ee.getMirror&&ee.getMirror({nodeMirror:Nt,crossOriginIframeMirror:It.crossOriginIframeMirror,crossOriginIframeStyleMirror:It.crossOriginIframeStyleMirror});let Lt=new Qc,zr=ZE(vt,{mirror:Nt,win:window,mutationCb:ee=>ve({type:z.IncrementalSnapshot,data:{source:j.CanvasMutation,...ee}}),recordCanvas:N,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:w,sampling:T.canvas,dataURLOptions:C,errorHandler:je}),ti=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Xc:new Jc({mutationCb:ae,scrollCb:he,bypassOptions:{onMutation:Tt,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:Kn,dataURLOptions:C,maskAttributeFn:I,maskTextFn:O,maskInputFn:P,recordCanvas:N,inlineImages:$,sampling:T,slimDOMOptions:Xn,iframeManager:It,stylesheetManager:Te,canvasManager:zr,keepIframeSrcFn:W,processedNodeManager:Lt},mirror:Nt}),Vs=(ee=!1)=>{if(!k)return;ve({type:z.Meta,data:{href:window.location.href,width:sp(),height:ip()}},ee),Te.reset(),ti.init(),Nr.forEach(V=>V.lock());let xt=RE(document,{mirror:Nt,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:Kn,maskAttributeFn:I,maskInputFn:P,maskTextFn:O,slimDOM:Xn,dataURLOptions:C,recordCanvas:N,inlineImages:$,onSerialize:V=>{up(V,Nt)&&It.addIframe(V),lp(V,Nt)&&Te.trackLinkElement(V),Gc(V)&&ti.addShadowRoot(V.shadowRoot,document)},onIframeLoad:(V,ge)=>{It.attachIframe(V,ge),V.contentWindow&&zr.addWindow(V.contentWindow),ti.observeAttachShadow(V)},onStylesheetLoad:(V,ge)=>{Te.attachLinkElement(V,ge)},keepIframeSrcFn:W});if(!xt)return console.warn("Failed to snapshot the document");ve({type:z.FullSnapshot,data:{node:xt,initialOffset:op(window)}}),Nr.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Te.adoptStyleSheets(document.adoptedStyleSheets,Nt.getId(document))};Ss=Vs;try{let ee=[],xt=ge=>X(XE)({onMutation:Tt,mutationCb:ae,mousemoveCb:(te,vn)=>ve({type:z.IncrementalSnapshot,data:{source:vn,positions:te}}),mouseInteractionCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.MouseInteraction,...te}}),scrollCb:he,viewportResizeCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.ViewportResize,...te}}),inputCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.Input,...te}}),mediaInteractionCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.MediaInteraction,...te}}),styleSheetRuleCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.StyleSheetRule,...te}}),styleDeclarationCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.StyleDeclaration,...te}}),canvasMutationCb:qe,fontCb:te=>ve({type:z.IncrementalSnapshot,data:{source:j.Font,...te}}),selectionCb:te=>{ve({type:z.IncrementalSnapshot,data:{source:j.Selection,...te}})},customElementCb:te=>{ve({type:z.IncrementalSnapshot,data:{source:j.CustomElement,...te}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:Kn,inlineStylesheet:h,sampling:T,recordDOM:k,recordCanvas:N,inlineImages:$,userTriggeredOnInput:re,collectFonts:be,doc:ge,maskAttributeFn:I,maskInputFn:P,maskTextFn:O,keepIframeSrcFn:W,blockSelector:i,unblockSelector:s,slimDOMOptions:Xn,dataURLOptions:C,mirror:Nt,iframeManager:It,stylesheetManager:Te,shadowDomManager:ti,processedNodeManager:Lt,canvasManager:zr,ignoreCSSAttributes:fe,plugins:Ft([Ie,"optionalAccess",te=>te.filter,"call",te=>te(vn=>vn.observer),"optionalAccess",te=>te.map,"call",te=>te(vn=>({observer:vn.observer,options:vn.options,callback:Zm=>ve({type:z.Plugin,data:{plugin:vn.name,payload:Zm}})}))])||[]},{});It.addLoadListener(ge=>{try{ee.push(xt(ge.contentDocument))}catch(te){console.warn(te)}});let V=()=>{Vs(),ee.push(xt(document))};return document.readyState==="interactive"||document.readyState==="complete"?V():(ee.push(ze("DOMContentLoaded",()=>{ve({type:z.DomContentLoaded,data:{}}),ne==="DOMContentLoaded"&&V()})),ee.push(ze("load",()=>{ve({type:z.Load,data:{}}),ne==="load"&&V()},window))),()=>{ee.forEach(ge=>ge()),Lt.destroy(),Ss=void 0,UE()}}catch(ee){console.warn(ee)}}function JE(e){if(!Ss)throw new Error("please take full snapshot after start recording");Ss(e)}yn.mirror=Nt;yn.takeFullSnapshot=JE;function ZE(e,t){try{return e?e(t):new _s}catch{return console.warn("Unable to initialize CanvasManager"),new _s}}var QE=3,eb=5;function gu(e){return e>9999999999?e:e*1e3}function Fc(e){return e>9999999999?e/1e3:e}function qo(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:z.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Me(t,10,1e3)}}),t.category==="console")))}var tb="button,a";function Sp(e){return e.closest(tb)||e}function yp(e){let t=Ep(e);return!t||!(t instanceof Element)?t:Sp(t)}function Ep(e){return nb(e)?e.target:e}function nb(e){return typeof e=="object"&&!!e&&"target"in e}var Sn;function rb(e){return Sn||(Sn=[],ob()),Sn.push(e),()=>{let t=Sn?Sn.indexOf(e):-1;t>-1&&Sn.splice(t,1)}}function ob(){ce(de,"open",function(e){return function(...t){if(Sn)try{Sn.forEach(n=>n())}catch{}return e.apply(de,t)}})}function ib(e,t,n){e.handleClick(t,n)}var eu=class{constructor(t,n,r=qo){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=rb(()=>{this._lastMutation=zf()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(ab(n,this._ignoreSelector)||!cb(t))return;let r={timestamp:Fc(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Fc(t)}registerScroll(t=Date.now()){this._lastScroll=Fc(t)}registerClick(t){let n=Sp(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=zf();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:de.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(n,d);return}if(s>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:de.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=nn(()=>this._checkClicks(),1e3)}},sb=["A","BUTTON","INPUT"];function ab(e,t){return!!(!sb.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 cb(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function zf(){return Date.now()/1e3}function ub(e,t){try{if(!lb(t))return;let{source:n}=t.data;if(n===j.Mutation&&e.registerMutation(t.timestamp),n===j.Scroll&&e.registerScroll(t.timestamp),db(t)){let{type:r,id:o}=t.data,i=yn.mirror.getNode(o);i instanceof HTMLElement&&r===Ge.Click&&e.registerClick(i)}}catch{}}function lb(e){return e.type===QE}function db(e){return e.data.source===j.MouseInteraction}function Wt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ys;(function(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"})(ys||(ys={}));var fb=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function pb(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let n in e)if(fb.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var mb=e=>t=>{if(!e.isEnabled())return;let n=hb(t);if(!n)return;let r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o&&o.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&ib(e.clickDetector,n,yp(t.event)),qo(e,n)};function bp(e,t){let n=yn.mirror.getId(e),r=n&&yn.mirror.getNode(n),o=r&&yn.mirror.getMeta(r),i=o&&_b(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===ys.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:pb(i.attributes)}}:{}}}function hb(e){let{target:t,message:n}=gb(e);return Wt({category:`ui.${e.name}`,...bp(t,n)})}function gb(e){let t=e.name==="click",n,r=null;try{r=t?yp(e.event):Ep(e.event),n=Ke(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function _b(e){return e.type===ys.Element}function Sb(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=yb(t);n&&qo(e,n)}function yb(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||Eb(s)||!i)return null;let a=t||r||o,c=i.length===1;if(!a&&c)return null;let u=Ke(s,{maxStringLength:200})||"<unknown>",d=bp(s,u);return Wt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}function Eb(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var bb={resource:wb,paint:Ib,navigation:xb};function ls(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Tb(e){return e.map(vb).filter(Boolean)}function vb(e){let t=bb[e.entryType];return t?t(e):null}function Dr(e){return((Se||de.performance.timeOrigin)+e)/1e3}function Ib(e){let{duration:t,entryType:n,name:r,startTime:o}=e,i=Dr(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function xb(e){let{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:m,transferSize:h,type:y}=e;return o===0?null:{type:`${t}.${y}`,start:Dr(m),end:Dr(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:p}}}function wb(e){let{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Dr(i),end:Dr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function Cb(e){let t=e.entries[e.entries.length-1],n=t?t.element:void 0;return ks(e,"largest-contentful-paint",n)}function kb(e){let t=e.entries[0],n=t&&t.sources&&t.sources[0]?t.sources[0].node:void 0;return ks(e,"cumulative-layout-shift",n)}function Rb(e){let t=e.entries[e.entries.length-1],n=t?t.target:void 0;return ks(e,"first-input-delay",n)}function Ab(e){let t=e.entries[e.entries.length-1],n=t?t.target:void 0;return ks(e,"interaction-to-next-paint",n)}function ks(e,t,n){let r=e.value,o=e.rating,i=Dr(r);return{type:"web-vital",name:t,start:i,end:i,data:{value:r,size:r,rating:o,nodeId:n?yn.mirror.getId(n):void 0}}}function Nb(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(o=>{r.push(At(o,n))}),r.push(xo(ls(Cb,e)),Io(ls(kb,e)),wo(ls(Rb,e)),Co(ls(Ab,e))),()=>{r.forEach(o=>o())}}var oe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Mb='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.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(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Ob(){let e=new Blob([Mb]);return URL.createObjectURL(e)}function rt(e,t){oe&&(g.info(e),t&&Tp(e))}function zn(e,t){oe&&(g.info(e),t&&nn(()=>{Tp(e)},0))}function Tp(e){tt({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}var Go=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${lu}.`)}},Es=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>lu)throw new Go;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?gu(t):null}},tu=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){rt("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((o,i)=>{let s=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){oe&&g.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},nu=class{constructor(t){this._worker=new tu(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=gu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>lu?Promise.reject(new Go):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{oe&&g.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},ru=class{constructor(t){this._fallback=new Es,this._compression=new nu(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{rt("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n}=this._fallback,r=[];for(let o of t)r.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(o){oe&&g.warn("[Replay] Failed to add events when switching buffers.",o)}}};function Db({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=Lb(t);if(n)return n}return rt("[Replay] Using simple buffer"),new Es}function Lb(e){try{let t=e||Pb();if(!t)return;rt(`[Replay] Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new ru(n)}catch{rt("[Replay] Failed to create compression worker")}}function Pb(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ob():""}function _u(){try{return"sessionStorage"in de&&!!de.sessionStorage}catch{return!1}}function Fb(e){Ub(),e.session=void 0}function Ub(){if(_u())try{de.sessionStorage.removeItem(cu)}catch{}}function vp(e){return e===void 0?!1:Math.random()<e}function Ip(e){let t=Date.now(),n=e.id||G(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a}}function Su(e){if(_u())try{de.sessionStorage.setItem(cu,JSON.stringify(e))}catch{}}function Bb(e,t){return vp(e)?"session":t?"buffer":!1}function jf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let o=Bb(e,t),i=Ip({sampled:o,previousSessionId:r});return n&&Su(i),i}function Hb(e){if(!_u())return null;try{let t=de.sessionStorage.getItem(cu);if(!t)return null;let n=JSON.parse(t);return zn("[Replay] Loading existing session",e),Ip(n)}catch{return null}}function ou(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function xp(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return ou(e.started,t,r)||ou(e.lastActivity,n,r)}function wp(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!xp(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Uc({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},o){let i=o.stickySession&&Hb(e);return i?wp(i,{sessionIdleExpire:t,maxReplayDuration:n})?(zn("[Replay] Session in sessionStorage is expired, creating new one..."),jf(o,{previousSessionId:i.id})):i:(zn("[Replay] Creating new session",e),jf(o,{previousSessionId:r}))}function $b(e){return e.type===z.Custom}function yu(e,t,n){return kp(e,t)?(Cp(e,t,n),!0):!1}function Wb(e,t,n){return kp(e,t)?Cp(e,t,n):Promise.resolve(null)}async function Cp(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),o=Gb(t,r.beforeAddRecordingEvent);return o?await e.eventBuffer.addEvent(o):void 0}catch(r){let o=r&&r instanceof Go?"addEventSizeExceeded":"addEvent";oe&&g.error(r),await e.stop({reason:o});let i=x();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function kp(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=gu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(zn(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Gb(e,t){try{if(typeof t=="function"&&$b(e))return t(e)}catch(n){return oe&&g.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Eu(e){return!e.type}function iu(e){return e.type==="transaction"}function zb(e){return e.type==="replay_event"}function qf(e){return e.type==="feedback"}function jb(e){return(t,n)=>{if(!e.isEnabled()||!Eu(t)&&!iu(t))return;let r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(iu(t)){qb(e,t);return}Yb(e,t)}}}function qb(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Yb(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||nn(()=>{e.sendBufferedReplayOrFlush()})}function Vb(e){return t=>{!e.isEnabled()||!Eu(t)||Kb(e,t)}}function Kb(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=Wt({category:"replay.hydrate-error",data:{url:Cn()}});qo(e,r)}}function Xb(e){let t=x();t&&t.on("beforeAddBreadcrumb",n=>Jb(e,n))}function Jb(e,t){if(!e.isEnabled()||!Rp(t))return;let n=Zb(t);n&&qo(e,n)}function Zb(e){return!Rp(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Qb(e):Wt(e)}function Qb(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Wt(e);let n=!1,r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>as?(n=!0,`${o.slice(0,as)}\u2026`):o;if(typeof o=="object")try{let i=Me(o,7);return JSON.stringify(i).length>as?(n=!0,`${JSON.stringify(i,null,2).slice(0,as)}\u2026`):i}catch{}return o});return Wt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Rp(e){return!!e.category}function eT(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function tT(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:z.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function nT(e,t){return e.recordingMode!=="buffer"||t.message===uu||!t.exception||t.type?!1:vp(e.getOptions().errorSampleRate)}function rT(e){return Object.assign((t,n)=>e.isEnabled()?zb(t)?(delete t.breadcrumbs,t):!Eu(t)&&!iu(t)&&!qf(t)||!e.checkAndHandleExpiredSession()?t:qf(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),tT(e,t),t):eT(t,n)&&!e.getOptions()._experiments.captureExceptions?(oe&&g.log("[Replay] Ignoring error from rrweb internals",t),null):((nT(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):t,{id:"Replay"})}function Rs(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:z.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function oT(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 iT(e){return t=>{if(!e.isEnabled())return;let n=oT(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Rs(e,[n]),!1)))}}function sT(e,t){return oe&&e.getOptions()._experiments.traceInternals?!1:So(t,x())}function Ap(e,t){e.isEnabled()&&t!==null&&(sT(e,t.name)||e.addUpdate(()=>(Rs(e,[t]),!0)))}function As(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=Dp(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Np(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Mp(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Dp(e)];if(!e)return[void 0]}catch{return oe&&g.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return oe&&g.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function bs(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Op(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:J({method:i,statusCode:s,request:a,response:c})}}function zo(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function En(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:o,warnings:i}=aT(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function su(e,t){return Object.entries(e).reduce((n,[r,o])=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=o),n},{})}function Dp(e){return new URLSearchParams(e).toString()}function aT(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Nf,n=cT(e);if(t){let r=e.slice(0,Nf);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function cT(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Ts(e,t){let n=uT(e);return pt(n,t)}function uT(e,t=de.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(de.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 lT(e,t,n){try{let r=await fT(e,t,n),o=Op("resource.fetch",r);Ap(n.replay,o)}catch(r){oe&&g.error("[Replay] Failed to capture fetch breadcrumb",r)}}function dT(e,t){let{input:n,response:r}=t,o=n?Lp(n):void 0,i=As(o),s=r?Np(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function fT(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Ts(s,n.networkDetailAllowUrls)&&!Ts(s,n.networkDetailDenyUrls),p=l?pT(n,t.input,u):zo(u),m=await mT(l,n,t.response,d);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:p,response:m}}function pT({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let o=n?_T(n,t):{};if(!e)return En(o,r,void 0);let i=Lp(n),[s,a]=Mp(i),c=En(o,r,s);return a?bs(c,a):c}async function mT(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return zo(o);let i=r?Pp(r.headers,n):{};if(!r||!t&&o!==void 0)return En(i,o,void 0);let[s,a]=await gT(r),c=hT(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?bs(c,a):c}function hT(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{let i=e&&e.length&&n===void 0?As(e):n;return r?t?En(o,i,e):En(o,i,void 0):zo(i)}catch(i){return oe&&g.warn("[Replay] Failed to serialize response body",i),En(o,n,void 0)}}async function gT(e){let t=ST(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await yT(t)]}catch(n){return oe&&g.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Lp(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Pp(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function _T(e,t){return e.length===1&&typeof e[0]!="string"?Yf(e[0],t):e.length===2?Yf(e[1],t):{}}function Yf(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?Pp(n,t):Array.isArray(n)?{}:su(n,t):{}}function ST(e){try{return e.clone()}catch(t){oe&&g.warn("[Replay] Failed to clone response body",t)}}function yT(e){return new Promise((t,n)=>{let r=nn(()=>n(new Error("Timeout while trying to read response body")),500);ET(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function ET(e){return await e.text()}async function bT(e,t,n){try{let r=vT(e,t,n),o=Op("resource.xhr",r);Ap(n.replay,o)}catch(r){oe&&g.error("[Replay] Failed to capture xhr breadcrumb",r)}}function TT(e,t){let{xhr:n,input:r}=t;if(!n)return;let o=As(r),i=n.getResponseHeader("content-length")?Np(n.getResponseHeader("content-length")):CT(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function vT(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Ts(c,n.networkDetailAllowUrls)||Ts(c,n.networkDetailDenyUrls)){let E=zo(l),T=zo(p);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:E,response:T}}let m=a[ut],h=m?su(m.request_headers,n.networkRequestHeaders):{},y=su(IT(a),n.networkResponseHeaders),[v,b]=n.networkCaptureBodies?Mp(s):[void 0],[I,P]=n.networkCaptureBodies?xT(a):[void 0],O=En(h,l,v),w=En(y,p,I);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:b?bs(O,b):O,response:P?bs(w,P):w}}function IT(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
30
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}function xT(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return wT(e.response,e.responseType)}catch(n){t.push(n)}return oe&&g.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function wT(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return oe&&g.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return oe&&g.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function CT(e,t){try{let n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return As(n)}catch{return}}function kT(e){let t=x();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>RT(a,c,u))}catch{}}function RT(e,t,n){if(t.data)try{AT(t)&&MT(n)&&(TT(t,n),bT(t,n,e)),NT(t)&&OT(n)&&(dT(t,n),lT(t,n,e))}catch{oe&&g.warn("Error when enriching network breadcrumb")}}function AT(e){return e.category==="xhr"}function NT(e){return e.category==="fetch"}function MT(e){return e&&e.xhr}function OT(e){return e&&e.response}function DT(e){let t=x();No(mb(e)),tn(iT(e)),Xb(e),kT(e);let n=rT(e);Pi(n),t&&(t.on("beforeSendEvent",Vb(e)),t.on("afterSendEvent",jb(e)),t.on("createDsc",r=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,o)=>{let i=e.getSessionId();o&&o.includeReplay&&e.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function LT(e){try{return Promise.all(Rs(e,[PT(de.performance.memory)]))}catch{return[]}}function PT(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function FT(e,t,n){let r,o,i,s=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function u(){return o!==void 0||i!==void 0?a():r}function d(){return o&&clearTimeout(o),o=nn(a,t),s&&i===void 0&&(i=nn(a,s)),r}return d.cancel=c,d.flush=u,d}function UT(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){oe&&g.warn("[Replay] Received replay event after session expired.");return}let o=r||!t;t=!0,e.clickDetector&&ub(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!yu(e,n,o))return!0;if(!o)return!1;if(HT(e,o),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){let i=e.eventBuffer.getEarliestTimestamp();i&&(rt(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&Su(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function BT(e){let t=e.getOptions();return{type:z.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 HT(e,t){!t||!e.session||e.session.segmentId!==0||yu(e,BT(e),!1)}function $T(e,t,n,r){return Re(io(e,ur(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function WT({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
31
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{let i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function GT({client:e,scope:t,replayId:n,event:r}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit("preprocessEvent",r,i);let s=await mo(e.getOptions(),r,i,t,e,Z());if(!s)return null;s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function zT({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){let s=WT({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=x(),p=U(),m=l&&l.getTransport(),h=l&&l.getDsn();if(!l||!m||!h||!i.sampled)return $e({});let y={type:Wy,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},v=await GT({scope:p,client:l,replayId:t,event:y});if(!v)return l.recordDroppedEvent("event_processor","replay",y),rt("An event processor returned `null`, will not send event."),$e({});delete v.sdkProcessingMetadata;let b=$T(v,s,h,l.getOptions().tunnel),I;try{I=await m.send(b)}catch(O){let w=new Error(uu);try{w.cause=O}catch{}throw w}if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new vs(I.statusCode);let P=ao({},I);if(so(P,"replay"))throw new Is(P);return I}var vs=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},Is=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};async function Fp(e,t={count:0,interval:Vy}){let{recordingData:n,options:r}=e;if(n.length)try{return await zT(e),!0}catch(o){if(o instanceof vs||o instanceof Is)throw o;if(br("Replays",{_retryCount:t.count}),oe&&r._experiments&&r._experiments.captureExceptions&&Jt(o),t.count>=Ky){let i=new Error(`${uu} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{nn(async()=>{try{await Fp(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Up="__THROTTLED",jT="__SKIPPED";function qT(e,t,n){let r=new Map,o=a=>{let c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0),s=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){let d=s;return s=!0,d?jT:Up}s=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var au=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Gy,sessionIdleExpire:zy},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=FT(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=qT((s,a)=>Wb(this,s,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(Xy,r),timeout:r,scrollTimeout:Jy,ignoreSelector:o?o.join(","):""}:void 0;i&&(this.clickDetector=new eu(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",zn(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){oe&&g.info("[Replay] Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){oe&&g.info("[Replay] Buffering is in progress, call `flush()` to save the replay");return}zn("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();let t=Uc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){oe&&g.info("[Replay] Buffering is in progress, call `flush()` to save the replay");return}zn("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);let t=Uc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=yn({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Yy},emit:UT(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{rt(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Fb(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),rt("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),rt("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();rt("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){let n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&ou(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${de.location.pathname}${de.location.hash}${de.location.search}`,n=`${de.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===Up){let o=Wt({category:"replay.throttled"});this.addUpdate(()=>!yu(this,{type:eb,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastActiveSpan||Q(),n=t&&K(t),o=(n&&F(n).data||{})[Oe];if(!(!n||!o||!["route","custom"].includes(o)))return F(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Db({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){oe&&g.error("[Replay]",t),oe&&this._options._experiments&&this._options._experiments.captureExceptions&&Jt(t)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Uc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return wp(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{de.document.addEventListener("visibilitychange",this._handleVisibilityChange),de.addEventListener("blur",this._handleWindowBlur),de.addEventListener("focus",this._handleWindowFocus),de.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(DT(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Nb(this)}_removeListeners(){try{de.document.removeEventListener("visibilitychange",this._handleVisibilityChange),de.removeEventListener("blur",this._handleWindowBlur),de.removeEventListener("focus",this._handleWindowFocus),de.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{de.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let t=Wt({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{let t=Wt({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Sb(this,t)}}_doChangeToBackgroundTasks(t){!this.session||xp(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){rt("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:z.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Tb(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Rs(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){oe&&g.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await LT(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Fp({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});let r=x();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){oe&&g.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){rt(`[Replay] Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&rt("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){oe&&g.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Su(this.session)}__init6(){this._onMutationHandler=t=>{let n=t.length,r=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>o||i){let s=Wt({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(s)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function Do(e,t){return[...e,...t].join(",")}function YT({mask:e,unmask:t,block:n,unblock:r,ignore:o}){let i=['base[href="/"]'],s=Do(e,[".sentry-mask","[data-sentry-mask]"]),a=Do(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:Do(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Do(r,[]),ignoreSelector:Do(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function VT({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}var Vf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',KT=["content-length","content-type","accept"],Kf=!1,XT=e=>new xs(e),xs=class e{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=jy,flushMaxDelay:n=qy,minReplayDuration:r=Zy,maxReplayDuration:o=Mf,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:b=[],networkCaptureBodies:I=!0,networkRequestHeaders:P=[],networkResponseHeaders:O=[],mask:w=[],maskAttributes:E=["title","placeholder"],unmask:T=[],block:C=[],unblock:D=[],ignore:k=[],maskFn:N,beforeAddRecordingEvent:H,beforeErrorSampling:ne}={}){this.name=e.id;let re=YT({mask:w,unmask:T,block:C,unblock:D,ignore:k});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:N,maskInputFn:N,maskAttributeFn:(be,$,Ie)=>VT({maskAttributes:E,maskAllText:u,privacyOptions:re,key:be,value:$,el:Ie}),...re,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:be=>{try{be.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Qy),maxReplayDuration:Math.min(o,Mf),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:h,slowClickIgnoreSelectors:y,networkDetailAllowUrls:v,networkDetailDenyUrls:b,networkCaptureBodies:I,networkRequestHeaders:Xf(P),networkResponseHeaders:Xf(O),beforeAddRecordingEvent:H,beforeErrorSampling:ne,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Vf}`:Vf),this._isInitialized&&ir())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Kf}set _isInitialized(t){Kf=t}afterAllSetup(t){!ir()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let n=JT(this._initialOptions,t);this._replay=new au({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};xs.__initStatic();function JT(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...J(e)},o=fn(n.replaysSessionSampleRate),i=fn(n.replaysOnErrorSampleRate);return o==null&&i==null&&Xe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),i!=null&&(r.errorSampleRate=i),r}function Xf(e){return[...KT,...e.map(t=>t.toLowerCase())]}function ZT(){let e=x();return e&&e.getIntegrationByName("Replay")}f();var Bp;(function(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"})(Bp||(Bp={}));function QT(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Tu(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Tu(e.parentNode,t,n,r+1)}function Hp(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(QT(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var Lr=`Please stop import mirror directly. Instead of that,\r
|
|
32
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
33
|
-
or you can use record.mirror to access the mirror instance during recording.`,$p={map:{},getId(){return console.error(Lr),-1},getNode(){return console.error(Lr),null},removeNodeFromMap(){console.error(Lr)},has(){return console.error(Lr),!1},reset(){console.error(Lr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&($p=new Proxy($p,{get(e,t,n){return t==="map"&&console.error(Lr),Reflect.get(e,t,n)}}));function Iu(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){Vp(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Iu(e,t,i||{},!0)}function xu(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function ev(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ds(e,t,n,r,o){if(!e)return!1;let i=ev(e);if(!i)return!1;let s=Hp(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=Tu(i,s),c=-1;return a<0?!1:(r&&(c=Tu(i,Hp(null,r))),a>-1&&c<0?!0:a<c)}var Wp={};function Yp(e){let t=Wp[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return Wp[e]=r.bind(window)}function jn(...e){return Yp("requestAnimationFrame")(...e)}function Vp(...e){return Yp("setTimeout")(...e)}var Fr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Fr||{}),Ms;function tv(e){Ms=e}var bu=e=>Ms?(...n)=>{try{return e(...n)}catch(r){if(Ms&&Ms(r)===!0)return()=>{};throw r}}:e,Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Yo=0;Yo<Pr.length;Yo++)nv[Pr.charCodeAt(Yo)]=Yo;var Yo,rv=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Pr[t[n]>>2],o+=Pr[(t[n]&3)<<4|t[n+1]>>4],o+=Pr[(t[n+1]&15)<<2|t[n+2]>>6],o+=Pr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},Gp=new Map;function ov(e,t){let n=Gp.get(e);return n||(n=new Map,Gp.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Kp=(e,t,n)=>{if(!e||!(Jp(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=ov(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Os(e,t,n){if(e instanceof Array)return e.map(r=>Os(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=rv(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Os(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Os(e.data,t,n),e.width,e.height]};if(Jp(e,t)||typeof e=="object"){let r=e.constructor.name,o=Kp(e,t,n);return{rr_type:r,index:o}}}}return e}var Xp=(e,t,n)=>e.map(r=>Os(r,t,n)),Jp=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function iv(e,t,n,r,o){let i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=xu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Ds(this.canvas,n,r,o,!0)||Vp(()=>{let l=Xp(d,t,this);e(this.canvas,{type:Fr["2D"],property:a,args:l})},0),u.apply(this,d)}});i.push(c)}catch{let u=Iu(t.CanvasRenderingContext2D.prototype,a,{set(d){e(this.canvas,{type:Fr["2D"],property:a,args:[d],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}function sv(e){return e==="experimental-webgl"?"webgl":e}function zp(e,t,n,r,o){let i=[];try{let s=xu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ds(this,t,n,r,!0)){let d=sv(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){let l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function jp(e,t,n,r,o,i,s,a){let c=[],u=Object.getOwnPropertyNames(e);for(let d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;let l=xu(e,d,function(p){return function(...m){let h=p.apply(this,m);if(Kp(h,a,this),"tagName"in this.canvas&&!Ds(this.canvas,r,o,i,!0)){let y=Xp(m,a,this),v={type:t,property:d,args:y};n(this.canvas,v)}return h}});c.push(l)}catch{let p=Iu(e,d,{set(m){n(this.canvas,{type:t,property:d,args:[m],setter:!0})}});c.push(p)}return c}function av(e,t,n,r,o,i){let s=[];return s.push(...jp(t.WebGLRenderingContext.prototype,Fr.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...jp(t.WebGL2RenderingContext.prototype,Fr.WebGL2,e,n,r,o,i,t)),()=>{s.forEach(a=>a())}}var cv='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 uv(){let e=new Blob([cv]);return URL.createObjectURL(e)}var vu=class{reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,Ft([this,"access",t=>t.worker,"optionalAccess",t=>t.terminate,"call",t=>t()]),this.worker=null,this.snapshotInProgressMap=new Map,(this.options.recordCanvas&&typeof this.options.sampling=="number"||this.options.enableManualSnapshot)&&(this.worker=this.initFPSWorker())}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.processMutation=(l,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(p)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,d&&tv(d),(c&&typeof n=="number"||t.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t.enableManualSnapshot&&bu(()=>{c&&n==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,o,i,s,a,{dataURLOptions:u})})()}addWindow(t){let{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:i,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}bu(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,o,i),s&&typeof n=="number"){let c=zp(t,r,o,i,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){let t=new Worker(uv());return t.onmessage=n=>{let r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;let{base64:i,type:s,width:a,height:c}=r;this.mutationCb({id:o,type:Fr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(t,n,r,o,i,s){let a=this.takeSnapshot(!1,t,n,r,o,i,s.dataURLOptions);this.restoreHandlers.push(()=>{cancelAnimationFrame(a)})}initCanvasMutationObserver(t,n,r,o){let i=zp(t,n,r,o,!1),s=iv(this.processMutation.bind(this),t,n,r,o),a=av(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{i(),s(),a()})}snapshot(t){let{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.restoreHandlers.push(()=>{cancelAnimationFrame(r)})}takeSnapshot(t,n,r,o,i,s,a,c){let u=1e3/n,d=0,l,p=h=>{if(h)return[h];let y=[],v=b=>{b.querySelectorAll("canvas").forEach(I=>{Ds(I,r,o,i,!0)||y.push(I)})};for(let b of this.windows){let I=b.deref();I&&v(I.document)}for(let b of this.shadowDoms){let I=b.deref();I&&v(I)}return y},m=h=>{if(this.windows.length){if(d&&h-d<u){l=jn(m);return}d=h,p(c).forEach(y=>{if(!this.mirror.hasNode(y))return;let v=this.mirror.getId(y);if(!this.snapshotInProgressMap.get(v)&&!(!y.width||!y.height)){if(this.snapshotInProgressMap.set(v,!0),!t&&["webgl","webgl2"].includes(y.__context)){let b=y.getContext(y.__context);Ft([b,"optionalAccess",I=>I.getContextAttributes,"call",I=>I(),"optionalAccess",I=>I.preserveDrawingBuffer])===!1&&b.clear(b.COLOR_BUFFER_BIT)}createImageBitmap(y).then(b=>{Ft([this,"access",I=>I.worker,"optionalAccess",I=>I.postMessage,"call",I=>I({id:v,bitmap:b,width:y.width,height:y.height,dataURLOptions:a,maxCanvasSize:s},[b])])}).catch(b=>{bu(()=>{throw b})()})}}),l=jn(m)}};return l=jn(m),l}startPendingCanvasMutationFlusher(){jn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,jn(t)};jn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),jn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(s=>{let{type:a,...c}=s;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}},qp={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}}},lv="ReplayCanvas",Ns=1280,dv=(e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Ns):Ns,n?Math.min(n,Ns):Ns]},o,i=new Promise(s=>o=s);return{name:lv,getOptions(){let{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{let d=new vu({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return o(d),d},...qp[s||"medium"]||qp.medium}},async snapshot(s){(await i).snapshot(s)}}},fv=dv;f();f();var Gt=A,pe=Gt.document,Ko=Gt.navigator,hm="Report a Bug",pv="Cancel",mv="Send Bug Report",hv="Confirm",gv="Report a Bug",_v="your.email@example.org",Sv="Email",yv="What's the bug? What did you expect?",Ev="Description",bv="Your Name",Tv="Name",vv="Thank you for your report!",Iv="(required)",xv="Add a screenshot",wv="Remove screenshot",Cv="widget",kv="api",Rv=5e3,gm=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");let n=x();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&U().setTags(e.tags);let r=Vi({source:kv,url:Cn(),...e},t);return new Promise((o,i)=>{let s=setTimeout(()=>i("Unable to determine if Feedback was correctly sent."),5e3),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300&&o(r),u&&typeof u.statusCode=="number"&&u.statusCode===0?i("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):i("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},Us=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Av(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ko.userAgent)||/Macintosh/i.test(Ko.userAgent)&&Ko.maxTouchPoints&&Ko.maxTouchPoints>1||!isSecureContext)}function Ls(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen&&t.onFormOpen(),e.onFormOpen&&e.onFormOpen()},onFormClose:()=>{t.onFormClose&&t.onFormClose(),e.onFormClose&&e.onFormClose()},onSubmitSuccess:n=>{t.onSubmitSuccess&&t.onSubmitSuccess(n),e.onSubmitSuccess&&e.onSubmitSuccess(n)},onSubmitError:n=>{t.onSubmitError&&t.onSubmitError(n),e.onSubmitError&&e.onSubmitError(n)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted(),e.onFormSubmitted&&e.onFormSubmitted()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Nv(){let e=pe.createElement("style");return e.textContent=`
|
|
34
|
-
.widget__actor {
|
|
35
|
-
position: fixed;
|
|
36
|
-
z-index: var(--z-index);
|
|
37
|
-
margin: var(--page-margin);
|
|
38
|
-
inset: var(--actor-inset);
|
|
39
|
-
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: 8px;
|
|
43
|
-
padding: 16px;
|
|
44
|
-
|
|
45
|
-
font-family: inherit;
|
|
46
|
-
font-size: var(--font-size);
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
line-height: 1.14em;
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
|
|
51
|
-
background: var(--actor-background, var(--background));
|
|
52
|
-
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
53
|
-
border: var(--actor-border, var(--border));
|
|
54
|
-
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
55
|
-
color: var(--actor-color, var(--foreground));
|
|
56
|
-
fill: var(--actor-color, var(--foreground));
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
opacity: 1;
|
|
59
|
-
transition: transform 0.2s ease-in-out;
|
|
60
|
-
transform: translate(0, 0) scale(1);
|
|
61
|
-
}
|
|
62
|
-
.widget__actor[aria-hidden="true"] {
|
|
63
|
-
opacity: 0;
|
|
64
|
-
pointer-events: none;
|
|
65
|
-
visibility: hidden;
|
|
66
|
-
transform: translate(0, 16px) scale(0.98);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.widget__actor:hover {
|
|
70
|
-
background: var(--actor-hover-background, var(--background));
|
|
71
|
-
filter: var(--interactive-filter);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.widget__actor svg {
|
|
75
|
-
width: 1.14em;
|
|
76
|
-
height: 1.14em;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (max-width: 600px) {
|
|
80
|
-
.widget__actor span {
|
|
81
|
-
display: none;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
`,e}function lt(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var Ur=20,Mv="http://www.w3.org/2000/svg";function Ov(){let e=a=>Gt.document.createElementNS(Mv,a),t=lt(e("svg"),{width:`${Ur}`,height:`${Ur}`,viewBox:`0 0 ${Ur} ${Ur}`,fill:"var(--foreground)"}),n=lt(e("g"),{clipPath:"url(#clip0_57_80)"}),r=lt(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 o=e("defs"),i=lt(e("clipPath"),{id:"clip0_57_80"}),s=lt(e("rect"),{width:`${Ur}`,height:`${Ur}`,fill:"white"});return i.appendChild(s),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(s),t}function Dv({triggerLabel:e,triggerAriaLabel:t,shadow:n}){let r=pe.createElement("button");if(r.type="button",r.className="widget__actor",r.ariaHidden="false",r.ariaLabel=t||e||hm,r.appendChild(Ov()),e){let i=pe.createElement("span");i.appendChild(pe.createTextNode(e)),r.appendChild(i)}let o=Nv();return{el:r,appendToDom(){n.appendChild(o),n.appendChild(r)},removeFromDom(){n.removeChild(r),n.removeChild(o)},show(){r.ariaHidden="false"},hide(){r.ariaHidden="true"}}}var _m="rgba(88, 74, 192, 1)",Lv={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:_m,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Zp={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:_m,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Qp(e){return`
|
|
85
|
-
--foreground: ${e.foreground};
|
|
86
|
-
--background: ${e.background};
|
|
87
|
-
--accent-foreground: ${e.accentForeground};
|
|
88
|
-
--accent-background: ${e.accentBackground};
|
|
89
|
-
--success-color: ${e.successColor};
|
|
90
|
-
--error-color: ${e.errorColor};
|
|
91
|
-
--border: ${e.border};
|
|
92
|
-
--box-shadow: ${e.boxShadow};
|
|
93
|
-
--outline: ${e.outline};
|
|
94
|
-
--interactive-filter: ${e.interactiveFilter};
|
|
95
|
-
`}function Pv({colorScheme:e,themeDark:t,themeLight:n}){let r=pe.createElement("style");return r.textContent=`
|
|
96
|
-
:host {
|
|
97
|
-
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
98
|
-
--font-size: 14px;
|
|
99
|
-
--z-index: 100000;
|
|
100
|
-
|
|
101
|
-
--page-margin: 16px;
|
|
102
|
-
--inset: auto 0 0 auto;
|
|
103
|
-
--actor-inset: var(--inset);
|
|
104
|
-
|
|
105
|
-
font-family: var(--font-family);
|
|
106
|
-
font-size: var(--font-size);
|
|
107
|
-
|
|
108
|
-
${e!=="system"?"color-scheme: only light;":""}
|
|
109
|
-
|
|
110
|
-
${Qp(e==="dark"?{...Zp,...t}:{...Lv,...n})}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
${e==="system"?`
|
|
114
|
-
@media (prefers-color-scheme: dark) {
|
|
115
|
-
:host {
|
|
116
|
-
${Qp({...Zp,...t})}
|
|
117
|
-
}
|
|
118
|
-
}`:""}
|
|
119
|
-
}
|
|
120
|
-
`,r}var zs=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:m,colorScheme:h="system",themeLight:y={},themeDark:v={},addScreenshotButtonLabel:b=xv,cancelButtonLabel:I=pv,confirmButtonLabel:P=hv,emailLabel:O=Sv,emailPlaceholder:w=_v,formTitle:E=gv,isRequiredLabel:T=Iv,messageLabel:C=Ev,messagePlaceholder:D=yv,nameLabel:k=Tv,namePlaceholder:N=bv,removeScreenshotButtonLabel:H=wv,submitButtonLabel:ne=mv,successMessageText:re=vv,triggerLabel:be=hm,triggerAriaLabel:$="",onFormOpen:Ie,onFormClose:W,onSubmitSuccess:fe,onSubmitError:je,onFormSubmitted:Tt}={})=>{let vt={id:o,autoInject:i,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:m,colorScheme:h,themeDark:v,themeLight:y,triggerLabel:be,triggerAriaLabel:$,cancelButtonLabel:I,submitButtonLabel:ne,confirmButtonLabel:P,formTitle:E,emailLabel:O,emailPlaceholder:w,messageLabel:C,messagePlaceholder:D,nameLabel:k,namePlaceholder:N,successMessageText:re,isRequiredLabel:T,addScreenshotButtonLabel:b,removeScreenshotButtonLabel:H,onFormClose:W,onFormOpen:Ie,onSubmitError:je,onSubmitSuccess:fe,onFormSubmitted:Tt},dt=null,Dt=[],Kn=ae=>{if(!dt){let he=pe.createElement("div");he.id=String(ae.id),pe.body.appendChild(he),dt=he.attachShadow({mode:"open"}),dt.appendChild(Pv(ae))}return dt},Xn=async(ae,he,qe)=>{let xe=x(),Te=xe&&xe.getIntegrationByName(ae);if(Te)return Te;let Lt=(he&&he()||await e(qe))();return xe&&xe.addIntegration(Lt),Lt},Jn=async ae=>{let he=ae.enableScreenshot&&Av(),[qe,xe]=await Promise.all([Xn("FeedbackModal",t,"feedbackModalIntegration"),he?Xn("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):void 0]);if(!qe)throw Us&&g.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!");return he&&!xe&&Us&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots."),qe.createDialog({options:ae,screenshotIntegration:he?xe:void 0,sendFeedback:gm,shadow:Kn(ae)})},Zn=(ae,he={})=>{let qe=Ls(vt,he),xe=typeof ae=="string"?pe.querySelector(ae):typeof ae.addEventListener=="function"?ae:null;if(!xe)throw Us&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Te=null,It=async()=>{Te||(Te=await Jn({...qe,onFormClose:()=>{Te&&Te.close(),qe.onFormClose&&qe.onFormClose()},onFormSubmitted:()=>{Te&&Te.removeFromDom(),qe.onFormSubmitted&&qe.onFormSubmitted()}})),Te.appendToDom(),Te.open()};xe.addEventListener("click",It);let Lt=()=>{Dt=Dt.filter(zr=>zr!==Lt),Te&&Te.removeFromDom(),Te=null,xe.removeEventListener("click",It)};return Dt.push(Lt),Lt},Qn=(ae={})=>{let he=Ls(vt,ae),qe=Kn(he),xe=Dv({triggerLabel:he.triggerLabel,triggerAriaLabel:he.triggerAriaLabel,shadow:qe});return Zn(xe.el,{...he,onFormOpen(){xe.hide()},onFormClose(){xe.show()},onFormSubmitted(){xe.show()}}),xe};return{name:"Feedback",setupOnce(){!ir()||!vt.autoInject||(pe.readyState==="loading"?pe.addEventListener("DOMContentLoaded",()=>Qn().appendToDom()):Qn().appendToDom())},attachTo:Zn,createWidget(ae={}){let he=Qn(Ls(vt,ae));return he.appendToDom(),he},async createForm(ae={}){return Jn(Ls(vt,ae))},remove(){dt&&(dt.parentElement&&dt.parentElement.remove(),dt=null),Dt.forEach(ae=>ae()),Dt=[]}}};function Fv(){let e=x();return e&&e.getIntegrationByName("Feedback")}var js,se,Sm,qn,em,ym,Au,Jo={},Du=[],Uv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lu=Array.isArray;function Tn(e,t){for(var n in t)e[n]=t[n];return e}function Em(e){var t=e.parentNode;t&&t.removeChild(e)}function q(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?js.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Bs(e,s,r,o,null)}function Bs(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Sm,__i:-1,__u:0};return o==null&&se.vnode!=null&&se.vnode(i),i}function Zo(e){return e.children}function Hs(e,t){this.props=e,this.context=t}function $r(e,t){if(t==null)return e.__?$r(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"?$r(e):null}function Bv(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=Tn({},o)).__v=o.__v+1,se.vnode&&se.vnode(r),Pu(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??$r(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&bm(r),r}function bm(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return bm(e)}}function tm(e){(!e.__d&&(e.__d=!0)&&qn.push(e)&&!Gs.__r++||em!==se.debounceRendering)&&((em=se.debounceRendering)||ym)(Gs)}function Gs(){var e,t,n,r=[],o=[];for(qn.sort(Au);e=qn.shift();)e.__d&&(n=qn.length,t=Bv(e,r,o)||t,n===0||qn.length>n?(Nu(r,t,o),o.length=r.length=0,t=void 0,qn.sort(Au)):t&&se.__c&&se.__c(t,Du));t&&Nu(r,t,o),Gs.__r=0}function Tm(e,t,n,r,o,i,s,a,c,u,d){var l,p,m,h,y,v=r&&r.__k||Du,b=t.length;for(n.__d=c,Hv(n,t,v),c=n.__d,l=0;l<b;l++)(m=n.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(p=m.__i===-1?Jo:v[m.__i]||Jo,m.__i=l,Pu(e,m,p,o,i,s,a,c,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Fu(p.ref,null,m),d.push(m.ref,m.__c||h,m)),y==null&&h!=null&&(y=h),65536&m.__u||p.__k===m.__k?c=vm(m,c,e):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:h&&(c=h.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=c,n.__e=y}function Hv(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Bs(null,o,null,null,o):Lu(o)?Bs(Zo,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Bs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=$v(o,n,s=r+l,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?l++:a>s?d>c-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==r+l&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=$r(i)),Mu(i,i,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=$r(i)),Mu(i,i))}function vm(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=vm(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function $v(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function nm(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Uv.test(t)?n:n+"px"}function Ps(e,t,n,r,o){var i;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||nm(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||nm(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?om:rm,i)):e.removeEventListener(t,i?om:rm,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function rm(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(se.event?se.event(e):e)}}function om(e){if(this.l)return this.l[e.type+!0](se.event?se.event(e):e)}function Pu(e,t,n,r,o,i,s,a,c,u){var d,l,p,m,h,y,v,b,I,P,O,w,E,T,C,D=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=se.__b)&&d(t);e:if(typeof D=="function")try{if(b=t.props,I=(d=D.contextType)&&r[d.__c],P=d?I?I.props.value:d.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:("prototype"in D&&D.prototype.render?t.__c=l=new D(b,P):(t.__c=l=new Hs(b,P),l.constructor=D,l.render=Gv),I&&I.sub(l),l.props=b,l.state||(l.state={}),l.context=P,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Tn({},l.__s)),Tn(l.__s,D.getDerivedStateFromProps(b,l.__s))),m=l.props,h=l.state,l.__v=t,p)D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(D.getDerivedStateFromProps==null&&b!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,P),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,P)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=b,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(k){k&&(k.__=t)}),O=0;O<l._sb.length;O++)l.__h.push(l._sb[O]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,P),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,h,y)})}if(l.context=P,l.props=b,l.__P=e,l.__e=!1,w=se.__r,E=0,"prototype"in D&&D.prototype.render){for(l.state=l.__s,l.__d=!1,w&&w(t),d=l.render(l.props,l.state,l.context),T=0;T<l._sb.length;T++)l.__h.push(l._sb[T]);l._sb=[]}else do l.__d=!1,w&&w(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++E<25);l.state=l.__s,l.getChildContext!=null&&(r=Tn(Tn({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(y=l.getSnapshotBeforeUpdate(m,h)),Tm(e,Lu(C=d!=null&&d.type===Zo&&d.key==null?d.props.children:d)?C:[C],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),v&&(l.__E=l.__=null)}catch(k){t.__v=null,c||i!=null?(t.__e=a,t.__u|=c?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),se.__e(k,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Wv(n.__e,t,n,r,o,i,s,c,u);(d=se.diffed)&&d(t)}function Nu(e,t,n){for(var r=0;r<n.length;r++)Fu(n[r],n[++r],n[++r]);se.__c&&se.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){se.__e(i,o.__v)}})}function Wv(e,t,n,r,o,i,s,a,c){var u,d,l,p,m,h,y,v=n.props,b=t.props,I=t.type;if(I==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!I&&(I?m.localName===I:m.nodeType===3)){e=m,i[u]=null;break}}if(e==null){if(I===null)return document.createTextNode(b);e=o?document.createElementNS("http://www.w3.org/2000/svg",I):document.createElement(I,b.is&&b),i=null,a=!1}if(I===null)v===b||a&&e.data===b||(e.data=b);else{if(i=i&&js.call(e.childNodes),v=n.props||Jo,!a&&i!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)m=v[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=m:u==="key"||u in b||Ps(e,u,null,m,o));for(u in b)m=b[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?h=m:u=="checked"?y=m:u==="key"||a&&typeof m!="function"||v[u]===m||Ps(e,u,m,v[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),Tm(e,Lu(p)?p:[p],t,n,r,o&&I!=="foreignObject",i,s,i?i[0]:n.__k&&$r(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&Em(i[u]);a||(u="value",h!==void 0&&(h!==e[u]||I==="progress"&&!h||I==="option"&&h!==v[u])&&Ps(e,u,h,v[u],!1),u="checked",y!==void 0&&y!==e[u]&&Ps(e,u,y,v[u],!1))}return e}function Fu(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){se.__e(r,n)}}function Mu(e,t,n){var r,o;if(se.unmount&&se.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Fu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){se.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Mu(r[o],t,n||typeof e.type!="function");n||e.__e==null||Em(e.__e),e.__=e.__e=e.__d=void 0}function Gv(e,t,n){return this.constructor(e,n)}function zv(e,t,n){var r,o,i,s;se.__&&se.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Pu(t,e=(!r&&n||t).__k=q(Zo,null,[e]),o||Jo,Jo,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?js.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),e.__d=void 0,Nu(i,e,s)}js=Du.slice,se={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Sm=0,Hs.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Tn({},this.state),typeof e=="function"&&(e=e(Tn({},n),this.props)),e&&Tn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tm(this))},Hs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tm(this))},Hs.prototype.render=Zo,qn=[],ym=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Au=function(e,t){return e.__v.__b-t.__v.__b},Gs.__r=0;var an,ie,wu,im,Wr=0,Im=[],$s=[],Ee=se,sm=Ee.__b,am=Ee.__r,cm=Ee.diffed,um=Ee.__c,lm=Ee.unmount,dm=Ee.__;function Yn(e,t){Ee.__h&&Ee.__h(ie,e,Wr||t),Wr=0;var n=ie.__H||(ie.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:$s}),n.__[e]}function Br(e){return Wr=1,xm(Cm,e)}function xm(e,t,n){var r=Yn(an++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Cm(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ie,!ie.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};ie.u=!0;var i=ie.shouldComponentUpdate,s=ie.componentWillUpdate;ie.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},ie.shouldComponentUpdate=o}return r.__N||r.__}function jv(e,t){var n=Yn(an++,3);!Ee.__s&&Uu(n.__H,t)&&(n.__=e,n.i=t,ie.__H.__h.push(n))}function wm(e,t){var n=Yn(an++,4);!Ee.__s&&Uu(n.__H,t)&&(n.__=e,n.i=t,ie.__h.push(n))}function qv(e){return Wr=5,Qo(function(){return{current:e}},[])}function Yv(e,t,n){Wr=6,wm(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Qo(e,t){var n=Yn(an++,7);return Uu(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Hr(e,t){return Wr=8,Qo(function(){return e},t)}function Vv(e){var t=ie.context[e.__c],n=Yn(an++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ie)),t.props.value):e.__}function Kv(e,t){Ee.useDebugValue&&Ee.useDebugValue(t?t(e):e)}function Xv(e){var t=Yn(an++,10),n=Br();return t.__=e,ie.componentDidCatch||(ie.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Jv(){var e=Yn(an++,11);if(!e.__){for(var t=ie.__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 Zv(){for(var e;e=Im.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ws),e.__H.__h.forEach(Ou),e.__H.__h=[]}catch(t){e.__H.__h=[],Ee.__e(t,e.__v)}}Ee.__b=function(e){ie=null,sm&&sm(e)},Ee.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dm&&dm(e,t)},Ee.__r=function(e){am&&am(e),an=0;var t=(ie=e.__c).__H;t&&(wu===ie?(t.__h=[],ie.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=$s,n.__N=n.i=void 0})):(t.__h.forEach(Ws),t.__h.forEach(Ou),t.__h=[],an=0)),wu=ie},Ee.diffed=function(e){cm&&cm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Im.push(t)!==1&&im===Ee.requestAnimationFrame||((im=Ee.requestAnimationFrame)||Qv)(Zv)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==$s&&(n.__=n.__V),n.i=void 0,n.__V=$s})),wu=ie=null},Ee.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ws),n.__h=n.__h.filter(function(r){return!r.__||Ou(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Ee.__e(r,n.__v)}}),um&&um(e,t)},Ee.unmount=function(e){lm&&lm(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ws(r)}catch(o){t=o}}),n.__H=void 0,t&&Ee.__e(t,n.__v))};var fm=typeof requestAnimationFrame=="function";function Qv(e){var t,n=function(){clearTimeout(r),fm&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fm&&(t=requestAnimationFrame(n))}function Ws(e){var t=ie,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ie=t}function Ou(e){var t=ie;e.__c=e.__(),ie=t}function Uu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Cm(e,t){return typeof t=="function"?t(e):t}var eI={__proto__:null,useCallback:Hr,useContext:Vv,useDebugValue:Kv,useEffect:jv,useErrorBoundary:Xv,useId:Jv,useImperativeHandle:Yv,useLayoutEffect:wm,useMemo:Qo,useReducer:xm,useRef:qv,useState:Br},tI="http://www.w3.org/2000/svg";function nI(){let e=r=>pe.createElementNS(tI,r),t=lt(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=lt(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}var pm="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function rI({options:e}){let t=Qo(()=>({__html:nI().outerHTML}),[]);return q("h2",{class:"dialog__header",__self:this,__source:{fileName:pm,lineNumber:16}},e.formTitle,e.showBranding?q("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t,__self:this,__source:{fileName:pm,lineNumber:19}}):null)}function oI(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}var me="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function Cu(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function iI({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){let{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:m,emailLabel:h,emailPlaceholder:y,isEmailRequired:v,isNameRequired:b,messageLabel:I,messagePlaceholder:P,nameLabel:O,namePlaceholder:w,submitButtonLabel:E,isRequiredLabel:T}=e,[C,D]=Br(null),[k,N]=Br(!1),H=u&&u.input,[ne,re]=Br(null),be=Hr(W=>{re(W),N(!1)},[]),$=Hr(W=>{let fe=oI(W,{emailLabel:h,isEmailRequired:v,isNameRequired:b,messageLabel:I,nameLabel:O});return fe.length>0?D(`Please enter in the following required fields: ${fe.join(", ")}`):D(null),fe.length===0},[h,v,b,I,O]),Ie=Hr(async W=>{try{if(W.preventDefault(),!(W.target instanceof HTMLFormElement))return;let fe=new FormData(W.target),je=await(u&&k?u.value():void 0),Tt={name:Cu(fe,"name"),email:Cu(fe,"email"),message:Cu(fe,"message"),attachments:je?[je]:void 0};if(!$(Tt))return;try{await o({name:Tt.name,email:Tt.email,message:Tt.message,source:Cv,tags:d},{attachments:Tt.attachments}),i(Tt)}catch(vt){Us&&g.error(vt),D(vt),s(vt)}}catch{}},[u&&k,i,s]);return q("form",{class:"form",onSubmit:Ie,__self:this,__source:{fileName:me,lineNumber:144}},H&&k?q(H,{onError:be,__self:this,__source:{fileName:me,lineNumber:146}}):null,q("div",{class:"form__right","data-sentry-feedback":!0,__self:this,__source:{fileName:me,lineNumber:149}},q("div",{class:"form__top",__self:this,__source:{fileName:me,lineNumber:150}},C?q("div",{class:"form__error-container",__self:this,__source:{fileName:me,lineNumber:151}},C):null,c?q("label",{for:"name",class:"form__label",__self:this,__source:{fileName:me,lineNumber:154}},q(ku,{label:O,isRequiredLabel:T,isRequired:b,__self:this,__source:{fileName:me,lineNumber:155}}),q("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:b,type:"text",__self:this,__source:{fileName:me,lineNumber:156}})):q("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:me,lineNumber:167}}),a?q("label",{for:"email",class:"form__label",__self:this,__source:{fileName:me,lineNumber:171}},q(ku,{label:h,isRequiredLabel:T,isRequired:v,__self:this,__source:{fileName:me,lineNumber:172}}),q("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:y,required:v,type:"email",__self:this,__source:{fileName:me,lineNumber:173}})):q("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden",__self:this,__source:{fileName:me,lineNumber:184}}),q("label",{for:"message",class:"form__label",__self:this,__source:{fileName:me,lineNumber:187}},q(ku,{label:I,isRequiredLabel:T,isRequired:!0,__self:this,__source:{fileName:me,lineNumber:188}}),q("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:P,required:!0,rows:5,__self:this,__source:{fileName:me,lineNumber:189}})),H?q("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:me,lineNumber:201}},q("button",{class:"btn btn--default",type:"button",onClick:()=>{re(null),N(W=>!W)},__self:this,__source:{fileName:me,lineNumber:202}},k?p:l),ne?q("div",{class:"form__error-container",__self:this,__source:{fileName:me,lineNumber:212}},ne.message):null):null),q("div",{class:"btn-group",__self:this,__source:{fileName:me,lineNumber:216}},q("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:me,lineNumber:217}},E),q("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:me,lineNumber:220}},m))))}function ku({label:e,isRequired:t,isRequiredLabel:n}){return q("span",{class:"form__label__text",__self:this,__source:{fileName:me,lineNumber:239}},e,t&&q("span",{class:"form__label__text--required",__self:this,__source:{fileName:me,lineNumber:241}},n))}var Fs=16,mm=17,sI="http://www.w3.org/2000/svg";function aI(){let e=c=>Gt.document.createElementNS(sI,c),t=lt(e("svg"),{width:`${Fs}`,height:`${mm}`,viewBox:`0 0 ${Fs} ${mm}`,fill:"inherit"}),n=lt(e("g"),{clipPath:"url(#clip0_57_156)"}),r=lt(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=lt(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);let i=e("defs"),s=lt(e("clipPath"),{id:"clip0_57_156"}),a=lt(e("rect"),{width:`${Fs}`,height:`${Fs}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}var on="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function cI({open:e,onFormSubmitted:t,...n}){let r=n.options,o=Qo(()=>({__html:aI().outerHTML}),[]),[i,s]=Br(null),a=Hr(()=>{i&&(clearTimeout(i),s(null)),t()},[i]),c=Hr(u=>{n.onSubmitSuccess(u),s(setTimeout(()=>{t(),s(null)},Rv))},[t]);return q(Zo,{__self:this,__source:{fileName:on,lineNumber:48}},i?q("div",{class:"success__position",onClick:a,__self:this,__source:{fileName:on,lineNumber:50}},q("div",{class:"success__content",__self:this,__source:{fileName:on,lineNumber:51}},r.successMessageText,q("span",{class:"success__icon",dangerouslySetInnerHTML:o,__self:this,__source:{fileName:on,lineNumber:53}}))):q("dialog",{class:"dialog",onClick:r.onFormClose,open:e,__self:this,__source:{fileName:on,lineNumber:57}},q("div",{class:"dialog__position",__self:this,__source:{fileName:on,lineNumber:58}},q("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()},__self:this,__source:{fileName:on,lineNumber:59}},q(rI,{options:r,__self:this,__source:{fileName:on,lineNumber:66}}),q(iI,{...n,onSubmitSuccess:c,__self:this,__source:{fileName:on,lineNumber:67}})))))}var uI=`
|
|
121
|
-
.dialog {
|
|
122
|
-
position: fixed;
|
|
123
|
-
z-index: var(--z-index);
|
|
124
|
-
margin: 0;
|
|
125
|
-
inset: 0;
|
|
126
|
-
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
justify-content: center;
|
|
130
|
-
padding: 0;
|
|
131
|
-
height: 100vh;
|
|
132
|
-
width: 100vw;
|
|
133
|
-
|
|
134
|
-
color: var(--dialog-color, var(--foreground));
|
|
135
|
-
fill: var(--dialog-color, var(--foreground));
|
|
136
|
-
line-height: 1.75em;
|
|
137
|
-
|
|
138
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
139
|
-
border: none;
|
|
140
|
-
inset: 0;
|
|
141
|
-
opacity: 1;
|
|
142
|
-
transition: opacity 0.2s ease-in-out;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dialog__position {
|
|
146
|
-
position: fixed;
|
|
147
|
-
z-index: var(--z-index);
|
|
148
|
-
inset: var(--dialog-inset);
|
|
149
|
-
padding: var(--page-margin);
|
|
150
|
-
display: flex;
|
|
151
|
-
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
152
|
-
}
|
|
153
|
-
@media (max-width: 600px) {
|
|
154
|
-
.dialog__position {
|
|
155
|
-
inset: var(--page-margin);
|
|
156
|
-
padding: 0;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.dialog__position:has(.editor) {
|
|
161
|
-
inset: var(--page-margin);
|
|
162
|
-
padding: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.dialog:not([open]) {
|
|
166
|
-
opacity: 0;
|
|
167
|
-
pointer-events: none;
|
|
168
|
-
visibility: hidden;
|
|
169
|
-
}
|
|
170
|
-
.dialog:not([open]) .dialog__content {
|
|
171
|
-
transform: translate(0, -16px) scale(0.98);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.dialog__content {
|
|
175
|
-
display: flex;
|
|
176
|
-
flex-direction: column;
|
|
177
|
-
gap: 16px;
|
|
178
|
-
padding: var(--dialog-padding, 24px);
|
|
179
|
-
max-width: 100%;
|
|
180
|
-
width: 100%;
|
|
181
|
-
max-height: 100%;
|
|
182
|
-
overflow: auto;
|
|
183
|
-
|
|
184
|
-
background: var(--dialog-background, var(--background));
|
|
185
|
-
border-radius: var(--dialog-border-radius, 20px);
|
|
186
|
-
border: var(--dialog-border, var(--border));
|
|
187
|
-
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
188
|
-
transform: translate(0, 0) scale(1);
|
|
189
|
-
transition: transform 0.2s ease-in-out;
|
|
190
|
-
}
|
|
191
|
-
`,lI=`
|
|
192
|
-
.dialog__header {
|
|
193
|
-
display: flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
justify-content: space-between;
|
|
196
|
-
font-weight: var(--dialog-header-weight, 600);
|
|
197
|
-
margin: 0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.brand-link {
|
|
201
|
-
display: inline-flex;
|
|
202
|
-
}
|
|
203
|
-
.brand-link:focus-visible {
|
|
204
|
-
outline: var(--outline);
|
|
205
|
-
}
|
|
206
|
-
`,dI=`
|
|
207
|
-
.form {
|
|
208
|
-
display: flex;
|
|
209
|
-
overflow: auto;
|
|
210
|
-
flex-direction: row;
|
|
211
|
-
gap: 16px;
|
|
212
|
-
flex: 1 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.form__right {
|
|
216
|
-
flex: 0 0 var(--form-width, 272px);
|
|
217
|
-
width: var(--form-width, 272px);
|
|
218
|
-
display: flex;
|
|
219
|
-
overflow: auto;
|
|
220
|
-
flex-direction: column;
|
|
221
|
-
justify-content: space-between;
|
|
222
|
-
gap: 20px;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
@media (max-width: 600px) {
|
|
226
|
-
.form__right {
|
|
227
|
-
width: auto;
|
|
228
|
-
}
|
|
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
|
-
}
|
|
241
|
-
|
|
242
|
-
.form__label {
|
|
243
|
-
display: flex;
|
|
244
|
-
flex-direction: column;
|
|
245
|
-
gap: 4px;
|
|
246
|
-
margin: 0px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.form__label__text {
|
|
250
|
-
display: flex;
|
|
251
|
-
gap: 4px;
|
|
252
|
-
align-items: center;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.form__label__text--required {
|
|
256
|
-
font-size: 0.85em;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.form__input {
|
|
260
|
-
font-family: inherit;
|
|
261
|
-
line-height: inherit;
|
|
262
|
-
background: transparent;
|
|
263
|
-
box-sizing: border-box;
|
|
264
|
-
border: var(--input-border, var(--border));
|
|
265
|
-
border-radius: var(--input-border-radius, 6px);
|
|
266
|
-
color: var(--input-color, inherit);
|
|
267
|
-
fill: var(--input-color, inherit);
|
|
268
|
-
font-size: var(--input-font-size, inherit);
|
|
269
|
-
font-weight: var(--input-font-weight, 500);
|
|
270
|
-
padding: 6px 12px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.form__input::placeholder {
|
|
274
|
-
opacity: 0.65;
|
|
275
|
-
color: var(--input-placeholder-color, inherit);
|
|
276
|
-
filter: var(--interactive-filter);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.form__input:focus-visible {
|
|
280
|
-
outline: var(--input-focus-outline, var(--outline));
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.form__input--textarea {
|
|
284
|
-
font-family: inherit;
|
|
285
|
-
resize: vertical;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.error {
|
|
289
|
-
color: var(--error-color);
|
|
290
|
-
fill: var(--error-color);
|
|
291
|
-
}
|
|
292
|
-
`,fI=`
|
|
293
|
-
.btn-group {
|
|
294
|
-
display: grid;
|
|
295
|
-
gap: 8px;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.btn {
|
|
299
|
-
line-height: inherit;
|
|
300
|
-
border: var(--button-border, var(--border));
|
|
301
|
-
border-radius: var(--button-border-radius, 6px);
|
|
302
|
-
cursor: pointer;
|
|
303
|
-
font-family: inherit;
|
|
304
|
-
font-size: var(--button-font-size, inherit);
|
|
305
|
-
font-weight: var(--button-font-weight, 600);
|
|
306
|
-
padding: var(--button-padding, 6px 16px);
|
|
307
|
-
}
|
|
308
|
-
.btn[disabled] {
|
|
309
|
-
opacity: 0.6;
|
|
310
|
-
pointer-events: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.btn--primary {
|
|
314
|
-
color: var(--button-primary-color, var(--accent-foreground));
|
|
315
|
-
fill: var(--button-primary-color, var(--accent-foreground));
|
|
316
|
-
background: var(--button-primary-background, var(--accent-background));
|
|
317
|
-
border: var(--button-primary-border, var(--border));
|
|
318
|
-
border-radius: var(--button-primary-border-radius, 6px);
|
|
319
|
-
font-weight: var(--button-primary-font-weight, 500);
|
|
320
|
-
}
|
|
321
|
-
.btn--primary:hover {
|
|
322
|
-
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
323
|
-
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
324
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
325
|
-
filter: var(--interactive-filter);
|
|
326
|
-
}
|
|
327
|
-
.btn--primary:focus-visible {
|
|
328
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
329
|
-
filter: var(--interactive-filter);
|
|
330
|
-
outline: var(--button-primary-focus-outline, var(--outline));
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.btn--default {
|
|
334
|
-
color: var(--button-color, var(--foreground));
|
|
335
|
-
fill: var(--button-color, var(--foreground));
|
|
336
|
-
background: var(--button-background, var(--background));
|
|
337
|
-
border: var(--button-border, var(--border));
|
|
338
|
-
border-radius: var(--button-border-radius, 6px);
|
|
339
|
-
font-weight: var(--button-font-weight, 500);
|
|
340
|
-
}
|
|
341
|
-
.btn--default:hover {
|
|
342
|
-
color: var(--button-color, var(--foreground));
|
|
343
|
-
fill: var(--button-color, var(--foreground));
|
|
344
|
-
background: var(--button-hover-background, var(--background));
|
|
345
|
-
filter: var(--interactive-filter);
|
|
346
|
-
}
|
|
347
|
-
.btn--default:focus-visible {
|
|
348
|
-
background: var(--button-hover-background, var(--background));
|
|
349
|
-
filter: var(--interactive-filter);
|
|
350
|
-
outline: var(--button-focus-outline, var(--outline));
|
|
351
|
-
}
|
|
352
|
-
`,pI=`
|
|
353
|
-
.success__position {
|
|
354
|
-
position: fixed;
|
|
355
|
-
inset: var(--dialog-inset);
|
|
356
|
-
padding: var(--page-margin);
|
|
357
|
-
z-index: var(--z-index);
|
|
358
|
-
}
|
|
359
|
-
.success__content {
|
|
360
|
-
background: var(--success-background, var(--background));
|
|
361
|
-
border: var(--success-border, var(--border));
|
|
362
|
-
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
363
|
-
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
364
|
-
font-weight: var(--success-font-weight, 600);
|
|
365
|
-
color: var(--success-color);
|
|
366
|
-
fill: var(--success-color);
|
|
367
|
-
padding: 12px 24px;
|
|
368
|
-
line-height: 1.75em;
|
|
369
|
-
|
|
370
|
-
display: grid;
|
|
371
|
-
align-items: center;
|
|
372
|
-
grid-auto-flow: column;
|
|
373
|
-
gap: 6px;
|
|
374
|
-
cursor: default;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.success__icon {
|
|
378
|
-
display: flex;
|
|
379
|
-
}
|
|
380
|
-
`;function mI(){let e=pe.createElement("style");return e.textContent=`
|
|
381
|
-
:host {
|
|
382
|
-
--dialog-inset: var(--inset);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
${uI}
|
|
386
|
-
${lI}
|
|
387
|
-
${dI}
|
|
388
|
-
${fI}
|
|
389
|
-
${pI}
|
|
390
|
-
`,e}var hI="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function gI(){let e=U().getUser(),t=Z().getUser(),n=dr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var km=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let o=r,i=e.useSentryUser,s=gI(),a=pe.createElement("div"),c=mI(),u="",d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){o.removeChild(a),o.removeChild(c),pe.body.style.overflow=u},open(){p(!0),e.onFormOpen&&e.onFormOpen(),u=pe.body.style.overflow,pe.body.style.overflow="hidden"},close(){p(!1),pe.body.style.overflow=u}},l=t&&t.createInput({h:q,hooks:eI,dialog:d,options:e}),p=m=>{zv(q(cI,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:i&&s&&s[i.name]||"",defaultEmail:i&&s&&s[i.email]||"",onFormClose:()=>{p(!1),e.onFormClose&&e.onFormClose()},onSubmit:n,onSubmitSuccess:h=>{p(!1),e.onSubmitSuccess&&e.onSubmitSuccess(h)},onSubmitError:h=>{e.onSubmitError&&e.onSubmitError(h)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted()},open:m,__self:void 0,__source:{fileName:hI,lineNumber:67}}),a)};return d}}),_I="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function SI({h:e}){return function({top:n,left:r,corner:o,onGrabButton:i}){return e("button",{class:`editor__crop-corner editor__crop-corner--${o} `,style:{top:n,left:r},onMouseDown:s=>{s.preventDefault(),i(s,o)},onClick:s=>{s.preventDefault()},__self:this,__source:{fileName:_I,lineNumber:22}})}}function yI(){let e=pe.createElement("style"),t="#1A141F",n="#302735";return e.textContent=`
|
|
391
|
-
.editor {
|
|
392
|
-
padding: 10px;
|
|
393
|
-
padding-top: 65px;
|
|
394
|
-
padding-bottom: 65px;
|
|
395
|
-
flex-grow: 1;
|
|
396
|
-
|
|
397
|
-
background-color: ${t};
|
|
398
|
-
background-image: repeating-linear-gradient(
|
|
399
|
-
-145deg,
|
|
400
|
-
transparent,
|
|
401
|
-
transparent 8px,
|
|
402
|
-
${t} 8px,
|
|
403
|
-
${t} 11px
|
|
404
|
-
),
|
|
405
|
-
repeating-linear-gradient(
|
|
406
|
-
-45deg,
|
|
407
|
-
transparent,
|
|
408
|
-
transparent 15px,
|
|
409
|
-
${n} 15px,
|
|
410
|
-
${n} 16px
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.editor__canvas-container {
|
|
415
|
-
width: 100%;
|
|
416
|
-
height: 100%;
|
|
417
|
-
position: relative;
|
|
418
|
-
display: flex;
|
|
419
|
-
align-items: center;
|
|
420
|
-
justify-content: center;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.editor__canvas-container canvas {
|
|
424
|
-
object-fit: contain;
|
|
425
|
-
position: relative;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.editor__crop-btn-group {
|
|
429
|
-
padding: 8px;
|
|
430
|
-
gap: 8px;
|
|
431
|
-
border-radius: var(--menu-border-radius, 6px);
|
|
432
|
-
background: var(--button-primary-background, var(--background));
|
|
433
|
-
width: 175px;
|
|
434
|
-
position: absolute;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.editor__crop-corner {
|
|
438
|
-
width: 30px;
|
|
439
|
-
height: 30px;
|
|
440
|
-
position: absolute;
|
|
441
|
-
background: none;
|
|
442
|
-
border: 3px solid #ffffff;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.editor__crop-corner--top-left {
|
|
446
|
-
cursor: nwse-resize;
|
|
447
|
-
border-right: none;
|
|
448
|
-
border-bottom: none;
|
|
449
|
-
}
|
|
450
|
-
.editor__crop-corner--top-right {
|
|
451
|
-
cursor: nesw-resize;
|
|
452
|
-
border-left: none;
|
|
453
|
-
border-bottom: none;
|
|
454
|
-
}
|
|
455
|
-
.editor__crop-corner--bottom-left {
|
|
456
|
-
cursor: nesw-resize;
|
|
457
|
-
border-right: none;
|
|
458
|
-
border-top: none;
|
|
459
|
-
}
|
|
460
|
-
.editor__crop-corner--bottom-right {
|
|
461
|
-
cursor: nwse-resize;
|
|
462
|
-
border-left: none;
|
|
463
|
-
border-top: none;
|
|
464
|
-
}
|
|
465
|
-
`,e}function EI({hooks:e}){return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:o,onError:i}){e.useEffect(()=>{(async()=>{n();let a=await Ko.mediaDevices.getDisplayMedia({video:{width:Gt.innerWidth*Gt.devicePixelRatio,height:Gt.innerHeight*Gt.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),c=pe.createElement("video");await new Promise((u,d)=>{c.srcObject=a,c.onloadedmetadata=()=>{r(c),a.getTracks().forEach(l=>l.stop()),u()},c.play().catch(d)}),o()})().catch(i)},[])}}var Et="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",Xo=30,sn=3,bn=Xo+sn,bt=Gt.devicePixelRatio,Vo=e=>({x:Math.min(e.startX,e.endX),y:Math.min(e.startY,e.endY),width:Math.abs(e.startX-e.endX),height:Math.abs(e.startY-e.endY)}),Ru=e=>{let t=e.clientHeight,n=e.clientWidth,r=e.width/e.height,o=t*r,i=t;o>n&&(o=n,i=n/r);let s=(n-o)/2,a=(t-i)/2;return{startX:s,startY:a,endX:o+s,endY:i+a}};function bI({h:e,hooks:t,imageBuffer:n,dialog:r,options:o}){let i=EI({hooks:t});return function({onError:a}){let c=t.useMemo(()=>({__html:yI().innerText}),[]),u=SI({h:e}),d=t.useRef(null),l=t.useRef(null),p=t.useRef(null),[m,h]=t.useState({startX:0,startY:0,endX:0,endY:0}),[y,v]=t.useState(!1);t.useEffect(()=>{Gt.addEventListener("resize",b,!1)},[]);function b(){let w=p.current,E=Vo(Ru(n));if(w){w.width=E.width*bt,w.height=E.height*bt,w.style.width=`${E.width}px`,w.style.height=`${E.height}px`;let C=w.getContext("2d");C&&C.scale(bt,bt)}let T=l.current;T&&(T.style.width=`${E.width}px`,T.style.height=`${E.height}px`),h({startX:0,startY:0,endX:E.width,endY:E.height})}t.useEffect(()=>{let w=p.current;if(!w)return;let E=w.getContext("2d");if(!E)return;let T=Vo(Ru(n)),C=Vo(m);E.clearRect(0,0,T.width,T.height),E.fillStyle="rgba(0, 0, 0, 0.5)",E.fillRect(0,0,T.width,T.height),E.clearRect(C.x,C.y,C.width,C.height),E.strokeStyle="#ffffff",E.lineWidth=3,E.strokeRect(C.x+1,C.y+1,C.width-2,C.height-2),E.strokeStyle="#000000",E.lineWidth=1,E.strokeRect(C.x+3,C.y+3,C.width-6,C.height-6)},[m]);function I(w,E){v(!1);let T=P(E),C=()=>{pe.removeEventListener("mousemove",T),pe.removeEventListener("mouseup",C),v(!0)};pe.addEventListener("mouseup",C),pe.addEventListener("mousemove",T)}let P=t.useCallback(w=>function(E){if(!p.current)return;let T=p.current,C=T.getBoundingClientRect(),D=E.clientX-C.x,k=E.clientY-C.y;switch(w){case"top-left":h(N=>({...N,startX:Math.min(Math.max(0,D),N.endX-bn),startY:Math.min(Math.max(0,k),N.endY-bn)}));break;case"top-right":h(N=>({...N,endX:Math.max(Math.min(D,T.width/bt),N.startX+bn),startY:Math.min(Math.max(0,k),N.endY-bn)}));break;case"bottom-left":h(N=>({...N,startX:Math.min(Math.max(0,D),N.endX-bn),endY:Math.max(Math.min(k,T.height/bt),N.startY+bn)}));break;case"bottom-right":h(N=>({...N,endX:Math.max(Math.min(D,T.width/bt),N.startX+bn),endY:Math.max(Math.min(k,T.height/bt),N.startY+bn)}));break}},[]);function O(){let w=pe.createElement("canvas"),E=Vo(Ru(n)),T=Vo(m);w.width=T.width*bt,w.height=T.height*bt;let C=w.getContext("2d");C&&n&&C.drawImage(n,T.x/E.width*n.width,T.y/E.height*n.height,T.width/E.width*n.width,T.height/E.height*n.height,0,0,w.width,w.height);let D=n.getContext("2d");D&&(D.clearRect(0,0,n.width,n.height),n.width=w.width,n.height=w.height,n.style.width=`${T.width}px`,n.style.height=`${T.height}px`,D.drawImage(w,0,0),b())}return i({onBeforeScreenshot:t.useCallback(()=>{r.el.style.display="none"},[]),onScreenshot:t.useCallback(w=>{let E=n.getContext("2d");if(!E)throw new Error("Could not get canvas context");n.width=w.videoWidth,n.height=w.videoHeight,n.style.width="100%",n.style.height="100%",E.drawImage(w,0,0)},[n]),onAfterScreenshot:t.useCallback(()=>{r.el.style.display="block";let w=d.current;w&&w.appendChild(n),b()},[]),onError:t.useCallback(w=>{r.el.style.display="block",a(w)},[])}),e("div",{class:"editor",__self:this,__source:{fileName:Et,lineNumber:262}},e("style",{dangerouslySetInnerHTML:c,__self:this,__source:{fileName:Et,lineNumber:263}}),e("div",{class:"editor__canvas-container",ref:d,__self:this,__source:{fileName:Et,lineNumber:264}},e("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:l,__self:this,__source:{fileName:Et,lineNumber:265}},e("canvas",{style:{position:"absolute"},ref:p,__self:this,__source:{fileName:Et,lineNumber:266}}),e(u,{left:m.startX-sn,top:m.startY-sn,onGrabButton:I,corner:"top-left",__self:this,__source:{fileName:Et,lineNumber:267}}),e(u,{left:m.endX-Xo+sn,top:m.startY-sn,onGrabButton:I,corner:"top-right",__self:this,__source:{fileName:Et,lineNumber:273}}),e(u,{left:m.startX-sn,top:m.endY-Xo+sn,onGrabButton:I,corner:"bottom-left",__self:this,__source:{fileName:Et,lineNumber:279}}),e(u,{left:m.endX-Xo+sn,top:m.endY-Xo+sn,onGrabButton:I,corner:"bottom-right",__self:this,__source:{fileName:Et,lineNumber:285}}),e("div",{style:{left:Math.max(0,m.endX-191),top:Math.max(0,m.endY+8),display:y?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:Et,lineNumber:291}},e("button",{onClick:w=>{w.preventDefault(),p.current&&h({startX:0,startY:0,endX:p.current.width/bt,endY:p.current.height/bt}),v(!1)},class:"btn btn--default",__self:this,__source:{fileName:Et,lineNumber:299}},o.cancelButtonLabel),e("button",{onClick:w=>{w.preventDefault(),O(),v(!1)},class:"btn btn--primary",__self:this,__source:{fileName:Et,lineNumber:316}},o.confirmButtonLabel)))))}}var Rm=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let o=pe.createElement("canvas");return{input:bI({h:e,hooks:t,imageBuffer:o,dialog:n,options:r}),value:async()=>{let i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}});var TI=zs({lazyLoadIntegration:Oo});f();var Am=zs({lazyLoadIntegration:Oo,getModalIntegration:()=>km,getScreenshotIntegration:()=>Rm});f();function vI(e,t=1,n){Bn.increment(Zt,e,t,n)}function II(e,t,n){Bn.distribution(Zt,e,t,n)}function xI(e,t,n){Bn.set(Zt,e,t,n)}function wI(e,t,n){Bn.gauge(Zt,e,t,n)}function CI(e,t,n="second",r){return Bn.timing(Zt,e,t,n,r)}var kI={increment:vI,distribution:II,set:xI,gauge:wI,timing:CI};f();var ei={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Bu(e){let{traceFetch:t,traceXHR:n,shouldCreateSpanForRequest:r,enableHTTPTimings:o,tracePropagationTargets:i}={traceFetch:ei.traceFetch,traceXHR:ei.traceXHR,...e},s=typeof r=="function"?r:u=>!0,a=u=>MI(u,i),c={};t&&An(u=>{let d=oc(u,s,a,c);if(d){let l=Mm(u.fetchData.url),p=l?ht(l).host:void 0;d.setAttributes({"http.url":l,"server.address":p})}o&&d&&Nm(d)}),n&&Wn(u=>{let d=OI(u,s,a,c);o&&d&&Nm(d)})}function RI(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Nm(e){let{url:t}=F(e).data||{};if(!t||typeof t!="string")return;let n=At("resource",({entries:r})=>{r.forEach(o=>{RI(o)&&o.name.endsWith(t)&&(NI(o).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function AI(e){let t="unknown",n="unknown",r="";for(let o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function zt(e=0){return((Se||performance.timeOrigin)+e)/1e3}function NI(e){let{name:t,version:n}=AI(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Se?[...r,["http.request.redirect_start",zt(e.redirectStart)],["http.request.fetch_start",zt(e.fetchStart)],["http.request.domain_lookup_start",zt(e.domainLookupStart)],["http.request.domain_lookup_end",zt(e.domainLookupEnd)],["http.request.connect_start",zt(e.connectStart)],["http.request.secure_connection_start",zt(e.secureConnectionStart)],["http.request.connection_end",zt(e.connectEnd)],["http.request.request_start",zt(e.requestStart)],["http.request.response_start",zt(e.responseStart)],["http.request.response_end",zt(e.responseEnd)]]:r}function MI(e,t){let n=R.location&&R.location.href;if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}let i=r.origin===o;return t?pt(r.toString(),t)||i&&pt(r.pathname,t):i}else{let r=!!e.match(/^\/(?!\/)/);return t?pt(e,t):r}}function OI(e,t,n,r){let o=e.xhr,i=o&&o[ut];if(!o||o.__sentry_own_request__||!i)return;let s=et()&&t(i.url);if(e.endTimestamp&&s){let p=o.__sentry_xhr_span_id__;if(!p)return;let m=r[p];m&&i.status_code!==void 0&&(gr(m,i.status_code),m.end(),delete r[p]);return}let a=Mm(i.url),c=a?ht(a).host:void 0,u=!!Q(),d=s&&u?Le({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":c,[ue]:"auto.http.browser",[kt]:"http.client"}}):new We;o.__sentry_xhr_span_id__=d.spanContext().spanId,r[o.__sentry_xhr_span_id__]=d;let l=x();return o.setRequestHeader&&n(i.url)&&l&&DI(o,l,et()&&u?d:void 0),d}function DI(e,t,n){let r=U(),o=Z(),{traceId:i,spanId:s,sampled:a,dsc:c}={...o.getPropagationContext(),...r.getPropagationContext()},u=n&&et()?_r(n):Mn(i,s,a),d=Nn(c||(n?De(n):dn(i,t)));LI(e,u,d)}function LI(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(ar,n)}catch{}}function Mm(e){try{return new URL(e,R.location.origin).href}catch{return}}f();f();function Om(){R&&R.document?R.document.addEventListener("visibilitychange",()=>{let e=Q();if(!e)return;let t=K(e);if(R.document.hidden&&t){let n="cancelled",{op:r,status:o}=F(t);B&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):B&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var PI="BrowserTracing",FI={...Er,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!1,enableInp:!0,_experiments:{},...ei},UI=(e={})=>{Sr();let{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:o},beforeStartSpan:i,idleTimeout:s,finalTimeout:a,childSpanTimeout:c,markBackgroundSpan:u,traceFetch:d,traceXHR:l,shouldCreateSpanForRequest:p,enableHTTPTimings:m,instrumentPageLoad:h,instrumentNavigation:y}={...FI,...e},v=yc();t&&Cc(),r&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?bc():n&&Ec(),o&&Tc();let b={name:void 0,source:void 0};function I(P,O){let w=O.op==="pageload",E=i?i(O):O,T=E.attributes||{};O.name!==E.name&&(T[Oe]="custom",E.attributes=T),b.name=E.name,b.source=T[Oe];let C=ki(E,{idleTimeout:s,finalTimeout:a,childSpanTimeout:c,disableAutoFinish:w,beforeSpanEnd:k=>{v(),vc(k)}});function D(){["interactive","complete"].includes(R.document.readyState)&&P.emit("idleSpanEnableAutoFinish",C)}return w&&R.document&&(R.document.addEventListener("readystatechange",()=>{D()}),D()),C}return{name:PI,afterAllSetup(P){let O,w=R.location&&R.location.href;P.on("startNavigationSpan",E=>{x()===P&&(O&&!F(O).timestamp&&(B&&g.log(`[Tracing] Finishing current root span with op: ${F(O).op}`),O.end()),O=I(P,{op:"navigation",...E}))}),P.on("startPageLoadSpan",(E,T={})=>{if(x()!==P)return;O&&!F(O).timestamp&&(B&&g.log(`[Tracing] Finishing current root span with op: ${F(O).op}`),O.end());let C=T.sentryTrace||Dm("sentry-trace"),D=T.baggage||Dm("baggage"),k=oo(C,D);U().setPropagationContext(k),O=I(P,{op:"pageload",...E})}),P.on("spanEnd",E=>{let T=F(E).op;if(E!==K(E)||T!=="navigation"&&T!=="pageload")return;let C=U(),D=C.getPropagationContext();C.setPropagationContext({...D,sampled:D.sampled!==void 0?D.sampled:_t(E),dsc:D.dsc||De(E)})}),R.location&&(h&&Lm(P,{name:R.location.pathname,startTime:Se?Se/1e3:void 0,attributes:{[Oe]:"url",[ue]:"auto.pageload.browser"}}),y&&tn(({to:E,from:T})=>{if(T===void 0&&w&&w.indexOf(E)!==-1){w=void 0;return}T!==E&&(w=void 0,Pm(P,{name:R.location.pathname,attributes:{[Oe]:"url",[ue]:"auto.navigation.browser"}}))})),u&&Om(),o&&BI(s,a,c,b),t&&kc(),Bu({traceFetch:d,traceXHR:l,tracePropagationTargets:P.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:p,enableHTTPTimings:m})}}};function Lm(e,t,n){e.emit("startPageLoadSpan",t,n),U().setTransactionName(t.name);let r=Q();return(r&&F(r).op)==="pageload"?r:void 0}function Pm(e,t){Z().setPropagationContext(qt()),U().setPropagationContext(qt()),e.emit("startNavigationSpan",t),U().setTransactionName(t.name);let n=Q();return(n&&F(n).op)==="navigation"?n:void 0}function Dm(e){let t=ta(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function BI(e,t,n,r){let o,i=()=>{let s="ui.action.click",a=Q(),c=a&&K(a);if(c){let u=F(c).op;if(["navigation","pageload"].includes(u)){B&&g.warn(`[Tracing] Did not create ${s} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(pr,"interactionInterrupted"),o.end(),o=void 0),!r.name){B&&g.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}o=ki({name:r.name,op:s,attributes:{[Oe]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};R.document&&addEventListener("click",i,{once:!1,capture:!0})}f();function Gr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function HI(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Gr(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function Hu(e){return Gr(e.getAllKeys())}function $I(e,t,n){return e(r=>Hu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Gr(r.transaction)}))}function WI(e,t,n){return e(r=>Hu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Gr(r.transaction)}))}function GI(e){return e(t=>Hu(t).then(n=>{let r=n[0];if(r!=null)return Gr(t.get(r)).then(o=>(t.delete(r),Gr(t.transaction).then(()=>o)))}))}function zI(e){let t;function n(){return t==null&&(t=HI(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{let o=await cr(r);await $I(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{let o=await cr(r);await WI(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let r=await GI(n());if(r)return Ea(r)}catch{}}}}function jI(e){return t=>e({...t,createStore:zI})}function qI(e=Mo){return jI(Xa(e))}f();f();f();var Fm=1e6,qs=String(0),YI="main",Hm="",$m="",Wm="",$u=R.navigator&&R.navigator.userAgent||"",Gm="",VI=R.navigator&&R.navigator.language||R.navigator&&R.navigator.languages&&R.navigator.languages[0]||"";function KI(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var Um=R.navigator&&R.navigator.userAgentData;KI(Um)&&Um.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Hm=e.platform||"",Wm=e.architecture||"",Gm=e.model||"",$m=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];$u=`${t.brand} ${t.version}`}}).catch(e=>{});function XI(e){return!("thread_metadata"in e)}function JI(e){return XI(e)?e0(e):e}function ZI(e){let t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&B&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function QI(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=ZI(r),i=JI(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Y()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Y()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Xt,runtime:{name:"javascript",version:R.navigator.userAgent},os:{name:Hm,version:$m,build_number:$u},device:{locale:VI,model:Gm,manufacturer:$u,architecture:Wm,is_emulator:!1},debug_meta:{images:t0(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||G(),trace_id:o,active_thread_id:qs,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function Ys(e){return F(e).op==="pageload"}function e0(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[qs]:{name:YI}}},o=e.samples[0];if(!o)return r;let i=o.timestamp,s=typeof performance.timeOrigin=="number"?performance.timeOrigin:Se||0,a=s-(Se||s);return e.samples.forEach((c,u)=>{if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[u]={elapsed_since_start_ns:((c.timestamp+a-i)*Fm).toFixed(0),stack_id:t,thread_id:qs};return}let d=e.stacks[c.stackId],l=[];for(;d;){l.push(d.frameId);let m=e.frames[d.frameId];m&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:m.name,abs_path:typeof m.resourceId=="number"?e.resources[m.resourceId]:void 0,lineno:m.line,colno:m.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}let p={elapsed_since_start_ns:((c.timestamp+a-i)*Fm).toFixed(0),stack_id:n,thread_id:qs};r.stacks[n]=l,r.samples[u]=p,n++}),r}function zm(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function jm(e){let t=[];return ct(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++){let i=n[o];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[o])}}),t}var Bm=new WeakMap;function t0(e){let t=A._sentryDebugIds;if(!t)return[];let n=x(),r=n&&n.getOptions(),o=r&&r.stackParser;if(!o)return[];let i,s=Bm.get(o);s?i=s:(i=new Map,Bm.set(o,i));let a=Object.keys(t).reduce((u,d)=>{let l,p=i.get(d);p?l=p:(l=o(d),i.set(d,l));for(let m=l.length-1;m>=0;m--){let h=l[m],y=h&&h.filename;if(h&&y){u[y]=t[d];break}}return u},{}),c=[];for(let u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function n0(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(B&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(B&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function r0(e){return e.samples.length<2?(B&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(B&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}var qm=!1,Wu=3e4;function o0(e){return typeof e=="function"}function Ym(){let e=R.Profiler;if(!o0(e)){B&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(Wu/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{B&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),qm=!0}}function Gu(e){if(qm)return B&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return B&&g.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let t=x(),n=t&&t.getOptions();if(!n)return B&&g.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return n0(r)?r?(r===!0?!0:Math.random()<r)?!0:(B&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(B&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(B&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function Vm(e,t,n,r){return r0(n)?QI(e,t,n,r):null}var Vn=new Map;function Km(){return Vn.size}function Xm(e){let t=Vn.get(e);return t&&Vn.delete(e),t}function Jm(e,t){if(Vn.set(e,t),Vn.size>30){let n=Vn.keys().next().value;Vn.delete(n)}}function zu(e){let t;Ys(e)&&(t=Y()*1e3);let n=Ym();if(!n)return;B&&g.log(`[Profiling] started profiling span: ${F(e).description}`);let r=G();U().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n)return n.stop().then(c=>{if(i&&(R.clearTimeout(i),i=void 0),B&&g.log(`[Profiling] stopped profiling of span: ${F(e).description}`),!c){B&&g.log(`[Profiling] profiler returned null profile for: ${F(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}Jm(r,c)}).catch(c=>{B&&g.log("[Profiling] error while stopping profiler:",c)})}let i=R.setTimeout(()=>{B&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",F(e).description),o()},Wu),s=e.end.bind(e);function a(){return e?(o().then(()=>{s()},()=>{s()}),e):s()}e.end=a}var i0="BrowserProfiling",s0=()=>({name:i0,setup(e){let t=Q(),n=t&&K(t);n&&Ys(n)&&Gu(n)&&zu(n),e.on("spanStart",r=>{r===K(r)&&Gu(r)&&zu(r)}),e.on("beforeEnvelope",r=>{if(!Km())return;let o=jm(r);if(!o.length)return;let i=[];for(let s of o){let a=s&&s.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){B&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){B&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}a&&a.profile&&delete a.profile;let d=Xm(c);if(!d){B&&g.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}let l=Vm(c,u,d,s);l&&i.push(l)}zm(r,i)})}}),a0=s0;export{bo as BrowserClient,Ue as SDK_VERSION,kt as SEMANTIC_ATTRIBUTE_SENTRY_OP,ue as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,fr as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,Oe as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Qe as Scope,R as WINDOW,tt as addBreadcrumb,Pi as addEventProcessor,id as addIntegration,Nl as addTracingExtensions,Ac as breadcrumbsIntegration,Nc as browserApiErrorsIntegration,a0 as browserProfilingIntegration,UI as browserTracingIntegration,Ed as captureConsoleIntegration,Bt as captureEvent,Jt as captureException,Vi as captureFeedback,Pn as captureMessage,ho as captureSession,gy as captureUserFeedback,gf as chromeStackLineParser,Ql as close,By as contextLinesIntegration,ql as continueTrace,Fi as createTransport,fc as createUserFeedbackEnvelope,bd as debugIntegration,Gi as dedupeIntegration,ei as defaultRequestInstrumentationOptions,Sf as defaultStackLineParsers,Rc as defaultStackParser,Un as endSession,lc as eventFromException,dc as eventFromMessage,Eo as exceptionFromError,xd as extraErrorDataIntegration,TI as feedbackAsyncIntegration,Am as feedbackIntegration,Am as feedbackSyncIntegration,Zl as flush,py as forceLoad,Ui as functionToStringIntegration,_f as geckoStackLineParser,Q as getActiveSpan,x as getClient,Wd as getCurrentHub,U as getCurrentScope,vf as getDefaultIntegrations,Fv as getFeedback,dr as getGlobalScope,Z as getIsolationScope,ZT as getReplay,K as getRootSpan,ln as getSpanDescendants,Ma as getSpanStatusFromHttpCode,Mc as globalHandlersIntegration,xy as httpClientIntegration,Oc as httpContextIntegration,Hi as inboundFiltersIntegration,dy as init,Bu as instrumentOutgoingRequests,ed as isInitialized,Li as lastEventId,Oo as lazyLoadIntegration,Dc as linkedErrorsIntegration,qI as makeBrowserOfflineTransport,Mo as makeFetchTransport,fd as makeMultiplexedTransport,kI as metrics,yd as moduleMetadataIntegration,my as onLoad,OS as opera10StackLineParser,PS as opera11StackLineParser,md as parameterize,Sr as registerSpanErrorInstrumentation,fv as replayCanvasIntegration,XT as replayIntegration,Ty as reportingObserverIntegration,wd as rewriteFramesIntegration,gm as sendFeedback,Cd as sessionTimingIntegration,br as setContext,Ka as setCurrentClient,Ni as setExtra,Ai as setExtras,gr as setHttpStatus,Ii as setMeasurement,Oi as setTag,Mi as setTags,Di as setUser,fy as showReportDialog,Ol as spanToBaggageHeader,F as spanToJSON,_r as spanToTraceHeader,Pm as startBrowserTracingNavigationSpan,Lm as startBrowserTracingPageLoadSpan,Le as startInactiveSpan,Yl as startNewTrace,Fn as startSession,jl as startSpan,wi as startSpanManual,Ad as thirdPartyErrorFilterIntegration,AS as winjsStackLineParser,Ln as withActiveSpan,Ra as withIsolationScope,Ae as withScope,kd as zodErrorsIntegration};
|
|
466
|
-
//# sourceMappingURL=esm-HBMYQBEO.js.map
|