import"./_sentry-release-injection-file.DIRF2JDl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7420e9b6-e63c-4774-ae18-d7006767cb4f",e._sentryDebugIdIdentifier="sentry-dbid-7420e9b6-e63c-4774-ae18-d7006767cb4f")}catch{}})();const So=Object.prototype.toString;function gs(e){switch(So.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return $e(e,Error)}}function Pt(e,t){return So.call(e)===`[object ${t}]`}function Eo(e){return Pt(e,"ErrorEvent")}function Qs(e){return Pt(e,"DOMError")}function Nc(e){return Pt(e,"DOMException")}function Fe(e){return Pt(e,"String")}function _s(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ys(e){return e===null||_s(e)||typeof e!="object"&&typeof e!="function"}function kt(e){return Pt(e,"Object")}function rr(e){return typeof Event<"u"&&$e(e,Event)}function Oc(e){return typeof Element<"u"&&$e(e,Element)}function Dc(e){return Pt(e,"RegExp")}function sr(e){return!!(e&&e.then&&typeof e.then=="function")}function Lc(e){return kt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function $e(e,t){try{return e instanceof t}catch{return!1}}function bo(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function It(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Zs(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{bo(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Pc(e,t,n=!1){return Fe(e)?Dc(t)?t.test(e):Fe(t)?n?e===t:e.includes(t):!1:!1}function Xe(e,t=[],n=!1){return t.some(r=>Pc(e,r,n))}function Fc(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!$e(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Bc(Fr(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function Fr(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if($e(r[s],Error)){ei(o,a);const u=e(t,r[s]),d=c.length;ti(u,s,d,a),c=Fr(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if($e(u,Error)){ei(o,a);const l=e(t,u),f=c.length;ti(l,`errors[${d}]`,f,a),c=Fr(e,t,n,u,s,[l,...c],l,f)}}),c}function ei(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 ti(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 Bc(e,t){return e.map(n=>(n.value&&(n.value=It(n.value,t)),n))}function vo(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const at="8.35.0",$=globalThis;function ir(e,t,n){const r=$,s=r.__SENTRY__=r.__SENTRY__||{},i=s[at]=s[at]||{};return i[e]||(i[e]=t())}const wt=$,$c=80;function Ue(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||$c;for(;n&&i++<r&&(u=Uc(n,d),!(u==="html"||i>1&&o+s.length*c+u.length>=l));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Uc(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(wt.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Fe(o)){const a=o.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function To(){try{return wt.document.location.href}catch{return""}}function Hc(e){return wt.document&&wt.document.querySelector?wt.document.querySelector(e):null}function Io(e){if(!wt.HTMLElement)return null;let t=e;const 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}const Ft=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wc="Sentry Logger ",Br=["debug","info","warn","error","log","assert","trace"],Un={};function Bt(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(Un);r.forEach(s=>{const i=Un[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function jc(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ft?Br.forEach(n=>{t[n]=(...r)=>{e&&Bt(()=>{$.console[n](`${Wc}[${n}]:`,...r)})}}):Br.forEach(n=>{t[n]=()=>{}}),t}const g=ir("logger",jc),zc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function qc(e){return e==="http"||e==="https"}function an(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Gc(e){const t=zc.exec(e);if(!t){Bt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return wo({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function wo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Yc(e){if(!Ft)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(g.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?qc(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 Vc(e){const t=typeof e=="string"?Gc(e):wo(e);if(!(!t||!Yc(t)))return t}class Ae 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}}function me(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&ko(s,r),e[t]=s}function be(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ft&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ko(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,be(e,"__sentry_original__",t)}catch{}}function Ss(e){return e.__sentry_original__}function Xc(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Co(e){if(gs(e))return{message:e.message,name:e.name,stack:e.stack,...ri(e)};if(rr(e)){const t={type:e.type,target:ni(e.target),currentTarget:ni(e.currentTarget),...ri(e)};return typeof CustomEvent<"u"&&$e(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ni(e){try{return Oc(e)?Ue(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ri(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Kc(e,t=40){const n=Object.keys(Co(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return It(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:It(i,t)}return""}function ne(e){return $r(e,new Map)}function $r(e,t){if(Jc(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.getOwnPropertyNames(e))typeof e[s]<"u"&&(r[s]=$r(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push($r(s,t))}),r}return e}function Jc(e){if(!kt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Ro=50,dt="?",si=/\(error: (.*)\)/,ii=/captureMessage|captureException/;function Mo(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
`);for(let a=r;a<o.length;a++){const c=o[a];if(c.length>1024)continue;const u=si.test(c)?c.replace(si,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){i.push(l);break}}if(i.length>=Ro+s)break}}return Zc(i.slice(s))}}function Qc(e){return Array.isArray(e)?Mo(...e):e}function Zc(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(En(t).function||"")&&t.pop(),t.reverse(),ii.test(En(t).function||"")&&(t.pop(),ii.test(En(t).function||"")&&t.pop()),t.slice(0,Ro).map(n=>({...n,filename:n.filename||En(t).filename,function:n.function||dt}))}function En(e){return e[e.length-1]||{}}const wr="<anonymous>";function He(e){try{return!e||typeof e!="function"?wr:e.name||wr}catch{return wr}}function oi(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const On={},ai={};function Qe(e,t){On[e]=On[e]||[],On[e].push(t)}function Ze(e,t){ai[e]||(t(),ai[e]=!0)}function Ee(e,t){const n=e&&On[e];if(n)for(const r of n)try{r(t)}catch(s){Ft&&g.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${He(r)}
Error:`,s)}}function eu(e){const t="console";Qe(t,e),Ze(t,tu)}function tu(){"console"in $&&Br.forEach(function(e){e in $.console&&me($.console,e,function(t){return Un[e]=t,function(...n){Ee("console",{args:n,level:e});const s=Un[e];s&&s.apply($.console,n)}})})}const Ur=$;function Ao(){if(!("fetch"in Ur))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Hr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function nu(){if(typeof EdgeRuntime=="string")return!0;if(!Ao())return!1;if(Hr(Ur.fetch))return!0;let e=!1;const t=Ur.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Hr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ft&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const xo=1e3;function cn(){return Date.now()/xo}function ru(){const{performance:e}=$;if(!e||!e.now)return cn;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/xo}const fe=ru(),pe=(()=>{const{performance:e}=$;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):t,u=c<t;return i||u?s<=c?e.timeOrigin:o:r})();function No(e,t){const n="fetch";Qe(n,e),Ze(n,()=>Oo(void 0,t))}function su(e){const t="fetch-body-resolved";Qe(t,e),Ze(t,()=>Oo(ou))}function Oo(e,t=!1){t&&!nu()||me($,"fetch",function(n){return function(...r){const{method:s,url:i}=au(r),o={args:r,fetchData:{method:s,url:i},startTimestamp:fe()*1e3};e||Ee("fetch",{...o});const a=new Error().stack;return n.apply($,r).then(async c=>(e?e(c):Ee("fetch",{...o,endTimestamp:fe()*1e3,response:c}),c),c=>{throw Ee("fetch",{...o,endTimestamp:fe()*1e3,error:c}),gs(c)&&c.stack===void 0&&(c.stack=a,be(c,"framesToPop",1)),c})}})}async function iu(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function ou(e){let t;try{t=e.clone()}catch{return}iu(t,()=>{Ee("fetch-body-resolved",{endTimestamp:fe()*1e3,response:e})})}function Wr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ci(e){return typeof e=="string"?e:e?Wr(e,"url")?e.url:e.toString?e.toString():"":""}function au(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ci(n),method:Wr(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:ci(t),method:Wr(t,"method")?String(t.method).toUpperCase():"GET"}}let bn=null;function Do(e){const t="error";Qe(t,e),Ze(t,cu)}function cu(){bn=$.onerror,$.onerror=function(e,t,n,r,s){return Ee("error",{column:r,error:s,line:n,msg:e,url:t}),bn&&!bn.__SENTRY_LOADER__?bn.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let vn=null;function Lo(e){const t="unhandledrejection";Qe(t,e),Ze(t,uu)}function uu(){vn=$.onunhandledrejection,$.onunhandledrejection=function(e){return Ee("unhandledrejection",e),vn&&!vn.__SENTRY_LOADER__?vn.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function lu(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function du(){return"npm"}function fu(){return!lu()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ui(){return typeof window<"u"&&(!fu()||pu())}function pu(){return $.process!==void 0&&$.process.type==="renderer"}function hu(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function J(){const e=$,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const 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 Po(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ze(e){const{message:t,event_id:n}=e;if(t)return t;const r=Po(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function jr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Qt(e,t){const n=Po(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function li(e){if(e&&e.__sentry_captured__)return!0;try{be(e,"__sentry_captured__",!0)}catch{}return!1}function Fo(e){return Array.isArray(e)?e:[e]}function Me(e,t=100,n=1/0){try{return zr("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Bo(e,t=3,n=100*1024){const r=Me(e,t);return yu(r)>n?Bo(e,t-1,n):r}function zr(e,t,n=1/0,r=1/0,s=hu()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=mu(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const 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 ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return zr("",h,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Co(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(l>=r){d[h]="[MaxProperties ~]";break}const p=f[h];d[h]=zr(h,p,c-1,r,s),l++}return o(t),d}function mu(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(bo(t))return"[VueViewModel]";if(Lc(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${He(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=gu(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function gu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function _u(e){return~-encodeURI(e).split(/%..|./).length}function yu(e){return _u(JSON.stringify(e))}var De;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(De||(De={}));function We(e){return new Se(t=>{t(e)})}function Hn(e){return new Se((t,n)=>{n(e)})}class Se{constructor(t){Se.prototype.__init.call(this),Se.prototype.__init2.call(this),Se.prototype.__init3.call(this),Se.prototype.__init4.call(this),this._state=De.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Se((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Se((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(De.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(De.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===De.PENDING){if(sr(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===De.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===De.RESOLVED&&n[1](this._value),this._state===De.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Su(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Hn(new Ae("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Se((a,c)=>{let u=t.length;if(!u)return a(!0);const d=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(l=>{We(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:s,drain:i}}function ct(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Eu=["fatal","error","warning","log","info","debug"];function $o(e){return e==="warn"?"warning":Eu.includes(e)?e:"log"}const yt="baggage",Es="sentry-",bu=/^sentry-/,vu=8192;function Uo(e){const t=Tu(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(bu)){const o=s.slice(Es.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Ho(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Es}${r}`]=s),n),{});return Iu(t)}function Tu(e){if(!(!e||!Fe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=di(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):di(e)}function di(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Iu(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>vu?(Ft&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const wu=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ku(e){if(!e)return;const t=e.match(wu);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 Cu(e,t){const n=ku(e),r=Uo(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||J(),parentSpanId:i||J().substring(16),spanId:J().substring(16),sampled:o,dsc:r||{}}:{traceId:s||J(),spanId:J().substring(16)}}function bs(e=J(),t=J().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ht(e,t=[]){return[e,t]}function Ru(e,t){const[n,r]=e;return[n,[...r,t]]}function fi(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function qr(e){return $.__SENTRY__&&$.__SENTRY__.encodePolyfill?$.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Mu(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[qr(r),i]:r.push(typeof i=="string"?qr(i):i)}for(const i of n){const[o,a]=i;if(s(`
${JSON.stringify(o)}
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Me(a))}s(c)}}return typeof r=="string"?r:Au(r)}function Au(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function xu(e){return[{type:"span"},e]}function Nu(e){const t=typeof e.data=="string"?qr(e.data):e.data;return[ne({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Ou={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 pi(e){return Ou[e]}function vs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Wo(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:an(r)},...s&&{trace:ne({...s})}}}function Du(e,t,n){const r=[{type:"client_report"},{timestamp:cn(),discarded_events:e}];return ht(t?{dsn:t}:{},[r])}const Lu=60*1e3;function Pu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Lu:r-t}function Fu(e,t){return e[t]||e.all||0}function jo(e,t,n=Date.now()){return Fu(e,t)>n}function zo(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else o?s.all=r+Pu(o,r):t===429&&(s.all=r+60*1e3);return s}function Bu(e,t){return e??t()}function _e(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Wn(){return{traceId:J(),spanId:J().substring(16)}}const Tn=$;function $u(){const e=Tn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Tn&&!!Tn.history.pushState&&!!Tn.history.replaceState;return!t&&n}const N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function $t(){return Ts($),$}function Ts(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||at,t[at]=t[at]||{}}function Uu(e){const t=fe(),n={sid:J(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Wu(n)};return e&&Ct(n,e),n}function Ct(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||fe(),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:J()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Hu(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Ct(e,n)}function Wu(e){return ne({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}})}const Gr="_sentrySpan";function Zt(e,t){t?be(e,Gr,t):delete e[Gr]}function jn(e){return e[Gr]}const ju=100;class Is{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Wn()}clone(){const t=new Is;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,Zt(t,jn(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&&Ct(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;const n=typeof t=="function"?t(this):t,[r,s]=n instanceof ft?[n.getScopeData(),n.getRequestSession()]:kt(n)?[t,t.requestSession]:[],{tags:i,extra:o,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},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),s&&(this._requestSession=s),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,Zt(this,void 0),this._attachments=[],this._propagationContext=Wn(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:ju;if(r<=0)return this;const s={timestamp:cn(),...t},i=this._breadcrumbs;return i.push(s),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:jn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:J();if(!this._client)return g.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:J();if(!this._client)return g.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:J();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)}}const ft=Is;function zu(){return ir("defaultCurrentScope",()=>new ft)}function qu(){return ir("defaultIsolationScope",()=>new ft)}class Gu{constructor(t,n){let r;t?r=t:r=new ft;let s;n?s=n:s=new ft,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return sr(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(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(){const 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 Rt(){const e=$t(),t=Ts(e);return t.stack=t.stack||new Gu(zu(),qu())}function Yu(e){return Rt().withScope(e)}function Vu(e,t){const n=Rt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function hi(e){return Rt().withScope(()=>e(Rt().getIsolationScope()))}function Xu(){return{withIsolationScope:hi,withScope:Yu,withSetScope:Vu,withSetIsolationScope:(e,t)=>hi(t),getCurrentScope:()=>Rt().getScope(),getIsolationScope:()=>Rt().getIsolationScope()}}function un(e){const t=Ts(e);return t.acs?t.acs:Xu()}function K(){const e=$t();return un(e).getCurrentScope()}function ve(){const e=$t();return un(e).getIsolationScope()}function Ku(){return ir("globalScope",()=>new ft)}function ws(...e){const t=$t(),n=un(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function B(){return K().getClient()}const Ju="_sentryMetrics";function Yr(e){const t=e[Ju];if(!t)return;const n={};for(const[,[r,s]]of t)(n[r]||(n[r]=[])).push(ne(s));return n}const Pe="sentry.source",qo="sentry.sample_rate",pt="sentry.op",ie="sentry.origin",Vr="sentry.idle_span_finish_reason",or="sentry.measurement_unit",ar="sentry.measurement_value",Qu="sentry.profile_id",ks="sentry.exclusive_time",Zu=0,Go=1,se=2;function el(e){if(e<400&&e>=100)return{code:Go};if(e>=400&&e<500)switch(e){case 401:return{code:se,message:"unauthenticated"};case 403:return{code:se,message:"permission_denied"};case 404:return{code:se,message:"not_found"};case 409:return{code:se,message:"already_exists"};case 413:return{code:se,message:"failed_precondition"};case 429:return{code:se,message:"resource_exhausted"};case 499:return{code:se,message:"cancelled"};default:return{code:se,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:se,message:"unimplemented"};case 503:return{code:se,message:"unavailable"};case 504:return{code:se,message:"deadline_exceeded"};default:return{code:se,message:"internal_error"}}return{code:se,message:"unknown_error"}}function Yo(e,t){e.setAttribute("http.response.status_code",t);const n=el(t);n.message!=="unknown_error"&&e.setStatus(n)}const Vo=0,Xo=1;function tl(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a}=W(e);return ne({parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a})}function nl(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=W(e);return ne({parent_span_id:r,span_id:t,trace_id:n})}function Ko(e){const{traceId:t,spanId:n}=e.spanContext(),r=mt(e);return bs(t,n,r)}function ut(e){return typeof e=="number"?mi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?mi(e.getTime()):fe()}function mi(e){return e>9999999999?e/1e3:e}function W(e){if(sl(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(rl(e)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:c}=e;return ne({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:ut(s),timestamp:ut(o)||void 0,status:Jo(c),op:r[pt],origin:r[ie],_metrics_summary:Yr(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function rl(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function sl(e){return typeof e.getSpanJSON=="function"}function mt(e){const{traceFlags:t}=e.spanContext();return t===Xo}function Jo(e){if(!(!e||e.code===Zu))return e.code===Go?"ok":e.message||"unknown_error"}const lt="_sentryChildSpans",Xr="_sentryRootSpan";function Qo(e,t){const n=e[Xr]||e;be(t,Xr,n),e[lt]?e[lt].add(t):be(e,lt,new Set([t]))}function il(e,t){e[lt]&&e[lt].delete(t)}function Dn(e){const t=new Set;function n(r){if(!t.has(r)&&mt(r)){t.add(r);const s=r[lt]?Array.from(r[lt]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function ce(e){return e[Xr]||e}function ue(){const e=$t(),t=un(e);return t.getActiveSpan?t.getActiveSpan():jn(K())}let gi=!1;function ol(){gi||(gi=!0,Do(Kr),Lo(Kr))}function Kr(){const e=ue(),t=e&&ce(e);if(t){const n="internal_error";N&&g.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:se,message:n})}}Kr.tag="sentry_tracingErrorCallback";const Zo="_sentryScope",ea="_sentryIsolationScope";function al(e,t,n){e&&(be(e,ea,n),be(e,Zo,t))}function _i(e){return{scope:e[Zo],isolationScope:e[ea]}}function je(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=B(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Ut{constructor(t={}){this._traceId=t.traceId||J(),this._spanId=t.spanId||J().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Vo}}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){}}const Cs="production",ta="_frozenDsc";function yi(e,t){be(e,ta,t)}function cr(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=ne({environment:n.environment||Cs,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function et(e){const t=B();if(!t)return{};const n=cr(W(e).trace_id||"",t),r=ce(e),s=r[ta];if(s)return s;const i=r.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&Uo(o);if(a)return a;const c=W(r),u=c.data||{},d=u[qo];d!=null&&(n.sample_rate=`${d}`);const l=u[Pe],f=c.description;return l!=="url"&&f&&(n.transaction=f),je()&&(n.sampled=String(mt(r))),t.emit("createDsc",n,r),n}function cl(e){if(!N)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=W(e),{spanId:s}=e.spanContext(),i=mt(e),o=ce(e),a=o===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=W(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c}
  ${u.join(`
  `)}`)}function ul(e){if(!N)return;const{description:t="< unknown name >",op:n="< unknown op >"}=W(e),{spanId:r}=e.spanContext(),i=ce(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;g.log(o)}function zn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){N&&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 ll(e,t){if(!je(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;const r=zn(n);return r===void 0?(N&&g.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(N&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(N&&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])}function dl(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){const s=vs(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:an(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ht(i,[o])}function pl(e,t,n,r){const s=vs(n),i=e.type&&e.type!=="replay_event"?e.type:"event";dl(e,n&&n.sdk);const o=Wo(e,s,r,t);return delete e.sdkProcessingMetadata,ht(o,[[{type:i},e]])}function hl(e,t){function n(d){return!!d.trace_id&&!!d.public_key}const r=et(e[0]),s=t&&t.getDsn(),i=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:an(s)}},a=t&&t.getOptions().beforeSendSpan,c=a?d=>a(W(d)):d=>W(d),u=[];for(const d of e){const l=c(d);l&&u.push(xu(l))}return ht(o,u)}function ml(e,t,n,r=ue()){const s=r&&ce(r);s&&s.addEvent(e,{[ar]:t,[or]:n})}function Si(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[or],i=r[ar];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const Ei=1e3;class Rs{constructor(t={}){this._traceId=t.traceId||J(),this._spanId=t.spanId||J().substring(16),this._startTime=t.startTimestamp||fe(),this._attributes={},this.setAttributes({[ie]:"manual",[pt]: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(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Xo:Vo}}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=ut(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=ut(t),ul(this),this._onSpanEnded())}getSpanJSON(){return ne({data:this._attributes,description:this._name,op:this._attributes[pt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Jo(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ie],_metrics_summary:Yr(this),profile_id:this._attributes[Qu],exclusive_time:this._attributes[ks],measurements:Si(this._events),is_segment:this._isStandaloneSpan&&ce(this)===this||void 0,segment_id:this._isStandaloneSpan?ce(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){N&&g.log("[Tracing] Adding an event to span:",t);const s=bi(n)?n:r||fe(),i=bi(n)?{}:n||{},o={name:t,time:ut(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=B();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===ce(this)))return;if(this._isStandaloneSpan){this._sampled?_l(hl([this],t)):(N&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(_i(this).scope||K()).captureEvent(r)}_convertSpanToTransaction(){if(!vi(W(this)))return;this._name||(N&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=_i(this),s=(t||K()).getClient()||B();if(this._sampled!==!0){N&&g.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const o=Dn(this).filter(l=>l!==this&&!gl(l)).map(l=>W(l)).filter(vi),a=this._attributes[Pe],c={contexts:{trace:tl(this)},spans:o.length>Ei?o.sort((l,f)=>l.start_timestamp-f.start_timestamp).slice(0,Ei):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...ne({dynamicSamplingContext:et(this)})},_metrics_summary:Yr(this),...a&&{transaction_info:{source:a}}},u=Si(this._events);return u&&Object.keys(u).length&&(N&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function bi(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function vi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function gl(e){return e instanceof Rs&&e.isStandaloneSpan()}function _l(e){const t=B();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,s=>{N&&g.error("Error while sending span:",s)})}const na="__SENTRY_SUPPRESS_TRACING__";function tt(e){const t=sa();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Sl(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>ws(e.scope,o):s!==void 0?o=>ra(s,o):o=>o())(()=>{const o=K(),a=bl(o);return e.onlyIfParent&&!a?new Ut:yl({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function ra(e,t){const n=sa();return n.withActiveSpan?n.withActiveSpan(e,t):ws(r=>(Zt(r,e||void 0),t(r)))}function yl({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!je())return new Ut;const s=ve();let i;if(e&&!n)i=El(e,r,t),Qo(e,i);else if(e){const o=et(e),{traceId:a,spanId:c}=e.spanContext(),u=mt(e);i=Ti({traceId:a,parentSpanId:c,...t},r,u),yi(i,o)}else{const{traceId:o,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=Ti({traceId:o,parentSpanId:c,...t},r,u),a&&yi(i,a)}return cl(i),al(i,r,s),i}function Sl(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=ut(e.startTime),delete r.startTime,r}return n}function sa(){const e=$t();return un(e)}function Ti(e,t,n){const r=B(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[na]?[!1]:ll(s,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new Rs({...e,attributes:{[Pe]:"custom",...e.attributes},sampled:a});return c!==void 0&&u.setAttribute(qo,c),r&&r.emit("spanStart",u),u}function El(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[na]?!1:mt(e),o=i?new Rs({...n,parentSpanId:r,traceId:s,sampled:i}):new Ut({traceId:s});Qo(e,o);const a=B();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function bl(e){const t=jn(e);if(!t)return;const n=B();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ce(t):t}const Ln={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},vl="heartbeatFailed",Tl="idleTimeout",Il="finalTimeout",wl="externalFinish";function ia(e,t={}){const n=new Map;let r=!1,s,i=wl,o=!t.disableAutoFinish;const a=[],{idleTimeout:c=Ln.idleTimeout,finalTimeout:u=Ln.finalTimeout,childSpanTimeout:d=Ln.childSpanTimeout,beforeSpanEnd:l}=t,f=B();if(!f||!je())return new Ut;const h=K(),p=ue(),m=kl(e);m.end=new Proxy(m.end,{apply(_,y,v){l&&l(m);const[F,...E]=v,T=F||fe(),M=ut(T),G=Dn(m).filter(q=>q!==m);if(!G.length)return x(M),Reflect.apply(_,y,[M,...E]);const Y=G.map(q=>W(q).timestamp).filter(q=>!!q),re=Y.length?Math.max(...Y):void 0,O=W(m).start_timestamp,oe=Math.min(O?O+u/1e3:1/0,Math.max(O||-1/0,Math.min(M,re||1/0)));return x(oe),Reflect.apply(_,y,[oe,...E])}});function b(){s&&(clearTimeout(s),s=void 0)}function S(_){b(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=Tl,m.end(_))},c)}function w(_){s=setTimeout(()=>{!r&&o&&(i=vl,m.end(_))},d)}function L(_){b(),n.set(_,!0);const y=fe();w(y+d/1e3)}function P(_){if(n.has(_)&&n.delete(_),n.size===0){const y=fe();S(y+c/1e3)}}function x(_){r=!0,n.clear(),a.forEach(M=>M()),Zt(h,p);const y=W(m),{start_timestamp:v}=y;if(!v)return;(y.data||{})[Vr]||m.setAttribute(Vr,i),g.log(`[Tracing] Idle span "${y.op}" finished`);const E=Dn(m).filter(M=>M!==m);let T=0;E.forEach(M=>{M.isRecording()&&(M.setStatus({code:se,message:"cancelled"}),M.end(_),N&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(M,void 0,2)));const G=W(M),{timestamp:Y=0,start_timestamp:re=0}=G,O=re<=_,oe=(u+c)/1e3,q=Y-re<=oe;if(N){const he=JSON.stringify(M,void 0,2);O?q||g.log("[Tracing] Discarding span since it finished after idle span final timeout",he):g.log("[Tracing] Discarding span since it happened after idle span was finished",he)}(!q||!O)&&(il(m,M),T++)}),T>0&&m.setAttribute("sentry.idle_span_discarded_spans",T)}return a.push(f.on("spanStart",_=>{if(r||_===m||W(_).timestamp)return;Dn(m).includes(_)&&L(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{r||P(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===m&&(o=!0,S(),n.size&&w())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(m.setStatus({code:se,message:"deadline_exceeded"}),i=Il,m.end())},u),m}function kl(e){const t=tt(e);return Zt(K(),t),N&&g.log("[Tracing] Started span is an idle span"),t}function Jr(e,t,n,r=0){return new Se((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);N&&o.id&&a===null&&g.log(`Event processor "${o.id}" dropped event`),sr(a)?a.then(c=>Jr(e,c,n,r+1).then(s)).then(null,i):Jr(e,a,n,r+1).then(s).then(null,i)}})}function Cl(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Rl(e,t),r&&xl(e,r),Nl(e,n),Ml(e,s),Al(e,i)}function Ii(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:f,transactionName:h,span:p}=t;qt(e,"extra",n),qt(e,"tags",r),qt(e,"user",s),qt(e,"contexts",i),qt(e,"sdkProcessingMetadata",a),o&&(e.level=o),h&&(e.transactionName=h),p&&(e.span=p),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,...f}}function qt(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Rl(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,c=ne(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=ne(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=ne(s);d&&Object.keys(d).length&&(e.user={...d,...e.user});const l=ne(i);l&&Object.keys(l).length&&(e.contexts={...l,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function Ml(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Al(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function xl(e,t){e.contexts={trace:nl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:et(t),...e.sdkProcessingMetadata};const n=ce(t),r=W(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Nl(e,t){e.fingerprint=e.fingerprint?Fo(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function oa(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||J(),timestamp:t.timestamp||cn()},u=n.integrations||e.integrations.map(b=>b.name);Ol(c,e),Pl(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Dl(c,e.stackParser);const d=Bl(r,n.captureContext);n.mechanism&&Qt(c,n.mechanism);const l=s?s.getEventProcessors():[],f=Ku().getScopeData();if(i){const b=i.getScopeData();Ii(f,b)}if(d){const b=d.getScopeData();Ii(f,b)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),Cl(c,f);const p=[...l,...f.eventProcessors];return Jr(p,c,n).then(b=>(b&&Ll(b),typeof o=="number"&&o>0?Fl(b,o,a):b))}function Ol(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Cs),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=It(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=It(o.value,i));const a=e.request;a&&a.url&&(a.url=It(a.url,i))}const wi=new WeakMap;function Dl(e,t){const n=$._sentryDebugIds;if(!n)return;let r;const s=wi.get(t);s?r=s:(r=new Map,wi.set(t,r));const i=Object.entries(n).reduce((o,[a,c])=>{let u;const d=r.get(a);d?u=d:(u=t(a),r.set(a,u));for(let l=u.length-1;l>=0;l--){const f=u[l];if(f.filename){o[f.filename]=c;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Ll(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function Pl(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Fl(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Me(s.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(s=>({...s,...s.data&&{data:Me(s.data,t,n)}}))),r}function Bl(e,t){if(!t)return e;const n=e?e.clone():new ft;return n.update(t),n}function aa(e,t){return K().captureException(e,void 0)}function ca(e,t){return K().captureEvent(e,t)}function $l(e,t){ve().setContext(e,t)}function Ul(e){ve().addEventProcessor(e)}function ki(e){const t=B(),n=ve(),r=K(),{release:s,environment:i=Cs}=t&&t.getOptions()||{},{userAgent:o}=$.navigator||{},a=Uu({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&Ct(c,{status:"exited"}),ua(),n.setSession(a),r.setSession(a),a}function ua(){const e=ve(),t=K(),n=t.getSession()||e.getSession();n&&Hu(n),la(),e.setSession(),t.setSession()}function la(){const e=ve(),t=K(),n=B(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ci(e=!1){if(e){ua();return}la()}const Hl="7";function Wl(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function jl(e){return`${Wl(e)}${e.projectId}/envelope/`}function zl(e,t){return Xc({sentry_key:e.publicKey,sentry_version:Hl,...t&&{sentry_client:`${t.name}/${t.version}`}})}function ql(e,t,n){return t||`${jl(e)}?${zl(e,n)}`}const Ri=[];function Gl(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Yl(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Fo(n(t)):r=t;const s=Gl(r),i=s.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=s.splice(i,1);s.push(o)}return s}function Vl(e,t){const n={};return t.forEach(r=>{r&&da(e,r,n)}),n}function Mi(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function da(e,t,n){if(n[t.name]){N&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ri.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Ri.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}N&&g.log(`Integration installed: ${t.name}`)}const Ai="Not capturing exception because it's already been captured.";class Xl{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Vc(t.dsn):N&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=ql(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){const s=J();if(li(t))return N&&g.log(Ai),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:J(),...r},o=_s(t)?t:String(t),a=ys(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,s))),i.event_id}captureEvent(t,n,r){const s=J();if(n&&n.originalException&&li(n.originalException))return N&&g.log(Ai),s;const i={event_id:s,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?N&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ct(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):We(!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._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];da(this,t,this._integrations),n||Mi(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=pl(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ru(r,Nu(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=fl(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;N&&g.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(N&&g.error("Error while sending event:",n),n)):(N&&g.error("Transport disabled"),We({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Vl(this,t),Mi(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Ct(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Se(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=ve()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),oa(i,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:l,parentSpanId:f,dsc:h}=c;a.contexts={trace:ne({trace_id:d,span_id:l,parent_span_id:f}),...a.contexts};const p=h||cr(d,this);a.sdkProcessingMetadata={dynamicSamplingContext:p,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(N){const i=s;i.logLevel==="log"?g.log(i.message):g.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=pa(t),a=fa(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof i>"u"?void 0:zn(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Hn(new Ae(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=c==="replay_event"?"replay":c,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,t),new Ae("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const b=Jl(this,s,p,n);return Kl(b,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l,t),o){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Ae(`${u} returned \`null\`, will not send event.`,"log")}const m=r&&r.getSession();if(!o&&m&&this._updateSessionFromEvent(m,p),o){const S=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=p.spans?p.spans.length:0,L=S-w;L>0&&this.recordDroppedEvent("before_send","span",L)}const b=p.transaction_info;if(o&&b&&p.transaction!==t.transaction){const S="custom";p.transaction_info={...b,source:S}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Ae?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Ae(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){N&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){N&&g.log("No outcomes to send");return}if(!this._dsn){N&&g.log("No dsn provided, will not send outcomes");return}N&&g.log("Sending outcomes:",t);const n=Du(t,this._options.tunnel&&an(this._dsn));this.sendEnvelope(n)}}function Kl(e,t){const n=`${t} must return \`null\` or a valid event.`;if(sr(e))return e.then(r=>{if(!kt(r)&&r!==null)throw new Ae(n);return r},r=>{throw new Ae(`${t} rejected with ${r}`)});if(!kt(e)&&e!==null)throw new Ae(n);return e}function Jl(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;if(fa(n)&&s)return s(n,r);if(pa(n)){if(n.spans&&o){const a=[];for(const c of n.spans){const u=o(c);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function fa(e){return e.type===void 0}function pa(e){return e.type==="transaction"}function Ql(e,t){t.debug===!0&&(N?g.enable():Bt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),K().update(t.initialScope);const r=new e(t);return Zl(r),r.init(),r}function Zl(e){K().setClient(e)}const ed=64;function td(e,t,n=Su(e.bufferSize||ed)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(fi(o,(l,f)=>{const h=pi(f);if(jo(r,h)){const p=xi(l,f);e.recordDroppedEvent("ratelimit_backoff",h,p)}else a.push(l)}),a.length===0)return We({});const c=ht(o[0],a),u=l=>{fi(c,(f,h)=>{const p=xi(f,h);e.recordDroppedEvent(l,pi(h),p)})},d=()=>t({body:Mu(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&N&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=zo(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof Ae)return N&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),We({});throw l})}return{send:i,flush:s}}function xi(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function nd(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return sd(e,n)||rd(e,r)}function rd(e,t){return t?Ni(e)===Ni(t):!1}function sd(e,t){return t?e.includes(t.host):!1}function Ni(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ha(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:at})),version:at}),e._metadata=s}const id=100;function Je(e,t){const n=B(),r=ve();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=id}=n.getOptions();if(i<=0)return;const a={timestamp:cn(),...e},c=s?Bt(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let Oi;const od="FunctionToString",Di=new WeakMap,ad=()=>({name:od,setupOnce(){Oi=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ss(this),n=Di.has(B())&&t!==void 0?t:this;return Oi.apply(n,e)}}catch{}},setup(e){Di.set(e,!0)}}),cd=ad,ud=[/^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"],ld="InboundFilters",dd=(e={})=>({name:ld,processEvent(t,n,r){const s=r.getOptions(),i=pd(e,s);return hd(t,i)?null:t}}),fd=dd;function pd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ud],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function hd(e,t){return t.ignoreInternal&&Ed(e)?(N&&g.warn(`Event dropped due to being internal Sentry Error.
Event: ${ze(e)}`),!0):md(e,t.ignoreErrors)?(N&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${ze(e)}`),!0):vd(e)?(N&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${ze(e)}`),!0):gd(e,t.ignoreTransactions)?(N&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${ze(e)}`),!0):_d(e,t.denyUrls)?(N&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${ze(e)}.
Url: ${qn(e)}`),!0):yd(e,t.allowUrls)?!1:(N&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${ze(e)}.
Url: ${qn(e)}`),!0)}function md(e,t){return e.type||!t||!t.length?!1:Sd(e).some(n=>Xe(n,t))}function gd(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Xe(n,t):!1}function _d(e,t){if(!t||!t.length)return!1;const n=qn(e);return n?Xe(n,t):!1}function yd(e,t){if(!t||!t.length)return!0;const n=qn(e);return n?Xe(n,t):!0}function Sd(e){const 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 Ed(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function bd(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function qn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?bd(t):null}catch{return N&&g.error(`Cannot extract url for event ${ze(e)}`),null}}function vd(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)}const Td="Dedupe",Id=()=>{let e;return{name:Td,processEvent(t){if(t.type)return t;try{if(kd(t,e))return N&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},wd=Id;function kd(e,t){return t?!!(Cd(e,t)||Rd(e,t)):!1}function Cd(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ga(e,t)||!ma(e,t))}function Rd(e,t){const n=Li(t),r=Li(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ga(e,t)||!ma(e,t))}function ma(e,t){let n=oi(e),r=oi(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function ga(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 Li(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Md(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const i=je()&&t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const m=r[p];m&&(Nd(m,e),delete r[p]);return}const o=K(),a=B(),{method:c,url:u}=e.fetchData,d=xd(u),l=d?ct(d).host:void 0,f=!!ue(),h=i&&f?tt({name:`${c} ${u}`,attributes:{url:u,type:"fetch","http.method":c,"http.url":d,"server.address":l,[ie]:s,[pt]:"http.client"}}):new Ut;if(e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const m=e.args[1];m.headers=Ad(p,a,o,m,je()&&f?h:void 0)}return h}function Ad(e,t,n,r,s){const i=ve(),{traceId:o,spanId:a,sampled:c,dsc:u}={...i.getPropagationContext(),...n.getPropagationContext()},d=s?Ko(s):bs(o,a,c),l=Ho(u||(s?et(s):cr(o,t))),f=r.headers||(typeof Request<"u"&&$e(e,Request)?e.headers:void 0);if(f)if(typeof Headers<"u"&&$e(f,Headers)){const h=new Headers(f);if(h.set("sentry-trace",d),l){const p=h.get(yt);if(p){const m=In(p);h.set(yt,m?`${m},${l}`:l)}else h.set(yt,l)}return h}else if(Array.isArray(f)){const h=[...f.filter(p=>!(Array.isArray(p)&&p[0]==="sentry-trace")).map(p=>{if(Array.isArray(p)&&p[0]===yt&&typeof p[1]=="string"){const[m,b,...S]=p;return[m,In(b),...S]}else return p}),["sentry-trace",d]];return l&&h.push([yt,l]),h}else{const h="baggage"in f?f.baggage:void 0;let p=[];return Array.isArray(h)?p=h.map(m=>typeof m=="string"?In(m):m).filter(m=>m===""):h&&p.push(In(h)),l&&p.push(l),{...f,"sentry-trace":d,baggage:p.length>0?p.join(","):void 0}}else return{"sentry-trace":d,baggage:l}}function xd(e){try{return new URL(e).href}catch{return}}function Nd(e,t){if(t.response){Yo(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:se,message:"internal_error"});e.end()}function In(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(Es)).join(",")}const A=$;let Qr=0;function _a(){return Qr>0}function Od(){Qr++,setTimeout(()=>{Qr--})}function Mt(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Ss(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(o=>Mt(o,t));return e.apply(this,i)}catch(i){throw Od(),ws(o=>{o.addEventProcessor(a=>(t.mechanism&&(jr(a,void 0),Qt(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),aa(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}ko(r,e),be(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const ke=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ms(e,t){const n=As(e,t),r={type:Bd(t),value:$d(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Dd(e,t,n,r){const s=B(),i=s&&s.getOptions().normalizeDepth,o=zd(t),a={__serialized__:Bo(t,i)};if(o)return{exception:{values:[Ms(e,o)]},extra:a};const c={exception:{values:[{type:rr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Wd(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=As(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function kr(e,t){return{exception:{values:[Ms(e,t)]}}}function As(e,t){const n=t.stacktrace||t.stack||"",r=Pd(t),s=Fd(t);try{return e(n,r,s)}catch{}return[]}const Ld=/Minified React error #\d+;/i;function Pd(e){return e&&Ld.test(e.message)?1:0}function Fd(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ya(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Bd(e){const t=e&&e.name;return!t&&ya(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function $d(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:ya(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ud(e,t,n,r){const s=n&&n.syntheticException||void 0,i=xs(e,t,s,r);return Qt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),We(i)}function Hd(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Zr(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),We(o)}function xs(e,t,n,r,s){let i;if(Eo(t)&&t.error)return kr(e,t.error);if(Qs(t)||Nc(t)){const o=t;if("stack"in t)i=kr(e,t);else{const a=o.name||(Qs(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=Zr(e,c,n,r),jr(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return gs(t)?kr(e,t):kt(t)||rr(t)?(i=Dd(e,t,n,s),Qt(i,{synthetic:!0}),i):(i=Zr(e,t,n,r),jr(i,`${t}`),Qt(i,{synthetic:!0}),i)}function Zr(e,t,n,r){const s={};if(r&&n){const i=As(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(_s(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Wd(e,{isUnhandledRejection:t}){const n=Kc(e),r=t?"promise rejection":"exception";return Eo(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:rr(e)?`Event \`${jd(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function jd(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function zd(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function qd(e,{metadata:t,tunnel:n,dsn:r}){const s={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:an(r)}},i=Gd(e);return ht(s,[i])}function Gd(e){return[{type:"user_report"},e]}class Yd extends Xl{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=A.SENTRY_SDK_SOURCE||du();ha(n,"browser",["browser"],r),super(n),n.sendClientReports&&A.document&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ud(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Hd(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ke&&g.warn("SDK not enabled, will not capture user feedback.");return}const n=qd(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)}}const ye=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vd=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ht=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s||0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=Vd(t.value,n),e(t)))}},C=$,Xd=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ln=()=>C.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],dn=()=>{const e=ln();return e&&e.activationStart||0},Wt=(e,t)=>{const n=ln();let r="navigate";return n&&(C.document&&C.document.prerendering||dn()>0?r="prerender":C.document&&C.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:Xd(),navigationType:r}},gt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},fn=e=>{const t=n=>{(n.type==="pagehide"||C.document&&C.document.visibilityState==="hidden")&&e(n)};C.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Ns=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let en=-1;const Kd=()=>{en=C.document.visibilityState==="hidden"&&!C.document.prerendering?0:1/0},Gn=e=>{C.document.visibilityState==="hidden"&&en>-1&&(en=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Gn,!0),removeEventListener("prerenderingchange",Gn,!0))},Jd=()=>{addEventListener("visibilitychange",Gn,!0),addEventListener("prerenderingchange",Gn,!0)},ur=()=>(C.document&&en<0&&(Kd(),Jd()),{get firstHiddenTime(){return en}}),pn=e=>{C.document&&C.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Qd=[1800,3e3],Zd=(e,t={})=>{pn(()=>{const n=ur(),r=Wt("FCP");let s;const o=gt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-dn(),0),r.entries.push(c),s(!0)))})});o&&(s=Ht(e,r,Qd,t.reportAllChanges))})},ef=[.1,.25],tf=(e,t={})=>{Zd(Ns(()=>{const n=Wt("CLS",0);let r,s=0,i=[];const o=c=>{c.forEach(u=>{if(!u.hadRecentInput){const d=i[0],l=i[i.length-1];s&&d&&l&&u.startTime-l.startTime<1e3&&u.startTime-d.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=gt("layout-shift",o);a&&(r=Ht(e,n,ef,t.reportAllChanges),fn(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},nf=[100,300],rf=(e,t={})=>{pn(()=>{const n=ur(),r=Wt("FID");let s;const i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},o=c=>{c.forEach(i)},a=gt("first-input",o);s=Ht(e,r,nf,t.reportAllChanges),a&&fn(Ns(()=>{o(a.takeRecords()),a.disconnect()}))})};let Sa=0,Cr=1/0,wn=0;const sf=e=>{e.forEach(t=>{t.interactionId&&(Cr=Math.min(Cr,t.interactionId),wn=Math.max(wn,t.interactionId),Sa=wn?(wn-Cr)/7+1:0)})};let es;const of=()=>es?Sa:performance.interactionCount||0,af=()=>{"interactionCount"in performance||es||(es=gt("event",sf,{type:"event",buffered:!0,durationThreshold:0}))},cf=[200,500],uf=0,Ea=()=>of()-uf,Pi=10,Le=[],Rr={},Fi=e=>{const t=Le[Le.length-1],n=Rr[e.interactionId];if(n||Le.length<Pi||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Rr[r.id]=r,Le.push(r)}Le.sort((r,s)=>s.latency-r.latency),Le.splice(Pi).forEach(r=>{delete Rr[r.id]})}},lf=()=>{const e=Math.min(Le.length-1,Math.floor(Ea()/50));return Le[e]},df=(e,t={})=>{pn(()=>{af();const n=Wt("INP");let r;const s=o=>{o.forEach(c=>{c.interactionId&&Fi(c),c.entryType==="first-input"&&!Le.some(d=>d.entries.some(l=>c.duration===l.duration&&c.startTime===l.startTime))&&Fi(c)});const a=lf();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=gt("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=Ht(e,n,cf,t.reportAllChanges),i&&("PerformanceEventTiming"in C&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),fn(()=>{s(i.takeRecords()),n.value<0&&Ea()>0&&(n.value=0,n.entries=[]),r(!0)}))})},ff=[2500,4e3],Bi={},pf=(e,t={})=>{pn(()=>{const n=ur(),r=Wt("LCP");let s;const i=a=>{const c=a[a.length-1];c&&c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-dn(),0),r.entries=[c],s())},o=gt("largest-contentful-paint",i);if(o){s=Ht(e,r,ff,t.reportAllChanges);const a=Ns(()=>{Bi[r.id]||(i(o.takeRecords()),o.disconnect(),Bi[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{C.document&&addEventListener(c,()=>setTimeout(a,0),!0)}),fn(a)}})},hf=[800,1800],ts=e=>{C.document&&C.document.prerendering?pn(()=>ts(e)):C.document&&C.document.readyState!=="complete"?addEventListener("load",()=>ts(e),!0):setTimeout(e,0)},mf=(e,t={})=>{const n=Wt("TTFB"),r=Ht(e,n,hf,t.reportAllChanges);ts(()=>{const s=ln();if(s){const i=s.responseStart;if(i<=0||i>performance.now())return;n.value=Math.max(i-dn(),0),n.entries=[s],r(!0)}})},Yt={},Yn={};let ba,va,Ta,Ia,wa;function Os(e,t=!1){return hn("cls",e,_f,ba,t)}function ka(e,t=!1){return hn("lcp",e,Sf,Ta,t)}function Ca(e){return hn("fid",e,yf,va)}function gf(e){return hn("ttfb",e,Ef,Ia)}function Ra(e){return hn("inp",e,bf,wa)}function At(e,t){return Ma(e,t),Yn[e]||(vf(e),Yn[e]=!0),Aa(e,t)}function jt(e,t){const n=Yt[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){ye&&g.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${He(r)}
Error:`,s)}}function _f(){return tf(e=>{jt("cls",{metric:e}),ba=e},{reportAllChanges:!0})}function yf(){return rf(e=>{jt("fid",{metric:e}),va=e})}function Sf(){return pf(e=>{jt("lcp",{metric:e}),Ta=e},{reportAllChanges:!0})}function Ef(){return mf(e=>{jt("ttfb",{metric:e}),Ia=e})}function bf(){return df(e=>{jt("inp",{metric:e}),wa=e})}function hn(e,t,n,r,s=!1){Ma(e,t);let i;return Yn[e]||(i=n(),Yn[e]=!0),r&&t({metric:r}),Aa(e,t,s?i:void 0)}function vf(e){const t={};e==="event"&&(t.durationThreshold=0),gt(e,n=>{jt(e,{entries:n})},t)}function Ma(e,t){Yt[e]=Yt[e]||[],Yt[e].push(t)}function Aa(e,t,n){return()=>{n&&n();const r=Yt[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Tf(e){return"duration"in e}function Mr(e){return typeof e=="number"&&isFinite(e)}function xt(e,t,n,{...r}){const s=W(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ra(e,()=>{const i=tt({startTime:t,...r});return i&&i.end(n),i})}function xa(e){const t=B();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a}=t.getOptions(),c=t.getIntegrationByName("Replay"),u=c&&c.getReplayId(),d=K(),l=d.getUser(),f=l!==void 0?l.email||l.id||l.ip_address:void 0;let h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}const p={release:o,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":C.navigator&&C.navigator.userAgent,...s};return tt({name:n,attributes:p,startTime:i,experimental:{standalone:!0}})}function Ds(){return C&&C.addEventListener&&C.performance}function ee(e){return e/1e3}function If(){let e=0,t,n;if(!kf())return;let r=!1;function s(){r||(r=!0,n&&wf(e,t,n),i())}const i=Os(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);fn(()=>{s()}),setTimeout(()=>{const o=B(),a=_e([o,"optionalAccess",l=>l.on,"call",l=>l("startNavigationSpan",()=>{s(),a&&a()})]),c=ue(),u=c&&ce(c),d=u&&W(u);d&&d.op==="pageload"&&(n=u.spanContext().spanId)},0)}function wf(e,t,n){ye&&g.log(`Sending CLS span (${e})`);const r=ee((pe||0)+(_e([t,"optionalAccess",c=>c.startTime])||0)),s=K().getScopeData().transactionName,i=t?Ue(_e([t,"access",c=>c.sources,"access",c=>c[0],"optionalAccess",c=>c.node])):"Layout shift",o=ne({[ie]:"auto.http.browser.cls",[pt]:"ui.webvital.cls",[ks]:_e([t,"optionalAccess",c=>c.duration])||0,"sentry.pageload.span_id":n}),a=xa({name:i,transaction:s,attributes:o,startTime:r});_e([a,"optionalAccess",c=>c.addEvent,"call",c=>c("cls",{[or]:"",[ar]:e})]),_e([a,"optionalAccess",c=>c.end,"call",c=>c(r)])}function kf(){try{return _e([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch{return!1}}const Cf=2147483647;let $i=0,ae={},Re,Vt;function Rf({recordClsStandaloneSpans:e}){const t=Ds();if(t&&pe){t.mark&&C.performance.mark("sentry-tracing-init");const n=Df(),r=Of(),s=Lf(),i=e?If():Nf();return()=>{n(),r(),s(),i&&i()}}return()=>{}}function Mf(){At("longtask",({entries:e})=>{if(ue())for(const t of e){const n=ee(pe+t.startTime),r=ee(t.duration),s=tt({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[ie]:"auto.ui.browser.metrics"}});s&&s.end(n+r)}})}function Af(){new PerformanceObserver(t=>{if(ue())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=ee(pe+n.startTime),s=ee(n.duration),i={[ie]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:a,invokerType:c,sourceURL:u,sourceFunctionName:d,sourceCharPosition:l}=o;i["browser.script.invoker"]=a,i["browser.script.invoker_type"]=c,u&&(i["code.filepath"]=u),d&&(i["code.function"]=d),l!==-1&&(i["browser.script.source_char_position"]=l);const f=tt({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:i});f&&f.end(r+s)}}).observe({type:"long-animation-frame",buffered:!0})}function xf(){At("event",({entries:e})=>{if(ue()){for(const t of e)if(t.name==="click"){const n=ee(pe+t.startTime),r=ee(t.duration),s={name:Ue(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[ie]:"auto.ui.browser.metrics"}},i=Io(t.target);i&&(s.attributes["ui.component_name"]=i);const o=tt(s);o&&o.end(n+r)}}})}function Nf(){return Os(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ye&&g.log(`[Measurements] Adding CLS ${e.value}`),ae.cls={value:e.value,unit:""},Vt=t)},!0)}function Of(){return ka(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ye&&g.log("[Measurements] Adding LCP"),ae.lcp={value:e.value,unit:"millisecond"},Re=t)},!0)}function Df(){return Ca(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ee(pe),r=ee(t.startTime);ye&&g.log("[Measurements] Adding FID"),ae.fid={value:e.value,unit:"millisecond"},ae["mark.fid"]={value:n+r,unit:"second"}})}function Lf(){return gf(({metric:e})=>{e.entries[e.entries.length-1]&&(ye&&g.log("[Measurements] Adding TTFB"),ae.ttfb={value:e.value,unit:"millisecond"})})}function Pf(e,t){const n=Ds();if(!n||!C.performance.getEntries||!pe)return;ye&&g.log("[Tracing] Adding & adjusting spans using Performance API");const r=ee(pe),s=n.getEntries(),{op:i,start_timestamp:o}=W(e);if(s.slice($i).forEach(a=>{const c=ee(a.startTime),u=ee(Math.max(0,a.duration));if(!(i==="navigation"&&o&&r+c<o))switch(a.entryType){case"navigation":{Bf(e,a,r);break}case"mark":case"paint":case"measure":{Ff(e,a,c,u,r);const d=ur(),l=a.startTime<d.firstHiddenTime;a.name==="first-paint"&&l&&(ye&&g.log("[Measurements] Adding FP"),ae.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&l&&(ye&&g.log("[Measurements] Adding FCP"),ae.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{Uf(e,a,a.name,c,u,r);break}}}),$i=Math.max(s.length-1,0),Hf(e),i==="pageload"){jf(ae);const a=ae["mark.fid"];a&&ae.fid&&(xt(e,a.value,a.value+ee(ae.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ie]:"auto.ui.browser.metrics"}}),delete ae["mark.fid"]),(!("fcp"in ae)||!t.recordClsOnPageloadSpan)&&delete ae.cls,Object.entries(ae).forEach(([c,u])=>{ml(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",dn()),Wf(e)}Re=void 0,Vt=void 0,ae={}}function Ff(e,t,n,r,s){const i=ln(),o=ee(i?i.requestStart:0),a=s+Math.max(n,o),c=s+n,u=c+r,d={[ie]:"auto.resource.browser.metrics"};return a!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),xt(e,a,u,{name:t.name,op:t.entryType,attributes:d}),a}function Bf(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{kn(e,t,r,n)}),kn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),kn(e,t,"fetch",n,"cache","domainLookupStart"),kn(e,t,"domainLookup",n,"DNS"),$f(e,t,n)}function kn(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||xt(e,r+ee(a),r+ee(o),{op:`browser.${s||n}`,name:t.name,attributes:{[ie]:"auto.ui.browser.metrics"}})}function $f(e,t,n){const r=n+ee(t.requestStart),s=n+ee(t.responseEnd),i=n+ee(t.responseStart);t.responseEnd&&(xt(e,r,s,{op:"browser.request",name:t.name,attributes:{[ie]:"auto.ui.browser.metrics"}}),xt(e,i,s,{op:"browser.response",name:t.name,attributes:{[ie]:"auto.ui.browser.metrics"}}))}function Uf(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=ct(n),a={[ie]:"auto.resource.browser.metrics"};Ar(a,t,"transferSize","http.response_transfer_size"),Ar(a,t,"encodedBodySize","http.response_content_length"),Ar(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(C.location.origin);const c=i+r,u=c+s;xt(e,c,u,{name:n.replace(C.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function Hf(e){const t=C.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Mr(n.rtt)&&(ae["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Mr(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Mr(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Wf(e){Re&&(ye&&g.log("[Measurements] Adding LCP Data"),Re.element&&e.setAttribute("lcp.element",Ue(Re.element)),Re.id&&e.setAttribute("lcp.id",Re.id),Re.url&&e.setAttribute("lcp.url",Re.url.trim().slice(0,200)),e.setAttribute("lcp.size",Re.size)),Vt&&Vt.sources&&(ye&&g.log("[Measurements] Adding CLS Data"),Vt.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Ue(t.node))))}function Ar(e,t,n,r){const s=t[n];s!=null&&s<Cf&&(e[r]=s)}function jf(e){const t=ln();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(ye&&g.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const zf=1e3;let Ui,ns,rs;function Na(e){const t="dom";Qe(t,e),Ze(t,qf)}function qf(){if(!C.document)return;const e=Ee.bind(null,"dom"),t=Hi(e,!0);C.document.addEventListener("click",t,!1),C.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=C[n]&&C[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(me(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=Hi(e);d.handler=l,s.call(this,i,l,a)}d.refCount++}catch{}return s.call(this,i,o,a)}}),me(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.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 s.call(this,i,o,a)}}))})}function Gf(e){if(e.type!==ns)return!1;try{if(!e.target||e.target._sentryId!==rs)return!1}catch{}return!0}function Yf(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Hi(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Vf(n);if(Yf(n.type,r))return;be(n,"_sentryCaptured",!0),r&&!r._sentryId&&be(r,"_sentryId",J());const s=n.type==="keypress"?"input":n.type;Gf(n)||(e({event:n,name:s,global:t}),ns=n.type,rs=r?r._sentryId:void 0),clearTimeout(Ui),Ui=C.setTimeout(()=>{rs=void 0,ns=void 0},zf)}}function Vf(e){try{return e.target}catch{return null}}let Cn;function lr(e){const t="history";Qe(t,e),Ze(t,Xf)}function Xf(){if(!$u())return;const e=C.onpopstate;C.onpopstate=function(...n){const r=C.location.href,s=Cn;if(Cn=r,Ee("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=Cn,o=String(s);Cn=o,Ee("history",{from:i,to:o})}return n.apply(this,r)}}me(C.history,"pushState",t),me(C.history,"replaceState",t)}const Pn={};function Oa(e){const t=Pn[e];if(t)return t;let n=C[e];if(Hr(n))return Pn[e]=n.bind(C);const r=C.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ye&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Pn[e]=n.bind(C))}function Wi(e){Pn[e]=void 0}function Nt(...e){return Oa("setTimeout")(...e)}const it="__sentry_xhr_v3__";function Da(e){const t="xhr";Qe(t,e),Ze(t,Kf)}function Kf(){if(!C.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=fe()*1e3,i=Fe(r[0])?r[0].toUpperCase():void 0,o=Jf(r[1]);if(!i||!o)return t.apply(n,r);n[it]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const c=n[it];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:fe()*1e3,startTimestamp:s,xhr:n};Ee("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return a(),c.apply(u,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[l,f]=d,h=u[it];return h&&Fe(l)&&Fe(f)&&(h.request_headers[l.toLowerCase()]=f),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[it];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:fe()*1e3,xhr:n};return Ee("xhr",i),t.apply(n,r)}})}function Jf(e){if(Fe(e))return e;try{return e.toString()}catch{}}const xr=[],Fn=new Map;function Qf(){if(Ds()&&pe){const t=Zf();return()=>{t()}}return()=>{}}const ji={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 Zf(){return Ra(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(p=>p.duration===e.value&&ji[p.name]);if(!t)return;const{interactionId:n}=t,r=ji[t.name],s=ee(pe+t.startTime),i=ee(e.value),o=ue(),a=o?ce(o):void 0,u=(n!=null?Fn.get(n):void 0)||a,d=u?W(u).description:K().getScopeData().transactionName,l=Ue(t.target),f=ne({[ie]:"auto.http.browser.inp",[pt]:`ui.interaction.${r}`,[ks]:t.duration}),h=xa({name:l,transaction:d,attributes:f,startTime:s});_e([h,"optionalAccess",p=>p.addEvent,"call",p=>p("inp",{[or]:"millisecond",[ar]:e.value})]),_e([h,"optionalAccess",p=>p.end,"call",p=>p(s+i)])})}function ep(e){const t=({entries:n})=>{const r=ue(),s=r&&ce(r);n.forEach(i=>{if(!Tf(i)||!s)return;const o=i.interactionId;if(o!=null&&!Fn.has(o)){if(xr.length>10){const a=xr.shift();Fn.delete(a)}xr.push(o),Fn.set(o,s)}})};At("event",t),At("first-input",t)}function tp(e,t=Oa("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Wi("fetch"),Hn("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=o,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 Wi("fetch"),n-=o,r--,Hn(c)}}return td(e,s)}const np=30,rp=50;function ss(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?dt:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const sp=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ip=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,op=/\((\S*)(?::(\d+))(?::(\d+))\)/,ap=e=>{const t=sp.exec(e);if(t){const[,r,s,i]=t;return ss(r,dt,+s,+i)}const n=ip.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=op.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=La(n[1]||dt,n[2]);return ss(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},cp=[np,ap],up=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,lp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,dp=e=>{const t=up.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=lp.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||dt;return[s,r]=La(s,r),ss(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},fp=[rp,dp],pp=[cp,fp],hp=Mo(...pp),La=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:dt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Rn=1024,mp="Breadcrumbs",gp=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:mp,setup(n){t.console&&eu(Ep(n)),t.dom&&Na(Sp(n,t.dom)),t.xhr&&Da(bp(n)),t.fetch&&No(vp(n)),t.history&&lr(Tp(n)),t.sentry&&n.on("beforeSendEvent",yp(n))}}},_p=gp;function yp(e){return function(n){B()===e&&Je({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ze(n)},{event:n})}}function Sp(e,t){return function(r){if(B()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Rn&&(ke&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Rn}, but a value of ${a} was configured. Sentry will use ${Rn} instead.`),a=Rn),typeof o=="string"&&(o=[o]);try{const u=r.event,d=Ip(u)?u.target:u;s=Ue(d,{keyAttrs:o,maxStringLength:a}),i=Io(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),Je(c,{event:r.event,name:r.name,global:r.global})}}function Ep(e){return function(n){if(B()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:$o(n.level),message:Zs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Zs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Je(r,{input:n.args,level:n.level})}}function bp(e){return function(n){if(B()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[it];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,d={method:o,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f=vo(c);Je({category:"xhr",data:d,type:"http",level:f},l)}}function vp(e){return function(n){if(B()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Je({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},c=vo(o.status_code);Je({category:"fetch",data:o,type:"http",level:c},a)}}}function Tp(e){return function(n){if(B()!==e)return;let r=n.from,s=n.to;const i=ct(A.location.href);let o=r?ct(r):void 0;const a=ct(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Je({category:"navigation",data:{from:r,to:s}})}}function Ip(e){return!!e&&!!e.target}const wp=["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"],kp="BrowserApiErrors",Cp=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:kp,setupOnce(){t.setTimeout&&me(A,"setTimeout",zi),t.setInterval&&me(A,"setInterval",zi),t.requestAnimationFrame&&me(A,"requestAnimationFrame",Mp),t.XMLHttpRequest&&"XMLHttpRequest"in A&&me(XMLHttpRequest.prototype,"send",Ap);const n=t.eventTarget;n&&(Array.isArray(n)?n:wp).forEach(xp)}}},Rp=Cp;function zi(e){return function(...t){const n=t[0];return t[0]=Mt(n,{mechanism:{data:{function:He(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Mp(e){return function(t){return e.apply(this,[Mt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:He(e)},handled:!1,type:"instrument"}})])}}function Ap(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&me(n,s,function(i){const o={mechanism:{data:{function:s,handler:He(i)},handled:!1,type:"instrument"}},a=Ss(i);return a&&(o.mechanism.data.handler=He(a)),Mt(i,o)})}),e.apply(this,t)}}function xp(e){const t=A,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(me(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Mt(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:He(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Mt(i,{mechanism:{data:{function:"addEventListener",handler:He(i),target:e},handled:!1,type:"instrument"}}),o])}}),me(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}const Np="GlobalHandlers",Op=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Np,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Lp(n),qi("onerror")),t.onunhandledrejection&&(Pp(n),qi("onunhandledrejection"))}}},Dp=Op;function Lp(e){Do(t=>{const{stackParser:n,attachStacktrace:r}=Pa();if(B()!==e||_a())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=$p(xs(n,c||s,void 0,r,!1),i,o,a);u.level="error",ca(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Pp(e){Lo(t=>{const{stackParser:n,attachStacktrace:r}=Pa();if(B()!==e||_a())return;const s=Fp(t),i=ys(s)?Bp(s):xs(n,s,void 0,r,!0);i.level="error",ca(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Fp(e){if(ys(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 Bp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function $p(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.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:To();return c.length===0&&c.push({colno:u,filename:l,function:dt,in_app:!0,lineno:d}),e}function qi(e){ke&&g.log(`Global Handler attached: ${e}`)}function Pa(){const e=B();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Up=()=>({name:"HttpContext",preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;const t=e.request&&e.request.url||A.location&&A.location.href,{referrer:n}=A.document||{},{userAgent:r}=A.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),Hp="cause",Wp=5,jp="LinkedErrors",zp=(e={})=>{const t=e.limit||Wp,n=e.key||Hp;return{name:jp,preprocessEvent(r,s,i){const o=i.getOptions();Fc(Ms,o.stackParser,o.maxValueLength,n,t,r,s)}}},qp=zp;function is(e){return[fd(),cd(),Rp(),_p(),Dp(),qp(),wd(),Up()]}function Gp(e={}){const t={defaultIntegrations:is(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:A.SENTRY_RELEASE&&A.SENTRY_RELEASE.id?A.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Yp(){const e=typeof A.window<"u"&&A;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=A.location&&A.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&A===A.top&&i.some(c=>s.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function Vp(e={}){const t=Gp(e);if(Yp()){Bt(()=>{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}ke&&(Ao()||g.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Qc(t.stackParser||hp),integrations:Yl(t),transport:t.transport||tp},r=Ql(Yd,n);return t.autoSessionTracking&&Xp(),r}function Xp(){if(typeof A.document>"u"){ke&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}ki({ignoreDuration:!0}),Ci(),lr(({from:e,to:t})=>{e!==void 0&&e!==t&&(ki({ignoreDuration:!0}),Ci())})}const X=$,Ls="sentryReplaySession",Kp="replay_event",Ps="Unable to send Replay",Jp=3e5,Qp=9e5,Zp=5e3,eh=5500,th=6e4,nh=5e3,rh=3,Gi=15e4,Mn=5e3,sh=3e3,ih=300,Fs=2e7,oh=4999,ah=15e3,Yi=36e5;function os(e,t){return e??t()}function tn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var te;(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"})(te||(te={}));function ch(e){return e.nodeType===e.ELEMENT_NODE}function Xt(e){const t=tn([e,"optionalAccess",n=>n.host]);return tn([t,"optionalAccess",n=>n.shadowRoot])===e}function Kt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function uh(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function lh(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Vn(e){try{const t=e.rules||e.cssRules;return t?uh(Array.from(t,Fa).join("")):null}catch{return null}}function Fa(e){let t;if(fh(e))try{t=Vn(e.styleSheet)||lh(e)}catch{}else if(ph(e)&&e.selectorText.includes(":"))return dh(e.cssText);return t||e.cssText}function dh(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function fh(e){return"styleSheet"in e}function ph(e){return"selectorText"in e}class Ba{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=tn([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return os(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){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function hh(){return new Ba}function dr({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 nn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ot(e){return e.toLowerCase()}function as(e){return e.toUpperCase()}const Vi="__rrweb_original__";function mh(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=Vi in i?i[Vi]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Bs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ot(t):null}function Xn(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function $a(e,t){let n;try{n=new URL(e,os(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return os(tn([s,"optionalAccess",i=>i[1]]),()=>null)}const Xi={};function Ua(e){const t=Xi[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Xi[e]=r.bind(window)}function cs(...e){return Ua("setTimeout")(...e)}function Ha(...e){return Ua("clearTimeout")(...e)}let gh=1;const _h=new RegExp("[^a-z0-9-_:]"),rn=-2;function $s(){return gh++}function yh(e){if(e instanceof HTMLFormElement)return"form";const t=Ot(e.tagName);return _h.test(t)?"div":t}function Sh(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let _t,Ki;const Eh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,bh=/^(?:[a-z+]+:)?\/\//i,vh=/^www\..*/i,Th=/^(data:)([^,]*),(.*)/i;function Kn(e,t){return(e||"").replace(Eh,(n,r,s,i,o,a)=>{const c=s||o||a,u=r||i||"";if(!c)return n;if(bh.test(c)||vh.test(c))return`url(${u}${c}${u})`;if(Th.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Sh(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const Ih=/^[^ \t\n\r\u000c]+/,wh=/^[, \t\n\r\u000c]+/;function kh(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(wh),!(n>=t.length);){let i=r(Ih);if(i.slice(-1)===",")i=Et(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Et(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}const Ji=new WeakMap;function Et(e,t){return!t||t.trim()===""?t:fr(e,t)}function Ch(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function fr(e,t){let n=Ji.get(e);if(n||(n=e.createElement("a"),Ji.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Wa(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Et(e,r):n==="srcset"?kh(e,r):n==="style"?Kn(r,fr(e)):t==="object"&&n==="data"?Et(e,r):typeof i=="function"?i(n,r,s):r)}function ja(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Rh(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 s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Mh(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ot(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ot(e.parentNode,t,n,r+1)}function bt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Mh(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Dt(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.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=ot(o,bt(r,s)),c<0)return!0;a=ot(o,bt(t,n),c>=0?c:1/0)}else{if(a=ot(o,bt(t,n)),a<0)return!1;c=ot(o,bt(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function Ah(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=cs(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Ha(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return cs(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function xh(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=cs(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ha(i),r=!0,t()})}function Nh(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:b,dataURLOptions:S={},inlineImages:w,recordCanvas:L,keepIframeSrcFn:P,newlyAddedElement:x=!1}=t,_=Oh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:te.Document,childNodes:[],compatMode:e.compatMode}:{type:te.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:te.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return Lh(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:p,maskInputFn:b,dataURLOptions:S,inlineImages:w,recordCanvas:L,keepIframeSrcFn:P,newlyAddedElement:x,rootId:_,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f});case e.TEXT_NODE:return Dh(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:b,rootId:_});case e.CDATA_SECTION_NODE:return{type:te.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:te.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function Oh(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Dh(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||tn([e,"access",S=>S.parentNode,"access",S=>S.sheet,"optionalAccess",S=>S.cssRules])&&(f=Vn(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=Kn(f,fr(t.doc))}p&&(f="SCRIPT_PLACEHOLDER");const b=Dt(e,r,i,s,o,n);if(!h&&!p&&!m&&f&&b&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(c.textarea||b)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const S=dr({type:null,tagName:l,maskInputOptions:c});f=nn({isMasked:Dt(e,r,i,s,o,S),element:e,value:f,maskInputFn:u})}return{type:te.Text,textContent:f||"",isStyle:h,rootId:d}}function Lh(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskAllText:b,maskTextClass:S,unmaskTextClass:w,maskTextSelector:L,unmaskTextSelector:P}=t,x=Rh(e,r,s,i),_=yh(e);let y={};const v=e.attributes.length;for(let E=0;E<v;E++){const T=e.attributes[E];T.name&&!ja(_,T.name,T.value)&&(y[T.name]=Wa(n,_,Ot(T.name),T.value,e,c))}if(_==="link"&&o){const E=Array.from(n.styleSheets).find(M=>M.href===e.href);let T=null;E&&(T=Vn(E)),T&&(delete y.rel,delete y.href,y._cssText=Kn(T,E.href))}if(_==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Vn(e.sheet);E&&(y._cssText=Kn(E,fr(n)))}if(_==="input"||_==="textarea"||_==="select"||_==="option"){const E=e,T=Bs(E),M=Xn(E,as(_),T),G=E.checked;if(T!=="submit"&&T!=="button"&&M){const Y=Dt(E,S,L,w,P,dr({type:T,tagName:as(_),maskInputOptions:a}));y.value=nn({isMasked:Y,element:E,value:M,maskInputFn:u})}G&&(y.checked=G)}if(_==="option"&&(e.selected&&!a.select?y.selected=!0:delete y.selected),_==="canvas"&&f){if(e.__context==="2d")mh(e)||(y.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),T=n.createElement("canvas");T.width=e.width,T.height=e.height;const M=T.toDataURL(d.type,d.quality);E!==M&&(y.rr_dataURL=E)}}if(_==="img"&&l){_t||(_t=n.createElement("canvas"),Ki=_t.getContext("2d"));const E=e,T=E.currentSrc||E.getAttribute("src")||"<unknown-src>",M=E.crossOrigin,G=()=>{E.removeEventListener("load",G);try{_t.width=E.naturalWidth,_t.height=E.naturalHeight,Ki.drawImage(E,0,0),y.rr_dataURL=_t.toDataURL(d.type,d.quality)}catch(Y){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G);return}else console.warn(`Cannot inline img src=${T}! Error: ${Y}`)}E.crossOrigin==="anonymous"&&(M?y.crossOrigin=M:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?G():E.addEventListener("load",G)}if((_==="audio"||_==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),x){const{width:E,height:T}=e.getBoundingClientRect();y={class:y.class,rr_width:`${E}px`,rr_height:`${T}px`}}_==="iframe"&&!h(y.src)&&(!x&&!e.contentDocument&&(y.rr_src=y.src),delete y.src);let F;try{customElements.get(_)&&(F=!0)}catch{}return{type:te.Element,tagName:_,attributes:y,childNodes:[],isSVG:Ch(e)||void 0,needBlock:x,rootId:m,isCustom:F}}function V(e){return e==null?"":e.toLowerCase()}function Ph(e,t){if(t.comment&&e.type===te.Comment)return!0;if(e.type===te.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&$a(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(V(e.attributes.name).match(/^msapplication-tile(image|color)$/)||V(e.attributes.name)==="application-name"||V(e.attributes.rel)==="icon"||V(e.attributes.rel)==="apple-touch-icon"||V(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&V(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(V(e.attributes.property).match(/^(og|twitter|fb):/)||V(e.attributes.name).match(/^(og|twitter):/)||V(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(V(e.attributes.name)==="robots"||V(e.attributes.name)==="googlebot"||V(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(V(e.attributes.name)==="author"||V(e.attributes.name)==="generator"||V(e.attributes.name)==="framework"||V(e.attributes.name)==="publisher"||V(e.attributes.name)==="progid"||V(e.attributes.property).match(/^article:/)||V(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(V(e.attributes.name)==="google-site-verification"||V(e.attributes.name)==="yandex-verification"||V(e.attributes.name)==="csrf-token"||V(e.attributes.name)==="p:domain_verify"||V(e.attributes.name)==="verify-v1"||V(e.attributes.name)==="verification"||V(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function vt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:L={},inlineImages:P=!1,recordCanvas:x=!1,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:v=5e3,onStylesheetLoad:F,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:M=!1}=t;let{preserveWhiteSpace:G=!0}=t;const Y=Nh(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,dataURLOptions:L,inlineImages:P,recordCanvas:x,keepIframeSrcFn:T,newlyAddedElement:M});if(!Y)return console.warn(e,"not serialized"),null;let re;r.hasNode(e)?re=r.getId(e):Ph(Y,w)||!G&&Y.type===te.Text&&!Y.isStyle&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?re=rn:re=$s();const O=Object.assign(Y,{id:re});if(r.add(e,O),re===rn)return null;_&&_(e);let oe=!f;if(O.type===te.Element){oe=oe&&!O.needBlock,delete O.needBlock;const q=e.shadowRoot;q&&Kt(q)&&(O.isShadowHost=!0)}if((O.type===te.Document||O.type===te.Element)&&oe){w.headWhitespace&&O.type===te.Element&&O.tagName==="head"&&(G=!1);const q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:L,inlineImages:P,recordCanvas:x,preserveWhiteSpace:G,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:F,stylesheetLoadTimeout:E,keepIframeSrcFn:T};for(const he of Array.from(e.childNodes)){const Ne=vt(he,q);Ne&&O.childNodes.push(Ne)}if(ch(e)&&e.shadowRoot)for(const he of Array.from(e.shadowRoot.childNodes)){const Ne=vt(he,q);Ne&&(Kt(e.shadowRoot)&&(Ne.isShadow=!0),O.childNodes.push(Ne))}}return e.parentNode&&Xt(e.parentNode)&&Kt(e.parentNode)&&(O.isShadow=!0),O.type===te.Element&&O.tagName==="iframe"&&Ah(e,()=>{const q=e.contentDocument;if(q&&y){const he=vt(q,{doc:q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:L,inlineImages:P,recordCanvas:x,preserveWhiteSpace:G,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:F,stylesheetLoadTimeout:E,keepIframeSrcFn:T});he&&y(e,he)}},v),O.type===te.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&$a(O.attributes.href)==="css")&&xh(e,()=>{if(F){const q=vt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOMOptions:w,dataURLOptions:L,inlineImages:P,recordCanvas:x,preserveWhiteSpace:G,onSerialize:_,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:F,stylesheetLoadTimeout:E,keepIframeSrcFn:T});q&&F(e,q)}},E),O}function Fh(e,t){const{mirror:n=new Ba,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOM:w=!1,dataURLOptions:L,preserveWhiteSpace:P,onSerialize:x,onIframeLoad:_,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:F,keepIframeSrcFn:E=()=>!1}=t||{};return vt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:p===!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}:p===!1?{}:p,maskAttributeFn:m,maskTextFn:b,maskInputFn:S,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:L,inlineImages:f,recordCanvas:h,preserveWhiteSpace:P,onSerialize:x,onIframeLoad:_,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:F,keepIframeSrcFn:E,newlyAddedElement:!1})}function qe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function de(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const St=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let Qi={map:{},getId(){return console.error(St),-1},getNode(){return console.error(St),null},removeNodeFromMap(){console.error(St)},has(){return console.error(St),!1},reset(){console.error(St)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Qi=new Proxy(Qi,{get(e,t,n){return t==="map"&&console.error(St),Reflect.get(e,t,n)}}));function sn(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(zh(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=pr(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function za(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){pr(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>za(e,t,i||{},!0)}function Us(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let Jn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Jn=()=>new Date().getTime());function qa(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:qe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||qe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||qe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:qe([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||qe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||qe([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Ga(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ya(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Va(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ge(e,t,n,r,s){if(!e)return!1;const i=Va(e);if(!i)return!1;const o=bt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=ot(i,o);let c=-1;return a<0?!1:(r&&(c=ot(i,bt(null,r))),a>-1&&c<0?!0:a<c)}function Bh(e,t){return t.getId(e)!==-1}function Nr(e,t){return t.getId(e)===rn}function Xa(e,t){if(Xt(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Xa(e.parentNode,t):!0:!0}function us(e){return!!e.changedTouches}function $h(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 Ka(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ja(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ls(e){return!!qe([e,"optionalAccess",t=>t.shadowRoot])}class Uh{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Bu(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 Qa(e){let t=null;return qe([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 Hh(e){let t=e,n;for(;n=Qa(t);)t=n;return t}function Wh(e){const t=e.ownerDocument;if(!t)return!1;const n=Hh(e);return t.contains(n)}function Za(e){const t=e.ownerDocument;return t?t.contains(e)||Wh(e):!1}const Zi={};function Hs(e){const t=Zi[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Zi[e]=r.bind(window)}function jh(...e){return Hs("requestAnimationFrame")(...e)}function pr(...e){return Hs("setTimeout")(...e)}function zh(...e){return Hs("clearTimeout")(...e)}var D=(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))(D||{}),R=(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))(R||{}),le=(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))(le||{}),Oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Oe||{});function qh(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function eo(e){return"__ln"in e}class Gh{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=qh([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&eo(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&eo(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const to=(e,t)=>`${e}@${t}`;class Yh{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Gh,s=c=>{let u=c,d=rn;for(;d===rn;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=c=>{if(!c.parentNode||!Za(c))return;const u=Xt(c.parentNode)?this.mirror.getId(Qa(c)):this.mirror.getId(c.parentNode),d=s(c);if(u===-1||d===-1)return r.addNode(c);const l=vt(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:f=>{Ka(f,this.mirror)&&!ge(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Ja(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ls(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{ge(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)no(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!ro(this.droppedSet,c)&&!no(this.removes,c,this.mirror)||ro(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const u=this.mirror.getId(o.value.parentNode),d=s(o.value);u!==-1&&d!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(l!==-1){c=d;break}else{const h=d.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Nr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Dt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Va(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Bs(n),a=n.tagName;s=Xn(n,a,o);const c=dr({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Dt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=nn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))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"),!ja(n.tagName,r)&&(i.attributes[r]=Wa(this.doc,Ot(n.tagName),Ot(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Xt(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Nr(n,this.mirror)||!Bh(n,this.mirror)||(this.addedSet.has(n)?(ds(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Xa(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[to(r,s)]?ds(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Xt(t.target)&&Kt(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(Nr(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[to(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ge(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),ls(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 ds(e,t){e.delete(t),t.childNodes.forEach(n=>ds(e,n))}function no(e,t,n){return e.length===0?!1:Vh(e,t,n)}function Vh(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function ro(e,t){return e.size===0?!1:ec(e,t)}function ec(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:ec(e,n):!1}let Jt;function Xh(e){Jt=e}function Kh(){Jt=void 0}const H=e=>Jt?(...n)=>{try{return e(...n)}catch(r){if(Jt&&Jt(r)===!0)return()=>{};throw r}}:e;function we(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const Tt=[];function mn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function tc(e,t){const n=new Yh;Tt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=we([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(H(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Jh({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=sn(H(l=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),l),o=[],a=null}),i),u=H(sn(H(l=>{const f=mn(l),{clientX:h,clientY:p}=us(l)?l.changedTouches[0]:l;a||(a=Jn()),o.push({x:h,y:p,id:r.getId(f),timeOffset:Jn()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?R.Drag:l instanceof MouseEvent?R.MouseMove:R.TouchMove)}),s,{trailing:!1})),d=[de("mousemove",u,n),de("touchmove",u,n),de("drag",u,n)];return H(()=>{d.forEach(l=>l())})}function Qh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let u=null;const d=l=>f=>{const h=mn(f);if(ge(h,r,s,i,!0))return;let p=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":p=Oe.Mouse;break;case"touch":p=Oe.Touch;break;case"pen":p=Oe.Pen;break}p===Oe.Touch?le[l]===le.MouseDown?m="TouchStart":le[l]===le.MouseUp&&(m="TouchEnd"):Oe.Pen}else us(f)&&(p=Oe.Touch);p!==null?(u=p,(m.startsWith("Touch")&&p===Oe.Touch||m.startsWith("Mouse")&&p===Oe.Mouse)&&(p=null)):le[l]===le.Click&&(p=u,u=null);const b=us(f)?f.changedTouches[0]:f;if(!b)return;const S=n.getId(h),{clientX:w,clientY:L}=b;H(e)({type:le[m],id:S,x:w,y:L,...p!==null&&{pointerType:p}})};return Object.keys(le).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let f=Ot(l);const h=d(l);if(window.PointerEvent)switch(le[l]){case le.MouseDown:case le.MouseUp:f=f.replace("mouse","pointer");break;case le.TouchStart:case le.TouchEnd:return}c.push(de(f,h,t))}),H(()=>{c.forEach(l=>l())})}function nc({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=H(sn(H(c=>{const u=mn(c);if(!u||ge(u,r,s,i,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=qa(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return de("scroll",a,t)}function Zh({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=H(sn(H(()=>{const i=Ga(),o=Ya();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return de("resize",s,t)}const em=["INPUT","TEXTAREA","SELECT"],so=new WeakMap;function tm({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function b(y){let v=mn(y);const F=y.isTrusted,E=v&&as(v.tagName);if(E==="OPTION"&&(v=v.parentElement),!v||!E||em.indexOf(E)<0||ge(v,r,s,i,!0))return;const T=v;if(T.classList.contains(o)||a&&T.matches(a))return;const M=Bs(v);let G=Xn(T,E,M),Y=!1;const re=dr({maskInputOptions:c,tagName:E,type:M}),O=Dt(v,f,p,h,m,re);(M==="radio"||M==="checkbox")&&(Y=v.checked),G=nn({isMasked:O,element:v,value:G,maskInputFn:u}),S(v,l?{text:G,isChecked:Y,userTriggered:F}:{text:G,isChecked:Y});const oe=v.name;M==="radio"&&oe&&Y&&t.querySelectorAll(`input[type="radio"][name="${oe}"]`).forEach(q=>{if(q!==v){const he=nn({isMasked:O,element:q,value:Xn(q,E,M),maskInputFn:u});S(q,l?{text:he,isChecked:!Y,userTriggered:!1}:{text:he,isChecked:!Y})}})}function S(y,v){const F=so.get(y);if(!F||F.text!==v.text||F.isChecked!==v.isChecked){so.set(y,v);const E=n.getId(y);H(e)({...v,id:E})}}const L=(d.input==="last"?["change"]:["input","change"]).map(y=>de(y,H(b),t)),P=t.defaultView;if(!P)return()=>{L.forEach(y=>y())};const x=P.Object.getOwnPropertyDescriptor(P.HTMLInputElement.prototype,"value"),_=[[P.HTMLInputElement.prototype,"value"],[P.HTMLInputElement.prototype,"checked"],[P.HTMLSelectElement.prototype,"value"],[P.HTMLTextAreaElement.prototype,"value"],[P.HTMLSelectElement.prototype,"selectedIndex"],[P.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&L.push(..._.map(y=>za(y[0],y[1],{set(){H(b)({target:this,isTrusted:!1})}},!1,P))),H(()=>{L.forEach(y=>y())})}function Qn(e){const t=[];function n(r,s){if(An("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||An("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||An("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||An("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function Ge(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function nm({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:H((d,l,f)=>{const[h,p]=f,{id:m,styleId:b}=Ge(l,t,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&e({id:m,styleId:b,adds:[{rule:h,index:p}]}),d.apply(l,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:m}=Ge(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,removes:[{index:h}]}),d.apply(l,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:m}=Ge(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replace:h}),d.apply(l,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:m}=Ge(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replaceSync:h}),d.apply(l,f)})}));const c={};xn("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(xn("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),xn("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),xn("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:H((f,h,p)=>{const[m,b]=p,{id:S,styleId:w}=Ge(h.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:m,index:[...Qn(h),b||0]}]}),f.apply(h,p)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:H((f,h,p)=>{const[m]=p,{id:b,styleId:S}=Ge(h.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||S&&S!==-1)&&e({id:b,styleId:S,removes:[{index:[...Qn(h),m]}]}),f.apply(h,p)})})}),H(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),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 rc({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?we([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):we([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=we([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(we([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return we([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=we([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),H(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function rm({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:H((a,c,u)=>{const[d,l,f]=u;if(n.has(d))return i.apply(c,[d,l,f]);const{id:h,styleId:p}=Ge(we([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:d,value:l,priority:f},index:Qn(c.parentRule)}),a.apply(c,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:H((a,c,u)=>{const[d]=u;if(n.has(d))return o.apply(c,[d]);const{id:l,styleId:f}=Ge(we([c,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:Qn(c.parentRule)}),a.apply(c,u)})}),H(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function sm({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=H(u=>sn(H(d=>{const l=mn(d);if(!l||ge(l,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:m}=l;e({type:u,id:s.getId(l),currentTime:f,volume:h,muted:p,playbackRate:m})}),i.media||500)),c=[de("play",a(0),o),de("pause",a(1),o),de("seeked",a(2),o),de("volumechange",a(3),o),de("ratechange",a(4),o)];return H(()=>{c.forEach(u=>u())})}function im({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,d){const l=new i(c,u,d);return s.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const o=Us(t.fonts,"add",function(a){return function(c){return pr(H(()=>{const u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),H(()=>{r.forEach(a=>a())})}function om(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=H(()=>{const u=t.getSelection();if(!u||a&&we([u,"optionalAccess",f=>f.isCollapsed]))return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const h=u.getRangeAt(f),{startContainer:p,startOffset:m,endContainer:b,endOffset:S}=h;ge(p,r,s,i,!0)||ge(b,r,s,i,!0)||d.push({start:n.getId(p),startOffset:m,end:n.getId(b),endOffset:S})}o({ranges:d})});return c(),de("selectionchange",c)}function am({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Us(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function cm(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=tc(e,e.doc));const s=Jh(e),i=Qh(e),o=nc(e),a=Zh(e,{win:n}),c=tm(e),u=sm(e);let d=()=>{},l=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(d=nm(e,{win:n}),l=rc(e,e.doc),f=rm(e,{win:n}),e.collectFonts&&(h=im(e)));const p=om(e),m=am(e),b=[];for(const S of e.plugins)b.push(S.observer(S.callback,n,S.options));return H(()=>{Tt.forEach(S=>S.reset()),we([r,"optionalAccess",S=>S.disconnect,"call",S=>S()]),s(),i(),o(),a(),c(),u(),d(),l(),f(),h(),p(),m(),b.forEach(S=>S())})}function An(e){return typeof window[e]<"u"}function xn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class fs{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,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 io(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class um{constructor(){this.crossOriginIframeMirror=new fs($s),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class lm{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new fs($s),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fs(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}),io([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){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case D.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:D.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case D.Meta:case D.Load:case D.DomContentLoaded:return!1;case D.Plugin:return n;case D.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case D.IncrementalSnapshot:switch(n.data.source){case R.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),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 R.Drag:case R.TouchMove:case R.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(n.data,t,["id"]),n;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case R.Font:return n;case R.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case R.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),io([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!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!==te.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class dm{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class fm{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(!Kt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=tc({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(nc({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),pr(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(rc({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){const r=this;this.restoreHandlers.push(Us(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Za(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class oo{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class pm{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Uh,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Fa(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class hm{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,jh(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Z,Zn;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=_e([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)}const Ie=hh();function Be(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:b,slimDOMOptions:S,maskAttributeFn:w,maskInputFn:L,maskTextFn:P,maxCanvasSize:x=null,packFn:_,sampling:y={},dataURLOptions:v={},mousemoveWait:F,recordDOM:E=!0,recordCanvas:T=!1,recordCrossOriginIframes:M=!1,recordAfter:G=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:Y=!1,collectFonts:re=!1,inlineImages:O=!1,plugins:oe,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:he=new Set([]),errorHandler:Ne,onMutation:Xs,getCanvasManager:Rc}=e;Xh(Ne);const _n=M?window.parent===window:!0;let zt=!1;if(!_n)try{window.parent.document&&(zt=!1)}catch{zt=!0}if(_n&&!t)throw new Error("emit function is required");if(!_n&&!zt)return()=>{};F!==void 0&&y.mousemove===void 0&&(y.mousemove=F),Ie.reset();const yr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:b!==void 0?b:{},Sr=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};$h();let Er,br=0;const Ks=j=>{for(const Te of oe||[])Te.eventProcessor&&(j=Te.eventProcessor(j));return _&&!zt&&(j=_(j)),j};Z=(j,Te)=>{const U=j;if(U.timestamp=Jn(),_e([Tt,"access",Q=>Q[0],"optionalAccess",Q=>Q.isFrozen,"call",Q=>Q()])&&U.type!==D.FullSnapshot&&!(U.type===D.IncrementalSnapshot&&U.data.source===R.Mutation)&&Tt.forEach(Q=>Q.unfreeze()),_n)_e([t,"optionalCall",Q=>Q(Ks(U),Te)]);else if(zt){const Q={type:"rrweb",event:Ks(U),origin:window.location.origin,isCheckout:Te};window.parent.postMessage(Q,"*")}if(U.type===D.FullSnapshot)Er=U,br=0;else if(U.type===D.IncrementalSnapshot){if(U.data.source===R.Mutation&&U.data.isAttachIframe)return;br++;const Q=r&&br>=r,z=n&&Er&&U.timestamp-Er.timestamp>n;(Q||z)&&Ir(!0)}};const yn=j=>{Z({type:D.IncrementalSnapshot,data:{source:R.Mutation,...j}})},Js=j=>Z({type:D.IncrementalSnapshot,data:{source:R.Scroll,...j}}),Mc=j=>Z({type:D.IncrementalSnapshot,data:{source:R.CanvasMutation,...j}}),Ac=j=>Z({type:D.IncrementalSnapshot,data:{source:R.AdoptedStyleSheet,...j}}),nt=new pm({mutationCb:yn,adoptedStyleSheetCb:Ac}),rt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new um:new lm({mirror:Ie,mutationCb:yn,stylesheetManager:nt,recordCrossOriginIframes:M,wrappedEmit:Z});for(const j of oe||[])j.getMirror&&j.getMirror({nodeMirror:Ie,crossOriginIframeMirror:rt.crossOriginIframeMirror,crossOriginIframeStyleMirror:rt.crossOriginIframeStyleMirror});const vr=new hm,Tr=gm(Rc,{mirror:Ie,win:window,mutationCb:j=>Z({type:D.IncrementalSnapshot,data:{source:R.CanvasMutation,...j}}),recordCanvas:T,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:x,sampling:y.canvas,dataURLOptions:v,errorHandler:Ne}),Sn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new dm:new fm({mutationCb:yn,scrollCb:Js,bypassOptions:{onMutation:Xs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:yr,dataURLOptions:v,maskAttributeFn:w,maskTextFn:P,maskInputFn:L,recordCanvas:T,inlineImages:O,sampling:y,slimDOMOptions:Sr,iframeManager:rt,stylesheetManager:nt,canvasManager:Tr,keepIframeSrcFn:q,processedNodeManager:vr},mirror:Ie}),Ir=(j=!1)=>{if(!E)return;Z({type:D.Meta,data:{href:window.location.href,width:Ya(),height:Ga()}},j),nt.reset(),Sn.init(),Tt.forEach(U=>U.lock());const Te=Fh(document,{mirror:Ie,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:yr,maskAttributeFn:w,maskInputFn:L,maskTextFn:P,slimDOM:Sr,dataURLOptions:v,recordCanvas:T,inlineImages:O,onSerialize:U=>{Ka(U,Ie)&&rt.addIframe(U),Ja(U,Ie)&&nt.trackLinkElement(U),ls(U)&&Sn.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,Q)=>{rt.attachIframe(U,Q),U.contentWindow&&Tr.addWindow(U.contentWindow),Sn.observeAttachShadow(U)},onStylesheetLoad:(U,Q)=>{nt.attachLinkElement(U,Q)},keepIframeSrcFn:q});if(!Te)return console.warn("Failed to snapshot the document");Z({type:D.FullSnapshot,data:{node:Te,initialOffset:qa(window)}}),Tt.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&nt.adoptStyleSheets(document.adoptedStyleSheets,Ie.getId(document))};Zn=Ir;try{const j=[],Te=Q=>H(cm)({onMutation:Xs,mutationCb:yn,mousemoveCb:(z,st)=>Z({type:D.IncrementalSnapshot,data:{source:st,positions:z}}),mouseInteractionCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.MouseInteraction,...z}}),scrollCb:Js,viewportResizeCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.ViewportResize,...z}}),inputCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.Input,...z}}),mediaInteractionCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.MediaInteraction,...z}}),styleSheetRuleCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.StyleSheetRule,...z}}),styleDeclarationCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.StyleDeclaration,...z}}),canvasMutationCb:Mc,fontCb:z=>Z({type:D.IncrementalSnapshot,data:{source:R.Font,...z}}),selectionCb:z=>{Z({type:D.IncrementalSnapshot,data:{source:R.Selection,...z}})},customElementCb:z=>{Z({type:D.IncrementalSnapshot,data:{source:R.CustomElement,...z}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:yr,inlineStylesheet:p,sampling:y,recordDOM:E,recordCanvas:T,inlineImages:O,userTriggeredOnInput:Y,collectFonts:re,doc:Q,maskAttributeFn:w,maskInputFn:L,maskTextFn:P,keepIframeSrcFn:q,blockSelector:i,unblockSelector:o,slimDOMOptions:Sr,dataURLOptions:v,mirror:Ie,iframeManager:rt,stylesheetManager:nt,shadowDomManager:Sn,processedNodeManager:vr,canvasManager:Tr,ignoreCSSAttributes:he,plugins:_e([oe,"optionalAccess",z=>z.filter,"call",z=>z(st=>st.observer),"optionalAccess",z=>z.map,"call",z=>z(st=>({observer:st.observer,options:st.options,callback:xc=>Z({type:D.Plugin,data:{plugin:st.name,payload:xc}})}))])||[]},{});rt.addLoadListener(Q=>{try{j.push(Te(Q.contentDocument))}catch(z){console.warn(z)}});const U=()=>{Ir(),j.push(Te(document))};return document.readyState==="interactive"||document.readyState==="complete"?U():(j.push(de("DOMContentLoaded",()=>{Z({type:D.DomContentLoaded,data:{}}),G==="DOMContentLoaded"&&U()})),j.push(de("load",()=>{Z({type:D.Load,data:{}}),G==="load"&&U()},window))),()=>{j.forEach(Q=>Q()),vr.destroy(),Zn=void 0,Kh()}}catch(j){console.warn(j)}}function mm(e){if(!Zn)throw new Error("please take full snapshot after start recording");Zn(e)}Be.mirror=Ie;Be.takeFullSnapshot=mm;function gm(e,t){try{return e?e(t):new oo}catch{return console.warn("Unable to initialize CanvasManager"),new oo}}const I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ao=["info","warn","error","log"],Bn="[Replay] ";function Or(e,t="info"){Je({category:"console",data:{logger:"replay"},level:t,message:`${Bn}${e}`},{level:t})}function _m(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return I?(ao.forEach(r=>{n[r]=(...s)=>{g[r](Bn,...s),t&&Or(s.join(""),$o(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),g.error(Bn,r),e?aa(r):t&&Or(r,"error")},n.infoTick=(...r)=>{g.info(Bn,...r),t&&setTimeout(()=>Or(r[0]),0)}):ao.forEach(r=>{n[r]=()=>{}}),n}const k=_m(),ym=3,Sm=5;function Ws(e){return e>9999999999?e:e*1e3}function Dr(e){return e>9999999999?e/1e3:e}function gn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:D.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Me(t,10,1e3)}}),t.category==="console")))}const Em="button,a";function sc(e){return e.closest(Em)||e}function ic(e){const t=oc(e);return!t||!(t instanceof Element)?t:sc(t)}function oc(e){return bm(e)?e.target:e}function bm(e){return typeof e=="object"&&!!e&&"target"in e}let Ye;function vm(e){return Ye||(Ye=[],Tm()),Ye.push(e),()=>{const t=Ye?Ye.indexOf(e):-1;t>-1&&Ye.splice(t,1)}}function Tm(){me(X,"open",function(e){return function(...t){if(Ye)try{Ye.forEach(n=>n())}catch{}return e.apply(X,t)}})}const Im=new Set([R.Mutation,R.StyleSheetRule,R.StyleDeclaration,R.AdoptedStyleSheet,R.CanvasMutation,R.Selection,R.MediaInteraction]);function wm(e,t,n){e.handleClick(t,n)}class km{constructor(t,n,r=gn){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(){const t=vm(()=>{this._lastMutation=co()});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(Rm(n,this._ignoreSelector)||!Mm(t))return;const r={timestamp:Dr(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Dr(t)}registerScroll(t=Date.now()){this._lastScroll=Dr(t)}registerClick(t){const n=sc(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=co();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:X.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,d);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:X.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Nt(()=>this._checkClicks(),1e3)}}const Cm=["A","BUTTON","INPUT"];function Rm(e,t){return!!(!Cm.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 Mm(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function co(){return Date.now()/1e3}function Am(e,t){try{if(!xm(t))return;const{source:n}=t.data;if(Im.has(n)&&e.registerMutation(t.timestamp),n===R.Scroll&&e.registerScroll(t.timestamp),Nm(t)){const{type:r,id:s}=t.data,i=Be.mirror.getNode(s);i instanceof HTMLElement&&r===le.Click&&e.registerClick(i)}}catch{}}function xm(e){return e.type===ym}function Nm(e){return e.data.source===R.MouseInteraction}function xe(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var er;(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"})(er||(er={}));const Om=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Dm(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Om.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Lm=e=>t=>{if(!e.isEnabled())return;const n=Pm(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&wm(e.clickDetector,n,ic(t.event)),gn(e,n)};function ac(e,t){const n=Be.mirror.getId(e),r=n&&Be.mirror.getNode(n),s=r&&Be.mirror.getMeta(r),i=s&&Bm(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===er.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Dm(i.attributes)}}:{}}}function Pm(e){const{target:t,message:n}=Fm(e);return xe({category:`ui.${e.name}`,...ac(t,n)})}function Fm(e){const t=e.name==="click";let n,r=null;try{r=t?ic(e.event):oc(e.event),n=Ue(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Bm(e){return e.type===er.Element}function $m(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Um(t);n&&gn(e,n)}function Um(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Hm(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const u=Ue(o,{maxStringLength:200})||"<unknown>",d=ac(o,u);return xe({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Hm(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Wm={resource:Ym,paint:qm,navigation:Gm};function Nn(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function jm(e){return e.map(zm).filter(Boolean)}function zm(e){const t=Wm[e.entryType];return t?t(e):null}function Lt(e){return((pe||X.performance.timeOrigin)+e)/1e3}function qm(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Lt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Gm(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:h,transferSize:p,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:Lt(h),end:Lt(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function Ym(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Lt(i),end:Lt(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Vm(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return hr(e,"largest-contentful-paint",n)}function Xm(e){return e.sources!==void 0}function Km(e){const t=[],n=[];for(const r of e.entries)if(Xm(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Be.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return hr(e,"cumulative-layout-shift",n,t)}function Jm(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hr(e,"first-input-delay",n)}function Qm(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hr(e,"interaction-to-next-paint",n)}function hr(e,t,n,r){const s=e.value,i=e.rating,o=Lt(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Be.mirror.getId(a)):void 0,attributions:r}}}function Zm(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(At(s,n))}),r.push(ka(Nn(Vm,e)),Os(Nn(Km,e)),Ca(Nn(Jm,e)),Ra(Nn(Qm,e))),()=>{r.forEach(s=>s())}}const eg='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 tg(){const e=new Blob([eg]);return URL.createObjectURL(e)}class js extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Fs}.`)}}class cc{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){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Fs)throw new js;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Ws(t):null}}class ng{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(){I&&k.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){I&&k.error("Error in compression worker: ",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class rg{constructor(t){this._worker=new ng(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){const n=Ws(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Fs?Promise.reject(new js):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{I&&k.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class sg{constructor(t){this._fallback=new cc,this._compression=new rg(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(t){I&&k.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(s){I&&k.exception(s,"Failed to add events when switching buffers.")}}}function ig({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=og(t);if(n)return n}return I&&k.info("Using simple buffer"),new cc}function og(e){try{const t=e||ag();if(!t)return;I&&k.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new sg(n)}catch(t){I&&k.exception(t,"Failed to create compression worker")}}function ag(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?tg():""}function zs(){try{return"sessionStorage"in X&&!!X.sessionStorage}catch{return!1}}function cg(e){ug(),e.session=void 0}function ug(){if(zs())try{X.sessionStorage.removeItem(Ls)}catch{}}function uc(e){return e===void 0?!1:Math.random()<e}function lc(e){const t=Date.now(),n=e.id||J(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function qs(e){if(zs())try{X.sessionStorage.setItem(Ls,JSON.stringify(e))}catch{}}function lg(e,t){return uc(e)?"session":t?"buffer":!1}function uo({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=lg(e,t),i=lc({sampled:s,previousSessionId:r});return n&&qs(i),i}function dg(){if(!zs())return null;try{const e=X.sessionStorage.getItem(Ls);if(!e)return null;const t=JSON.parse(e);return I&&k.infoTick("Loading existing session"),lc(t)}catch{return null}}function ps(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function dc(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return ps(e.started,t,r)||ps(e.lastActivity,n,r)}function fc(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!dc(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Lr({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&dg();return s?fc(s,{sessionIdleExpire:e,maxReplayDuration:t})?(I&&k.infoTick("Session in sessionStorage is expired, creating new one..."),uo(r,{previousSessionId:s.id})):s:(I&&k.infoTick("Creating new session"),uo(r,{previousSessionId:n}))}function fg(e){return e.type===D.Custom}function Gs(e,t,n){return hc(e,t)?(pc(e,t,n),!0):!1}function pg(e,t,n){return hc(e,t)?pc(e,t,n):Promise.resolve(null)}async function pc(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=hg(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof js?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:s});const i=B();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function hc(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Ws(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(I&&k.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function hg(e,t){try{if(typeof t=="function"&&fg(e))return t(e)}catch(n){return I&&k.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ys(e){return!e.type}function hs(e){return e.type==="transaction"}function mg(e){return e.type==="replay_event"}function lo(e){return e.type==="feedback"}function gg(e){return(t,n)=>{if(!e.isEnabled()||!Ys(t)&&!hs(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(hs(t)){_g(e,t);return}yg(e,t)}}}function _g(e,t){const 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 yg(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Nt(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Sg(e){return t=>{!e.isEnabled()||!Ys(t)||Eg(e,t)}}function Eg(e,t){const 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))){const r=xe({category:"replay.hydrate-error",data:{url:To()}});gn(e,r)}}function bg(e){const t=B();t&&t.on("beforeAddBreadcrumb",n=>vg(e,n))}function vg(e,t){if(!e.isEnabled()||!mc(t))return;const n=Tg(t);n&&gn(e,n)}function Tg(e){return!mc(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Ig(e):xe(e)}function Ig(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return xe(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Mn?(n=!0,`${s.slice(0,Mn)}…`):s;if(typeof s=="object")try{const i=Me(s,7);return JSON.stringify(i).length>Mn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Mn)}…`):i}catch{}return s});return xe({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function mc(e){return!!e.category}function wg(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function kg(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:D.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 Cg(e,t){return e.recordingMode!=="buffer"||t.message===Ps||!t.exception||t.type?!1:uc(e.getOptions().errorSampleRate)}function Rg(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:mg(t)?(delete t.breadcrumbs,t):!Ys(t)&&!hs(t)&&!lo(t)||!e.checkAndHandleExpiredSession()?t:lo(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),kg(e,t),t):wg(t,n)&&!e.getOptions()._experiments.captureExceptions?(I&&k.log("Ignoring error from rrweb internals",t),null):((Cg(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t),{id:"Replay"})}function mr(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:D.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function Mg(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Ag(e){return t=>{if(!e.isEnabled())return;const n=Mg(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(mr(e,[n]),!1)))}}function xg(e,t){return I&&e.getOptions()._experiments.traceInternals?!1:nd(t,B())}function gc(e,t){e.isEnabled()&&t!==null&&(xg(e,t.name)||e.addUpdate(()=>(mr(e,[t]),!0)))}function gr(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Ec(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function _c(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function yc(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ec(e)];if(!e)return[void 0]}catch(t){return I&&k.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return I&&k.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function tr(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Sc(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:ne({method:i,statusCode:o,request:a,response:c})}}function on(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ke(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=Ng(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function ms(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function Ec(e){return new URLSearchParams(e).toString()}function Ng(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Gi,n=Og(e);if(t){const r=e.slice(0,Gi);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Og(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function nr(e,t){const n=Dg(e);return Xe(n,t)}function Dg(e,t=X.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(X.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Lg(e,t,n){try{const r=await Fg(e,t,n),s=Sc("resource.fetch",r);gc(n.replay,s)}catch(r){I&&k.exception(r,"Failed to capture fetch breadcrumb")}}function Pg(e,t){const{input:n,response:r}=t,s=n?bc(n):void 0,i=gr(s),o=r?_c(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function Fg(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=nr(o,n.networkDetailAllowUrls)&&!nr(o,n.networkDetailDenyUrls),f=l?Bg(n,t.input,u):on(u),h=await $g(l,n,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:h}}function Bg({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Wg(n,t):{};if(!e)return Ke(s,r,void 0);const i=bc(n),[o,a]=yc(i),c=Ke(s,r,o);return a?tr(c,a):c}async function $g(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return on(s);const i=r?vc(r.headers,n):{};if(!r||!t&&s!==void 0)return Ke(i,s,void 0);const[o,a]=await Hg(r),c=Ug(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?tr(c,a):c}function Ug(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e&&e.length&&n===void 0?gr(e):n;return r?t?Ke(s,i,e):Ke(s,i,void 0):on(i)}catch(i){return I&&k.exception(i,"Failed to serialize response body"),Ke(s,n,void 0)}}async function Hg(e){const t=jg(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await zg(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(I&&k.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(I&&k.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function bc(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function vc(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Wg(e,t){return e.length===1&&typeof e[0]!="string"?fo(e[0],t):e.length===2?fo(e[1],t):{}}function fo(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?vc(n,t):Array.isArray(n)?{}:ms(n,t):{}}function jg(e){try{return e.clone()}catch(t){I&&k.exception(t,"Failed to clone response body")}}function zg(e){return new Promise((t,n)=>{const r=Nt(()=>n(new Error("Timeout while trying to read response body")),500);qg(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function qg(e){return await e.text()}async function Gg(e,t,n){try{const r=Vg(e,t,n),s=Sc("resource.xhr",r);gc(n.replay,s)}catch(r){I&&k.exception(r,"Failed to capture xhr breadcrumb")}}function Yg(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=gr(r),i=n.getResponseHeader("content-length")?_c(n.getResponseHeader("content-length")):Qg(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function Vg(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!c)return null;if(!a||!nr(c,n.networkDetailAllowUrls)||nr(c,n.networkDetailDenyUrls)){const _=on(l),y=on(f);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:d,request:_,response:y}}const h=a[it],p=h?ms(h.request_headers,n.networkRequestHeaders):{},m=ms(Xg(a),n.networkResponseHeaders),[b,S]=n.networkCaptureBodies?yc(o):[void 0],[w,L]=n.networkCaptureBodies?Kg(a):[void 0],P=Ke(p,l,b),x=Ke(m,f,w);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:d,request:S?tr(P,S):P,response:L?tr(x,L):x}}function Xg(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function Kg(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Jg(e.response,e.responseType)}catch(n){t.push(n)}return I&&k.warn("Failed to get xhr response body",...t),[void 0]}function Jg(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return I&&k.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return I&&k.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Qg(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return gr(n)}catch{return}}function Zg(e){const t=B();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(c,u)=>e_(a,c,u))}catch{}}function e_(e,t,n){if(t.data)try{t_(t)&&r_(n)&&(Yg(t,n),Gg(t,n,e)),n_(t)&&s_(n)&&(Pg(t,n),Lg(t,n,e))}catch(r){I&&k.exception(r,"Error when enriching network breadcrumb")}}function t_(e){return e.category==="xhr"}function n_(e){return e.category==="fetch"}function r_(e){return e&&e.xhr}function s_(e){return e&&e.response}function i_(e){const t=B();Na(Lm(e)),lr(Ag(e)),bg(e),Zg(e);const n=Rg(e);Ul(n),t&&(t.on("beforeSendEvent",Sg(e)),t.on("afterSendEvent",gg(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,s)=>{const i=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function o_(e){try{return Promise.all(mr(e,[a_(X.performance.memory)]))}catch{return[]}}function a_(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function c_(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function d(){return s&&clearTimeout(s),s=Nt(a,t),o&&i===void 0&&(i=Nt(a,o)),r}return d.cancel=c,d.flush=u,d}function u_(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){I&&k.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Am(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Gs(e,n,s))return!0;if(!s)return!1;const i=e.session;if(d_(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(I&&k.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&qs(i))}return i&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function l_(e){const t=e.getOptions();return{type:D.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 d_(e,t){!t||!e.session||e.session.segmentId!==0||Gs(e,l_(e),!1)}function f_(){const e=K().getPropagationContext().dsc;e&&delete e.replay_id;const t=ue();if(t){const n=et(t);delete n.replay_id}}function p_(e,t,n,r){return ht(Wo(e,vs(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function h_({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function m_({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await oa(e.getOptions(),r,i,t,e,ve());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function g_({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=h_({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=B(),f=K(),h=l&&l.getTransport(),p=l&&l.getDsn();if(!l||!h||!p||!i.sampled)return We({});const m={type:Kp,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},b=await m_({scope:f,client:l,replayId:t,event:m});if(!b)return l.recordDroppedEvent("event_processor","replay",m),I&&k.info("An event processor returned `null`, will not send event."),We({});delete b.sdkProcessingMetadata;const S=p_(b,o,p,l.getOptions().tunnel);let w;try{w=await h.send(S)}catch(P){const x=new Error(Ps);try{x.cause=P}catch{}throw x}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new Tc(w.statusCode);const L=zo({},w);if(jo(L,"replay"))throw new Vs(L);return w}class Tc extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Vs extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Ic(e,t={count:0,interval:nh}){const{recordingData:n,onError:r}=e;if(n.length)try{return await g_(e),!0}catch(s){if(s instanceof Tc||s instanceof Vs)throw s;if($l("Replays",{_retryCount:t.count}),r&&r(s),t.count>=rh){const i=new Error(`${Ps} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{Nt(async()=>{try{await Ic(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const wc="__THROTTLED",__="__SKIPPED";function y_(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const d=o;return o=!0,d?__:wc}o=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Ve{constructor({options:t,recordingOptions:n}){Ve.prototype.__init.call(this),Ve.prototype.__init2.call(this),Ve.prototype.__init3.call(this),Ve.prototype.__init4.call(this),Ve.prototype.__init5.call(this),Ve.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Jp,sessionIdleExpire:Qp},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=c_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=y_((o,a)=>pg(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(sh,r),timeout:r,scrollTimeout:ih,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new km(this,i)),I){const o=t._experiments;k.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){I&&k.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){I&&k.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",I&&k.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){I&&k.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){I&&k.info("Buffering is in progress, call `flush()` to save the replay");return}I&&k.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Lr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){I&&k.info("Buffering is in progress, call `flush()` to save the replay");return}I&&k.infoTick("Starting replay in buffer mode");const t=Lr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Be({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:th}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:u_(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{I&&k.info(`Stopping Replay${n?` triggered by ${n}`:""}`),f_(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,cg(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),I&&k.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),I&&k.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();I&&k.info("Converting buffer to session"),await this.flushImmediate();const 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){const 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&&ps(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${X.location.pathname}${X.location.hash}${X.location.search}`,n=`${X.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===wc){const s=xe({category:"replay.throttled"});this.addUpdate(()=>!Gs(this,{type:Sm,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||ue(),n=t&&ce(t),s=(n&&W(n).data||{})[Pe];if(!(!n||!s||!["route","custom"].includes(s)))return W(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ig({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Lr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return fc(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{X.document.addEventListener("visibilitychange",this._handleVisibilityChange),X.addEventListener("blur",this._handleWindowBlur),X.addEventListener("focus",this._handleWindowFocus),X.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(i_(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Zm(this)}_removeListeners(){try{X.document.removeEventListener("visibilitychange",this._handleVisibilityChange),X.removeEventListener("blur",this._handleWindowBlur),X.removeEventListener("focus",this._handleWindowFocus),X.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{X.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=xe({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=xe({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{$m(this,t)}}_doChangeToBackgroundTasks(t){!this.session||dc(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()){I&&k.info("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:D.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=jm(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(mr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){I&&k.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await o_(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Ic({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=B();if(r){const s=n instanceof Vs?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){I&&k.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){I&&k.info(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&I&&k.info("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&qs(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=xe({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Gt(e,t){return[...e,...t].join(",")}function S_({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=['base[href="/"]'],o=Gt(e,[".sentry-mask","[data-sentry-mask]"]),a=Gt(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:Gt(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Gt(r,[]),ignoreSelector:Gt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function E_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const po='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',b_=["content-length","content-type","accept"];let ho=!1;const v_=e=>new _r(e);class _r{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Zp,flushMaxDelay:n=eh,minReplayDuration:r=oh,maxReplayDuration:s=Yi,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:b=[],networkDetailDenyUrls:S=[],networkCaptureBodies:w=!0,networkRequestHeaders:L=[],networkResponseHeaders:P=[],mask:x=[],maskAttributes:_=["title","placeholder"],unmask:y=[],block:v=[],unblock:F=[],ignore:E=[],maskFn:T,beforeAddRecordingEvent:M,beforeErrorSampling:G}={}){this.name=_r.id;const Y=S_({mask:x,unmask:y,block:v,unblock:F,ignore:E});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(re,O,oe)=>E_({maskAttributes:_,maskAllText:u,privacyOptions:Y,key:re,value:O,el:oe}),...Y,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:re=>{try{re.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ah),maxReplayDuration:Math.min(s,Yi),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:b,networkDetailDenyUrls:S,networkCaptureBodies:w,networkRequestHeaders:mo(L),networkResponseHeaders:mo(P),beforeAddRecordingEvent:M,beforeErrorSampling:G,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${po}`:po),this._isInitialized&&ui())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ho}set _isInitialized(t){ho=t}afterAllSetup(t){!ui()||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){const n=T_(this._initialOptions,t);this._replay=new Ve({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}_r.__initStatic();function T_(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ne(e)},s=zn(n.replaysSessionSampleRate),i=zn(n.replaysOnErrorSampleRate);return s==null&&i==null&&Bt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function mo(e){return[...b_,...e.map(t=>t.toLowerCase())]}const go=new WeakMap,Pr=new Map,$n={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function I_(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a}={traceFetch:$n.traceFetch,traceXHR:$n.traceXHR,trackFetchStreamPerformance:$n.trackFetchStreamPerformance,...t},c=typeof i=="function"?i:l=>!0,u=l=>R_(l,a),d={};n&&(e.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(f=>{if(f.op==="http.client"){const h=Pr.get(f.span_id);h&&(f.timestamp=h/1e3,Pr.delete(f.span_id))}}),l)),s&&su(l=>{if(l.response){const f=go.get(l.response);f&&l.endTimestamp&&Pr.set(f,l.endTimestamp)}}),No(l=>{const f=Md(l,c,u,d);if(l.response&&l.fetchData.__span&&go.set(l.response,l.fetchData.__span),f){const h=kc(l.fetchData.url),p=h?ct(h).host:void 0;f.setAttributes({"http.url":h,"server.address":p})}o&&f&&_o(f)})),r&&Da(l=>{const f=M_(l,c,u,d);o&&f&&_o(f)})}function w_(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function _o(e){const{url:t}=W(e).data||{};if(!t||typeof t!="string")return;const n=At("resource",({entries:r})=>{r.forEach(s=>{w_(s)&&s.name.endsWith(t)&&(C_(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function k_(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function Ce(e=0){return((pe||performance.timeOrigin)+e)/1e3}function C_(e){const{name:t,version:n}=k_(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),pe?[...r,["http.request.redirect_start",Ce(e.redirectStart)],["http.request.fetch_start",Ce(e.fetchStart)],["http.request.domain_lookup_start",Ce(e.domainLookupStart)],["http.request.domain_lookup_end",Ce(e.domainLookupEnd)],["http.request.connect_start",Ce(e.connectStart)],["http.request.secure_connection_start",Ce(e.secureConnectionStart)],["http.request.connection_end",Ce(e.connectEnd)],["http.request.request_start",Ce(e.requestStart)],["http.request.response_start",Ce(e.responseStart)],["http.request.response_end",Ce(e.responseEnd)]]:r}function R_(e,t){const n=A.location&&A.location.href;if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Xe(r.toString(),t)||i&&Xe(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Xe(e,t):r}}function M_(e,t,n,r){const s=e.xhr,i=s&&s[it];if(!s||s.__sentry_own_request__||!i)return;const o=je()&&t(i.url);if(e.endTimestamp&&o){const f=s.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&i.status_code!==void 0&&(Yo(h,i.status_code),h.end(),delete r[f]);return}const a=kc(i.url),c=a?ct(a).host:void 0,u=!!ue(),d=o&&u?tt({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":c,[ie]:"auto.http.browser",[pt]:"http.client"}}):new Ut;s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d;const l=B();return s.setRequestHeader&&n(i.url)&&l&&A_(s,l,je()&&u?d:void 0),d}function A_(e,t,n){const r=K(),s=ve(),{traceId:i,spanId:o,sampled:a,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},u=n&&je()?Ko(n):bs(i,o,a),d=Ho(c||(n?et(n):cr(i,t)));x_(e,u,d)}function x_(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(yt,n)}catch{}}function kc(e){try{return new URL(e,A.location.origin).href}catch{return}}function N_(){A&&A.document?A.document.addEventListener("visibilitychange",()=>{const e=ue();if(!e)return;const t=ce(e);if(A.document.hidden&&t){const n="cancelled",{op:r,status:s}=W(t);ke&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:se,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ke&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const O_="BrowserTracing",D_={...Ln,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...$n},Cc=(e={})=>{ol();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:l,traceXHR:f,trackFetchStreamPerformance:h,shouldCreateSpanForRequest:p,enableHTTPTimings:m,instrumentPageLoad:b,instrumentNavigation:S}={...D_,...e},w=Rf({recordClsStandaloneSpans:i||!1});t&&Qf(),r&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Af():n&&Mf(),s&&xf();const L={name:void 0,source:void 0};function P(x,_){const y=_.op==="pageload",v=o?o(_):_,F=v.attributes||{};_.name!==v.name&&(F[Pe]="custom",v.attributes=F),L.name=v.name,L.source=F[Pe];const E=ia(v,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:y,beforeSpanEnd:M=>{w(),Pf(M,{recordClsOnPageloadSpan:!i})}});function T(){["interactive","complete"].includes(A.document.readyState)&&x.emit("idleSpanEnableAutoFinish",E)}return y&&A.document&&(A.document.addEventListener("readystatechange",()=>{T()}),T()),E}return{name:O_,afterAllSetup(x){let _,y=A.location&&A.location.href;x.on("startNavigationSpan",v=>{B()===x&&(_&&!W(_).timestamp&&(ke&&g.log(`[Tracing] Finishing current root span with op: ${W(_).op}`),_.end()),_=P(x,{op:"navigation",...v}))}),x.on("startPageLoadSpan",(v,F={})=>{if(B()!==x)return;_&&!W(_).timestamp&&(ke&&g.log(`[Tracing] Finishing current root span with op: ${W(_).op}`),_.end());const E=F.sentryTrace||yo("sentry-trace"),T=F.baggage||yo("baggage"),M=Cu(E,T);K().setPropagationContext(M),_=P(x,{op:"pageload",...v})}),x.on("spanEnd",v=>{const F=W(v).op;if(v!==ce(v)||F!=="navigation"&&F!=="pageload")return;const E=K(),T=E.getPropagationContext();E.setPropagationContext({...T,sampled:T.sampled!==void 0?T.sampled:mt(v),dsc:T.dsc||et(v)})}),A.location&&(b&&L_(x,{name:A.location.pathname,startTime:pe?pe/1e3:void 0,attributes:{[Pe]:"url",[ie]:"auto.pageload.browser"}}),S&&lr(({to:v,from:F})=>{if(F===void 0&&y&&y.indexOf(v)!==-1){y=void 0;return}F!==v&&(y=void 0,P_(x,{name:A.location.pathname,attributes:{[Pe]:"url",[ie]:"auto.navigation.browser"}}))})),d&&N_(),s&&F_(a,c,u,L),t&&ep(),I_(x,{traceFetch:l,traceXHR:f,trackFetchStreamPerformance:h,tracePropagationTargets:x.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:p,enableHTTPTimings:m})}}};function L_(e,t,n){e.emit("startPageLoadSpan",t,n),K().setTransactionName(t.name);const r=ue();return(r&&W(r).op)==="pageload"?r:void 0}function P_(e,t){ve().setPropagationContext(Wn()),K().setPropagationContext(Wn()),e.emit("startNavigationSpan",t),K().setTransactionName(t.name);const n=ue();return(n&&W(n).op)==="navigation"?n:void 0}function yo(e){const t=Hc(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function F_(e,t,n,r){let s;const i=()=>{const o="ui.action.click",a=ue(),c=a&&ce(a);if(c){const u=W(c).op;if(["navigation","pageload"].includes(u)){ke&&g.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Vr,"interactionInterrupted"),s.end(),s=void 0),!r.name){ke&&g.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}s=ia({name:r.name,op:o,attributes:{[Pe]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};A.document&&addEventListener("click",i,{once:!1,capture:!0})}function B_(e){const t={defaultIntegrations:$_(),...e};return ha(t,"astro",["astro","browser"]),Vp(t)}function $_(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...is(),Cc()]:is()}B_({dsn:"https://d092f22076bda9e423b96452533e4928@o4507595091279872.ingest.de.sentry.io/4507595093704784",debug:!1,environment:"production",release:void 0,tracesSampleRate:1,integrations:[Cc(),v_()],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});
//# sourceMappingURL=page.CZJD7B01.js.map
