(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"5c734802b4deb32fcfe38503b5883fe67e5e3b8e"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83d1b52d-fed1-49f0-951d-3c108a16cbaa",e._sentryDebugIdIdentifier="sentry-dbid-83d1b52d-fed1-49f0-951d-3c108a16cbaa")}catch{}})();const v=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,D=globalThis,mt="10.39.0";function It(){return Ir(D),D}function Ir(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||mt,t[mt]=t[mt]||{}}function Gt(e,t,n=D){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[mt]=r[mt]||{};return s[e]||(s[e]=t())}const ga=["debug","info","warn","error","log","assert","trace"],ed="Sentry Logger ",ar={};function st(e){if(!("console"in D))return e();const t=D.console,n={},r=Object.keys(ar);r.forEach(s=>{const i=ar[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function td(){$s().enabled=!0}function nd(){$s().enabled=!1}function _a(){return $s().enabled}function rd(...e){Bs("log",...e)}function sd(...e){Bs("warn",...e)}function id(...e){Bs("error",...e)}function Bs(e,...t){v&&_a()&&st(()=>{D.console[e](`${ed}[${e}]:`,...t)})}function $s(){return v?Gt("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const y={enable:td,disable:nd,isEnabled:_a,log:rd,warn:sd,error:id},ya=50,St="?",Ni=/\(error: (.*)\)/,Oi=/captureMessage|captureException/;function Sa(...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 c=r;c<o.length;c++){let a=o[c];a.length>1024&&(a=a.slice(0,1024));const u=Ni.test(a)?a.replace(Ni,"$1"):a;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){i.push(l);break}}if(i.length>=ya+s)break}}return ad(i.slice(s))}}function od(e){return Array.isArray(e)?Sa(...e):e}function ad(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test($n(t).function||"")&&t.pop(),t.reverse(),Oi.test($n(t).function||"")&&(t.pop(),Oi.test($n(t).function||"")&&t.pop()),t.slice(0,ya).map(n=>({...n,filename:n.filename||$n(t).filename,function:n.function||St}))}function $n(e){return e[e.length-1]||{}}const Hr="<anonymous>";function je(e){try{return!e||typeof e!="function"?Hr:e.name||Hr}catch{return Hr}}function Li(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Ea(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Xn={},Di={};function it(e,t){Xn[e]=Xn[e]||[],Xn[e].push(t)}function ot(e,t){if(!Di[e]){Di[e]=!0;try{t()}catch(n){v&&y.error(`Error while instrumenting ${e}`,n)}}}function Re(e,t){const n=e&&Xn[e];if(n)for(const r of n)try{r(t)}catch(s){v&&y.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${je(r)}
Error:`,s)}}let Wr=null;function ba(e){const t="error";it(t,e),ot(t,cd)}function cd(){Wr=D.onerror,D.onerror=function(e,t,n,r,s){return Re("error",{column:r,error:s,line:n,msg:e,url:t}),Wr?Wr.apply(this,arguments):!1},D.onerror.__SENTRY_INSTRUMENTED__=!0}let zr=null;function va(e){const t="unhandledrejection";it(t,e),ot(t,ud)}function ud(){zr=D.onunhandledrejection,D.onunhandledrejection=function(e){return Re("unhandledrejection",e),zr?zr.apply(this,arguments):!0},D.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ta=Object.prototype.toString;function wr(e){switch(Ta.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return qe(e,Error)}}function Vt(e,t){return Ta.call(e)===`[object ${t}]`}function Ia(e){return Vt(e,"ErrorEvent")}function Pi(e){return Vt(e,"DOMError")}function dd(e){return Vt(e,"DOMException")}function Ue(e){return Vt(e,"String")}function kr(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Et(e){return e===null||kr(e)||typeof e!="object"&&typeof e!="function"}function ln(e){return Vt(e,"Object")}function Rr(e){return typeof Event<"u"&&qe(e,Event)}function ld(e){return typeof Element<"u"&&qe(e,Element)}function fd(e){return Vt(e,"RegExp")}function Yt(e){return!!(e?.then&&typeof e.then=="function")}function pd(e){return ln(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function qe(e,t){try{return e instanceof t}catch{return!1}}function wa(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Us(e){return typeof Request<"u"&&qe(e,Request)}const Hs=D,hd=80;function ye(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const c=" > ",a=c.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||hd;for(;n&&i++<r&&(u=md(n,d),!(u==="html"||i>1&&o+s.length*a+u.length>=l));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(c)}catch{return"<unknown>"}}function md(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Hs.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?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s?.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Ue(o)){const c=o.split(/\s+/);for(const a of c)r.push(`.${a}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const c=n.getAttribute(o);c&&r.push(`[${o}="${c}"]`)}return r.join("")}function Kt(){try{return Hs.document.location.href}catch{return""}}function ka(e){if(!Hs.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}function _e(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Ra(s,r);try{e[t]=s}catch{v&&y.log(`Failed to replace method "${t}" in object`,e)}}function Se(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{v&&y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ra(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Se(e,"__sentry_original__",t)}catch{}}function Ws(e){return e.__sentry_original__}function Ca(e){if(wr(e))return{message:e.message,name:e.name,stack:e.stack,...Bi(e)};if(Rr(e)){const t={type:e.type,target:Fi(e.target),currentTarget:Fi(e.currentTarget),...Bi(e)};return typeof CustomEvent<"u"&&qe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Fi(e){try{return ld(e)?ye(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Bi(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 gd(e){const t=Object.keys(Ca(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Ct;function bn(e){if(Ct!==void 0)return Ct?Ct(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=D;return t in n&&typeof n[t]=="function"?(Ct=n[t],Ct(e)):(Ct=null,e())}function Je(){return bn(()=>Math.random())}function vn(){return bn(()=>Date.now())}function os(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function $i(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{wa(s)?n.push(Ea(s)):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Jn(e,t,n=!1){return Ue(e)?fd(t)?t.test(e):Ue(t)?n?e===t:e.includes(t):!1:!1}function He(e,t=[],n=!1){return t.some(r=>Jn(e,r,n))}function _d(){const e=D;return e.crypto||e.msCrypto}let jr;function yd(){return Je()*16}function Te(e=_d()){try{if(e?.randomUUID)return bn(()=>e.randomUUID()).replace(/-/g,"")}catch{}return jr||(jr="10000000100040008000"+1e11),jr.replace(/[018]/g,t=>(t^(yd()&15)>>t/4).toString(16))}function Ma(e){return e.exception?.values?.[0]}function ft(e){const{message:t,event_id:n}=e;if(t)return t;const r=Ma(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function as(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 Bt(e,t){const n=Ma(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?.data,...t.data};n.mechanism.data=i}}function Ui(e){if(Sd(e))return!0;try{Se(e,"__sentry_captured__",!0)}catch{}return!1}function Sd(e){try{return e.__sentry_captured__}catch{}}const xa=1e3;function wt(){return vn()/xa}function Ed(){const{performance:e}=D;if(!e?.now||!e.timeOrigin)return wt;const t=e.timeOrigin;return()=>(t+bn(()=>e.now()))/xa}let Hi;function ue(){return(Hi??(Hi=Ed()))()}let qr=null;function bd(){const{performance:e}=D;if(!e?.now)return;const t=3e5,n=bn(()=>e.now()),r=vn(),s=e.timeOrigin;if(typeof s=="number"&&Math.abs(s+n-r)<t)return s;const i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+n-r)<t?i:r-n}function me(){return qr===null&&(qr=bd()),qr}function vd(e){const t=ue(),n={sid:Te(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Id(n)};return e&&$t(n,e),n}function $t(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||ue(),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:Te()),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 Td(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),$t(e,n)}function Id(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Tn(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Tn(r[s],t[s],n-1));return r}function Ge(){return Te()}function We(){return Te().substring(16)}const cs="_sentrySpan";function Ut(e,t){t?Se(e,cs,t):delete e[cs]}function fn(e){return e[cs]}const wd=100;class Pe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ge(),sampleRand:Je()}}clone(){const t=new Pe;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Ut(t,fn(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&&$t(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof Pe?n.getScopeData():ln(n)?t:void 0,{tags:s,attributes:i,extra:o,user:c,contexts:a,level:u,fingerprint:d=[],propagationContext:l,conversationId:f}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},c&&Object.keys(c).length&&(this._user=c),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),f&&(this._conversationId=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Ut(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ge(),sampleRand:Je()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:wd;if(r<=0)return this;const s={timestamp:wt(),...t,message:t.message?os(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:fn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Tn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Te();if(!this._client)return v&&y.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?.event_id||Te();if(!this._client)return v&&y.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=t.event_id||n?.event_id||Te();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(v&&y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function kd(){return Gt("defaultCurrentScope",()=>new Pe)}function Rd(){return Gt("defaultIsolationScope",()=>new Pe)}class Cd{constructor(t,n){let r;t?r=t:r=new Pe;let s;n?s=n:s=new Pe,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 Yt(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 Ht(){const e=It(),t=Ir(e);return t.stack=t.stack||new Cd(kd(),Rd())}function Md(e){return Ht().withScope(e)}function xd(e,t){const n=Ht();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Wi(e){return Ht().withScope(()=>e(Ht().getIsolationScope()))}function Ad(){return{withIsolationScope:Wi,withScope:Md,withSetScope:xd,withSetIsolationScope:(e,t)=>Wi(t),getCurrentScope:()=>Ht().getScope(),getIsolationScope:()=>Ht().getIsolationScope()}}function Xt(e){const t=Ir(e);return t.acs?t.acs:Ad()}function V(){const e=It();return Xt(e).getCurrentScope()}function Me(){const e=It();return Xt(e).getIsolationScope()}function Nd(){return Gt("globalScope",()=>new Pe)}function In(...e){const t=It(),n=Xt(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function F(){return V().getClient()}function Aa(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||We()};return r&&(i.parent_span_id=r),i}const ke="sentry.source",zs="sentry.sample_rate",Na="sentry.previous_trace_sample_rate",Ve="sentry.op",ie="sentry.origin",pn="sentry.idle_span_finish_reason",wn="sentry.measurement_unit",kn="sentry.measurement_value",zi="sentry.custom_span_name",js="sentry.profile_id",Jt="sentry.exclusive_time",Od="sentry.link.type",Ld="gen_ai.conversation.id",Dd=0,qs=1,ce=2;function Pd(e){if(e<400&&e>=100)return{code:qs};if(e>=400&&e<500)switch(e){case 401:return{code:ce,message:"unauthenticated"};case 403:return{code:ce,message:"permission_denied"};case 404:return{code:ce,message:"not_found"};case 409:return{code:ce,message:"already_exists"};case 413:return{code:ce,message:"failed_precondition"};case 429:return{code:ce,message:"resource_exhausted"};case 499:return{code:ce,message:"cancelled"};default:return{code:ce,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ce,message:"unimplemented"};case 503:return{code:ce,message:"unavailable"};case 504:return{code:ce,message:"deadline_exceeded"};default:return{code:ce,message:"internal_error"}}return{code:ce,message:"internal_error"}}function Oa(e,t){e.setAttribute("http.response.status_code",t);const n=Pd(t);n.message!=="unknown_error"&&e.setStatus(n)}const La="_sentryScope",Da="_sentryIsolationScope";function Fd(e){try{const t=D.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Bd(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function $d(e,t,n){e&&(Se(e,Da,Fd(n)),Se(e,La,t))}function cr(e){const t=e;return{scope:t[La],isolationScope:Bd(t[Da])}}const Gs="sentry-",Ud=/^sentry-/,Hd=8192;function Pa(e){const t=zd(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(Ud)){const o=s.slice(Gs.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Wd(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Gs}${r}`]=s),n),{});return jd(t)}function zd(e){if(!(!e||!Ue(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=ji(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):ji(e)}function ji(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function jd(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>Hd?(v&&y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const qd=/^o(\d+)\./,Gd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Vd(e){return e==="http"||e==="https"}function Qt(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:c,publicKey:a}=e;return`${c}://${a}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Yd(e){const t=Gd.exec(e);if(!t){st(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",c=""]=t.slice(1);let a="",u=c;const d=u.split("/");if(d.length>1&&(a=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return Fa({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function Fa(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Kd(e){if(!v)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(y.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Vd(r)?t&&isNaN(parseInt(t,10))?(y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Xd(e){return e.match(qd)?.[1]}function Jd(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Xd(n)),r}function Qd(e){const t=typeof e=="string"?Yd(e):Fa(e);if(!(!t||!Kd(t)))return t}function bt(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const Ba=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Zd(e){if(!e)return;const t=e.match(Ba);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 el(e,t){const n=Zd(e),r=Pa(t);if(!n?.traceId)return{traceId:Ge(),sampleRand:Je()};const s=tl(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:c}=n;return{traceId:i,parentSpanId:o,sampled:c,dsc:r||{},sampleRand:s}}function $a(e=Ge(),t=We(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ua(e=Ge(),t=We(),n){return`00-${e}-${t}-${n?"01":"00"}`}function tl(e,t){const n=bt(t?.sample_rand);if(n!==void 0)return n;const r=bt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Je()*r:r+Je()*(1-r):Je()}const Ha=0,Vs=1;let qi=!1;function nl(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:c,links:a}=j(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:c,links:a}}function Wa(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:j(e).parent_span_id,i=cr(e).scope,o=r?i?.getPropagationContext().propagationSpanId||We():t;return{parent_span_id:s,span_id:o,trace_id:n}}function rl(e){const{traceId:t,spanId:n}=e.spanContext(),r=at(e);return $a(t,n,r)}function sl(e){const{traceId:t,spanId:n}=e.spanContext(),r=at(e);return Ua(t,n,r)}function za(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Vs,attributes:i,...s}))}function gt(e){return typeof e=="number"?Gi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Gi(e.getTime()):ue()}function Gi(e){return e>9999999999?e/1e3:e}function j(e){if(ol(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(il(e)){const{attributes:r,startTime:s,name:i,endTime:o,status:c,links:a}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:gt(s),timestamp:gt(o)||void 0,status:ja(c),op:r[Ve],origin:r[ie],links:za(a)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function il(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ol(e){return typeof e.getSpanJSON=="function"}function at(e){const{traceFlags:t}=e.spanContext();return t===Vs}function ja(e){if(!(!e||e.code===Dd))return e.code===qs?"ok":e.message||"internal_error"}const _t="_sentryChildSpans",us="_sentryRootSpan";function qa(e,t){const n=e[us]||e;Se(t,us,n),e[_t]?e[_t].add(t):Se(e,_t,new Set([t]))}function al(e,t){e[_t]&&e[_t].delete(t)}function Qn(e){const t=new Set;function n(r){if(!t.has(r)&&at(r)){t.add(r);const s=r[_t]?Array.from(r[_t]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function le(e){return e[us]||e}function fe(){const e=It(),t=Xt(e);return t.getActiveSpan?t.getActiveSpan():fn(V())}function ds(){qi||(st(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),qi=!0)}let Vi=!1;function cl(){if(Vi)return;function e(){const t=fe(),n=t&&le(t);if(n){const r="internal_error";v&&y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:ce,message:r})}}e.tag="sentry_tracingErrorCallback",Vi=!0,ba(e),va(e)}function Oe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||F()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Yi(e){y.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ur(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(dl(n)){if(Jn(e.description,n))return v&&Yi(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Jn(e.description,n.name):!0,s=n.op?e.op&&Jn(e.op,n.op):!0;if(r&&s)return v&&Yi(e),!0}return!1}function ul(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function dl(e){return typeof e=="string"||e instanceof RegExp}const Ys="production",Ga="_frozenDsc";function Zn(e,t){Se(e,Ga,t)}function Va(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Ys,release:n.release,public_key:r,trace_id:e,org_id:Jd(t)};return t.emit("createDsc",s),s}function Ks(e,t){const n=t.getPropagationContext();return n.dsc||Va(n.traceId,e)}function Fe(e){const t=F();if(!t)return{};const n=le(e),r=j(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[zs]??s[Na];function c(h){return(typeof o=="number"||typeof o=="string")&&(h.sample_rate=`${o}`),h}const a=n[Ga];if(a)return c(a);const u=i?.get("sentry.dsc"),d=u&&Pa(u);if(d)return c(d);const l=Va(e.spanContext().traceId,t),f=s[ke],p=r.description;return f!=="url"&&p&&(l.transaction=p),Oe()&&(l.sampled=String(at(n)),l.sample_rand=i?.get("sentry.sample_rand")??cr(n).scope?.getPropagationContext().sampleRand.toString()),c(l),t.emit("createDsc",l,n),l}class tt{constructor(t={}){this._traceId=t.traceId||Ge(),this._spanId=t.spanId||We()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Ha}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function we(e,t=100,n=1/0){try{return ls("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ya(e,t=3,n=100*1024){const r=we(e,t);return hl(r)>n?Ya(e,t-1,n):r}function ls(e,t,n=1/0,r=1/0,s=ml()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=ll(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const a=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(a===0)return c.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return ls("",p,a-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Ca(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(l>=r){d[p]="[MaxProperties ~]";break}const h=f[p];d[p]=ls(p,h,a-1,r,s),l++}return o(t),d}function ll(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(wa(t))return Ea(t);if(pd(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${je(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=fl(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function fl(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function pl(e){return~-encodeURI(e).split(/%..|./).length}function hl(e){return pl(JSON.stringify(e))}function ml(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function ct(e,t=[]){return[e,t]}function gl(e,t){const[n,r]=e;return[n,[...r,t]]}function fs(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 _l(e,t){return fs(e,(n,r)=>t.includes(r))}function ps(e){const t=Ir(D);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function yl(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[ps(r),i]:r.push(typeof i=="string"?ps(i):i)}for(const i of n){const[o,c]=i;if(s(`
${JSON.stringify(o)}
`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(we(c))}s(a)}}return typeof r=="string"?r:Sl(r)}function Sl(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 El(e){return[{type:"span"},e]}function bl(e){const t=typeof e.data=="string"?ps(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const vl={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Ki(e){return vl[e]}function Xs(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ka(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Qt(r)},...s&&{trace:s}}}function Tl(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Il(e,t,n,r){const s=Xs(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Qt(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ct(i,[o])}function wl(e,t,n,r){const s=Xs(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Tl(e,n?.sdk);const o=Ka(e,s,r,t);return delete e.sdkProcessingMetadata,ct(o,[[{type:i},e]])}function kl(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=Fe(e[0]),s=t?.getDsn(),i=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Qt(s)}},{beforeSendSpan:c,ignoreSpans:a}=t?.getOptions()||{},u=a?.length?e.filter(p=>!ur(j(p),a)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=c?p=>{const h=j(p),m=c(h);return m||(ds(),h)}:j,f=[];for(const p of u){const h=l(p);h&&f.push(El(h))}return ct(o,f)}function Rl(e){if(!v)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=j(e),{spanId:s}=e.spanContext(),i=at(e),o=le(e),c=o===e,a=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!c){const{op:d,description:l}=j(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}y.log(`${a}
${u.join(`
`)}`)}function Cl(e){if(!v)return;const{description:t="< unknown name >",op:n="< unknown op >"}=j(e),{spanId:r}=e.spanContext(),i=le(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;y.log(o)}function Ml(e,t,n,r=fe()){const s=r&&le(r);s&&(v&&y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[kn]:t,[wn]:n}))}function Xi(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[wn],i=r[kn];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const Ji=1e3;class Cr{constructor(t={}){this._traceId=t.traceId||Ge(),this._spanId=t.spanId||We(),this._startTime=t.startTimestamp||ue(),this._links=t.links,this._attributes={},this.setAttributes({[ie]:"manual",[Ve]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Vs:Ha}}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=gt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ke,"custom"),this}end(t){this._endTime||(this._endTime=gt(t),Cl(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ve],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ja(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ie],profile_id:this._attributes[js],exclusive_time:this._attributes[Jt],measurements:Xi(this._events),is_segment:this._isStandaloneSpan&&le(this)===this||void 0,segment_id:this._isStandaloneSpan?le(this).spanContext().spanId:void 0,links:za(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){v&&y.log("[Tracing] Adding an event to span:",t);const s=Qi(n)?n:r||ue(),i=Qi(n)?{}:n||{},o={name:t,time:gt(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=F();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===le(this)))return;if(this._isStandaloneSpan){this._sampled?Al(kl([this],t)):(v&&y.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&&(cr(this).scope||V()).captureEvent(r)}_convertSpanToTransaction(){if(!Zi(j(this)))return;this._name||(v&&y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=cr(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=Qn(this).filter(d=>d!==this&&!xl(d)).map(d=>j(d)).filter(Zi),o=this._attributes[ke];delete this._attributes[zi],i.forEach(d=>{delete d.data[zi]});const c={contexts:{trace:nl(this)},spans:i.length>Ji?i.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Ji):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Fe(this)},request:r,...o&&{transaction_info:{source:o}}},a=Xi(this._events);return a&&Object.keys(a).length&&(v&&y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),c.measurements=a),c}}function Qi(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Zi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function xl(e){return e instanceof Cr&&e.isStandaloneSpan()}function Al(e){const t=F();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Nl(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return Ol(s,t,n,r)}function Ol(e,t,n,r){return Yt(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function Ll(e,t,n){if(!Oe(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:c=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):c}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=bt(s);if(i===void 0)return v&&y.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return v&&y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||v&&y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const Xa="__SENTRY_SUPPRESS_TRACING__";function Dl(e,t){const n=Qs();if(n.startSpan)return n.startSpan(e,t);const r=Qa(e),{forceTransaction:s,parentSpan:i,scope:o}=e,c=o?.clone();return In(c,()=>Fl(i)(()=>{const u=V(),d=Za(u,i),f=e.onlyIfParent&&!d?new tt:Ja({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return Ut(u,f),Nl(()=>t(f),()=>{const{status:p}=j(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:ce,message:"internal_error"})},()=>{f.end()})}))}function Zt(e){const t=Qs();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Qa(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>In(e.scope,o):s!==void 0?o=>Js(s,o):o=>o())(()=>{const o=V(),c=Za(o,s);return e.onlyIfParent&&!c?new tt:Ja({parentSpan:c,spanArguments:n,forceTransaction:r,scope:o})})}function Js(e,t){const n=Qs();return n.withActiveSpan?n.withActiveSpan(e,t):In(r=>(Ut(r,e||void 0),t(r)))}function Ja({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Oe()){const o=new tt;if(n||!e){const c={sampled:"false",sample_rate:"0",transaction:t.name,...Fe(o)};Zn(o,c)}return o}const s=Me();let i;if(e&&!n)i=Pl(e,r,t),qa(e,i);else if(e){const o=Fe(e),{traceId:c,spanId:a}=e.spanContext(),u=at(e);i=eo({traceId:c,parentSpanId:a,...t},r,u),Zn(i,o)}else{const{traceId:o,dsc:c,parentSpanId:a,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=eo({traceId:o,parentSpanId:a,...t},r,u),c&&Zn(i,c)}return Rl(i),$d(i,r,s),i}function Qa(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=gt(e.startTime),delete r.startTime,r}return n}function Qs(){const e=It();return Xt(e)}function eo(e,t,n){const r=F(),s=r?.getOptions()||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const c=o.parentSampled??n,a=o.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[Xa]?[!1]:Ll(s,{name:i,parentSampled:c,attributes:a,parentSampleRate:bt(u.dsc?.sample_rate)},u.sampleRand),p=new Cr({...e,attributes:{[ke]:"custom",[zs]:l!==void 0&&f?l:void 0,...a},sampled:d});return!d&&r&&(v&&y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function Pl(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[Xa]?!1:at(e),o=i?new Cr({...n,parentSpanId:r,traceId:s,sampled:i}):new tt({traceId:s});qa(e,o);const c=F();return c&&(c.emit("spanStart",o),n.endTimestamp&&c.emit("spanEnd",o)),o}function Za(e,t){if(t)return t;if(t===null)return;const n=fn(e);if(!n)return;const r=F();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?le(n):n}function Fl(e){return e!==void 0?t=>Js(e,t):t=>t()}const er={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Bl="heartbeatFailed",$l="idleTimeout",Ul="finalTimeout",Hl="externalFinish";function ec(e,t={}){const n=new Map;let r=!1,s,i=Hl,o=!t.disableAutoFinish;const c=[],{idleTimeout:a=er.idleTimeout,finalTimeout:u=er.finalTimeout,childSpanTimeout:d=er.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:f=!0}=t,p=F();if(!p||!Oe()){const g=new tt,I={sample_rate:"0",sampled:"false",...Fe(g)};return Zn(g,I),g}const h=V(),m=fe(),_=Wl(e);_.end=new Proxy(_.end,{apply(g,I,K){if(l&&l(_),I instanceof tt)return;const[E,...k]=K,B=E||ue(),z=gt(B),O=Qn(_).filter(w=>w!==_),ae=j(_);if(!O.length||!f)return M(z),Reflect.apply(g,I,[z,...k]);const X=p.getOptions().ignoreSpans,ee=O?.reduce((w,J)=>{const te=j(J);return!te.timestamp||X&&ur(te,X)?w:w?Math.max(w,te.timestamp):te.timestamp},void 0),b=ae.start_timestamp,Y=Math.min(b?b+u/1e3:1/0,Math.max(b||-1/0,Math.min(z,ee||1/0)));return M(Y),Reflect.apply(g,I,[Y,...k])}});function S(){s&&(clearTimeout(s),s=void 0)}function T(g){S(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=$l,_.end(g))},a)}function $(g){s=setTimeout(()=>{!r&&o&&(i=Bl,_.end(g))},d)}function N(g){S(),n.set(g,!0);const I=ue();$(I+d/1e3)}function W(g){if(n.has(g)&&n.delete(g),n.size===0){const I=ue();T(I+a/1e3)}}function M(g){r=!0,n.clear(),c.forEach(O=>O()),Ut(h,m);const I=j(_),{start_timestamp:K}=I;if(!K)return;I.data[pn]||_.setAttribute(pn,i);const k=I.status;(!k||k==="unknown")&&_.setStatus({code:qs}),y.log(`[Tracing] Idle span "${I.op}" finished`);const B=Qn(_).filter(O=>O!==_);let z=0;B.forEach(O=>{O.isRecording()&&(O.setStatus({code:ce,message:"cancelled"}),O.end(g),v&&y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(O,void 0,2)));const ae=j(O),{timestamp:X=0,start_timestamp:ee=0}=ae,b=ee<=g,Y=(u+a)/1e3,w=X-ee<=Y;if(v){const J=JSON.stringify(O,void 0,2);b?w||y.log("[Tracing] Discarding span since it finished after idle span final timeout",J):y.log("[Tracing] Discarding span since it happened after idle span was finished",J)}(!w||!b)&&(al(_,O),z++)}),z>0&&_.setAttribute("sentry.idle_span_discarded_spans",z)}return c.push(p.on("spanStart",g=>{if(r||g===_||j(g).timestamp||g instanceof Cr&&g.isStandaloneSpan())return;Qn(_).includes(g)&&N(g.spanContext().spanId)})),c.push(p.on("spanEnd",g=>{r||W(g.spanContext().spanId)})),c.push(p.on("idleSpanEnableAutoFinish",g=>{g===_&&(o=!0,T(),n.size&&$())})),t.disableAutoFinish||T(),setTimeout(()=>{r||(_.setStatus({code:ce,message:"deadline_exceeded"}),i=Ul,_.end())},u),_}function Wl(e){const t=Zt(e);return Ut(V(),t),v&&y.log("[Tracing] Started span is an idle span"),t}const Gr=0,to=1,no=2;function Rn(e){return new hn(t=>{t(e)})}function Zs(e){return new hn((t,n)=>{n(e)})}class hn{constructor(t){this._state=Gr,this._handlers=[],this._runExecutor(t)}then(t,n){return new hn((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 hn((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)})})}_executeHandlers(){if(this._state===Gr)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===to&&n[1](this._value),this._state===no&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Gr){if(Yt(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(to,i)},s=i=>{n(no,i)};try{t(r,s)}catch(i){s(i)}}}function zl(e,t,n,r=0){try{const s=hs(t,n,e,r);return Yt(s)?s:Rn(s)}catch(s){return Zs(s)}}function hs(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return v&&i===null&&y.log(`Event processor "${s.id||"?"}" dropped event`),Yt(i)?i.then(o=>hs(o,t,n,r+1)):hs(i,t,n,r+1)}let lt,ro,so,Ye;function jl(e){const t=D._sentryDebugIds,n=D._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ye&&r.length===ro&&s.length===so)return Ye;ro=r.length,so=s.length,Ye={},lt||(lt={});const i=(o,c)=>{for(const a of o){const u=c[a],d=lt?.[a];if(d&&Ye&&u)Ye[d[0]]=u,lt&&(lt[a]=[d[0],u]);else if(u){const l=e(a);for(let f=l.length-1;f>=0;f--){const h=l[f]?.filename;if(h&&Ye&<){Ye[h]=u,lt[a]=[h,u];break}}}}};return t&&i(r,t),n&&i(s,n),Ye}function ql(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Gl(e,t),r&&Kl(e,r),Xl(e,n),Vl(e,s),Yl(e,i)}function io(e,t){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:c,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:f,propagationContext:p,transactionName:h,span:m}=t;sn(e,"extra",n),sn(e,"tags",r),sn(e,"attributes",s),sn(e,"user",i),sn(e,"contexts",o),e.sdkProcessingMetadata=Tn(e.sdkProcessingMetadata,a,2),c&&(e.level=c),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function sn(e,t,n){e[t]=Tn(e[t],n,1)}function tc(e,t){const n=Nd().getScopeData();return e&&io(n,e.getScopeData()),t&&io(n,t.getScopeData()),n}function Gl(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:c}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),c&&e.type!=="transaction"&&(e.transaction=c)}function Vl(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Yl(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Kl(e,t){e.contexts={trace:Wa(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Fe(t),...e.sdkProcessingMetadata};const n=le(t),r=j(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Xl(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function nc(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=e,a={...t,event_id:t.event_id||n.event_id||Te(),timestamp:t.timestamp||wt()},u=n.integrations||e.integrations.map(S=>S.name);Jl(a,e),ef(a,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Ql(a,e.stackParser);const d=nf(r,n.captureContext);n.mechanism&&Bt(a,n.mechanism);const l=s?s.getEventProcessors():[],f=tc(i,d),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ql(a,f);const h=[...l,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Rn(a):zl(h,a,n)).then(S=>(S&&Zl(S),typeof o=="number"&&o>0?tf(S,o,c):S))}function Jl(e,t){const{environment:n,release:r,dist:s,maxValueLength:i}=t;e.environment=e.environment||n||Ys,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o?.url&&i&&(o.url=os(o.url,i)),i&&e.exception?.values?.forEach(c=>{c.value&&(c.value=os(c.value,i))})}function Ql(e,t){const n=jl(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function Zl(e){const t={};if(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)})}),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 ef(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function tf(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:we(s.data,t,n)}}))},...e.user&&{user:we(e.user,t,n)},...e.contexts&&{contexts:we(e.contexts,t,n)},...e.extra&&{extra:we(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=we(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:we(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=we(e.contexts.flags,3,n)),r}function nf(e,t){if(!t)return e;const n=e?e.clone():new Pe;return n.update(t),n}function rf(e){if(e)return sf(e)?{captureContext:e}:af(e)?{captureContext:e}:e}function sf(e){return e instanceof Pe||typeof e=="function"}const of=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function af(e){return Object.keys(e).some(t=>of.includes(t))}function rc(e,t){return V().captureException(e,rf(t))}function sc(e,t){return V().captureEvent(e,t)}function cf(e,t){Me().setContext(e,t)}function uf(){const e=F();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function df(e){Me().addEventProcessor(e)}function oo(e){const t=Me(),n=V(),{userAgent:r}=D.navigator||{},s=vd({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&$t(i,{status:"exited"}),ic(),t.setSession(s),s}function ic(){const e=Me(),n=V().getSession()||e.getSession();n&&Td(n),oc(),e.setSession()}function oc(){const e=Me(),t=F(),n=e.getSession();n&&t&&t.captureSession(n)}function ao(e=!1){if(e){ic();return}oc()}const lf="7";function ff(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function pf(e){return`${ff(e)}${e.projectId}/envelope/`}function hf(e,t){const n={sentry_version:lf};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function mf(e,t,n){return t||`${pf(e)}?${hf(e,n)}`}const co=[];function gf(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 _f(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return gf(r)}function yf(e,t){const n={};return t.forEach(r=>{r&&ac(e,r,n)}),n}function uo(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ac(e,t,n){if(n[t.name]){v&&y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!co.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),co.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)}v&&y.log(`Integration installed: ${t.name}`)}function Sf(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Ef(e,t){const{value:n,unit:r}=Sf(e)?e:{value:e,unit:void 0},s=bf(n),i=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...i};if(!t||t==="skip-undefined"&&n===void 0)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...i}}function lo(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const i=Ef(s,t);i&&(n[r]=i)}return n}function bf(e){const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function vf(e,t){return t?In(t,()=>{const n=fe(),r=n?Wa(n):Aa(t);return[n?Fe(n):Ks(e,t),r]}):[void 0,void 0]}const Tf={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function If(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function wf(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Qt(r)),ct(s,[If(e)])}const kf=100;function Le(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Rf(e,t){const n=ti(),r=cc(e);r===void 0?n.set(e,[t]):r.length>=kf?(ei(e,r),n.set(e,[t])):n.set(e,[...r,t])}function fo(e,t=V(),n=Rf){const r=t?.getClient()??F();if(!r){v&&y.warn("No client available to capture log.");return}const{release:s,environment:i,enableLogs:o=!1,beforeSendLog:c}=r.getOptions();if(!o){v&&y.warn("logging option not enabled, log will not be captured.");return}const[,a]=vf(r,t),u={...e.attributes},{user:{id:d,email:l,username:f},attributes:p={}}=tc(Me(),t);Le(u,"user.id",d,!1),Le(u,"user.email",l,!1),Le(u,"user.name",f,!1),Le(u,"sentry.release",s),Le(u,"sentry.environment",i);const{name:h,version:m}=r.getSdkMetadata()?.sdk??{};Le(u,"sentry.sdk.name",h),Le(u,"sentry.sdk.version",m);const _=r.getIntegrationByName("Replay"),S=_?.getReplayId(!0);Le(u,"sentry.replay_id",S),S&&_?.getRecordingMode()==="buffer"&&Le(u,"sentry._internal.replay_is_buffering",!0);const T=e.message;if(kr(T)){const{__sentry_template_string__:k,__sentry_template_values__:B=[]}=T;B?.length&&(u["sentry.message.template"]=k),B.forEach((z,O)=>{u[`sentry.message.parameter.${O}`]=z})}const $=fn(t);Le(u,"sentry.trace.parent_span_id",$?.spanContext().spanId);const N={...e,attributes:u};r.emit("beforeCaptureLog",N);const W=c?st(()=>c(N)):N;if(!W){r.recordDroppedEvent("before_send","log_item",1),v&&y.warn("beforeSendLog returned null, log will not be captured.");return}const{level:M,message:g,attributes:I={},severityNumber:K}=W,E={timestamp:ue(),level:M,body:g,trace_id:a?.trace_id,severity_number:K??Tf[M],attributes:{...lo(p),...lo(I,!0)}};n(r,E),r.emit("afterCaptureLog",W)}function ei(e,t){const n=t??cc(e)??[];if(n.length===0)return;const r=e.getOptions(),s=wf(n,r._metadata,r.tunnel,e.getDsn());ti().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function cc(e){return ti().get(e)}function ti(){return Gt("clientToLogBufferMap",()=>new WeakMap)}function Cf(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function Mf(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Qt(r)),ct(s,[Cf(e)])}function uc(e,t){const n=t??xf(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Mf(n,r._metadata,r.tunnel,e.getDsn());dc().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function xf(e){return dc().get(e)}function dc(){return Gt("clientToMetricBufferMap",()=>new WeakMap)}function lc(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const ni=Symbol.for("SentryBufferFullError");function ri(e=100){const t=new Set;function n(){return t.size<e}function r(o){t.delete(o)}function s(o){if(!n())return Zs(ni);const c=o();return t.add(c),c.then(()=>r(c),()=>r(c)),c}function i(o){if(!t.size)return Rn(!0);const c=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return c;const a=[c,new Promise(u=>lc(setTimeout(()=>u(!1),o)))];return Promise.race(a)}return{get $(){return Array.from(t)},add:s,drain:i}}const Af=60*1e3;function Nf(e,t=vn()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Af:r-t}function Of(e,t){return e[t]||e.all||0}function fc(e,t,n=vn()){return Of(e,t)>n}function pc(e,{statusCode:t,headers:n},r=vn()){const s={...e},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const c of i.trim().split(",")){const[a,u,,,d]=c.split(":",5),l=parseInt(a,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Nf(o,r):t===429&&(s.all=r+60*1e3);return s}const hc=64;function Lf(e,t,n=ri(e.bufferSize||hc)){let r={};const s=o=>n.drain(o);function i(o){const c=[];if(fs(o,(l,f)=>{const p=Ki(f);fc(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):c.push(l)}),c.length===0)return Promise.resolve({});const a=ct(o[0],c),u=l=>{if(_l(a,["client_report"])){v&&y.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}fs(a,(f,p)=>{e.recordDroppedEvent(l,Ki(p))})},d=()=>t({body:yl(a)}).then(l=>l.statusCode===413?(v&&y.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(v&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&y.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=pc(r,l),l),l=>{throw u("network_error"),v&&y.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===ni)return v&&y.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:i,flush:s}}function Df(e,t,n){const r=[{type:"client_report"},{timestamp:wt(),discarded_events:e}];return ct(t?{dsn:t}:{},[r])}function mc(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Pf(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:c}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o?.[js],exclusive_time:o?.[Jt],measurements:e.measurements,is_segment:!0}}function Ff(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[js]:e.profile_id},...e.exclusive_time&&{[Jt]:e.exclusive_time}}}},measurements:e.measurements}}const po="Not capturing exception because it's already been captured.",ho="Discarded session because of missing or non-string release",gc=Symbol.for("SentryInternalError"),_c=Symbol.for("SentryDoNotSendEventError"),Bf=5e3;function tr(e){return{message:e,[gc]:!0}}function Vr(e){return{message:e,[_c]:!0}}function mo(e){return!!e&&typeof e=="object"&&gc in e}function go(e){return!!e&&typeof e=="object"&&_c in e}function _o(e,t,n,r,s){let i=0,o,c=!1;e.on(n,()=>{i=0,clearTimeout(o),c=!1}),e.on(t,a=>{i+=r(a),i>=8e5?s(e):c||(c=!0,o=lc(setTimeout(()=>{s(e)},Bf)))}),e.on("flush",()=>{s(e)})}class $f{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ri(t.transportOptions?.bufferSize??hc),t.dsn?this._dsn=Qd(t.dsn):v&&y.warn("No DSN provided, client will not send events."),this._dsn){const r=mf(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:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&_o(this,"afterCaptureLog","flushLogs",zf,ei),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&_o(this,"afterCaptureMetric","flushMetrics",Wf,uc)}captureException(t,n,r){const s=Te();if(Ui(t))return v&&y.log(po),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:Te(),...r},o=kr(t)?t:String(t),c=Et(t),a=c?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(()=>a.then(u=>this._captureEvent(u,i,s)),c?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=Te();if(n?.originalException&&Ui(n.originalException))return v&&y.log(po),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},c=o.capturedSpanScope,a=o.capturedSpanIsolationScope,u=yo(t.type);return this._process(()=>this._captureEvent(t,i,c||r,a),u),i.event_id}captureSession(t){this.sendSession(t),$t(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];ac(this,t,this._integrations),n||uo(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=wl(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=gl(r,bl(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Ys}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){v&&y.warn(ho);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){v&&y.warn(ho);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=Il(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;v&&y.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return v&&y.error("Error while sending envelope:",n),{}}return v&&y.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=yf(this,t),uo(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0,r=!1;for(const a of i)if(a.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&($t(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),nc(i,t,n,r,this,s).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:Aa(r),...c.contexts};const a=Ks(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(t,n={},r=V(),s=Me()){return v&&ms(t)&&y.log(`Captured error event \`${mc(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{v&&(go(i)?y.log(i.message):mo(i)?y.warn(i.message):y.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,c=yc(t),a=ms(t),d=`before send for type \`${t.type||"error"}\``,l=typeof o>"u"?void 0:bt(o);if(a&&typeof l=="number"&&Je()>l)return this.recordDroppedEvent("sample_rate","error"),Zs(Vr(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=yo(t.type);return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Vr("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=Hf(this,i,p,n);return Uf(m,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),c){const S=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw Vr(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(a&&h&&this._updateSessionFromEvent(h,p),c){const _=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,S=p.spans?p.spans.length:0,T=_-S;T>0&&this.recordDroppedEvent("before_send","span",T)}const m=p.transaction_info;if(c&&m&&p.transaction!==t.transaction){const _="custom";p.transaction_info={...m,source:_}}return this.sendEvent(p,n),p}).then(null,p=>{throw go(p)||mo(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),tr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ni&&this.recordDroppedEvent("queue_overflow",n),r))}_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(){v&&y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){v&&y.log("No outcomes to send");return}if(!this._dsn){v&&y.log("No dsn provided, will not send outcomes");return}v&&y.log("Sending outcomes:",t);const n=Df(t,this._options.tunnel&&Qt(this._dsn));this.sendEnvelope(n)}}function yo(e){return e==="replay_event"?"replay":e||"error"}function Uf(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Yt(e))return e.then(r=>{if(!ln(r)&&r!==null)throw tr(n);return r},r=>{throw tr(`${t} rejected with ${r}`)});if(!ln(e)&&e!==null)throw tr(n);return e}function Hf(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o,ignoreSpans:c}=t;let a=n;if(ms(a)&&s)return s(a,r);if(yc(a)){if(o||c){const u=Pf(a);if(c?.length&&ur(u,c))return null;if(o){const d=o(u);d?a=Tn(n,Ff(d)):ds()}if(a.spans){const d=[],l=a.spans;for(const p of l){if(c?.length&&ur(p,c)){ul(l,p);continue}if(o){const h=o(p);h?d.push(h):(ds(),d.push(p))}else d.push(p)}const f=a.spans.length-d.length;f&&e.recordDroppedEvent("before_send","span",f),a.spans=d}}if(i){if(a.spans){const u=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(a,r)}}return a}function ms(e){return e.type===void 0}function yc(e){return e.type==="transaction"}function Wf(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Sc(e.attributes)}function zf(e){let t=0;return e.message&&(t+=e.message.length*2),t+Sc(e.attributes)}function Sc(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*So(n[0]):Et(n)?t+=So(n):t+=100}),t}function So(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function jf(e){return wr(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function Eo(e){return jf(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function qf(e,t){t.debug===!0&&(v?y.enable():st(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),V().update(t.initialScope);const r=new e(t);return Gf(r),r.init(),r}function Gf(e){V().setClient(e)}const Vf="thismessage:/";function si(e){return"isRelative"in e}function ii(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Vf:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function Yf(e){if(si(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function yt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Kf(e){return e.split(/[?#]/,1)[0]}function Qe(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),i=e.indexOf(",");let o="";if(t&&i!==-1){const c=e.slice(i+1);o=c.length>10?`${c.slice(0,10)}... [truncated]`:c}return`data:${r}${s?",base64":""}${o?`,${o}`:""}`}return e}function Xf(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Qf(e,n)||Jf(e,r)}function Jf(e,t){return t?bo(e)===bo(t):!1}function Qf(e,t){const n=ii(e);return!n||si(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function bo(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Zf(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Ec(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:mt})),s.version=mt)}function bc(e={}){const t=e.client||F();if(!uf()||!t)return{};const n=It(),r=Xt(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||V(),i=e.span||fe(),o=i?rl(i):ep(s),c=i?Fe(i):Ks(t,s),a=Wd(c);if(!Ba.test(o))return y.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":o,baggage:a};return e.propagateTraceparent&&(d.traceparent=i?sl(i):tp(s)),d}function ep(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return $a(t,r,n)}function tp(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ua(t,r,n)}function np(e,t,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,t):0,c=n?.setTimeoutImpl||setTimeout;function a(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function d(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=c(a,t),o&&i===void 0&&(i=c(a,o)),r}return l.cancel=u,l.flush=d,l}const rp=100;function nt(e,t){const n=F(),r=Me();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=rp}=n.getOptions();if(i<=0)return;const c={timestamp:wt(),...e},a=s?st(()=>s(c,t)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,i))}let vo;const sp="FunctionToString",To=new WeakMap,ip=()=>({name:sp,setupOnce(){vo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ws(this),n=To.has(F())&&t!==void 0?t:this;return vo.apply(n,e)}}catch{}},setup(e){To.set(e,!0)}}),op=ip,ap=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],cp="EventFilters",up=(e={})=>{let t;return{name:cp,setup(n){const r=n.getOptions();t=Io(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=Io(e,i)}return lp(n,t)?null:n}}},dp=(e={})=>({...up(e),name:"InboundFilters"});function Io(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ap],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function lp(e,t){if(e.type){if(e.type==="transaction"&&pp(e,t.ignoreTransactions))return v&&y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${ft(e)}`),!0}else{if(fp(e,t.ignoreErrors))return v&&y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${ft(e)}`),!0;if(_p(e))return v&&y.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${ft(e)}`),!0;if(hp(e,t.denyUrls))return v&&y.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${ft(e)}.
Url: ${dr(e)}`),!0;if(!mp(e,t.allowUrls))return v&&y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${ft(e)}.
Url: ${dr(e)}`),!0}return!1}function fp(e,t){return t?.length?mc(e).some(n=>He(n,t)):!1}function pp(e,t){if(!t?.length)return!1;const n=e.transaction;return n?He(n,t):!1}function hp(e,t){if(!t?.length)return!1;const n=dr(e);return n?He(n,t):!1}function mp(e,t){if(!t?.length)return!0;const n=dr(e);return n?He(n,t):!0}function gp(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 dr(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?gp(n):null}catch{return v&&y.error(`Cannot extract url for event ${ft(e)}`),null}}function _p(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function yp(e,t,n,r,s,i){if(!s.exception?.values||!i||!qe(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=gs(e,t,r,i.originalException,n,s.exception.values,o,0))}function gs(e,t,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(qe(r[s],Error)){wo(o,c,r);const u=e(t,r[s]),d=a.length;ko(u,s,d,c),a=gs(e,t,n,r[s],s,[u,...a],u,d)}return vc(r)&&r.errors.forEach((u,d)=>{if(qe(u,Error)){wo(o,c,r);const l=e(t,u),f=a.length;ko(l,`errors[${d}]`,f,c),a=gs(e,t,n,u,s,[l,...a],l,f)}}),a}function vc(e){return Array.isArray(e.errors)}function wo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...vc(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ko(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Tc(e){const t="console";it(t,e),ot(t,Sp)}function Sp(){"console"in D&&ga.forEach(function(e){e in D.console&&_e(D.console,e,function(t){return ar[e]=t,function(...n){Re("console",{args:n,level:e}),ar[e]?.apply(D.console,n)}})})}function Ic(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Ep="Dedupe",bp=()=>{let e;return{name:Ep,processEvent(t){if(t.type)return t;try{if(Tp(t,e))return v&&y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},vp=bp;function Tp(e,t){return t?!!(Ip(e,t)||wp(e,t)):!1}function Ip(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!kc(e,t)||!wc(e,t))}function wp(e,t){const n=Ro(t),r=Ro(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!kc(e,t)||!wc(e,t))}function wc(e,t){let n=Li(e),r=Li(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 kc(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 Ro(e){return e.exception?.values?.[0]}const kp="ConversationId",Rp=()=>({name:kp,setup(e){e.on("spanStart",t=>{const n=V().getScopeData(),r=Me().getScopeData(),s=n.conversationId||r.conversationId;s&&t.setAttribute(Ld,s)})}}),Cp=Rp;function Mp(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,c=Oe()&&t(o);if(e.endTimestamp&&c){const p=e.fetchData.__span;if(!p)return;const h=r[p];h&&(Np(h,e),xp(h,e,s),delete r[p]);return}const{spanOrigin:a="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},d=!!fe(),l=c&&d?Zt(Lp(o,i,a)):new tt;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){const p=e.args[0],h={...e.args[1]||{}},m=Ap(p,h,Oe()&&d?l:void 0,u);m&&(e.args[1]=h,h.headers=m)}const f=F();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",l,p)}return l}function xp(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Ap(e,t,n,r){const s=bc({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,c=s.traceparent;if(!i)return;const a=t.headers||(Us(e)?e.headers:void 0);if(a)if(Op(a)){const u=new Headers(a);if(u.get("sentry-trace")||u.set("sentry-trace",i),r&&c&&!u.get("traceparent")&&u.set("traceparent",c),o){const d=u.get("baggage");d?Un(d)||u.set("baggage",`${d},${o}`):u.set("baggage",o)}return u}else if(Array.isArray(a)){const u=[...a];a.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&c&&!a.find(l=>l[0]==="traceparent")&&u.push(["traceparent",c]);const d=a.find(l=>l[0]==="baggage"&&Un(l[1]));return o&&!d&&u.push(["baggage",o]),u}else{const u="sentry-trace"in a?a["sentry-trace"]:void 0,d="traceparent"in a?a.traceparent:void 0,l="baggage"in a?a.baggage:void 0,f=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>Un(m)):Un(l));o&&!p&&f.push(o);const h={...a,"sentry-trace":u??i,baggage:f.length>0?f.join(","):void 0};return r&&c&&!d&&(h.traceparent=c),h}else return{...s}}function Np(e,t){if(t.response){Oa(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:ce,message:"internal_error"});e.end()}function Un(e){return e.split(",").some(t=>t.trim().startsWith(Gs))}function Op(e){return typeof Headers<"u"&&qe(e,Headers)}function Lp(e,t,n){if(e.startsWith("data:")){const i=Qe(e);return{name:`${t} ${i}`,attributes:Co(e,void 0,t,n)}}const r=ii(e),s=r?Yf(r):e;return{name:`${t} ${s}`,attributes:Co(e,r,t,n)}}function Co(e,t,n,r){const s={url:Qe(e),type:"fetch","http.method":n,[ie]:r,[Ve]:"http.client"};return t&&(si(t)||(s["http.url"]=Qe(t.href),s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function Mo(e,t,n){return"util"in D&&typeof D.util.format=="function"?D.util.format(...e):Dp(e,t,n)}function Dp(e,t,n){return e.map(r=>Et(r)?String(r):JSON.stringify(we(r,t,n))).join(" ")}function Pp(e){return/%[sdifocO]/.test(e)}function Fp(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((s,i)=>{n[`sentry.message.parameter.${i}`]=s}),n}const Bp="ConsoleLogs",xo={[ie]:"auto.log.console"},$p=(e={})=>{const t=e.levels||ga;return{name:Bp,setup(n){const{enableLogs:r,normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=n.getOptions();if(!r){v&&y.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Tc(({args:o,level:c})=>{if(F()!==n||!t.includes(c))return;const a=o[0],u=o.slice(1);if(c==="assert"){if(!a){const p=u.length>0?`Assertion failed: ${Mo(u,s,i)}`:"Assertion failed";fo({level:"error",message:p,attributes:xo})}return}const d=c==="log",l=o.length>1&&typeof o[0]=="string"&&!Pp(o[0]),f={...xo,...l?Fp(a,u):{}};fo({level:d?"info":c,message:Mo(o,s,i),severityNumber:d?10:void 0,attributes:f})})}}},Up=$p;function Rc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const mn=D;function Hp(){return"history"in mn&&!!mn.history}function Wp(){if(!("fetch"in mn))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function _s(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function zp(){if(typeof EdgeRuntime=="string")return!0;if(!Wp())return!1;if(_s(mn.fetch))return!0;let e=!1;const t=mn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=_s(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){v&&y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Cc(e,t){const n="fetch";it(n,e),ot(n,()=>Mc(void 0,t))}function jp(e){const t="fetch-body-resolved";it(t,e),ot(t,()=>Mc(Gp))}function Mc(e,t=!1){t&&!zp()||_e(D,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=Vp(r),c={args:r,fetchData:{method:i,url:o},startTimestamp:ue()*1e3,virtualError:s,headers:Yp(r)};return e||Re("fetch",{...c}),n.apply(D,r).then(async a=>(e?e(a):Re("fetch",{...c,endTimestamp:ue()*1e3,response:a}),a),a=>{Re("fetch",{...c,endTimestamp:ue()*1e3,error:a}),wr(a)&&a.stack===void 0&&(a.stack=s.stack,Se(a,"framesToPop",1));const d=F()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&a instanceof TypeError&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(c.fetchData.url).host;d==="always"?a.message=`${a.message} (${p})`:Se(a,"__sentry_fetch_url_host__",p)}catch{}throw a})}})}async function qp(e,t){if(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:c}=await r.read();clearTimeout(o),c&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Gp(e){let t;try{t=e.clone()}catch{return}qp(t,()=>{Re("fetch-body-resolved",{endTimestamp:ue()*1e3,response:e})})}function nr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ao(e){return typeof e=="string"?e:e?nr(e,"url")?e.url:e.toString?e.toString():"":""}function Vp(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Ao(n),method:nr(r,"method")?String(r.method).toUpperCase():Us(n)&&nr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ao(t),method:nr(t,"method")?String(t.method).toUpperCase():"GET"}}function Yp(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Us(t))return new Headers(t.headers)}catch{}}function Kp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Xp(){return"npm"}function Jp(){return!Kp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ys(){return typeof window<"u"&&(!Jp()||Qp())}function Qp(){return D.process?.type==="renderer"}const P=D;let Ss=0;function xc(){return Ss>0}function Zp(){Ss++,setTimeout(()=>{Ss--})}function Wt(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Ws(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>Wt(o,t));return e.apply(this,i)}catch(i){throw Zp(),In(o=>{o.addEventProcessor(c=>(t.mechanism&&(as(c,void 0),Bt(c,t.mechanism)),c.extra={...c.extra,arguments:s},c)),rc(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Ra(r,e),Se(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function oi(){const e=Kt(),{referrer:t}=P.document||{},{userAgent:n}=P.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function ai(e,t){const n=ci(e,t),r={type:sh(t),value:ih(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function eh(e,t,n,r){const i=F()?.getOptions().normalizeDepth,o=dh(t),c={__serialized__:Ya(t,i)};if(o)return{exception:{values:[ai(e,o)]},extra:c};const a={exception:{values:[{type:Rr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:ch(t,{isUnhandledRejection:r})}]},extra:c};if(n){const u=ci(e,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function Yr(e,t){return{exception:{values:[ai(e,t)]}}}function ci(e,t){const n=t.stacktrace||t.stack||"",r=nh(t),s=rh(t);try{return e(n,r,s)}catch{}return[]}const th=/Minified React error #\d+;/i;function nh(e){return e&&th.test(e.message)?1:0}function rh(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ac(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function sh(e){const t=e?.name;return!t&&Ac(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ih(e){const t=e?.message;return Ac(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?Eo(t.error):Eo(e):"No error message"}function oh(e,t,n,r){const s=n?.syntheticException||void 0,i=ui(e,t,s,r);return Bt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),Rn(i)}function ah(e,t,n="info",r,s){const i=r?.syntheticException||void 0,o=Es(e,t,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),Rn(o)}function ui(e,t,n,r,s){let i;if(Ia(t)&&t.error)return Yr(e,t.error);if(Pi(t)||dd(t)){const o=t;if("stack"in t)i=Yr(e,t);else{const c=o.name||(Pi(o)?"DOMError":"DOMException"),a=o.message?`${c}: ${o.message}`:c;i=Es(e,a,n,r),as(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return wr(t)?Yr(e,t):ln(t)||Rr(t)?(i=eh(e,t,n,s),Bt(i,{synthetic:!0}),i):(i=Es(e,t,n,r),as(i,`${t}`),Bt(i,{synthetic:!0}),i)}function Es(e,t,n,r){const s={};if(r&&n){const i=ci(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Bt(s,{synthetic:!0})}if(kr(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 ch(e,{isUnhandledRejection:t}){const n=gd(e),r=t?"promise rejection":"exception";return Ia(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Rr(e)?`Event \`${uh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function uh(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function dh(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class lh extends $f{constructor(t){const n=fh(t),r=P.SENTRY_SDK_SOURCE||Xp();Ec(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:c,enableMetrics:a}=this._options,u=a??c?.enableMetrics??!0;P.document&&(i||o||u)&&P.document.addEventListener("visibilitychange",()=>{P.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&ei(this),u&&uc(this))}),s&&this.on("beforeSendSession",Zf)}eventFromException(t,n){return oh(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return ah(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function fh(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:P.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const vt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,A=D,ph=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Cn=(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=ph(t.value,n),e(t)))}},Mn=(e=!0)=>{const t=A.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},en=()=>Mn()?.activationStart??0;function Ze(e,t,n){A.document&&A.addEventListener(e,t,n)}function lr(e,t,n){A.document&&A.removeEventListener(e,t,n)}let Ft=-1;const Nc=new Set,hh=()=>A.document?.visibilityState==="hidden"&&!A.document?.prerendering?0:1/0,rr=e=>{if(mh(e)&&Ft>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of Nc)t();isFinite(Ft)||(Ft=e.type==="visibilitychange"?e.timeStamp:0,lr("prerenderingchange",rr,!0))}},xn=()=>{if(A.document&&Ft<0){const e=en();Ft=(A.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??hh(),Ze("visibilitychange",rr,!0),Ze("pagehide",rr,!0),Ze("prerenderingchange",rr,!0)}return{get firstHiddenTime(){return Ft},onHidden(e){Nc.add(e)}}};function mh(e){return e.type==="pagehide"||A.document?.visibilityState==="hidden"}const gh=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,An=(e,t=-1)=>{const n=Mn();let r="navigate";return n&&(A.document?.prerendering||en()>0?r="prerender":A.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:gh(),navigationType:r}},Kr=new WeakMap;function di(e,t){try{return Kr.get(e)||Kr.set(e,new t),Kr.get(e)}catch{return new t}}class fr{constructor(){fr.prototype.__init.call(this),fr.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const tn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},li=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Mr=e=>{A.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},_h=[1800,3e3],yh=(e,t={})=>{Mr(()=>{const n=xn(),r=An("FCP");let s;const o=tn("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-en(),0),r.entries.push(a),s(!0)))});o&&(s=Cn(e,r,_h,t.reportAllChanges))})},Sh=[.1,.25],Eh=(e,t={})=>{yh(li(()=>{const n=An("CLS",0);let r;const s=xn(),i=di(t,fr),o=a=>{for(const u of a)i._processEntry(u);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},c=tn("layout-shift",o);c&&(r=Cn(e,n,Sh,t.reportAllChanges),s.onHidden(()=>{o(c.takeRecords()),r(!0)}),A?.setTimeout?.(r))}))};let Oc=0,Xr=1/0,Hn=0;const bh=e=>{e.forEach(t=>{t.interactionId&&(Xr=Math.min(Xr,t.interactionId),Hn=Math.max(Hn,t.interactionId),Oc=Hn?(Hn-Xr)/7+1:0)})};let bs;const Lc=()=>bs?Oc:performance.interactionCount||0,vh=()=>{"interactionCount"in performance||bs||(bs=tn("event",bh,{type:"event",buffered:!0,durationThreshold:0}))},Jr=10;let Dc=0;const Th=()=>Lc()-Dc;class pr{constructor(){pr.prototype.__init.call(this),pr.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Dc=Lc(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(Th()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Jr||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,i)=>i._latency-s._latency),this._longestInteractionList.length>Jr){const s=this._longestInteractionList.splice(Jr);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Pc=e=>{const t=A.requestIdleCallback||A.setTimeout;A.document?.visibilityState==="hidden"?e():(e=li(e),Ze("visibilitychange",e,{once:!0,capture:!0}),Ze("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),lr("visibilitychange",e,{capture:!0}),lr("pagehide",e,{capture:!0})}))},Ih=[200,500],wh=40,kh=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=xn();Mr(()=>{vh();const r=An("INP");let s;const i=di(t,pr),o=a=>{Pc(()=>{for(const d of a)i._processEntry(d);const u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},c=tn("event",o,{durationThreshold:t.durationThreshold??wh});s=Cn(e,r,Ih,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(c.takeRecords()),s(!0)}))})};class Rh{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const Ch=[2500,4e3],Mh=(e,t={})=>{Mr(()=>{const n=xn(),r=An("LCP");let s;const i=di(t,Rh),o=a=>{t.reportAllChanges||(a=a.slice(-1));for(const u of a)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-en(),0),r.entries=[u],s())},c=tn("largest-contentful-paint",o);if(c){s=Cn(e,r,Ch,t.reportAllChanges);const a=li(()=>{o(c.takeRecords()),c.disconnect(),s(!0)}),u=d=>{d.isTrusted&&(Pc(a),lr(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])Ze(d,u,{capture:!0})}})},xh=[800,1800],vs=e=>{A.document?.prerendering?Mr(()=>vs(e)):A.document?.readyState!=="complete"?addEventListener("load",()=>vs(e),!0):setTimeout(e)},Ah=(e,t={})=>{const n=An("TTFB"),r=Cn(e,n,xh,t.reportAllChanges);vs(()=>{const s=Mn();s&&(n.value=Math.max(s.responseStart-en(),0),n.entries=[s],r(!0))})},an={},hr={};let Fc,Bc,$c,Uc;function fi(e,t=!1){return xr("cls",e,Oh,Fc,t)}function pi(e,t=!1){return xr("lcp",e,Lh,Bc,t)}function Nh(e){return xr("ttfb",e,Dh,$c)}function Hc(e){return xr("inp",e,Ph,Uc)}function Tt(e,t){return Wc(e,t),hr[e]||(Fh(e),hr[e]=!0),zc(e,t)}function Nn(e,t){const n=an[e];if(n?.length)for(const r of n)try{r(t)}catch(s){vt&&y.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${je(r)}
Error:`,s)}}function Oh(){return Eh(e=>{Nn("cls",{metric:e}),Fc=e},{reportAllChanges:!0})}function Lh(){return Mh(e=>{Nn("lcp",{metric:e}),Bc=e},{reportAllChanges:!0})}function Dh(){return Ah(e=>{Nn("ttfb",{metric:e}),$c=e})}function Ph(){return kh(e=>{Nn("inp",{metric:e}),Uc=e})}function xr(e,t,n,r,s=!1){Wc(e,t);let i;return hr[e]||(i=n(),hr[e]=!0),r&&t({metric:r}),zc(e,t,s?i:void 0)}function Fh(e){const t={};e==="event"&&(t.durationThreshold=0),tn(e,n=>{Nn(e,{entries:n})},t)}function Wc(e,t){an[e]=an[e]||[],an[e].push(t)}function zc(e,t,n){return()=>{n&&n();const r=an[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Bh(e){return"duration"in e}const $h=e=>{const t=n=>{(n.type==="pagehide"||A.document?.visibilityState==="hidden")&&e(n)};Ze("visibilitychange",t,{capture:!0,once:!0}),Ze("pagehide",t,{capture:!0,once:!0})};function Qr(e){return typeof e=="number"&&isFinite(e)}function rt(e,t,n,{...r}){const s=j(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Js(e,()=>{const i=Zt({startTime:t,...r});return i&&i.end(n),i})}function hi(e){const t=F();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:c,sendDefaultPii:a}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=V(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:c,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":A.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...s};return Zt({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function On(){return A.addEventListener&&A.performance}function se(e){return e/1e3}function Uh(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 jc(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function qc(e,t){let n,r=!1;function s(c){!r&&n&&t(c,n),r=!0}$h(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(c,a)=>{a?.isRedirect||(s("navigation"),i(),o())}),o=e.on("afterStartPageLoadSpan",c=>{n=c.spanContext().spanId,o()})}function Hh(e){let t=0,n;if(!jc("layout-shift"))return;const r=fi(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);qc(e,(s,i)=>{Wh(t,n,i,s),r()})}function Wh(e,t,n,r){vt&&y.log(`Sending CLS span (${e})`);const s=t?se((me()||0)+t.startTime):ue(),i=V().getScopeData().transactionName,o=t?ye(t.sources[0]?.node):"Layout shift",c={[ie]:"auto.http.browser.cls",[Ve]:"ui.webvital.cls",[Jt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{c[`cls.source.${d+1}`]=ye(u.node)});const a=hi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("cls",{[wn]:"",[kn]:e}),a.end(s))}function zh(e){let t=0,n;if(!jc("largest-contentful-paint"))return;const r=pi(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);qc(e,(s,i)=>{jh(t,n,i,s),r()})}function jh(e,t,n,r){vt&&y.log(`Sending LCP span (${e})`);const s=se((me()||0)+(t?.startTime||0)),i=V().getScopeData().transactionName,o=t?ye(t.element):"Largest contentful paint",c={[ie]:"auto.http.browser.lcp",[Ve]:"ui.webvital.lcp",[Jt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(c["lcp.element"]=ye(t.element)),t.id&&(c["lcp.id"]=t.id),t.url&&(c["lcp.url"]=t.url),t.loadTime!=null&&(c["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(c["lcp.renderTime"]=t.renderTime),t.size!=null&&(c["lcp.size"]=t.size));const a=hi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[wn]:"millisecond",[kn]:e}),a.end(s))}function Ie(e){return e&&((me()||performance.timeOrigin)+e)/1e3}function Gc(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=Uh(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return me()||On()?.timeOrigin?qh({...t,"http.request.redirect_start":Ie(e.redirectStart),"http.request.redirect_end":Ie(e.redirectEnd),"http.request.worker_start":Ie(e.workerStart),"http.request.fetch_start":Ie(e.fetchStart),"http.request.domain_lookup_start":Ie(e.domainLookupStart),"http.request.domain_lookup_end":Ie(e.domainLookupEnd),"http.request.connect_start":Ie(e.connectStart),"http.request.secure_connection_start":Ie(e.secureConnectionStart),"http.request.connection_end":Ie(e.connectEnd),"http.request.request_start":Ie(e.requestStart),"http.request.response_start":Ie(e.responseStart),"http.request.response_end":Ie(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function qh(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Gh=2147483647;let No=0,Ne={},ge,mr;function Vh({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=On();if(r&&me()){r.mark&&A.performance.mark("sentry-tracing-init");const s=t?zh(n):Qh(),i=Zh(),o=e?Hh(n):Jh();return()=>{s?.(),i(),o?.()}}return()=>{}}function Yh(){Tt("longtask",({entries:e})=>{const t=fe();if(!t)return;const{op:n,start_timestamp:r}=j(t);for(const s of e){const i=se(me()+s.startTime),o=se(s.duration);n==="navigation"&&r&&i<r||rt(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ie]:"auto.ui.browser.metrics"}})}})}function Kh(){new PerformanceObserver(t=>{const n=fe();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=se(me()+r.startTime),{start_timestamp:i,op:o}=j(n);if(o==="navigation"&&i&&s<i)continue;const c=se(r.duration),a={[ie]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;a["browser.script.invoker"]=d,a["browser.script.invoker_type"]=l,f&&(a["code.filepath"]=f),p&&(a["code.function"]=p),h!==-1&&(a["browser.script.source_char_position"]=h),rt(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function Xh(){Tt("event",({entries:e})=>{const t=fe();if(t){for(const n of e)if(n.name==="click"){const r=se(me()+n.startTime),s=se(n.duration),i={name:ye(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[ie]:"auto.ui.browser.metrics"}},o=ka(n.target);o&&(i.attributes["ui.component_name"]=o),rt(t,r,r+s,i)}}})}function Jh(){return fi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ne.cls={value:e.value,unit:""},mr=t)},!0)}function Qh(){return pi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ne.lcp={value:e.value,unit:"millisecond"},ge=t)},!0)}function Zh(){return Nh(({metric:e})=>{e.entries[e.entries.length-1]&&(Ne.ttfb={value:e.value,unit:"millisecond"})})}function em(e,t){const n=On(),r=me();if(!n?.getEntries||!r)return;const s=se(r),i=n.getEntries(),{op:o,start_timestamp:c}=j(e);i.slice(No).forEach(a=>{const u=se(a.startTime),d=se(Math.max(0,a.duration));if(!(o==="navigation"&&c&&s+u<c))switch(a.entryType){case"navigation":{sm(e,a,s);break}case"mark":case"paint":case"measure":{nm(e,a,u,d,s,t.ignorePerformanceApiSpans);const l=xn(),f=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&f&&(Ne.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&f&&(Ne.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{am(e,a,a.name,u,d,s,t.ignoreResourceSpans);break}}}),No=Math.max(i.length-1,0),cm(e),o==="pageload"&&(lm(Ne),t.recordClsOnPageloadSpan||delete Ne.cls,t.recordLcpOnPageloadSpan||delete Ne.lcp,Object.entries(Ne).forEach(([a,u])=>{Ml(a,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",en()),um(e,t)),ge=void 0,mr=void 0,Ne={}}function tm(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function nm(e,t,n,r,s,i){if(tm(t)||["mark","measure"].includes(t.entryType)&&He(t.name,i))return;const o=Mn(!1),c=se(o?o.requestStart:0),a=s+Math.max(n,c),u=s+n,d=u+r,l={[ie]:"auto.resource.browser.metrics"};a!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),rm(l,t),a<=d&&rt(e,a,d,{name:t.name,op:t.entryType,attributes:l})}function rm(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Et(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Et(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function sm(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Wn(e,t,r,n)}),Wn(e,t,"secureConnection",n,"TLS/SSL"),Wn(e,t,"fetch",n,"cache"),Wn(e,t,"domainLookup",n,"DNS"),om(e,t,n)}function Wn(e,t,n,r,s=n){const i=im(n),o=t[i],c=t[`${n}Start`];!c||!o||rt(e,r+se(c),r+se(o),{op:`browser.${s}`,name:t.name,attributes:{[ie]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function im(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function om(e,t,n){const r=n+se(t.requestStart),s=n+se(t.responseEnd),i=n+se(t.responseStart);t.responseEnd&&(rt(e,r,s,{op:"browser.request",name:t.name,attributes:{[ie]:"auto.ui.browser.metrics"}}),rt(e,i,s,{op:"browser.response",name:t.name,attributes:{[ie]:"auto.ui.browser.metrics"}}))}function am(e,t,n,r,s,i,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const c=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o?.includes(c))return;const a={[ie]:"auto.resource.browser.metrics"},u=yt(n);u.protocol&&(a["url.scheme"]=u.protocol.split(":").pop()),u.host&&(a["server.address"]=u.host),a["url.same_origin"]=n.includes(A.location.origin),dm(t,a,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const d={...a,...Gc(t)},l=i+r,f=l+s;rt(e,l,f,{name:n.replace(A.location.origin,""),op:c,attributes:d})}function cm(e){const t=A.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Qr(n.rtt)&&(Ne["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Qr(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Qr(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function um(e,t){ge&&t.recordLcpOnPageloadSpan&&(ge.element&&e.setAttribute("lcp.element",ye(ge.element)),ge.id&&e.setAttribute("lcp.id",ge.id),ge.url&&e.setAttribute("lcp.url",ge.url.trim().slice(0,200)),ge.loadTime!=null&&e.setAttribute("lcp.loadTime",ge.loadTime),ge.renderTime!=null&&e.setAttribute("lcp.renderTime",ge.renderTime),e.setAttribute("lcp.size",ge.size)),mr?.sources&&t.recordClsOnPageloadSpan&&mr.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,ye(n.node)))}function dm(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<Gh||typeof i=="string")&&(t[s]=i)})}function lm(e){const t=Mn(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function fm(){return On()&&me()?Tt("element",pm):()=>{}}const pm=({entries:e})=>{const t=fe(),n=t?le(t):void 0,r=n?j(n).description:V().getScopeData().transactionName;e.forEach(s=>{const i=s;if(!i.identifier)return;const o=i.name,c=i.renderTime,a=i.loadTime,[u,d]=a?[se(a),"load-time"]:c?[se(c),"render-time"]:[ue(),"entry-emission"],l=o==="image-paint"?se(Math.max(0,(c??0)-(a??0))):0,f={[ie]:"auto.ui.browser.elementtiming",[Ve]:"ui.elementtiming",[ke]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":c,"element.load_time":a,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":o};Dl({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},hm=1e3;let Oo,Ts,Is;function Vc(e){const t="dom";it(t,e),ot(t,mm)}function mm(){if(!A.document)return;const e=Re.bind(null,"dom"),t=Lo(e,!0);A.document.addEventListener("click",t,!1),A.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=A[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(_e(s,"addEventListener",function(i){return function(o,c,a){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const l=Lo(e);d.handler=l,i.call(this,o,l,a)}d.refCount++}catch{}return i.call(this,o,c,a)}}),_e(s,"removeEventListener",function(i){return function(o,c,a){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,c,a)}}))})}function gm(e){if(e.type!==Ts)return!1;try{if(!e.target||e.target._sentryId!==Is)return!1}catch{}return!0}function _m(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Lo(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=ym(n);if(_m(n.type,r))return;Se(n,"_sentryCaptured",!0),r&&!r._sentryId&&Se(r,"_sentryId",Te());const s=n.type==="keypress"?"input":n.type;gm(n)||(e({event:n,name:s,global:t}),Ts=n.type,Is=r?r._sentryId:void 0),clearTimeout(Oo),Oo=A.setTimeout(()=>{Is=void 0,Ts=void 0},hm)}}function ym(e){try{return e.target}catch{return null}}let zn;function Ar(e){const t="history";it(t,e),ot(t,Sm)}function Sm(){if(A.addEventListener("popstate",()=>{const t=A.location.href,n=zn;if(zn=t,n===t)return;Re("history",{from:n,to:t})}),!Hp())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=zn,i=Em(String(r));if(zn=i,s===i)return t.apply(this,n);Re("history",{from:s,to:i})}return t.apply(this,n)}}_e(A.history,"pushState",e),_e(A.history,"replaceState",e)}function Em(e){try{return new URL(e,A.location.origin).toString()}catch{return e}}const sr={};function Yc(e){const t=sr[e];if(t)return t;let n=A[e];if(_s(n))return sr[e]=n.bind(A);const r=A.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?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){vt&&y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(sr[e]=n.bind(A))}function bm(e){sr[e]=void 0}function Ln(...e){return Yc("setTimeout")(...e)}const pt="__sentry_xhr_v3__";function Kc(e){const t="xhr";it(t,e),ot(t,vm)}function vm(){if(!A.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=ue()*1e3,o=Ue(r[0])?r[0].toUpperCase():void 0,c=Tm(r[1]);if(!o||!c)return t.apply(n,r);n[pt]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[pt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:ue()*1e3,startTimestamp:i,xhr:n,virtualError:s};Re("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return a(),u.apply(d,l)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,h=d[pt];return h&&Ue(f)&&Ue(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[pt];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:ue()*1e3,xhr:n};return Re("xhr",i),t.apply(n,r)}})}function Tm(e){if(Ue(e))return e;try{return e.toString()}catch{}}const Im=Symbol.for("sentry__originalRequestBody");function Xc(e){return new URLSearchParams(e).toString()}function Jc(e,t=y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Xc(e)];if(!e)return[void 0]}catch(n){return vt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return vt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Qc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][Im];return n!==void 0?n:void 0}}function Zc(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return vt&&y.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}const Zr=[],ir=new Map,Mt=new Map,wm=60;function km(){if(On()&&me()){const t=Rm();return()=>{t()}}return()=>{}}const ws={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 Rm(){return Hc(Cm)}const Cm=({metric:e})=>{if(e.value==null)return;const t=se(e.value);if(t>wm)return;const n=e.entries.find(h=>h.duration===e.value&&ws[h.name]);if(!n)return;const{interactionId:r}=n,s=ws[n.name],i=se(me()+n.startTime),o=fe(),c=o?le(o):void 0,a=r!=null?ir.get(r):void 0,u=a?.span||c,d=u?j(u).description:V().getScopeData().transactionName,l=a?.elementName||ye(n.target),f={[ie]:"auto.http.browser.inp",[Ve]:`ui.interaction.${s}`,[Jt]:n.duration},p=hi({name:l,transaction:d,attributes:f,startTime:i});p&&(p.addEvent("inp",{[wn]:"millisecond",[kn]:e.value}),p.end(i+t))};function Mm(){const e=Object.keys(ws);ys()&&e.forEach(s=>{A.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const i=s.target;if(!i)return;const o=ye(i),c=Math.round(s.timeStamp);if(Mt.set(c,o),Mt.size>50){const a=Mt.keys().next().value;a!==void 0&&Mt.delete(a)}}function n(s){const i=Math.round(s.startTime);let o=Mt.get(i);if(!o)for(let c=-5;c<=5;c++){const a=Mt.get(i+c);if(a){o=a;break}}return o||"<unknown>"}const r=({entries:s})=>{const i=fe(),o=i&&le(i);s.forEach(c=>{if(!Bh(c))return;const a=c.interactionId;if(a==null||ir.has(a))return;const u=c.target?ye(c.target):n(c);if(Zr.length>10){const d=Zr.shift();ir.delete(d)}Zr.push(a),ir.set(a,{span:o,elementName:u})})};Tt("event",r),Tt("first-input",r)}const xm=40;function Am(e,t=Yc("fetch")){let n=0,r=0;async function s(i){const o=i.body.length;n+=o,r++;const c={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const a=await t(e.url,c);return{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}}catch(a){throw bm("fetch"),a}finally{n-=o,r--}}return Lf(e,s,ri(e.bufferSize||xm))}const Ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nm=30,Om=50;function ks(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?St:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Lm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Dm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pm=/\((\S*)(?::(\d+))(?::(\d+))\)/,Fm=/at (.+?) ?\(data:(.+?),/,Bm=e=>{const t=e.match(Fm);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Lm.exec(e);if(n){const[,s,i,o]=n;return ks(s,St,+i,+o)}const r=Dm.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const c=Pm.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,o]=eu(r[1]||St,r[2]);return ks(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},$m=[Nm,Bm],Um=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wm=e=>{const t=Um.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Hm.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]||St;return[s,r]=eu(s,r),ks(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},zm=[Om,Wm],jm=[$m,zm],qm=Sa(...jm),eu=(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]:St,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},jn=1024,Gm="Breadcrumbs",Vm=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Gm,setup(n){t.console&&Tc(Jm(n)),t.dom&&Vc(Xm(n,t.dom)),t.xhr&&Kc(Qm(n)),t.fetch&&Cc(Zm(n)),t.history&&Ar(eg(n)),t.sentry&&n.on("beforeSendEvent",Km(n))}}},Ym=Vm;function Km(e){return function(n){F()===e&&nt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ft(n)},{event:n})}}function Xm(e,t){return function(r){if(F()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>jn&&(Ce&&y.warn(`\`dom.maxStringLength\` cannot exceed ${jn}, but a value of ${c} was configured. Sentry will use ${jn} instead.`),c=jn),typeof o=="string"&&(o=[o]);try{const u=r.event,d=tg(u)?u.target:u;s=ye(d,{keyAttrs:o,maxStringLength:c}),i=ka(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};i&&(a.data={"ui.component_name":i}),nt(a,{event:r.event,name:r.name,global:r.global})}}function Jm(e){return function(n){if(F()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ic(n.level),message:$i(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${$i(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;nt(r,{input:n.args,level:n.level})}}function Qm(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[pt];if(!r||!s||!i)return;const{method:o,url:c,status_code:a,body:u}=i,d={method:o,url:c,status_code:a},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:d,type:"http",level:Rc(a)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),nt(f,l)}}function Zm(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",c,o),nt(c,o)}else{const i=n.response,o={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;const c={input:n.args,response:i,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,type:"http",level:Rc(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,c),nt(a,c)}}}function eg(e){return function(n){if(F()!==e)return;let r=n.from,s=n.to;const i=yt(P.location.href);let o=r?yt(r):void 0;const c=yt(s);o?.path||(o=i),i.protocol===c.protocol&&i.host===c.host&&(s=c.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),nt({category:"navigation",data:{from:r,to:s}})}}function tg(e){return!!e&&!!e.target}const ng=["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"],rg="BrowserApiErrors",sg=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:rg,setupOnce(){t.setTimeout&&_e(P,"setTimeout",Do),t.setInterval&&_e(P,"setInterval",Do),t.requestAnimationFrame&&_e(P,"requestAnimationFrame",og),t.XMLHttpRequest&&"XMLHttpRequest"in P&&_e(XMLHttpRequest.prototype,"send",ag);const n=t.eventTarget;n&&(Array.isArray(n)?n:ng).forEach(s=>cg(s,t))}}},ig=sg;function Do(e){return function(...t){const n=t[0];return t[0]=Wt(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${je(e)}`}}),e.apply(this,t)}}function og(e){return function(t){return e.apply(this,[Wt(t,{mechanism:{data:{handler:je(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ag(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&_e(n,s,function(i){const o={mechanism:{data:{handler:je(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=Ws(i);return c&&(o.mechanism.data.handler=je(c)),Wt(i,o)})}),e.apply(this,t)}}function cg(e,t){const r=P[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(_e(r,"addEventListener",function(s){return function(i,o,c){try{ug(o)&&(o.handleEvent=Wt(o.handleEvent,{mechanism:{data:{handler:je(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&dg(this,i,o),s.apply(this,[i,Wt(o,{mechanism:{data:{handler:je(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),c])}}),_e(r,"removeEventListener",function(s){return function(i,o,c){try{const a=o.__sentry_wrapped__;a&&s.call(this,i,a,c)}catch{}return s.call(this,i,o,c)}}))}function ug(e){return typeof e.handleEvent=="function"}function dg(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const lg=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof P.document>"u"){Ce&&y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}oo({ignoreDuration:!0}),ao(),t==="route"&&Ar(({from:n,to:r})=>{n!==void 0&&n!==r&&(oo({ignoreDuration:!0}),ao())})}}},fg="CultureContext",pg=()=>({name:fg,preprocessEvent(e){const t=mg();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}}),hg=pg;function mg(){try{const e=P.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const gg="GlobalHandlers",_g=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:gg,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Sg(n),Po("onerror")),t.onunhandledrejection&&(Eg(n),Po("onunhandledrejection"))}}},yg=_g;function Sg(e){ba(t=>{const{stackParser:n,attachStacktrace:r}=tu();if(F()!==e||xc())return;const{msg:s,url:i,line:o,column:c,error:a}=t,u=Tg(ui(n,a||s,void 0,r,!1),i,o,c);u.level="error",sc(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Eg(e){va(t=>{const{stackParser:n,attachStacktrace:r}=tu();if(F()!==e||xc())return;const s=bg(t),i=Et(s)?vg(s):ui(n,s,void 0,r,!0);i.level="error",sc(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function bg(e){if(Et(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 vg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Tg(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},c=o.stacktrace=o.stacktrace||{},a=c.frames=c.frames||[],u=r,d=n,l=Ig(t)??Kt();return a.length===0&&a.push({colno:u,filename:l,function:St,in_app:!0,lineno:d}),e}function Po(e){Ce&&y.log(`Global Handler attached: ${e}`)}function tu(){return F()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ig(e){if(!(!Ue(e)||e.length===0))return e.startsWith("data:")?`<${Qe(e,!1)}>`:e}const wg=()=>({name:"HttpContext",preprocessEvent(e){if(!P.navigator&&!P.location&&!P.document)return;const t=oi(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),kg="cause",Rg=5,Cg="LinkedErrors",Mg=(e={})=>{const t=e.limit||Rg,n=e.key||kg;return{name:Cg,preprocessEvent(r,s,i){const o=i.getOptions();yp(ai,o.stackParser,n,t,r,s)}}},xg=Mg;function Ag(){return Ng()?(Ce&&st(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function Ng(){if(typeof P.window>"u")return!1;const e=P;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Kt(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(P===P.top&&r.some(i=>n.startsWith(`${i}://`)))}function Rs(e){return[dp(),op(),Cp(),ig(),Ym(),yg(),xg(),vp(),wg(),hg(),lg()]}function Og(e={}){const t=!e.skipBrowserExtensionCheck&&Ag();let n=e.defaultIntegrations==null?Rs():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:od(e.stackParser||qm),integrations:_f({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Am};return qf(lh,r)}const Z=D,mi="sentryReplaySession",Lg="replay_event",gi="Unable to send Replay",Dg=3e5,Pg=9e5,Fg=5e3,Bg=5500,$g=6e4,Ug=5e3,Hg=3,Fo=15e4,qn=5e3,Wg=3e3,zg=300,_i=2e7,jg=4999,qg=5e4,Bo=36e5;var Gg=Object.defineProperty,Vg=(e,t,n)=>t in e?Gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$o=(e,t,n)=>Vg(e,typeof t!="symbol"?t+"":t,n),oe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(oe||{});function Yg(e){return e.nodeType===e.ELEMENT_NODE}function cn(e){return e?.host?.shadowRoot===e}function un(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Kg(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 Xg(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 gr(e){try{const t=e.rules||e.cssRules;return t?Kg(Array.from(t,nu).join("")):null}catch{return null}}function Jg(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function nu(e){let t;if(Zg(e))try{t=gr(e.styleSheet)||Xg(e)}catch{}else if(e_(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=Jg(e)),r&&(n=Qg(n)),r||s)return n}return t||e.cssText}function Qg(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Zg(e){return"styleSheet"in e}function e_(e){return"selectorText"in e}class ru{constructor(){$o(this,"idNodeMap",new Map),$o(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const 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 t_(){return new ru}function Nr({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 gn({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function zt(e){return e.toLowerCase()}function Cs(e){return e.toUpperCase()}const Uo="__rrweb_original__";function n_(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=Uo in i?i[Uo]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function yi(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?zt(t):null}function _r(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function su(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Ho={};function iu(e){const t=Ho[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 Ho[e]=r.bind(window)}function Ms(...e){return iu("setTimeout")(...e)}function ou(...e){return iu("clearTimeout")(...e)}function au(e){try{return e.contentDocument}catch{}}let r_=1;const s_=new RegExp("[^a-z0-9-_:]"),_n=-2;function Si(){return r_++}function i_(e){if(e instanceof HTMLFormElement)return"form";const t=zt(e.tagName);return s_.test(t)?"div":t}function o_(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let xt,Wo;const a_=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,c_=/^(?:[a-z+]+:)?\/\//i,u_=/^www\..*/i,d_=/^(data:)([^,]*),(.*)/i;function l_(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let s of n){if(s=s.trim(),!s)continue;const i=s.indexOf(":");if(i===-1){r.push(s);continue}const o=s.slice(0,i).trim();t.has(o)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function yr(e,t){return(e||"").replace(a_,(n,r,s,i,o,c)=>{const a=s||o||c,u=r||i||"";if(!a)return n;if(c_.test(a)||u_.test(a))return`url(${u}${a}${u})`;if(d_.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${o_(t)+a}${u})`;const d=t.split("/"),l=a.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const f_=/^[^ \t\n\r\u000c]+/,p_=/^[, \t\n\r\u000c]+/;function h_(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const c=i.exec(t.substring(n));return c?(o=c[0],n+=o.length,o):""}const s=[];for(;r(p_),!(n>=t.length);){let i=r(f_);if(i.slice(-1)===",")i=Ot(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Ot(e,i);let c=!1;for(;;){const a=t.charAt(n);if(a===""){s.push((i+o).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((i+o).trim());break}else a==="("&&(c=!0);o+=a,n+=1}}}return s.join(", ")}const zo=new WeakMap;function Ot(e,t){return!t||t.trim()===""?t:Or(e,t)}function m_(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Or(e,t){let n=zo.get(e);if(n||(n=e.createElement("a"),zo.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function cu(e,t,n,r,s,i,o){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Ot(e,r);if(n==="xlink:href"&&r[0]!=="#")return Ot(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Ot(e,r);if(n==="srcset")return h_(e,r);if(n==="style"){let c=yr(r,Or(e));return o&&o.size>0&&(c=l_(c,o)),c}else if(t==="object"&&n==="data")return Ot(e,r);return typeof i=="function"?i(n,r,s):r}function uu(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function g_(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 __(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ht(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ht(e.parentNode,t,n,r+1)}function Lt(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(__(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function jt(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 c=-1,a=-1;if(i){if(a=ht(o,Lt(r,s)),a<0)return!0;c=ht(o,Lt(t,n),a>=0?a:1/0)}else{if(c=ht(o,Lt(t,n)),c<0)return!1;a=ht(o,Lt(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function y_(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 c=Ms(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{ou(c),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Ms(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function S_(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Ms(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{ou(i),r=!0,t()})}function E_(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:_,dataURLOptions:S={},inlineImages:T,recordCanvas:$,keepIframeSrcFn:N,newlyAddedElement:W=!1,ignoreCSSAttributes:M}=t,g=b_(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:oe.Document,childNodes:[],compatMode:e.compatMode}:{type:oe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:oe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return T_(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:a,maskInputOptions:h,maskInputFn:_,dataURLOptions:S,inlineImages:T,recordCanvas:$,keepIframeSrcFn:N,newlyAddedElement:W,rootId:g,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,ignoreCSSAttributes:M});case e.TEXT_NODE:return v_(e,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:h,maskInputFn:_,rootId:g});case e.CDATA_SECTION_NODE:return{type:oe.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:oe.Comment,textContent:e.textContent||"",rootId:g};default:return!1}}function b_(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function v_(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=gr(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=yr(f,Or(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const _=jt(e,r,i,s,o,n);if(!p&&!h&&!m&&f&&_&&(f=c?c(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(a.textarea||_)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const S=Nr({type:null,tagName:l,maskInputOptions:a});f=gn({isMasked:jt(e,r,i,s,o,S),element:e,value:f,maskInputFn:u})}return{type:oe.Text,textContent:f||"",isStyle:p,rootId:d}}function T_(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:_,unmaskTextClass:S,maskTextSelector:T,unmaskTextSelector:$,ignoreCSSAttributes:N}=t,W=g_(e,r,s,i),M=i_(e);let g={};const I=e.attributes.length;for(let E=0;E<I;E++){const k=e.attributes[E];k.name&&!uu(M,k.name,k.value)&&(g[k.name]=cu(n,M,zt(k.name),k.value,e,a,N))}if(M==="link"&&o){const E=Array.from(n.styleSheets).find(B=>B.href===e.href);let k=null;E&&(k=gr(E)),k&&(g.rel=null,g.href=null,g.crossorigin=null,g._cssText=yr(k,E.href))}if(M==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=gr(e.sheet);E&&(g._cssText=yr(E,Or(n)))}if(M==="input"||M==="textarea"||M==="select"||M==="option"){const E=e,k=yi(E),B=_r(E,Cs(M),k),z=E.checked;if(k!=="submit"&&k!=="button"&&B){const O=jt(E,_,T,S,$,Nr({type:k,tagName:Cs(M),maskInputOptions:c}));g.value=gn({isMasked:O,element:E,value:B,maskInputFn:u})}z&&(g.checked=z)}if(M==="option"&&(e.selected&&!c.select?g.selected=!0:delete g.selected),M==="canvas"&&f){if(e.__context==="2d")n_(e)||(g.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const E=e.toDataURL(d.type,d.quality),k=n.createElement("canvas");k.width=e.width,k.height=e.height;const B=k.toDataURL(d.type,d.quality);E!==B&&(g.rr_dataURL=E)}}if(M==="img"&&l){xt||(xt=n.createElement("canvas"),Wo=xt.getContext("2d"));const E=e,k=E.currentSrc||E.getAttribute("src")||"<unknown-src>",B=E.crossOrigin,z=()=>{E.removeEventListener("load",z);try{xt.width=E.naturalWidth,xt.height=E.naturalHeight,Wo.drawImage(E,0,0),g.rr_dataURL=xt.toDataURL(d.type,d.quality)}catch(O){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?z():E.addEventListener("load",z);return}else console.warn(`Cannot inline img src=${k}! Error: ${O}`)}E.crossOrigin==="anonymous"&&(B?g.crossOrigin=B:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?z():E.addEventListener("load",z)}if((M==="audio"||M==="video")&&(g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),W){const{width:E,height:k}=e.getBoundingClientRect();g={class:g.class,rr_width:`${E}px`,rr_height:`${k}px`}}M==="iframe"&&!p(g.src)&&(!W&&!au(e)&&(g.rr_src=g.src),delete g.src);let K;try{customElements.get(M)&&(K=!0)}catch{}return{type:oe.Element,tagName:M,attributes:g,childNodes:[],isSVG:m_(e)||void 0,needBlock:W,rootId:m,isCustom:K}}function Q(e){return e==null?"":e.toLowerCase()}function I_(e,t){if(t.comment&&e.type===oe.Comment)return!0;if(e.type===oe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&su(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(e.attributes.name)==="application-name"||Q(e.attributes.rel)==="icon"||Q(e.attributes.rel)==="apple-touch-icon"||Q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Q(e.attributes.property).match(/^(og|twitter|fb):/)||Q(e.attributes.name).match(/^(og|twitter):/)||Q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Q(e.attributes.name)==="robots"||Q(e.attributes.name)==="googlebot"||Q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Q(e.attributes.name)==="author"||Q(e.attributes.name)==="generator"||Q(e.attributes.name)==="framework"||Q(e.attributes.name)==="publisher"||Q(e.attributes.name)==="progid"||Q(e.attributes.property).match(/^article:/)||Q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Q(e.attributes.name)==="google-site-verification"||Q(e.attributes.name)==="yandex-verification"||Q(e.attributes.name)==="csrf-token"||Q(e.attributes.name)==="p:domain_verify"||Q(e.attributes.name)==="verify-v1"||Q(e.attributes.name)==="verification"||Q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Dt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOMOptions:T,dataURLOptions:$={},inlineImages:N=!1,recordCanvas:W=!1,onSerialize:M,onIframeLoad:g,iframeLoadTimeout:I=5e3,onBlockedImageLoad:K,onStylesheetLoad:E,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:B=()=>!1,newlyAddedElement:z=!1,ignoreCSSAttributes:O}=t;let{preserveWhiteSpace:ae=!0}=t;const X=E_(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,dataURLOptions:$,inlineImages:N,recordCanvas:W,keepIframeSrcFn:B,newlyAddedElement:z,ignoreCSSAttributes:O});if(!X)return console.warn(e,"not serialized"),null;let ee;r.hasNode(e)?ee=r.getId(e):I_(X,T)||!ae&&X.type===oe.Text&&!X.isStyle&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?ee=_n:ee=Si();const b=Object.assign(X,{id:ee});if(r.add(e,b),ee===_n)return null;M&&M(e);let Y=!f;if(b.type===oe.Element){Y=Y&&!b.needBlock;const w=e.shadowRoot;w&&un(w)&&(b.isShadowHost=!0)}if((b.type===oe.Document||b.type===oe.Element)&&Y){T.headWhitespace&&b.type===oe.Element&&b.tagName==="head"&&(ae=!1);const w={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOMOptions:T,dataURLOptions:$,inlineImages:N,recordCanvas:W,preserveWhiteSpace:ae,onSerialize:M,onIframeLoad:g,iframeLoadTimeout:I,onBlockedImageLoad:K,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:B,ignoreCSSAttributes:O},J=e.childNodes?Array.from(e.childNodes):[];for(const te of J){const ne=Dt(te,w);ne&&b.childNodes.push(ne)}if(Yg(e)&&e.shadowRoot)for(const te of Array.from(e.shadowRoot.childNodes)){const ne=Dt(te,w);ne&&(un(e.shadowRoot)&&(ne.isShadow=!0),b.childNodes.push(ne))}}if(e.parentNode&&cn(e.parentNode)&&un(e.parentNode)&&(b.isShadow=!0),b.type===oe.Element&&b.tagName==="iframe"&&!b.needBlock&&y_(e,()=>{const w=au(e);if(w&&g){const J=Dt(w,{doc:w,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOMOptions:T,dataURLOptions:$,inlineImages:N,recordCanvas:W,preserveWhiteSpace:ae,onSerialize:M,onIframeLoad:g,iframeLoadTimeout:I,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:B,ignoreCSSAttributes:O});J&&g(e,J)}},I),b.type===oe.Element&&b.tagName==="img"&&!e.complete&&b.needBlock){const w=e,J=()=>{if(w.isConnected&&!w.complete&&K)try{const te=w.getBoundingClientRect();te.width>0&&te.height>0&&K(w,b,te)}catch{}w.removeEventListener("load",J)};w.isConnected&&w.addEventListener("load",J)}return b.type===oe.Element&&b.tagName==="link"&&typeof b.attributes.rel=="string"&&(b.attributes.rel==="stylesheet"||b.attributes.rel==="preload"&&typeof b.attributes.href=="string"&&su(b.attributes.href)==="css")&&S_(e,()=>{if(E){const w=Dt(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOMOptions:T,dataURLOptions:$,inlineImages:N,recordCanvas:W,preserveWhiteSpace:ae,onSerialize:M,onIframeLoad:g,iframeLoadTimeout:I,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:B,ignoreCSSAttributes:O});w&&E(e,w)}},k),b.type===oe.Element&&delete b.needBlock,b}function w_(e,t){const{mirror:n=new ru,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOM:T=!1,dataURLOptions:$,preserveWhiteSpace:N,onSerialize:W,onIframeLoad:M,iframeLoadTimeout:g,onBlockedImageLoad:I,onStylesheetLoad:K,stylesheetLoadTimeout:E,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:B=new Set([])}=t||{};return Dt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:S,slimDOMOptions:T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:T==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:T===!1?{}:T,dataURLOptions:$,inlineImages:f,recordCanvas:p,preserveWhiteSpace:N,onSerialize:W,onIframeLoad:M,iframeLoadTimeout:g,onBlockedImageLoad:I,onStylesheetLoad:K,stylesheetLoadTimeout:E,keepIframeSrcFn:k,newlyAddedElement:!1,ignoreCSSAttributes:B})}function he(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const At=`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 jo={map:{},getId(){return console.error(At),-1},getNode(){return console.error(At),null},removeNodeFromMap(){console.error(At)},has(){return console.error(At),!1},reset(){console.error(At)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(jo=new Proxy(jo,{get(e,t,n){return t==="map"&&console.error(At),Reflect.get(e,t,n)}}));function yn(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const c=t-(o-s),a=this;c<=0||c>t?(r&&(N_(r),r=null),s=o,e.apply(a,i)):!r&&n.trailing!==!1&&(r=Lr(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,i)},c))}}function du(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Lr(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>du(e,t,i||{},!0)}function Ei(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 Sr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Sr=()=>new Date().getTime());function lu(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function fu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function hu(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ve(e,t,n,r,s){if(!e)return!1;const i=hu(e);if(!i)return!1;const o=Lt(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const c=ht(i,o);let a=-1;return c<0?!1:(r&&(a=ht(i,Lt(null,r))),c>-1&&a<0?!0:c<a)}function k_(e,t){return t.getId(e)!==-1}function es(e,t){return t.getId(e)===_n}function mu(e,t){if(cn(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?mu(e.parentNode,t):!0:!0}function xs(e){return!!e.changedTouches}function R_(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 gu(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function _u(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function As(e){return!!e?.shadowRoot}class C_{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function yu(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function M_(e){let t=e,n;for(;n=yu(t);)t=n;return t}function x_(e){const t=e.ownerDocument;if(!t)return!1;const n=M_(e);return t.contains(n)}function Su(e){const t=e.ownerDocument;return t?t.contains(e)||x_(e):!1}const qo={};function bi(e){const t=qo[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 qo[e]=r.bind(window)}function A_(...e){return bi("requestAnimationFrame")(...e)}function Lr(...e){return bi("setTimeout")(...e)}function N_(...e){return bi("clearTimeout")(...e)}var L=(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))(L||{}),x=(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))(x||{}),pe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(pe||{}),$e=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))($e||{}),Nt=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Nt||{});function vi(e){try{return e.contentDocument}catch{}}function O_(e){try{return e.contentWindow}catch{}}function Go(e){return"__ln"in e}class L_{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Go(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&&Go(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 Vo=(e,t)=>`${e}@${t}`;class D_{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 L_,s=a=>{let u=a,d=_n;for(;d===_n;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=a=>{if(!a.parentNode||!Su(a))return;const u=cn(a.parentNode)?this.mirror.getId(yu(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=Dt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{gu(f,this.mirror)&&!ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),_u(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),As(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{ve(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});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 a of this.movedSet)Yo(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!Ko(this.droppedSet,a)&&!Yo(this.removes,a,this.mirror)||Ko(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(o.value.parentNode),d=s(o.value);u!==-1&&d!==-1&&(a=o)}if(!a){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){a=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))},this.processMutation=t=>{if(!es(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:jt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,hu(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=yi(n),c=n.tagName;s=_r(n,c,o);const a=Nr({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),u=jt(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=gn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(ve(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(!vi(n))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"),!uu(n.tagName,r)&&(i.attributes[r]=cu(this.doc,zt(n.tagName),zt(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 c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==o.style.getPropertyValue(c)||u!==o.style.getPropertyPriority(c)?u===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,u]:i._unchangedStyles[c]=[a,u]}for(const c of Array.from(o.style))n.style.getPropertyValue(c)===""&&(i.styleDiff[c]=!1)}break}case"childList":{if(ve(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=cn(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||es(n,this.mirror)||!k_(n,this.mirror)||(this.addedSet.has(n)?(Ns(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||mu(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Vo(r,s)]?Ns(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:cn(t.target)&&un(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(es(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[Vo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ve(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),As(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","ignoreCSSAttributes"].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 Ns(e,t){e.delete(t),t.childNodes?.forEach(n=>Ns(e,n))}function Yo(e,t,n){return e.length===0?!1:P_(e,t,n)}function P_(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 Ko(e,t){return e.size===0?!1:Eu(e,t)}function Eu(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Eu(e,n):!1}let dn;function F_(e){dn=e}function B_(){dn=void 0}const H=e=>dn?(...n)=>{try{return e(...n)}catch(r){if(dn&&dn(r)===!0)return()=>{};throw r}}:e,Pt=[];function Dn(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 bu(e,t){const n=new D_;Pt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("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 $_({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=[],c;const a=yn(H(l=>{const f=Date.now()-c;e(o.map(p=>(p.timeOffset-=f,p)),l),o=[],c=null}),i),u=H(yn(H(l=>{const f=Dn(l),{clientX:p,clientY:h}=xs(l)?l.changedTouches[0]:l;c||(c=Sr()),o.push({x:p,y:h,id:r.getId(f),timeOffset:Sr()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?x.Drag:l instanceof MouseEvent?x.MouseMove:x.TouchMove)}),s,{trailing:!1})),d=[he("mousemove",u,n),he("touchmove",u,n),he("drag",u,n)];return H(()=>{d.forEach(l=>l())})}function U_({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let u=null;const d=l=>f=>{const p=Dn(f);if(ve(p,r,s,i,!0))return;let h=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=$e.Mouse;break;case"touch":h=$e.Touch;break;case"pen":h=$e.Pen;break}h===$e.Touch?pe[l]===pe.MouseDown?m="TouchStart":pe[l]===pe.MouseUp&&(m="TouchEnd"):$e.Pen}else xs(f)&&(h=$e.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===$e.Touch||m.startsWith("Mouse")&&h===$e.Mouse)&&(h=null)):pe[l]===pe.Click&&(h=u,u=null);const _=xs(f)?f.changedTouches[0]:f;if(!_)return;const S=n.getId(p),{clientX:T,clientY:$}=_;H(e)({type:pe[m],id:S,x:T,y:$,...h!==null&&{pointerType:h}})};return Object.keys(pe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEach(l=>{let f=zt(l);const p=d(l);if(window.PointerEvent)switch(pe[l]){case pe.MouseDown:case pe.MouseUp:f=f.replace("mouse","pointer");break;case pe.TouchStart:case pe.TouchEnd:return}a.push(he(f,p,t))}),H(()=>{a.forEach(l=>l())})}function vu({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const c=H(yn(H(a=>{const u=Dn(a);if(!u||ve(u,r,s,i,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=lu(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 he("scroll",c,t)}function H_({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=H(yn(H(()=>{const i=fu(),o=pu();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return he("resize",s,t)}const W_=["INPUT","TEXTAREA","SELECT"],Xo=new WeakMap;function z_({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function _(g){let I=Dn(g);const K=g.isTrusted,E=I&&Cs(I.tagName);if(E==="OPTION"&&(I=I.parentElement),!I||!E||W_.indexOf(E)<0||ve(I,r,s,i,!0))return;const k=I;if(k.classList.contains(o)||c&&k.matches(c))return;const B=yi(I);let z=_r(k,E,B),O=!1;const ae=Nr({maskInputOptions:a,tagName:E,type:B}),X=jt(I,f,h,p,m,ae);(B==="radio"||B==="checkbox")&&(O=I.checked),z=gn({isMasked:X,element:I,value:z,maskInputFn:u}),S(I,l?{text:z,isChecked:O,userTriggered:K}:{text:z,isChecked:O});const ee=I.name;B==="radio"&&ee&&O&&t.querySelectorAll(`input[type="radio"][name="${ee}"]`).forEach(b=>{if(b!==I){const Y=gn({isMasked:X,element:b,value:_r(b,E,B),maskInputFn:u});S(b,l?{text:Y,isChecked:!O,userTriggered:!1}:{text:Y,isChecked:!O})}})}function S(g,I){const K=Xo.get(g);if(!K||K.text!==I.text||K.isChecked!==I.isChecked){Xo.set(g,I);const E=n.getId(g);H(e)({...I,id:E})}}const $=(d.input==="last"?["change"]:["input","change"]).map(g=>he(g,H(_),t)),N=t.defaultView;if(!N)return()=>{$.forEach(g=>g())};const W=N.Object.getOwnPropertyDescriptor(N.HTMLInputElement.prototype,"value"),M=[[N.HTMLInputElement.prototype,"value"],[N.HTMLInputElement.prototype,"checked"],[N.HTMLSelectElement.prototype,"value"],[N.HTMLTextAreaElement.prototype,"value"],[N.HTMLSelectElement.prototype,"selectedIndex"],[N.HTMLOptionElement.prototype,"selected"]];return W&&W.set&&$.push(...M.map(g=>du(g[0],g[1],{set(){H(_)({target:this,isTrusted:!1})}},!1,N))),H(()=>{$.forEach(g=>g())})}function Er(e){const t=[];function n(r,s){if(Gn("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gn("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gn("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gn("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 Ke(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function j_({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[p,h]=f,{id:m,styleId:_}=Ke(l,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:p,index:h}]}),d.apply(l,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:H((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Ke(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),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[p]=f,{id:h,styleId:m}=Ke(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),d.apply(l,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:H((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Ke(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),d.apply(l,f)})}));const a={};Vn("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Vn("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Vn("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Vn("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:H((f,p,h)=>{const[m,_]=h,{id:S,styleId:T}=Ke(p.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||T&&T!==-1)&&e({id:S,styleId:T,adds:[{rule:m,index:[...Er(p),_||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:H((f,p,h)=>{const[m]=h,{id:_,styleId:S}=Ke(p.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,removes:[{index:[...Er(p),m]}]}),f.apply(p,h)})})}),H(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Tu({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"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(o){const c=i.set?.call(this,o);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return c}}),H(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function q_({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((c,a,u)=>{const[d,l,f]=u;if(n.has(d))return i.apply(a,[d,l,f]);const{id:p,styleId:h}=Ke(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:d,value:l,priority:f},index:Er(a.parentRule)}),c.apply(a,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:H((c,a,u)=>{const[d]=u;if(n.has(d))return o.apply(a,[d]);const{id:l,styleId:f}=Ke(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:Er(a.parentRule)}),c.apply(a,u)})}),H(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function G_({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=H(u=>yn(H(d=>{const l=Dn(d);if(!l||ve(l,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:s.getId(l),currentTime:f,volume:p,muted:h,playbackRate:m})}),i.media||500)),a=[he("play",c(Nt.Play),o),he("pause",c(Nt.Pause),o),he("seeked",c(Nt.Seeked),o),he("volumechange",c(Nt.VolumeChange),o),he("ratechange",c(Nt.RateChange),o)];return H(()=>{a.forEach(u=>u())})}function V_({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(a,u,d){const l=new i(a,u,d);return s.set(l,{family:a,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const o=Ei(t.fonts,"add",function(c){return function(a){return Lr(H(()=>{const u=s.get(a);u&&(e(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=i}),r.push(o),H(()=>{r.forEach(c=>c())})}function Y_(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let c=!0;const a=H(()=>{const u=t.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:_,endOffset:S}=p;ve(h,r,s,i,!0)||ve(_,r,s,i,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(_),endOffset:S})}o({ranges:d})});return a(),he("selectionchange",a)}function K_({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ei(n.customElements,"define",function(s){return function(i,o,c){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,c])}})}function X_(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=bu(e,e.doc));const s=$_(e),i=U_(e),o=vu(e),c=H_(e,{win:n}),a=z_(e),u=G_(e);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=j_(e,{win:n}),l=Tu(e,e.doc),f=q_(e,{win:n}),e.collectFonts&&(p=V_(e)));const h=Y_(e),m=K_(e),_=[];for(const S of e.plugins)_.push(S.observer(S.callback,n,S.options));return H(()=>{Pt.forEach(S=>S.reset()),r?.disconnect(),s(),i(),o(),c(),a(),u(),d(),l(),f(),p(),h(),m(),_.forEach(S=>S())})}function Gn(e){return typeof window[e]<"u"}function Vn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Os{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 c=i.get(n);return c||(c=this.generateIdFn(),i.set(n,c),o.set(c,n)),c}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}}class J_{constructor(){this.crossOriginIframeMirror=new Os(Si),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Q_{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Os(Si),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Os(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=vi(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const 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 L.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:L.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return n;case L.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case L.IncrementalSnapshot:switch(n.data.source){case x.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 x.Drag:case x.TouchMove:case x.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(n.data,t,["id"]),n;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case x.Font:return n;case x.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case x.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,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!==oe.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Z_{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class ey{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(!un(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=bu({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(vu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Lr(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Tu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=vi(t),r=O_(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ei(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Su(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()}}var Jo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ty=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Yn=0;Yn<Jo.length;Yn++)ty[Jo.charCodeAt(Yn)]=Yn;class Qo{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class ny{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new C_,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,(c,a)=>({rule:nu(c),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ry{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,A_(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let re,br;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ae=t_();function ze(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:_,slimDOMOptions:S,maskAttributeFn:T,maskInputFn:$,maskTextFn:N,maxCanvasSize:W=null,packFn:M,sampling:g={},dataURLOptions:I={},mousemoveWait:K,recordDOM:E=!0,recordCanvas:k=!1,recordCrossOriginIframes:B=!1,recordAfter:z=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:ae=!1,inlineImages:X=!1,plugins:ee,keepIframeSrcFn:b=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:w,onMutation:J,getCanvasManager:te}=e;F_(w);const ne=B?window.parent===window:!0;let Ee=!1;if(!ne)try{window.parent.document&&(Ee=!1)}catch{Ee=!0}if(ne&&!t)throw new Error("emit function is required");if(!ne&&!Ee)return()=>{};K!==void 0&&g.mousemove===void 0&&(g.mousemove=K),Ae.reset();const be=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:_!==void 0?_:{},kt=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||{};R_();let Be,Rt=0;const Fn=q=>{for(const xe of ee||[])xe.eventProcessor&&(q=xe.eventProcessor(q));return M&&!Ee&&(q=M(q)),q};re=(q,xe)=>{const U=q;if(U.timestamp=Sr(),Pt[0]?.isFrozen()&&U.type!==L.FullSnapshot&&!(U.type===L.IncrementalSnapshot&&U.data.source===x.Mutation)&&Pt.forEach(de=>de.unfreeze()),ne)t?.(Fn(U),xe);else if(Ee){const de={type:"rrweb",event:Fn(U),origin:window.location.origin,isCheckout:xe};window.parent.postMessage(de,"*")}if(U.type===L.FullSnapshot)Be=U,Rt=0;else if(U.type===L.IncrementalSnapshot){if(U.data.source===x.Mutation&&U.data.isAttachIframe)return;Rt++;const de=r&&Rt>=r,G=n&&Be&&U.timestamp-Be.timestamp>n;(de||G)&&Ur(!0)}};const nn=q=>{re({type:L.IncrementalSnapshot,data:{source:x.Mutation,...q}})},Ai=q=>re({type:L.IncrementalSnapshot,data:{source:x.Scroll,...q}}),Qu=q=>re({type:L.IncrementalSnapshot,data:{source:x.CanvasMutation,...q}}),Zu=q=>re({type:L.IncrementalSnapshot,data:{source:x.AdoptedStyleSheet,...q}}),ut=new ny({mutationCb:nn,adoptedStyleSheetCb:Zu}),dt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new J_:new Q_({mirror:Ae,mutationCb:nn,stylesheetManager:ut,recordCrossOriginIframes:B,wrappedEmit:re});for(const q of ee||[])q.getMirror&&q.getMirror({nodeMirror:Ae,crossOriginIframeMirror:dt.crossOriginIframeMirror,crossOriginIframeStyleMirror:dt.crossOriginIframeStyleMirror});const Br=new ry,$r=iy(te,{mirror:Ae,win:window,mutationCb:q=>re({type:L.IncrementalSnapshot,data:{source:x.CanvasMutation,...q}}),recordCanvas:k,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:W,sampling:g.canvas,dataURLOptions:I,errorHandler:w}),Bn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Z_:new ey({mutationCb:nn,scrollCb:Ai,bypassOptions:{onMutation:J,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:be,dataURLOptions:I,maskAttributeFn:T,maskTextFn:N,maskInputFn:$,recordCanvas:k,inlineImages:X,sampling:g,slimDOMOptions:kt,iframeManager:dt,stylesheetManager:ut,canvasManager:$r,keepIframeSrcFn:b,processedNodeManager:Br,ignoreCSSAttributes:Y},mirror:Ae}),Ur=(q=!1)=>{if(!E)return;re({type:L.Meta,data:{href:window.location.href,width:pu(),height:fu()}},q),ut.reset(),Bn.init(),Pt.forEach(U=>U.lock());const xe=w_(document,{mirror:Ae,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:be,maskAttributeFn:T,maskInputFn:$,maskTextFn:N,slimDOM:kt,dataURLOptions:I,recordCanvas:k,inlineImages:X,onSerialize:U=>{gu(U,Ae)&&dt.addIframe(U),_u(U,Ae)&&ut.trackLinkElement(U),As(U)&&Bn.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,de)=>{dt.attachIframe(U,de),U.contentWindow&&$r.addWindow(U.contentWindow),Bn.observeAttachShadow(U)},onStylesheetLoad:(U,de)=>{ut.attachLinkElement(U,de)},onBlockedImageLoad:(U,de,{width:G,height:rn})=>{nn({adds:[],removes:[],texts:[],attributes:[{id:de.id,attributes:{style:{width:`${G}px`,height:`${rn}px`}}}]})},keepIframeSrcFn:b,ignoreCSSAttributes:Y});if(!xe)return console.warn("Failed to snapshot the document");re({type:L.FullSnapshot,data:{node:xe,initialOffset:lu(window)}}),Pt.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ut.adoptStyleSheets(document.adoptedStyleSheets,Ae.getId(document))};br=Ur;try{const q=[],xe=de=>H(X_)({onMutation:J,mutationCb:nn,mousemoveCb:(G,rn)=>re({type:L.IncrementalSnapshot,data:{source:rn,positions:G}}),mouseInteractionCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.MouseInteraction,...G}}),scrollCb:Ai,viewportResizeCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.ViewportResize,...G}}),inputCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.Input,...G}}),mediaInteractionCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.MediaInteraction,...G}}),styleSheetRuleCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.StyleSheetRule,...G}}),styleDeclarationCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.StyleDeclaration,...G}}),canvasMutationCb:Qu,fontCb:G=>re({type:L.IncrementalSnapshot,data:{source:x.Font,...G}}),selectionCb:G=>{re({type:L.IncrementalSnapshot,data:{source:x.Selection,...G}})},customElementCb:G=>{re({type:L.IncrementalSnapshot,data:{source:x.CustomElement,...G}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:be,inlineStylesheet:h,sampling:g,recordDOM:E,recordCanvas:k,inlineImages:X,userTriggeredOnInput:O,collectFonts:ae,doc:de,maskAttributeFn:T,maskInputFn:$,maskTextFn:N,keepIframeSrcFn:b,blockSelector:i,unblockSelector:o,slimDOMOptions:kt,dataURLOptions:I,mirror:Ae,iframeManager:dt,stylesheetManager:ut,shadowDomManager:Bn,processedNodeManager:Br,canvasManager:$r,ignoreCSSAttributes:Y,plugins:ee?.filter(G=>G.observer)?.map(G=>({observer:G.observer,options:G.options,callback:rn=>re({type:L.Plugin,data:{plugin:G.name,payload:rn}})}))||[]},{});dt.addLoadListener(de=>{try{q.push(xe(de.contentDocument))}catch(G){console.warn(G)}});const U=()=>{Ur(),q.push(xe(document))};return document.readyState==="interactive"||document.readyState==="complete"?U():(q.push(he("DOMContentLoaded",()=>{re({type:L.DomContentLoaded,data:{}}),z==="DOMContentLoaded"&&U()})),q.push(he("load",()=>{re({type:L.Load,data:{}}),z==="load"&&U()},window))),()=>{q.forEach(de=>de()),Br.destroy(),br=void 0,B_()}}catch(q){console.warn(q)}}function sy(e){if(!br)throw new Error("please take full snapshot after start recording");br(e)}ze.mirror=Ae;ze.takeFullSnapshot=sy;function iy(e,t){try{return e?e(t):new Qo}catch{return console.warn("Unable to initialize CanvasManager"),new Qo}}var Zo;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Zo||(Zo={}));const oy=3,ay=5;function Ti(e){return e>9999999999?e:e*1e3}function ts(e){return e>9999999999?e/1e3:e}function Pn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:L.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:we(t,10,1e3)}}),t.category==="console")))}const cy="button,a";function Iu(e){return e.closest(cy)||e}function wu(e){const t=ku(e);return!t||!(t instanceof Element)?t:Iu(t)}function ku(e){return uy(e)?e.target:e}function uy(e){return typeof e=="object"&&!!e&&"target"in e}let Xe;function dy(e){return Xe||(Xe=[],ly()),Xe.push(e),()=>{const t=Xe?Xe.indexOf(e):-1;t>-1&&Xe.splice(t,1)}}function ly(){_e(Z,"open",function(e){return function(...t){if(Xe)try{Xe.forEach(n=>n())}catch{}return e.apply(Z,t)}})}const fy=new Set([x.Mutation,x.StyleSheetRule,x.StyleDeclaration,x.AdoptedStyleSheet,x.CanvasMutation,x.Selection,x.MediaInteraction]);function py(e,t,n){e.handleClick(t,n)}class hy{constructor(t,n,r=Pn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=dy(()=>{this._lastMutation=ea()});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(gy(n,this._ignoreSelector)||!_y(t))return;const r={timestamp:ts(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=ts(t)}registerScroll(t=Date.now()){this._lastScroll=ts(t)}registerClick(t){const n=Iu(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=ea();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._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:c}=t;if(i){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=a<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:Z.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,d);return}if(o>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:Z.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Ln(()=>this._checkClicks(),1e3)}}const my=["A","BUTTON","INPUT"];function gy(e,t){return!!(!my.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 _y(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ea(){return Date.now()/1e3}function yy(e,t){try{if(!Sy(t))return;const{source:n}=t.data;if(fy.has(n)&&e.registerMutation(t.timestamp),n===x.Scroll&&e.registerScroll(t.timestamp),Ey(t)){const{type:r,id:s}=t.data,i=ze.mirror.getNode(s);i instanceof HTMLElement&&r===pe.Click&&e.registerClick(i)}}catch{}}function Sy(e){return e.type===oy}function Ey(e){return e.data.source===x.MouseInteraction}function De(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Ii=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ii||{});const by=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function vy(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(by.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Ty=e=>t=>{if(!e.isEnabled())return;const n=Iy(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&py(e.clickDetector,n,wu(t.event)),Pn(e,n)};function Ru(e,t){const n=ze.mirror.getId(e),r=n&&ze.mirror.getNode(n),s=r&&ze.mirror.getMeta(r),i=s&&ky(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===Ii.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:vy(i.attributes)}}:{}}}function Iy(e){const{target:t,message:n}=wy(e);return De({category:`ui.${e.name}`,...Ru(t,n)})}function wy(e){const t=e.name==="click";let n,r=null;try{r=t?wu(e.event):ku(e.event),n=ye(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ky(e){return e.type===Ii.Element}function Ry(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Cy(t);n&&Pn(e,n)}function Cy(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||My(o)||!i)return null;const c=t||r||s,a=i.length===1;if(!c&&a)return null;const u=ye(o,{maxStringLength:200})||"<unknown>",d=Ru(o,u);return De({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function My(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const xy={resource:Dy,paint:Oy,navigation:Ly};function ns(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Ay(e){return e.map(Ny).filter(Boolean)}function Ny(e){const t=xy[e.entryType];return t?t(e):null}function qt(e){return((me()||Z.performance.timeOrigin)+e)/1e3}function Oy(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=qt(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Ly(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:p,transferSize:h,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:qt(p),end:qt(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function Dy(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:qt(i),end:qt(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function Py(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return wi(e,"largest-contentful-paint",n)}function Fy(e){return e.sources!==void 0}function By(e){const t=[],n=[];for(const r of e.entries)if(Fy(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=ze.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return wi(e,"cumulative-layout-shift",n,t)}function $y(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return wi(e,"interaction-to-next-paint",n)}function wi(e,t,n,r){const s=e.value,i=e.rating,o=qt(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(c=>ze.mirror.getId(c)):void 0,attributions:r}}}function Uy(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(Tt(s,n))}),r.push(pi(ns(Py,e)),fi(ns(By,e)),Hc(ns($y,e))),()=>{r.forEach(s=>s())}}const R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Hy='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Wy(){const e=new Blob([Hy]);return URL.createObjectURL(e)}const ta=["log","warn","error"],or="[Replay] ";function rs(e,t="info"){nt({category:"console",data:{logger:"replay"},level:t,message:`${or}${e}`},{level:t})}function zy(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return R?(ta.forEach(r=>{n[r]=(...s)=>{y[r](or,...s),t&&rs(s.join(""),Ic(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),y.error(or,r),e?rc(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&rs(r,"error")},n.infoTick=(...r)=>{y.log(or,...r),t&&setTimeout(()=>rs(r[0]),0)}):ta.forEach(r=>{n[r]=()=>{}}),n}const C=zy();class ki extends Error{constructor(){super(`Event buffer exceeded maximum size of ${_i}.`)}}class Cu{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>_i)throw new ki;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?Ti(t):null}}class jy{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():(R&&C.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{R&&C.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){R&&C.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:c})=>{const a=c;if(a.method===t&&a.id===r){if(this._worker.removeEventListener("message",o),!a.success){R&&C.error("Error in compression worker: ",a.response),i(new Error("Error in compression worker"));return}s(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class qy{constructor(t){this._worker=new jy(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Ti(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>_i?Promise.reject(new ki):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{R&&C.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 Gy{constructor(t){this._fallback=new Cu,this._compression=new qy(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){R&&C.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){R&&C.exception(i,"Failed to add events when switching buffers.")}}}function Vy({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Yy(t);if(n)return n}return R&&C.log("Using simple buffer"),new Cu}function Yy(e){try{const t=e||Ky();if(!t)return;R&&C.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Gy(n)}catch(t){R&&C.exception(t,"Failed to create compression worker")}}function Ky(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Wy():""}function Ri(){try{return"sessionStorage"in Z&&!!Z.sessionStorage}catch{return!1}}function Xy(e){Jy(),e.session=void 0}function Jy(){if(Ri())try{Z.sessionStorage.removeItem(mi)}catch{}}function Mu(e){return e===void 0?!1:Math.random()<e}function Dr(e){if(Ri())try{Z.sessionStorage.setItem(mi,JSON.stringify(e))}catch{}}function xu(e){const t=Date.now(),n=e.id||Te(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,c=e.previousSessionId,a=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:c,dirty:a}}function Qy(e,t){return Mu(e)?"session":t?"buffer":!1}function na({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Qy(e,t),i=xu({sampled:s,previousSessionId:r});return n&&Dr(i),i}function Zy(){if(!Ri())return null;try{const e=Z.sessionStorage.getItem(mi);if(!e)return null;const t=JSON.parse(e);return R&&C.infoTick("Loading existing session"),xu(t)}catch{return null}}function Ls(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Au(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ls(e.started,t,r)||Ls(e.lastActivity,n,r)}function Nu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Au(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ss({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&Zy();return s?Nu(s,{sessionIdleExpire:e,maxReplayDuration:t})?(R&&C.infoTick("Session in sessionStorage is expired, creating new one..."),na(r,{previousSessionId:s.id})):s:(R&&C.infoTick("Creating new session"),na(r,{previousSessionId:n}))}function eS(e){return e.type===L.Custom}function Ci(e,t,n){return Lu(e,t)?(Ou(e,t,n),!0):!1}function tS(e,t,n){return Lu(e,t)?Ou(e,t,n):Promise.resolve(null)}async function Ou(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=nS(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof ki,c=o?"addEventSizeExceeded":"addEvent",a=F();if(a){const u=o?"buffer_overflow":"internal_sdk_error";a.recordDroppedEvent(u,"replay")}if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:c})}}function Lu(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Ti(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(R&&C.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function nS(e,t){try{if(typeof t=="function"&&eS(e))return t(e)}catch(n){return R&&C.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Mi(e){return!e.type}function Ds(e){return e.type==="transaction"}function rS(e){return e.type==="replay_event"}function ra(e){return e.type==="feedback"}function sS(e){return(t,n)=>{if(!e.isEnabled()||!Mi(t)&&!Ds(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ds(t)){iS(e,t);return}oS(e,t)}}}function iS(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function oS(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)||Ln(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function aS(e){return t=>{!e.isEnabled()||!Mi(t)||cS(e,t)}}function cS(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=De({category:"replay.hydrate-error",data:{url:Kt()}});Pn(e,r)}}function uS(e){const t=F();t&&t.on("beforeAddBreadcrumb",n=>dS(e,n))}function dS(e,t){if(!e.isEnabled()||!Du(t))return;const n=lS(t);n&&Pn(e,n)}function lS(e){return!Du(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?fS(e):De(e)}function fS(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return De(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>qn?(n=!0,`${s.slice(0,qn)}…`):s;if(typeof s=="object")try{const i=we(s,7);return JSON.stringify(i).length>qn?(n=!0,`${JSON.stringify(i,null,2).slice(0,qn)}…`):i}catch{}return s});return De({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Du(e){return!!e.category}function pS(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Pu(){const e=V().getPropagationContext().dsc;e&&delete e.replay_id;const t=fe();if(t){const n=Fe(t);delete n.replay_id}}function hS(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:L.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 mS(e,t){return e.recordingMode!=="buffer"||t.message===gi||!t.exception||t.type?!1:Mu(e.getOptions().errorSampleRate)}function gS(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(rS(t))return delete t.breadcrumbs,t;if(!Mi(t)&&!Ds(t)&&!ra(t))return t;if(!e.checkAndHandleExpiredSession())return Pu(),t;if(ra(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),hS(e,t),t;if(pS(t,n)&&!e.getOptions()._experiments.captureExceptions)return R&&C.log("Ignoring error from rrweb internals",t),null;const s=mS(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const o=e.session;o.dirty=!0,e.getOptions().stickySession&&Dr(o)}return t},{id:"Replay"})}function Pr(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const c=e.throttledAddEvent({type:L.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof c=="string"?Promise.resolve(null):c})}function _S(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 yS(e){return t=>{if(!e.isEnabled())return;const n=_S(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Pr(e,[n]),!1)))}}function SS(e,t){return R&&e.getOptions()._experiments.traceInternals?!1:Xf(t,F())}function Fu(e,t){e.isEnabled()&&t!==null&&(SS(e,t.name)||e.addUpdate(()=>(Pr(e,[t]),!0)))}function Fr(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=Xc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Bu(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function vr(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 $u(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:c,response:a}}}function Sn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function et(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}=ES(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function Ps(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 ES(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Fo,n=bS(e);if(t){const r=e.slice(0,Fo);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 bS(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Tr(e,t){const n=vS(e);return He(n,t)}function vS(e,t=Z.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Z.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 TS(e,t,n){try{const r=await wS(e,t,n),s=$u("resource.fetch",r);Fu(n.replay,s)}catch(r){R&&C.exception(r,"Failed to capture fetch breadcrumb")}}function IS(e,t){const{input:n,response:r}=t,s=n?Qc(n):void 0,i=Fr(s),o=r?Bu(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 wS(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:d}=e.data,l=Tr(o,n.networkDetailAllowUrls)&&!Tr(o,n.networkDetailDenyUrls),f=l?kS(n,t.input,u):Sn(u),p=await RS(l,n,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:f,response:p}}function kS({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?xS(n,t):{};if(!e)return et(s,r,void 0);const i=Qc(n),[o,c]=Jc(i,C),a=et(s,r,o);return c?vr(a,c):a}async function RS(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Sn(s);const i=r?Uu(r.headers,n):{};if(!r||!t&&s!==void 0)return et(i,s,void 0);const[o,c]=await MS(r),a=CS(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return c?vr(a,c):a}function CS(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e?.length&&n===void 0?Fr(e):n;return r?t?et(s,i,e):et(s,i,void 0):Sn(i)}catch(i){return R&&C.exception(i,"Failed to serialize response body"),et(s,n,void 0)}}async function MS(e){const t=AS(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await NS(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(R&&C.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(R&&C.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Uu(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function xS(e,t){return e.length===1&&typeof e[0]!="string"?sa(e[0],t):e.length===2?sa(e[1],t):{}}function sa(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Uu(n,t):Array.isArray(n)?{}:Ps(n,t):{}}function AS(e){try{return e.clone()}catch(t){R&&C.exception(t,"Failed to clone response body")}}function NS(e){return new Promise((t,n)=>{const r=Ln(()=>n(new Error("Timeout while trying to read response body")),500);OS(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function OS(e){return await e.text()}async function LS(e,t,n){try{const r=PS(e,t,n),s=$u("resource.xhr",r);Fu(n.replay,s)}catch(r){R&&C.exception(r,"Failed to capture xhr breadcrumb")}}function DS(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Fr(r),i=n.getResponseHeader("content-length")?Bu(n.getResponseHeader("content-length")):$S(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function PS(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:c}=t,{url:a,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!a)return null;if(!c||!Tr(a,n.networkDetailAllowUrls)||Tr(a,n.networkDetailDenyUrls)){const M=Sn(l),g=Sn(f);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:M,response:g}}const p=c[pt],h=p?Ps(p.request_headers,n.networkRequestHeaders):{},m=Ps(Zc(c),n.networkResponseHeaders),[_,S]=n.networkCaptureBodies?Jc(o,C):[void 0],[T,$]=n.networkCaptureBodies?FS(c):[void 0],N=et(h,l,_),W=et(m,f,T);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:S?vr(N,S):N,response:$?vr(W,$):W}}function FS(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return BS(e.response,e.responseType)}catch(n){t.push(n)}return R&&C.warn("Failed to get xhr response body",...t),[void 0]}function BS(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 R&&C.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return R&&C.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function $S(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Fr(n)}catch{return}}function US(e){const t=F();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(a,u)=>HS(c,a,u))}catch{}}function HS(e,t,n){if(t.data)try{WS(t)&&jS(n)&&(DS(t,n),LS(t,n,e)),zS(t)&&qS(n)&&(IS(t,n),TS(t,n,e))}catch(r){R&&C.exception(r,"Error when enriching network breadcrumb")}}function WS(e){return e.category==="xhr"}function zS(e){return e.category==="fetch"}function jS(e){return e?.xhr}function qS(e){return e?.response}function GS(e){const t=F();Vc(Ty(e)),Ar(yS(e)),uS(e),US(e);const n=gS(e);df(n),t&&(t.on("beforeSendEvent",aS(e)),t.on("afterSendEvent",sS(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",async(r,s)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function VS(e){try{return Promise.all(Pr(e,[YS(Z.performance.memory)]))}catch{return[]}}function YS(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 KS(e,t,n){return np(e,t,{...n,setTimeoutImpl:Ln})}const Kn=D.navigator;function XS(){return/iPhone|iPad|iPod/i.test(Kn?.userAgent??"")||/Macintosh/i.test(Kn?.userAgent??"")&&Kn?.maxTouchPoints&&Kn?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function JS(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){R&&C.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&yy(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Ci(e,n,s))return!0;if(!s)return!1;const i=e.session;if(ZS(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const o=e.eventBuffer.getEarliestTimestamp();o&&(R&&C.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&Dr(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function QS(e){const t=e.getOptions();return{type:L.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 ZS(e,t){!t||!e.session||e.session.segmentId!==0||Ci(e,QS(e),!1)}function eE(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function tE(e,t,n,r){return ct(Ka(e,Xs(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function nE({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 rE({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 nc(e.getOptions(),r,i,t,e,Me());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:u,settings:d}=c?.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},o}async function sE({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=nE({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=F(),f=V(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!i.sampled)return Promise.resolve({});const m={type:Lg,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:t,segment_id:n,replay_type:i.sampled},_=await rE({scope:f,client:l,replayId:t,event:m});if(!_)return l.recordDroppedEvent("event_processor","replay"),R&&C.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const S=tE(_,o,h,l.getOptions().tunnel);let T;try{T=await p.send(S)}catch(N){const W=new Error(gi);try{W.cause=N}catch{}throw W}const $=pc({},T);if(fc($,"replay"))throw new xi($);if(typeof T.statusCode=="number"&&(T.statusCode<200||T.statusCode>=300))throw new Hu(T.statusCode);return T}class Hu extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class xi extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class ia extends Error{constructor(){super("Session is too long, not sending replay")}}async function Wu(e,t={count:0,interval:Ug}){const{recordingData:n,onError:r}=e;if(n.length)try{return await sE(e),!0}catch(s){if(s instanceof Hu||s instanceof xi)throw s;if(cf("Replays",{_retryCount:t.count}),r&&r(s),t.count>=Hg){const i=new Error(`${gi} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{Ln(async()=>{try{await Wu(e,t),i(!0)}catch(c){o(c)}},t.interval)})}}const zu="__THROTTLED",iE="__SKIPPED";function oE(e,t,n){const r=new Map,s=c=>{const a=c-n;r.forEach((u,d)=>{d<a&&r.delete(d)})},i=()=>[...r.values()].reduce((c,a)=>c+a,0);let o=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),i()>=t){const d=o;return o=!0,d?iE:zu}o=!1;const u=r.get(a)||0;return r.set(a,u+1),e(...c)}}class aE{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Dg,sessionIdleExpire:Pg},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=KS(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=oE((o,c)=>tS(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(Wg,r),timeout:r,scrollTimeout:zg,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new hy(this,i)),R){const o=t._experiments;C.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{Z.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=De({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=De({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{Ry(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){R&&C.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){R&&C.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",R&&C.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){R&&C.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){R&&C.log("Buffering is in progress, call `flush()` to save the replay");return}R&&C.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ss({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){R&&C.log("Buffering is in progress, call `flush()` to save the replay");return}R&&C.infoTick("Starting replay in buffer mode");const t=ss({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=ze({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:$g}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:JS(this),...XS(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{R&&C.log(`Stopping Replay${n?` triggered by ${n}`:""}`),Pu(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Xy(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),R&&C.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),R&&C.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();R&&C.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Ls(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Z.location.pathname}${Z.location.hash}${Z.location.search}`,n=`${Z.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===zu){const s=De({category:"replay.throttled"});this.addUpdate(()=>!Ci(this,{type:ay,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||fe(),n=t&&le(t),s=(n&&j(n).data||{})[ke];if(!(!n||!s||!["route","custom"].includes(s)))return j(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Vy({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=ss({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 Nu(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{Z.document.addEventListener("visibilitychange",this._handleVisibilityChange),Z.addEventListener("blur",this._handleWindowBlur),Z.addEventListener("focus",this._handleWindowFocus),Z.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(GS(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Uy(this)}_removeListeners(){try{Z.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Z.removeEventListener("blur",this._handleWindowBlur),Z.removeEventListener("focus",this._handleWindowFocus),Z.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Au(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()){R&&C.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:L.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Ay(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(Pr(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){R&&C.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await VS(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new ia;const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Wu({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=F();if(r){let s;n instanceof xi?s="ratelimit_backoff":n instanceof ia?s="invalid":s="send_error",r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){R&&C.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){R&&C.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&R&&C.log("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Dr(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(c=>{const a=eE(c.target),u=n.join(",");return a?.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const c=De({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(c)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function on(e,t){return[...e,...t].join(",")}function cE({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=on(e,[".sentry-mask","[data-sentry-mask]"]),c=on(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:on(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:on(r,[]),ignoreSelector:on(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function uE({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 oa='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',dE=["content-length","content-type","accept"],lE=Symbol.for("sentry__originalRequestBody");let aa=!1,ca=!1;function fE(){if(typeof Request>"u"||ca)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return r?.body!=null&&(s[lE]=r.body),s};t.prototype=e.prototype,D.Request=t,ca=!0}catch{}}const pE=e=>new hE(e);class hE{constructor({flushMinDelay:t=Fg,flushMaxDelay:n=Bg,minReplayDuration:r=jg,maxReplayDuration:s=Bo,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:S=[],networkCaptureBodies:T=!0,networkRequestHeaders:$=[],networkResponseHeaders:N=[],mask:W=[],maskAttributes:M=["title","placeholder","aria-label"],unmask:g=[],block:I=[],unblock:K=[],ignore:E=[],maskFn:k,beforeAddRecordingEvent:B,beforeErrorSampling:z,onError:O,attachRawBodyFromRequest:ae=!1}={}){this.name="Replay";const X=cE({mask:W,unmask:g,block:I,unblock:K,ignore:E});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:k,maskInputFn:k,maskAttributeFn:(ee,b,Y)=>uE({maskAttributes:M,maskAllText:u,privacyOptions:X,key:ee,value:b,el:Y}),...X,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ee=>{try{ee.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,qg),maxReplayDuration:Math.min(s,Bo),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:S,networkCaptureBodies:T,networkRequestHeaders:ua($),networkResponseHeaders:ua(N),beforeAddRecordingEvent:B,beforeErrorSampling:z,onError:O,attachRawBodyFromRequest:ae,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${oa}`:oa,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ys())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return aa}set _isInitialized(t){aa=t}afterAllSetup(t){!ys()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&fE(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=mE(this._initialOptions,t);this._replay=new aE({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function mE(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=bt(n.replaysSessionSampleRate),i=bt(n.replaysOnErrorSampleRate);return s==null&&i==null&&st(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function ua(e){return[...dE,...e.map(t=>t.toLowerCase())]}function gE(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function ju(e){try{return new URL(e,P.location.origin).href}catch{return}}function _E(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function qu(e){try{return new Headers(e)}catch{return}}const da=new WeakMap,is=new Map,Gu={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function yE(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:c,onRequestSpanStart:a,onRequestSpanEnd:u}={...Gu,...t},d=typeof i=="function"?i:h=>!0,l=h=>SE(h,c),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(m=>{if(m.op==="http.client"){const _=is.get(m.span_id);_&&(m.timestamp=_/1e3,is.delete(m.span_id))}}),h)),s&&jp(h=>{if(h.response){const m=da.get(h.response);m&&h.endTimestamp&&is.set(m,h.endTimestamp)}}),Cc(h=>{const m=Mp(h,d,l,f,{propagateTraceparent:p,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&da.set(h.response,h.fetchData.__span),m){const _=ju(h.fetchData.url),S=_?yt(_).host:void 0;m.setAttributes({"http.url":_?Qe(_):void 0,"server.address":S}),o&&la(m),a?.(m,{headers:h.headers})}})),r&&Kc(h=>{const m=EE(h,d,l,f,p,u);m&&(o&&la(m),a?.(m,{headers:qu(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function la(e){const{url:t}=j(e).data;if(!t||typeof t!="string")return;const n=Tt("resource",({entries:r})=>{r.forEach(s=>{_E(s)&&s.name.endsWith(t)&&(e.setAttributes(Gc(s)),setTimeout(n))})})}function SE(e,t){const n=Kt();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?He(r.toString(),t)||i&&He(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?He(e,t):r}}function EE(e,t,n,r,s,i){const o=e.xhr,c=o?.[pt];if(!o||o.__sentry_own_request__||!c)return;const{url:a,method:u}=c,d=Oe()&&t(a);if(e.endTimestamp&&d){const S=o.__sentry_xhr_span_id__;if(!S)return;const T=r[S];T&&c.status_code!==void 0&&(Oa(T,c.status_code),T.end(),i?.(T,{headers:qu(Zc(o)),error:e.error}),delete r[S]);return}const l=ju(a),f=yt(l||a),p=Qe(Kf(a)),h=!!fe(),m=d&&h?Zt({name:`${u} ${p}`,attributes:{url:Qe(a),type:"xhr","http.method":u,"http.url":l?Qe(l):void 0,"server.address":f?.host,[ie]:"auto.http.browser",[Ve]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new tt;o.__sentry_xhr_span_id__=m.spanContext().spanId,r[o.__sentry_xhr_span_id__]=m,n(a)&&bE(o,Oe()&&h?m:void 0,s);const _=F();return _&&_.emit("beforeOutgoingRequestSpan",m,e),m}function bE(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=bc({span:t,propagateTraceparent:n});r&&vE(e,r,s,i)}function vE(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=s?.baggage;(!i||!gE(i))&&e.setRequestHeader("baggage",n)}}catch{}}function TE(){P.document?P.document.addEventListener("visibilitychange",()=>{const e=fe();if(!e)return;const t=le(e);if(P.document.hidden&&t){const n="cancelled",{op:r,status:s}=j(t);Ce&&y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:ce,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ce&&y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const IE=3600,Vu="sentry_previous_trace",wE="sentry.previous_trace";function kE(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?ME():void 0;e.on("spanStart",o=>{if(le(o)!==o)return;const c=V().getPropagationContext();s=RE(s,o,c),r&&CE(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const c=V(),a=c.getPropagationContext();if(i&&a.parentSpanId){i=!1;return}c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(s.sampleRate),sampled:String(Fs(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=Fs(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[Na]:s.sampleRate}})}function RE(e,t,n){const r=j(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[zs])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=IE&&(Ce&&y.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Od]:"previous_trace"}}),t.setAttribute(wE,`${o.traceId}-${o.spanId}-${Fs(o)?1:0}`)),i)}function CE(e){try{P.sessionStorage.setItem(Vu,JSON.stringify(e))}catch(t){Ce&&y.warn("Could not store previous trace in sessionStorage",t)}}function ME(){try{const e=P.sessionStorage?.getItem(Vu);return JSON.parse(e)}catch{return}}function Fs(e){return e.traceFlags===1}const xE="BrowserTracing",AE={...er,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Gu},NE=(e={})=>{const t={name:void 0,source:void 0},n=P.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:c,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:m,traceXHR:_,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:T,enableHTTPTimings:$,ignoreResourceSpans:N,ignorePerformanceApiSpans:W,instrumentPageLoad:M,instrumentNavigation:g,detectRedirects:I,linkPreviousTrace:K,consistentTraceSampling:E,enableReportPageLoaded:k,onRequestSpanStart:B,onRequestSpanEnd:z}={...AE,...e};let O,ae,X;function ee(b,Y,w=!0){const J=Y.op==="pageload",te=Y.name,ne=d?d(Y):Y,Ee=ne.attributes||{};if(te!==ne.name&&(Ee[ke]="custom",ne.attributes=Ee),!w){const Be=wt();Zt({...ne,startTime:Be}).end(Be);return}t.name=ne.name,t.source=Ee[ke];const be=ec(ne,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:J,beforeSpanEnd:Be=>{O?.(),em(Be,{recordClsOnPageloadSpan:!a,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:N,ignorePerformanceApiSpans:W}),ha(b,void 0);const Rt=V(),Fn=Rt.getPropagationContext();Rt.setPropagationContext({...Fn,traceId:be.spanContext().traceId,sampled:at(be),dsc:Fe(Be)}),J&&(X=void 0)},trimIdleSpanEndTimestamp:!k});J&&k&&(X=be),ha(b,be);function kt(){n&&["interactive","complete"].includes(n.readyState)&&b.emit("idleSpanEnableAutoFinish",be)}J&&!k&&n&&(n.addEventListener("readystatechange",()=>{kt()}),kt())}return{name:xE,setup(b){if(cl(),O=Vh({recordClsStandaloneSpans:a||!1,recordLcpStandaloneSpans:u||!1,client:b}),r&&km(),s&&fm(),o&&D.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Kh():i&&Yh(),c&&Xh(),I&&n){const w=()=>{ae=ue()};addEventListener("click",w,{capture:!0}),addEventListener("keydown",w,{capture:!0,passive:!0})}function Y(){const w=En(b);w&&!j(w).timestamp&&(Ce&&y.log(`[Tracing] Finishing current active span with op: ${j(w).op}`),w.setAttribute(pn,"cancelled"),w.end())}b.on("startNavigationSpan",(w,J)=>{if(F()!==b)return;if(J?.isRedirect){Ce&&y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ee(b,{op:"navigation.redirect",...w},!1);return}ae=void 0,Y(),Me().setPropagationContext({traceId:Ge(),sampleRand:Math.random(),propagationSpanId:Oe()?void 0:We()});const te=V();te.setPropagationContext({traceId:Ge(),sampleRand:Math.random(),propagationSpanId:Oe()?void 0:We()}),te.setSDKProcessingMetadata({normalizedRequest:void 0}),ee(b,{op:"navigation",...w,parentSpan:null,forceTransaction:!0})}),b.on("startPageLoadSpan",(w,J={})=>{if(F()!==b)return;Y();const te=J.sentryTrace||fa("sentry-trace")||pa("sentry-trace"),ne=J.baggage||fa("baggage")||pa("baggage"),Ee=el(te,ne),be=V();be.setPropagationContext(Ee),Oe()||(be.getPropagationContext().propagationSpanId=We()),be.setSDKProcessingMetadata({normalizedRequest:oi()}),ee(b,{op:"pageload",...w})}),b.on("endPageloadSpan",()=>{k&&X&&(X.setAttribute(pn,"reportPageLoaded"),X.end())})},afterAllSetup(b){let Y=Kt();if(K!=="off"&&kE(b,{linkPreviousTrace:K,consistentTraceSampling:E}),P.location){if(M){const w=me();Yu(b,{name:P.location.pathname,startTime:w?w/1e3:void 0,attributes:{[ke]:"url",[ie]:"auto.pageload.browser"}})}g&&Ar(({to:w,from:J})=>{if(J===void 0&&Y?.indexOf(w)!==-1){Y=void 0;return}Y=void 0;const te=ii(w),ne=En(b),Ee=ne&&I&&DE(ne,ae);OE(b,{name:te?.pathname||P.location.pathname,attributes:{[ke]:"url",[ie]:"auto.navigation.browser"}},{url:w,isRedirect:Ee})})}h&&TE(),c&&LE(b,l,f,p,t),r&&Mm(),yE(b,{traceFetch:m,traceXHR:_,trackFetchStreamPerformance:S,tracePropagationTargets:b.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:T,enableHTTPTimings:$,onRequestSpanStart:B,onRequestSpanEnd:z})}}};function Yu(e,t,n){e.emit("startPageLoadSpan",t,n),V().setTransactionName(t.name);const r=En(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function OE(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=V();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...oi(),url:r}}),En(e)}function fa(e){return P.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function pa(e){return P.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function LE(e,t,n,r,s){const i=P.document;let o;const c=()=>{const a="ui.action.click",u=En(e);if(u){const d=j(u).op;if(["navigation","pageload"].includes(d)){Ce&&y.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(pn,"interactionInterrupted"),o.end(),o=void 0),!s.name){Ce&&y.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=ec({name:s.name,op:a,attributes:{[ke]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",c,{capture:!0})}const Ku="_sentry_idleSpan";function En(e){return e[Ku]}function ha(e,t){Se(e,Ku,t)}const ma=1.5;function DE(e,t){const n=j(e),r=wt(),s=n.start_timestamp;return!(r-s>ma||t&&r-t<=ma)}const PE=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function FE(e){return P.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Xu(e={}){const t=NE({...e,instrumentPageLoad:!1});return{...t,afterAllSetup(n){if(t.afterAllSetup?.(n),P.location&&e.instrumentPageLoad!=!1){const r=me(),{name:s,source:i}=BE();Yu(n,{name:s,startTime:r?r/1e3:void 0,attributes:{[ke]:i,[ie]:"auto.pageload.astro"}})}}}}function BE(){try{const e=FE("sentry-route-name");if(e){const t=decodeURIComponent(e);return PE&&y.log(`[Tracing] Using route name from Sentry HTML meta-tag: ${t}`),{name:t,source:"route"}}}catch{}return{name:P.location.pathname,source:"url"}}function $E(e){const t={defaultIntegrations:UE(),...e};return Ec(t,"astro",["astro","browser"]),Og(t)}function UE(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...Rs(),Xu()]:Rs()}const Ju=!1,HE=Ju;$E({dsn:"https://[email protected]/4509097209626624",environment:"production",tracesSampleRate:.5,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[pE({maskAllText:!0,blockAllMedia:!0}),Xu(),Up({levels:["warn","error"]})],enableLogs:!Ju,spotlight:HE,ignoreErrors:["Illegal invocation","Failed to execute 'fetch' on 'WorkerGlobalScope'"],beforeSend(e){return e}});