1const v=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,L=globalThis,be="10.55.0";function Ae(){return Nr(L),L}function Nr(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||be,e[be]=e[be]||{}}function Ke(t,e,n=L){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[be]=r[be]||{};return s[t]||(s[t]=e())}const gl=["debug","info","warn","error","log","assert","trace"],_l="Sentry Logger ",dr={};function oe(t){if(!("console"in L))return t();const e=L.console,n={},r=Object.keys(dr);r.forEach(s=>{const i=dr[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function Sl(){si().enabled=!0}function yl(){si().enabled=!1}function Ma(){return si().enabled}function El(...t){ri("log",...t)}function bl(...t){ri("warn",...t)}function vl(...t){ri("error",...t)}function ri(t,...e){v&&Ma()&&oe(()=>{L.console[t](`${_l}[${t}]:`,...e)})}function si(){return v?Ke("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:Sl,disable:yl,isEnabled:Ma,log:El,warn:bl,error:vl},xa=50,we="?",qi=/\(error: (.*)\)/,ji=/captureMessage|captureException/;function Na(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(` 2`);for(let c=r;c<o.length;c++){let a=o[c];a.length>1024&&(a=a.slice(0,1024));const u=qi.test(a)?a.replace(qi,"$1"):a;if(!u.includes("Error: ")){for(const d of e){const l=d(u);if(l){i.push(l);break}}if(i.length>=xa+s)break}}return Il(i.slice(s))}}function Tl(t){return Array.isArray(t)?Na(...t):t}function Il(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(jn(e).function||"")&&e.pop(),e.reverse(),ji.test(jn(e).function||"")&&(e.pop(),ji.test(jn(e).function||"")&&e.pop()),e.slice(0,xa).map(n=>({...n,filename:n.filename||jn(e).filename,function:n.function||we}))}function jn(t){return t[t.length-1]||{}}const ss="<anonymous>";function Xt(t){try{return!t||typeof t!="function"?ss:t.name||ss}catch{return ss}}function Gi(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const an={},Vi={};function ae(t,e){return an[t]=an[t]||[],an[t].push(e),()=>{const n=an[t];if(n){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}}function ce(t,e){if(!Vi[t]){Vi[t]=!0;try{e()}catch(n){v&&_.error(`Error while instrumenting ${t}`,n)}}}function kt(t,e){const n=t&&an[t];if(n)for(const r of n)try{r(e)}catch(s){v&&_.error(`Error while triggering instrumentation handler. 3Type: ${t} 4Name: ${Xt(r)} 5Error:`,s)}}let is=null;function Oa(t){const e="error";ae(e,t),ce(e,wl)}function wl(){is=L.onerror,L.onerror=function(t,e,n,r,s){return kt("error",{column:r,error:s,line:n,msg:t,url:e}),is?is.apply(this,arguments):!1},L.onerror.__SENTRY_INSTRUMENTED__=!0}let os=null;function La(t){const e="unhandledrejection";ae(e,t),ce(e,kl)}function kl(){os=L.onunhandledrejection,L.onunhandledrejection=function(t){return kt("unhandledrejection",t),os?os.apply(this,arguments):!0},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Da=Object.prototype.toString;function Or(t){switch(Da.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Re(t,Error)}}function Xe(t,e){return Da.call(t)===`[object ${e}]`}function Pa(t){return Xe(t,"ErrorEvent")}function Yi(t){return Xe(t,"DOMError")}function Rl(t){return Xe(t,"DOMException")}function Vt(t){return Xe(t,"String")}function ii(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ke(t){return t===null||ii(t)||typeof t!="object"&&typeof t!="function"}function fr(t){return Xe(t,"Object")}function Lr(t){return typeof Event<"u"&&Re(t,Event)}function Cl(t){return Xe(t,"RegExp")}function Rn(t){return!!(t?.then&&typeof t.then=="function")}function Re(t,e){try{return t instanceof e}catch{return!1}}function oi(t){return typeof Request<"u"&&Re(t,Request)}function yt(t,e,n){if(!(e in t))return;const r=t[e];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Fa(s,r);try{t[e]=s}catch{v&&_.log(`Failed to replace method "${e}" in object`,t)}}function Et(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{v&&_.log(`Failed to add non-enumerable property "${String(e)}" to object`,t)}}function Fa(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Et(t,"__sentry_original__",e)}catch{}}function ai(t){return t.__sentry_original__}function Ba(t){if(Or(t))return{message:t.message,name:t.name,stack:t.stack,...Ki(t)};
5if(Lr(t)){const{type:e,target:n,currentTarget:r,detail:s}=t;return{type:e,target:n,currentTarget:r,...s?{detail:s}:{},...Ki(t)}}return t}function Ki(t){return typeof t=="object"&&t!==null?Object.fromEntries(Object.entries(t)):{}}function Al(t){const e=Object.keys(Ba(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}let xe;function Cn(t){if(xe!==void 0)return xe?xe(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=L;return e in n&&typeof n[e]=="function"?(xe=n[e],xe(t)):(xe=null,t())}function ee(){return Cn(()=>Math.random())}function An(){return Cn(()=>Date.now())}const Ml=Symbol.for("sentry.skipNormalization"),xl=Symbol.for("sentry.overrideNormalizationDepth");function Nl(t){return!!t[Ml]}function Ol(t){const e=t[xl];return typeof e=="number"?e:void 0}let Ts;function Ll(t){Ts=t}function Nt(t,e=100,n=1/0){try{return Is("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function $a(t,e=3,n=100*1024){const r=Nt(t,e);return Fl(r)>n?$a(t,e-1,n):r}function Is(t,e,n=1/0,r=1/0,s=Bl()){const[i,o]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=Ua(t,e);if(!c.startsWith("[object "))return c;if(Nl(e))return e;const a=Ol(e),u=a!==void 0?a:n;if(u===0)return c.replace("object ","");if(i(e))return"[Circular ~]";const d=e;if(d&&typeof d.toJSON=="function")try{const h=d.toJSON();return Is("",h,u-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let p=0;const f=Ba(e);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=r){l[h]="[MaxProperties ~]";break}const m=f[h];l[h]=Is(h,m,u-1,r,s),p++}return o(e),l}function Ua(t,e){try{if(Ts){const r=Ts(e);if(r)return r}return typeof global<"u"&&e===global?"[Global]":typeof e=="number"&&!Number.isFinite(e)?`[${e}]`:typeof e=="function"?`[Function: ${Xt(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Dl(e)}]`}catch(n){return`**non-serializable** (${n})`}}function Dl(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Pl(t){return~-encodeURI(t).split(/%..|./).length}function Fl(t){return Pl(JSON.stringify(t))}function Bl(){const t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function ws(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Xi(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];ke(s)?n.push(String(s)):s instanceof Error?n.push(s.message?`${s.name}: ${s.message}`:s.name):n.push(Ua(void 0,s))}return n.join(e)}function cn(t,e,n=!1){return Vt(t)?Cl(e)?e.test(t):Vt(e)?n?t===e:t.includes(e):typeof e=="function"?e(t):!1:!1}function $t(t,e=[],n=!1){for(const r of e)if(cn(t,r,n))return!0;return!1}function $l(){const t=L;return t.crypto||t.msCrypto}let as;function Ul(){return ee()*16}function Tt(t=$l()){try{if(t?.randomUUID)return Cn(()=>t.randomUUID()).replace(/-/g,"")}catch{}return as||(as="10000000100040008000"+1e11),as.replace(/[018]/g,e=>(e^(Ul()&15)>>e/4).toString(16))}function Ha(t){return t.exception?.values?.[0]}function Se(t){const{message:e,event_id:n}=t;if(e)return e;const r=Ha(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ks(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function ve(t,e){const n=Ha(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const i={...s?.data,...e.data};n.mechanism.data=i}}function Ji(t){if(Hl(t))return!0;try{Et(t,"__sentry_captured__",!0)}catch{}return!1}function Hl(t){try{return t.__sentry_captured__}catch{}}const Wa=1e3;function Me(){return An()/Wa}function Wl(){const{performance:t}=L;if(!t?.now||!t.timeOrigin)return Me;const e=t.timeOrigin;return()=>(e+Cn(()=>t.now()))/Wa}let Zi;function ct(){return(Zi??(Zi=Wl()))()}let cs=null;function zl(){const{performance:t}=L;if(!t?.now)return;const e=3e5,n=Cn(()=>t.now()),r=An(),s=t.timeOrigin;if(typeof s=="number"&&Math.abs(s+n-r)<e)return s;const i=t.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+n-r)<e?i:r-n}function dt(){return cs===null&&(cs=zl()),cs}function ql(t){const e=ct(),n={sid:Tt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Gl(n)};return t&&He(n,t),n}function He(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||ct(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Tt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),t
5ypeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function jl(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),He(t,n)}function Gl(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function Mn(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Mn(r[s],e[s],n-1));return r}function Jt(){return Tt()}function Yt(){return Tt().substring(16)}const Rs="_sentrySpan";function hn(t,e){e?Et(t,Rs,e):delete t[Rs]}function pr(t){return t[Rs]}const Vl=100;class Wt{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:Jt(),sampleRand:ee()}}clone(){const e=new Wt;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,hn(e,pr(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&He(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this.setTags({[e]:n})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,n){return this.setAttributes({[e]:n})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof Wt?n.getScopeData():fr(n)?e:void 0,{tags:s,attributes:i,extra:o,user:c,contexts:a,level:u,fingerprint:d=[],propagationContext:l,conversationId:p}=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),p&&(this._conversationId=p),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,hn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Jt(),sampleRand:ee()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Vl;if(r<=0)return this;const s={timestamp:Me(),...e,message:e.message?ws(e.message,2048):e.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(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:pr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Mn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||Tt();if(!this._client)return v&&_.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r?.event_id||Tt();if(!this._client)return v&&_.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=e.event_id||n?.event_id||Tt();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(v&&_.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(e=>{e(this)}),this._notifyingListeners=!1)}}function Yl(){return Ke("defaultCurrentScope",()=>new Wt)}function Kl(){return Ke("defaultIsolationScope",()=>new Wt)}const Qi=t=>t instanceof Promise&&!t[za],za=Symbol("chained PromiseLike"),Xl=(t,e,n)=>{const r=t.then(s=>(e(s),s),s=>{throw n(s),s});return Qi(r)&&Qi(t)?r:Jl(t,r)},Jl=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const s=t[r];typeof s=="function"?Object.defineProperty(e,r,{value:(...i)=>s.apply(t,i),enumerable:!0,configurable:!0,writable:!0}):e[r]=s}return n&&Object.assign(e,{[za]:!0}),e};class Zl{constructor(e,n){let r;e?r=e:r=new Wt;let s;n?s=n:s=new Wt,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(s){throw this._popScope(),s}return Rn(r)?Xl(r,()=>this._popScope(),()=>this._popScope()):(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 e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function We(){const t=Ae(),e=Nr(t);return e.stack=e.stack||new Zl(Yl(),Kl())}function Ql(t){return We().withScope(t)}function td(t,e){const n=We();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function to(t){return We().withScope(()=>t(We().getIsolationScope()))}function ed(){return{withIsolationScope:to,withScope:Ql,withSetScope:td,withSetIsolationScope:(t,e)=>to(e),getCurrentScope:()=>We().getScope(),getIsolationScope:()=>We().getIsolationScope()}}function Je(t){const e=Nr(t);return e.acs?e.acs:ed()}function nd(t){return typeof t=="object"&&t!=null&&!Array.isArray(t)&&Object.keys(t).includes("value")}function rd(t,e){const{value:n,unit:r}=nd(t)?t:{value:t,unit:void 0},s=sd(n),i=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...i};if(!e||e==="skip-undefined"&&n===void 0)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...i}}function eo(t,e=!1){const n={};for(const[r,s]of Object.entries(t??{})){const i=rd(s,e);i&&(n[r]=i)}return n}function sd(t){if(Array.isArray(t))return{value:t,type:"array"};const e=typeof t=="string"?"string":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?Number.isInteger(t)?"integer":"double":null;if(e)return{value:t,type:e}}function V(){const t=Ae();return Je(t).getCurrentScope()}function Ct(){const t=Ae();return Je(t).getIsolationScope()}function id(){return Ke("globalScope",()=>new Wt)}function ci(...t){const e=Ae(),n=Je(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function D(){return V().getClient()}function od(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,i={trace_id:n,span_id:s||Yt()};return r&&(i.parent_span_id=r),i}const Ot="sentry.source",ui="sentry.sample_rate",qa="sentry.previous_trace_sample_rate",Rt="sentry.op",it="sentry.origin",mn="sentry.idle_span_finish_reason",xn="sentry.measurement_unit",Nn="sentry.measurement_value",no="sentry.custom_span_name",li="sentry.profile_id",ue="sentry.exclusive_time",ad="sentry.link.type",cd="gen_ai.conversation.id",ja=0,Dr=1,lt=2;function ud(t){if(t<400&&t>=100)return{code:Dr};if(t>=400&&t<500)switch(t){case 401:return{code:lt,message:"unauthenticated"};case 403:return{code:lt,message:"permission_denied"};case 404:return{code:lt,message:"not_found"};case 409:return{code:lt,message:"already_exists"};case 413:return{code:lt,message:"failed_precondition"};case 429:return{code:lt,message:"resource_exhausted"};case 499:return{code:lt,message:"cancelled"};default:return{code:lt,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:lt,message:"unimplemented"};case 503:return{code:lt,message:"unavailable"};case 504:return{code:lt,message:"deadline_exceeded"};default:return{code:lt,message:"internal_error"}}return{code:lt,message:"internal_error"}}function Ga(t,e){t.setAttribute("http.response.status_code",e);const n=ud(e);n.message!=="unknown_error"&&t.setStatus(n)}function ld(t){try{const e=L.WeakRef;if(typeof e=="function")return new e(t)}catch{}return t}function dd(t){if(t){if(typeof t=="object"&&"deref"in t&&typeof t.deref=="function")try{return t.deref()}catch{return}return t}}const Va="_sentryScope",Ya="_sentryIsolationScope";function fd(t,e,n){t&&(Et(t,Ya,ld(n)),Et(t,Va,e))}function hr(t){const e=t;return{scope:e[Va],isolationScope:dd(e[Ya])}}const mr="sentry-",pd=8192;function Ka(t){const e=md(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,i])=>{if(s.startsWith(mr)){const o=s.slice(mr.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function hd(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${mr}${r}`]=s),n),{});return gd(e)}function md(t){if(!(!t||!Vt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=ro(n);return Object.entries(r).forEach(([s,i])=>{e[s]=i}),e},{}):ro(t)}function ro(t){return t.split(",").map(e=>{const n=e.indexOf("=");if(n===-1)return[];const r=e.slice(0,n),s=e.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function gd(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${e},${i}`;return o.length>pd?(v&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}const _d=/^o(\d+)\./,Sd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function yd(t){return t==="http"||t==="https"}function Ze(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Ed(t){const e=Sd.exec(t);if(!e){oe(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i="",o="",c=""]=e.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 Xa({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function Xa(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function bd(t){if(!v)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(_.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?yd(r)?e&&isNaN(parseInt(e,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${e}
5`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function vd(t){return t.match(_d)?.[1]}function Td(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=vd(n)),r}function Id(t){const e=typeof t=="string"?Ed(t):Xa(t);if(!(!e||!bd(e)))return e}function Ce(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const Ja=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function wd(t){if(!t)return;const e=t.match(Ja);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function kd(t,e){const n=wd(t),r=Ka(e);if(!n?.traceId)return{traceId:Jt(),sampleRand:ee()};const s=Rd(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 Za(t=Jt(),e=Yt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function Qa(t=Jt(),e=Yt(),n){return`00-${t}-${e}-${n?"01":"00"}`}function Rd(t,e){const n=Ce(e?.sample_rand);if(n!==void 0)return n;const r=Ce(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?ee()*r:r+ee()*(1-r):ee()}const tc=0,Pr=1;let so=!1;function Cd(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:c,links:a}=j(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:c,links:a}}function Ad(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:j(t).parent_span_id,i=hr(t).scope,o=r?i?.getPropagationContext().propagationSpanId||Yt():e;return{parent_span_id:s,span_id:o,trace_id:n}}function Md(t){const{traceId:e,spanId:n}=t.spanContext(),r=le(t);return Za(e,n,r)}function xd(t){const{traceId:e,spanId:n}=t.spanContext(),r=le(t);return Qa(e,n,r)}function ec(t){if(t&&t.length>0)return t.map(({context:{spanId:e,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:e,trace_id:n,sampled:r===Pr,attributes:i,...s}))}function nc(t){if(t?.length)return t.map(({context:{spanId:e,traceId:n,traceFlags:r},attributes:s})=>({span_id:e,trace_id:n,sampled:r===Pr,attributes:s}))}function Kt(t){return typeof t=="number"?io(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?io(t.getTime()):ct()}function io(t){return t>9999999999?t/1e3:t}function j(t){if(oc(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(ic(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:c,links:a}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:sc(t),start_timestamp:Kt(s),timestamp:Kt(o)||void 0,status:ac(c),op:r[Rt],origin:r[it],links:ec(a)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function rc(t){if(oc(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(ic(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:c,links:a}=t;return{name:i,span_id:e,trace_id:n,parent_span_id:sc(t),start_timestamp:Kt(s),end_timestamp:Kt(o),is_segment:t===As(t),status:cc(c),attributes:r,links:nc(a)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===As(t)}}function sc(t){return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0}function Nd(t){return{...t,attributes:eo(t.attributes),links:t.links?.map(e=>({...e,attributes:eo(e.attributes)}))}}function ic(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function oc(t){return typeof t.getSpanJSON=="function"}function le(t){const{traceFlags:e}=t.spanContext();return e===Pr}function ac(t){if(!(!t||t.code===ja))return t.code===Dr?"ok":t.message||"internal_error"}function cc(t){return!t||t.code===Dr||t.code===ja||t.message==="cancelled"?"ok":"error"}const Te="_sentryChildSpans",Cs="_sentryRootSpan";function uc(t,e){const n=t[Cs]||t;Et(e,Cs,n),t[Te]?t[Te].add(e):Et(t,Te,new Set([e]))}function Od(t,e){t[Te]&&t[Te].delete(e)}function rr(t){const e=new Set;function n(r){if(!e.has(r)&&le(r)){e.add(r);const s=r[Te]?Array.from(r[Te]):[];for(const i of s)n(i)}}return n(t),Array.from(e)}const pt=As;function As(t){return t[Cs]||t}function ht(){const t=Ae(),e=Je(t);return e.getActiveSpan?e.getActiveSpan():pr(V())}function Ms(){so||(oe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),so=!0)}let oo=!1;
5function Ld(){if(oo)return;function t(){const e=ht(),n=e&&pt(e);if(n){const r="internal_error";v&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:lt,message:r})}}oo=!0,Oa(t),La(t)}function Lt(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||D()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}function ao(t){_.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function gn(t,e){if(!e?.length)return!1;for(const n of e){if(Fd(n)){if(t.description&&cn(t.description,n))return v&&ao(t),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const s=n.name?t.description&&cn(t.description,n.name):!0,i=n.op?t.op&&cn(t.op,n.op):!0,o=n.attributes?Object.entries(n.attributes).every(([c,a])=>Dd(t.attributes?.[c],a)):!0;if(s&&i&&o)return v&&ao(t),!0}return!1}function Dd(t,e){return typeof t=="string"&&(typeof e=="string"||e instanceof RegExp)?cn(t,e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t===e}function Pd(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const s of t)s.parent_span_id===r&&(s.parent_span_id=n)}function Fd(t){return typeof t=="string"||t instanceof RegExp}const di="production",lc="_frozenDsc";function sr(t,e){Et(t,lc,e)}function dc(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||di,release:n.release,public_key:r,trace_id:t,org_id:Td(e)};return e.emit("createDsc",s),s}function fc(t,e){const n=e.getPropagationContext();return n.dsc||dc(n.traceId,t)}function zt(t){const e=D();if(!e)return{};const n=pt(t),r=j(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[ui]??s[qa];function c(h){return(typeof o=="number"||typeof o=="string")&&(h.sample_rate=`${o}`),h}const a=n[lc];if(a)return c(a);const u=i?.get("sentry.dsc"),d=u&&Ka(u);if(d)return c(d);const l=dc(t.spanContext().traceId,e),p=s[Ot]??s["sentry.span.source"],f=r.description;return p!=="url"&&f&&(l.transaction=f),Lt()&&(l.sampled=String(le(n)),l.sample_rand=i?.get("sentry.sample_rand")??hr(n).scope?.getPropagationContext().sampleRand.toString()),c(l),e.emit("createDsc",l,n),l}class Ut{constructor(e={}){this._traceId=e.traceId||Jt(),this._spanId=e.spanId||Yt(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:tc}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function pc(t){return!!t&&typeof t=="function"&&"_streamed"in t&&!!t._streamed}function de(t,e=[]){return[t,e]}function co(t,e){const[n,r]=t;return[n,[...r,e]]}function xs(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function Bd(t,e){return xs(t,(n,r)=>e.includes(r))}function Ns(t){const e=Nr(L);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function $d(t){const[e,n]=t;let r=JSON.stringify(e);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Ns(r),i]:r.push(typeof i=="string"?Ns(i):i)}for(const i of n){const[o,c]=i;if(s(` 6${JSON.stringify(o)} 7`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(Nt(c))}s(a)}}return typeof r=="string"?r:Ud(r)}function Ud(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function Hd(t){return[{type:"span"},t]}function Wd(t){const e=typeof t.data=="string"?Ns(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const hc={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function zd(t){return t in hc}function uo(t){return zd(t)?hc[t]:t}function fi(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function mc(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Ze(r)},...s&&{trace:s}}}function qd(t,e){if(!e)return t;const n=t.sdk||{};return t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?{...t.sdk?.settings,...e.settings}:void 0},t}
7function jd(t,e,n,r){const s=fi(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Ze(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return de(i,[o])}function Gd(t,e,n,r){const s=fi(n),i=t.type&&t.type!=="replay_event"?t.type:"event";qd(t,n?.sdk);const o=mc(t,s,r,e);return delete t.sdkProcessingMetadata,de(o,[[{type:i},t]])}function Vd(t,e){function n(f){return!!f.trace_id&&!!f.public_key}const r=zt(t[0]),s=e?.getDsn(),i=e?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Ze(s)}},{beforeSendSpan:c,ignoreSpans:a}=e?.getOptions()||{},u=a?.length?t.filter(f=>{const h=j(f);return!gn({description:h.description,op:h.op,attributes:h.data},a)}):t,d=t.length-u.length;d&&e?.recordDroppedEvent("before_send","span",d);const l=c?f=>{const h=j(f),m=pc(c)?h:c(h);return m||(Ms(),h)}:j,p=[];for(const f of u){const h=l(f);h&&p.push(Hd(h))}return de(o,p)}function Yd(t){if(!v)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=j(t),{spanId:s}=t.spanContext(),i=le(t),o=pt(t),c=o===t,a=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`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}`)}_.log(`${a} 8 ${u.join(` 9 `)}`)}function Kd(t){if(!v)return;const{description:e="< unknown name >",op:n="< unknown op >"}=j(t),{spanId:r}=t.spanContext(),i=pt(t)===t,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${e}" with ID ${r}`;_.log(o)}function Xd(t,e,n,r=ht()){const s=r&&pt(r);s&&(v&&_.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[Nn]:e,[xn]:n}))}function lo(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[xn],i=r[Nn];typeof s=="string"&&typeof i=="number"&&(e[n.name]={value:i,unit:s})}),e}function qt(t){return t.getOptions().traceLifecycle==="stream"}const fo=1e3;class Fr{constructor(e={}){this._traceId=e.traceId||Jt(),this._spanId=e.spanId||Yt(),this._startTime=e.startTimestamp||ct(),this._links=e.links,this._attributes={},this.setAttributes({[it]:"manual",[Rt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Pr:tc}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Kt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Ot,"custom"),this}end(e){this._endTime||(this._endTime=Kt(e),Kd(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Rt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ac(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[it],profile_id:this._attributes[li],exclusive_time:this._attributes[ue],measurements:lo(this._events),is_segment:this._isStandaloneSpan&&pt(this)===this||void 0,segment_id:this._isStandaloneSpan?pt(this).spanContext().spanId:void 0,links:ec(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===pt(this),status:cc(this._status),attributes:this._attributes,links:nc(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){v&&_.log("[Tracing] Adding an event to span:",e);const s=po(n)?n:r||ct(),i=po(n)?{}:n||{},o={name:e,time:Kt(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=D();if(e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===pt(this)))return;if(this._isStandaloneSpan){this._sampled?Zd(Vd([this],e)):(v&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}else if(e&&qt(e)){e.emit("afterSegmentSpanEnd",this);return}const r=this._convertSpanToTransaction();r&&(hr(this).scope||V()).captureEvent(r)}_convertSpanToTransaction(){if(!ho(j(this)))return;this._name||(v&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=hr(this),r=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=rr(this).filter(l=>
9l!==this&&!Jd(l)).map(l=>j(l)).filter(ho),o=this._attributes[Ot];delete this._attributes[no];let c=!1;i.forEach(l=>{delete l.data[no],l.op?.startsWith("gen_ai.")&&(c=!0)});const a={contexts:{trace:Cd(this)},spans:i.length>fo?i.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,fo):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:zt(this),hasGenAiSpans:c},request:r,...o&&{transaction_info:{source:o}}},u=lo(this._events);return u&&Object.keys(u).length&&(v&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),a.measurements=u),a}}function po(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function ho(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function Jd(t){return t instanceof Fr&&t.isStandaloneSpan()}function Zd(t){const e=D();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function Qd(t,e,n){if(!Lt(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:c=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):c}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const i=Ce(s);if(i===void 0)return v&&_.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&&_.log(`[Tracing] Discarding transaction because ${typeof t.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&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const tf="__SENTRY_SUPPRESS_TRACING__";function fe(t){const e=_c();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=nf(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?o=>ci(t.scope,o):s!==void 0?o=>gc(s,o):o=>o())(()=>{const o=V(),c=sf(o,s),a=D();return t.onlyIfParent&&!c?(a?.recordDroppedEvent("no_parent_span","span"),new Ut):ef({parentSpan:c,spanArguments:n,forceTransaction:r,scope:o})})}function gc(t,e){const n=_c();return n.withActiveSpan?n.withActiveSpan(t,e):ci(r=>(hn(r,t||void 0),e(r)))}function ef({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Lt()){const c=new Ut;if(n||!t){const a={sampled:"false",sample_rate:"0",transaction:e.name,...zt(c)};sr(c,a)}return c}const s=D();if(of(s,e))return pi(r)||s?.recordDroppedEvent("ignored","span"),new Ut({dropReason:"ignored",traceId:t?.spanContext().traceId??r.getPropagationContext().traceId});const i=Ct();let o;if(t&&!n)o=rf(t,r,e),uc(t,o);else if(t){const c=zt(t),{traceId:a,spanId:u}=t.spanContext(),d=le(t);o=mo({traceId:a,parentSpanId:u,...e},r,d),sr(o,c)}else{const{traceId:c,dsc:a,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...r.getPropagationContext()};o=mo({traceId:c,parentSpanId:u,...e},r,d),a&&sr(o,a)}return Yd(o),fd(o,r,i),o}function nf(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Kt(t.startTime),delete r.startTime,r}return n}function _c(){const t=Ae();return Je(t)}function mo(t,e,n){const r=D(),s=r?.getOptions()||{},{name:i=""}=t,o={spanAttributes:{...t.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const c=o.parentSampled??n,a=o.spanAttributes,u=e.getPropagationContext(),d=pi(e),[l,p,f]=d?[!1]:Qd(s,{name:i,parentSampled:c,attributes:a,parentSampleRate:Ce(u.dsc?.sample_rate)},u.sampleRand),h=new Fr({...t,attributes:{[Ot]:"custom",[ui]:p!==void 0&&f?p:void 0,...a},sampled:l});return!l&&r&&!d&&(v&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate",qt(r)?"span":"transaction")),r&&r.emit("spanStart",h),h}function rf(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),i=pi(e),o=i?!1:le(t),c=o?new Fr({...n,parentSpanId:r,traceId:s,sampled:o}):new Ut({traceId:s});uc(t,c);const a=D();return a&&(qt(a)&&c instanceof Ut&&(t instanceof Ut&&t.dropReason?(c.dropReason=t.dropReason,a.recordDroppedEvent(t.dropReason,"span")):i||(c.dropReason="sample_rate",a.recordDroppedEvent("sample_rate","span"))),a.emit("spanStart",c),n.endTimestamp&&(a.emit("spanEnd",c),a.emit("afterSpanEnd",c))),c}function sf(t,e){if(e)return e;if(e===null)return;const n=pr(t);if(!n)return;const r=D();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?pt(n):n}function of(t,e){const n=t?.getOptions().ignoreSpans;return!t||!qt(t)||!n?.length?!1:gn({description:e.name||"",op:e.attributes?.[Rt]||e.op,attributes:e.attributes},n)}function pi(t){return t.getScopeData().sdkProcessingMetadata[tf]===!0}const ir={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},af="heartbeatFailed",cf="idleTimeout",uf="finalTimeout",lf="externalFinish";function Sc(t,e={}){const n=new Map;let r=!1,s,i=lf,o=!e.disableAutoFinish;const c=[],{idleTimeout:a=ir.idleTimeout,finalTimeout:u=ir.finalTimeout,childSpanTimeout:d=ir.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:p=!0}=e,f=D();if(!f||!Lt()){const g=new Ut,T={sample_rate:"0",sampled:"false",...zt(g)};return sr(g,T),g}
9const h=V(),m=ht(),S=df(t);S.end=new Proxy(S.end,{apply(g,T,et){if(l&&l(S),T instanceof Ut)return;const[b,...w]=et,U=b||ct(),q=Kt(U),F=rr(S).filter(A=>A!==S),at=j(S);if(!F.length||!p)return x(q),Reflect.apply(g,T,[q,...w]);const X=f.getOptions().ignoreSpans,nt=F?.reduce((A,$)=>{const J=j($);return!J.timestamp||X&&gn({description:J.description,op:J.op,attributes:J.data},X)?A:A?Math.max(A,J.timestamp):J.timestamp},void 0),E=at.start_timestamp,Y=Math.min(E?E+u/1e3:1/0,Math.max(E||-1/0,Math.min(q,nt||1/0)));return x(Y),Reflect.apply(g,T,[Y,...w])}});function y(){s&&(clearTimeout(s),s=void 0)}function I(g){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=cf,S.end(g))},a)}function P(g){s=setTimeout(()=>{!r&&o&&(i=af,S.end(g))},d)}function B(g){y(),n.set(g,!0);const T=ct();P(T+d/1e3)}function K(g){if(n.has(g)&&n.delete(g),n.size===0){const T=ct();I(T+a/1e3)}}function x(g){r=!0,n.clear(),c.forEach(F=>F()),hn(h,m);const T=j(S),{start_timestamp:et}=T;if(!et)return;T.data[mn]||S.setAttribute(mn,i);const w=T.status;(!w||w==="unknown")&&S.setStatus({code:Dr}),_.log(`[Tracing] Idle span "${T.op}" finished`);const U=rr(S).filter(F=>F!==S);let q=0;U.forEach(F=>{F.isRecording()&&(F.setStatus({code:lt,message:"cancelled"}),F.end(g),v&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(F,void 0,2)));const at=j(F),{timestamp:X=0,start_timestamp:nt=0}=at,E=nt<=g,Y=(u+a)/1e3,A=X-nt<=Y;if(v){const $=JSON.stringify(F,void 0,2);E?A||_.log("[Tracing] Discarding span since it finished after idle span final timeout",$):_.log("[Tracing] Discarding span since it happened after idle span was finished",$)}(!A||!E)&&(Od(S,F),q++)}),q>0&&S.setAttribute("sentry.idle_span_discarded_spans",q)}return c.push(f.on("spanStart",g=>{if(r||g===S||j(g).timestamp||g instanceof Fr&&g.isStandaloneSpan())return;rr(S).includes(g)&&B(g.spanContext().spanId)})),c.push(f.on("spanEnd",g=>{r||K(g.spanContext().spanId)})),c.push(f.on("idleSpanEnableAutoFinish",g=>{g===S&&(o=!0,I(),n.size&&P())})),e.disableAutoFinish||I(),setTimeout(()=>{r||(S.setStatus({code:lt,message:"deadline_exceeded"}),i=uf,S.end())},u),S}function df(t){const e=fe(t);return hn(V(),e),v&&_.log("[Tracing] Started span is an idle span"),e}function ff(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;pf(t,e),r&&gf(t,r),_f(t,n),hf(t,s),mf(t,i)}function go(t,e){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:c,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:p,propagationContext:f,transactionName:h,span:m}=e;sn(t,"extra",n),sn(t,"tags",r),sn(t,"attributes",s),sn(t,"user",i),sn(t,"contexts",o),t.sdkProcessingMetadata=Mn(t.sdkProcessingMetadata,a,2),c&&(t.level=c),h&&(t.transactionName=h),m&&(t.span=m),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext={...t.propagationContext,...f}}function sn(t,e,n){t[e]=Mn(t[e],n,1)}function yc(t,e){const n=id().getScopeData();return t&&go(n,t.getScopeData()),e&&go(n,e.getScopeData()),n}function pf(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:c}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(i).length&&(t.contexts={...i,...t.contexts}),o&&(t.level=o),c&&t.type!=="transaction"&&(t.transaction=c)}function hf(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function mf(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function gf(t,e){t.contexts={trace:Ad(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:zt(e),...t.sdkProcessingMetadata};const n=pt(e),r=j(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function _f(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}const Sf="thismessage:/";function hi(t){return"isRelative"in t}function Br(t,e){const n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=n?Sf:void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const s=new URL(t,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function Ec(t){if(hi(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function Ie(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function yf(t){return t.split(/[?#]/,1)[0]}function Ht(t,e=!0){if(t.startsWith("data:")){const n=t.match(/^data:([^;
9,]+)/),r=n?n[1]:"text/plain",s=t.includes(";base64,"),i=t.indexOf(",");let o="";if(e&&i!==-1){const c=t.slice(i+1);o=c.length>10?`${c.slice(0,10)}... [truncated]`:c}return`data:${r}${s?",base64":""}${o?`,${o}`:""}`}return t}function mi(t,e){const n=t.attributes??(t.attributes={});Object.entries(e).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const us=0,_o=1,So=2;function On(t){return new _n(e=>{e(t)})}function gi(t){return new _n((e,n)=>{n(t)})}class _n{constructor(e){this._state=us,this._handlers=[],this._runExecutor(e)}then(e,n){return new _n((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new _n((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===us)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===_o&&n[1](this._value),this._state===So&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(i,o)=>{if(this._state===us){if(Rn(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(_o,i)},s=i=>{n(So,i)};try{e(r,s)}catch(i){s(i)}}}function Ef(t,e,n,r=0){try{const s=Os(e,n,t,r);return Rn(s)?s:On(s)}catch(s){return gi(s)}}function Os(t,e,n,r){const s=n[r];if(!t||!s)return t;const i=s({...t},e);return v&&i===null&&_.log(`Event processor "${s.id||"?"}" dropped event`),Rn(i)?i.then(o=>Os(o,e,n,r+1)):Os(i,e,n,r+1)}let _e,yo,Eo,Zt;function bf(t){const e=L._sentryDebugIds,n=L._debugIds;if(!e&&!n)return{};const r=e?Object.keys(e):[],s=n?Object.keys(n):[];if(Zt&&r.length===yo&&s.length===Eo)return Zt;yo=r.length,Eo=s.length,Zt={},_e||(_e={});const i=(o,c)=>{for(const a of o){const u=c[a],d=_e?.[a];if(d&&Zt&&u)Zt[d[0]]=u,_e&&(_e[a]=[d[0],u]);else if(u){const l=t(a);for(let p=l.length-1;p>=0;p--){const h=l[p]?.filename;if(h&&Zt&&_e){Zt[h]=u,_e[a]=[h,u];break}}}}};return e&&i(r,e),n&&i(s,n),Zt}function bc(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,a={...e,event_id:e.event_id||n.event_id||Tt(),timestamp:e.timestamp||Me()},u=n.integrations||t.integrations.map(y=>y.name);vf(a,t),wf(a,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&Tf(a,t.stackParser);const d=Rf(r,n.captureContext);n.mechanism&&ve(a,n.mechanism);const l=s?s.getEventProcessors():[],p=yc(i,d),f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),ff(a,p);const h=[...l,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?On(a):Ef(h,a,n)).then(y=>(y&&If(y),typeof o=="number"&&o>0?kf(y,o,c):y))}function vf(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||di,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&i&&(o.url=ws(o.url,i)),i&&t.exception?.values?.forEach(c=>{c.value&&(c.value=ws(c.value,i))})}function Tf(t,e){const n=bf(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function If(t){const e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function wf(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function kf(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:Nt(s.data,e,n)}}))},...t.user&&{user:Nt(t.user,e,n)},...t.contexts&&{contexts:Nt(t.contexts,e,n)},...t.extra&&{extra:Nt(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Nt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>({...s,...s.data&&{data:Nt(s.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Nt(t.contexts.flags,3,n)),r}function Rf(t,e){if(!e)return t;const n=t?t.clone():new Wt;return n.update(e),n}function Cf(t){if(t)return Af(t)?{captureContext:t}:xf(t)?{captureContext:t}:t}function Af(t){return t instanceof Wt||typeof t=="function"}const Mf=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function xf(t){return Object.keys(t).some(e=>Mf.includes(e))}function vc(t,e){return V().captureException(t,Cf(e))}function Tc(t,e){return V().captureEvent(t,e)}function Nf(t,e){Ct().setContext(t,e)}function Of(){const t=D();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}
9function Lf(t){Ct().addEventProcessor(t)}function bo(t){const e=Ct(),{user:n}=yc(e,V()),{userAgent:r}=L.navigator||{},s=ql({user:n,...r&&{userAgent:r},...t}),i=e.getSession();return i?.status==="ok"&&He(i,{status:"exited"}),Ic(),e.setSession(s),s}function Ic(){const t=Ct(),n=V().getSession()||t.getSession();n&&jl(n),wc(),t.setSession()}function wc(){const t=Ct(),e=D(),n=t.getSession();n&&e&&e.captureSession(n)}function ls(t=!1){if(t){Ic();return}wc()}const Df="7";function Pf(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Ff(t){return`${Pf(t)}${t.projectId}/envelope/`}function Bf(t,e){const n={sentry_version:Df};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function $f(t,e,n){return e||`${Ff(t)}?${Bf(t,n)}`}const vo=[];function Uf(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function Hf(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return Uf(r)}function Wf(t,e){const n={};return e.forEach(r=>{r?.beforeSetup&&r.beforeSetup(t)}),e.forEach(r=>{r&&kc(t,r,n)}),n}function To(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function kc(t,e,n){if(n[e.name]){v&&_.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,!vo.includes(e.name)&&typeof e.setupOnce=="function"&&(e.setupOnce(),vo.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,i)=>r(s,i,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((i,o)=>r(i,o,t),{id:e.name});t.addEventProcessor(s)}["processSpan","processSegmentSpan"].forEach(r=>{const s=e[r];typeof s=="function"&&t.on(r,i=>s.call(e,i,t))}),v&&_.log(`Integration installed: ${e.name}`)}function zf(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function qf(){return"npm"}function jf(){return!zf()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ze(){return typeof window<"u"&&(!jf()||Gf())}function Gf(){return L.process?.type==="renderer"}function Vf(t,e){const n=e?"auto":"never";return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ze()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function Yf(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Ze(r)),de(i,[Vf(t,s)])}function Ls(t,e){const n=e??Kf(t)??[];if(n.length===0)return;const r=t.getOptions(),s=Yf(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);Rc().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function Kf(t){return Rc().get(t)}function Rc(){return Ke("clientToLogBufferMap",()=>new WeakMap)}function Xf(t,e){const n=e?"auto":"never";return[{type:"trace_metric",item_count:t.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...ze()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function Jf(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Ze(r)),de(i,[Xf(t,s)])}function Cc(t,e){const n=e??Zf(t)??[];if(n.length===0)return;const r=t.getOptions(),s=Jf(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);Ac().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(s)}function Zf(t){return Ac().get(t)}function Ac(){return Ke("clientToMetricBufferMap",()=>new WeakMap)}function Qf(t){const e={trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,name:t.description||"",start_timestamp:t.start_timestamp,end_timestamp:t.timestamp||t.start_timestamp,status:!t.status||t.status==="ok"||t.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...t.data},links:t.links};return Nd(e)}function tp(t,e){if(t.type!=="transaction"||!t.spans?.length||!t.sdkProcessingMetadata?.hasGenAiSpans||!e.getOptions().streamGenAiSpans||qt(e))return;const n=[],r=[];for(const i of t.spans)i.op?.startsWith("gen_ai.")?n.push(Qf(i)):r.push(i);if(n.length===0)return;t.spans=r;const s=e.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ze()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}function Mc(t){return typeof t=="object"&&typeof t.unref=="function"&&t.unref(),t}const _i=Symbol.for("SentryBufferFullError");function Si(t=100){const e=new Set;function n(){return e.size<t}function r(o){e.delete(o)}function s(o){if(!n())return gi(_i);const c=o();return e.add(c),c.then(()=>r(c),()=>r(c)),c}function i(o){if(!e.size)return On(!0);const c=Promise.allSettled(Array.from(e)).then(()=>!0);if(!o)return c;const a=[c,new Promise(u=>Mc(setTimeout(()=>u(!1),o)))];return Promise.race(a)}return{get $(){return Array.from(e)},add:s,drain:i}}const ep=60*1e3;function np(t,e=An()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?ep:r-e}function rp(t,e){return t[e]||t.all||0}function xc(t,e,n=An()){return rp(t,e)>n}function Nc(t,{statusCode:e,headers:n},r=An()){const s={...t},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),p=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[f]=r+p):s[f]=r+p}else o?s.all=r+np(o,r):e===429&&(s.all=r+60*1e3);return s}const Oc=64;function sp(t,e,n=Si(t.bufferSize||Oc)){let r={};const s=o=>n.drain(o);function i(o){const c=[];if(xs(o,(l,p)=>{const f=uo(p);xc(r,f)?t.recordDroppedEvent("ratelimit_backoff",f):c.push(l)}),c.length===0)return Promise.resolve({});const a=de(o[0],c),u=l=>{if(Bd(a,["client_report"])){v&&_.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}xs(a,(p,f)=>{t.recordDroppedEvent(l,uo(f))})},d=()=>e({body:$d(a)}).then(l=>l.statusCode===413?(v&&_.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)&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Nc(r,l),l),l=>{throw u("network_error"),v&&_.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===_i)return v&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:i,flush:s}}function ip(t,e,n){const r=[{type:"client_report"},{timestamp:Me(),discarded_events:t}];return de(e?{dsn:e}:{},[r])}function Lc(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function op(t){const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:c}=t.contexts?.trace??{};return{data:o??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:i,profile_id:o?.[li],exclusive_time:o?.[ue],measurements:t.measurements,is_segment:!0}}function ap(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[li]:t.profile_id},...t.exclusive_time&&{[ue]:t.exclusive_time}}}},measurements:t.measurements}}const Gn=["forwarded","-ip","remote-","via","-user"];function cp(t){return t===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0}
9,stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:Gn},httpHeaders:{request:{deny:Gn},response:{deny:Gn}},httpBodies:[],queryParams:{deny:Gn},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}const up={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function lp(t){const e=t.dataCollection!=null?up:cp(t.sendDefaultPii),n=t.dataCollection??{};return{userInfo:n.userInfo??e.userInfo,cookies:n.cookies??e.cookies,httpHeaders:{request:n.httpHeaders?.request??e.httpHeaders.request,response:n.httpHeaders?.response??e.httpHeaders.response},httpBodies:n.httpBodies??e.httpBodies,queryParams:n.queryParams??e.queryParams,genAI:{inputs:n.genAI?.inputs??e.genAI.inputs,outputs:n.genAI?.outputs??e.genAI.outputs},stackFrameVariables:n.stackFrameVariables??e.stackFrameVariables,frameContextLines:n.frameContextLines??e.frameContextLines}}const Io="Not capturing exception because it's already been captured.",wo="Discarded session because of missing or non-string release",Dc=Symbol.for("SentryInternalError"),Pc=Symbol.for("SentryDoNotSendEventError"),dp=5e3;function or(t){return{message:t,[Dc]:!0}}function ds(t){return{message:t,[Pc]:!0}}function ko(t){return!!t&&typeof t=="object"&&Dc in t}function Ro(t){return!!t&&typeof t=="object"&&Pc in t}function Co(t,e,n,r,s){let i=0,o,c=!1;t.on(n,()=>{i=0,clearTimeout(o),c=!1}),t.on(e,a=>{if(i+=r(a),i>=8e5)s(t);else if(!c){const u=t.getOptions()._flushInterval??dp;u>0&&(c=!0,o=Mc(setTimeout(()=>{s(t)},u)))}}),t.on("flush",()=>{s(t)})}class fp{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Si(e.transportOptions?.bufferSize??Oc),this._dataCollection=lp(e),e.dsn?this._dsn=Id(e.dsn):v&&_.warn("No DSN provided, client will not send events."),this._dsn){const r=$f(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Co(this,"afterCaptureLog","flushLogs",gp,Ls),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Co(this,"afterCaptureMetric","flushMetrics",mp,Cc)}captureException(e,n,r){const s=Tt();if(Ji(e))return v&&_.log(Io),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(e,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(e,n,r,s){const i={event_id:Tt(),...r},o=ii(e)?e:String(e),c=ke(e),a=c?this.eventFromMessage(o,n,i):this.eventFromException(e,i);return this._process(()=>a.then(u=>this._captureEvent(u,i,s)),c?"unknown":"error"),i.event_id}captureEvent(e,n,r){const s=Tt();if(n?.originalException&&Ji(n.originalException))return v&&_.log(Io),s;const i={event_id:s,...n},o=e.sdkProcessingMetadata||{},c=o.capturedSpanScope,a=o.capturedSpanIsolationScope,u=Ao(e.type);return this._process(()=>this._captureEvent(e,i,c||r,a),u),i.event_id}captureSession(e){this.sendSession(e),He(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(e),s=await n.flush(e);return r&&s}async close(e){Ls(this);const n=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const n=this._integrations[e.name];!n&&e.beforeSetup&&e.beforeSetup(this),kc(this,e,this._integrations),n||To(this,[e])}sendEvent(e,n={}
9){this.emit("beforeSendEvent",e,n);const r=tp(e,this);let s=Gd(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])s=co(s,Wd(i));r&&(s=co(s,r)),this.sendEnvelope(s).then(i=>this.emit("afterSendEvent",e,i))}sendSession(e){const{release:n,environment:r=di}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!n){v&&_.warn(wo);return}i.release=i.release||n,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!n){v&&_.warn(wo);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=jd(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;v&&_.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(n){return v&&_.error("Error while sending envelope:",n),{}}return v&&_.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Wf(this,e),To(this,e)}_updateSessionFromEvent(e,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=e.status==="ok";(o&&e.errors===0||o&&r)&&(He(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let n=0;for(;!e||n<e;){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(e,n,r,s){const i=this.getOptions(),o=this.getIntegrationNames();return!n.integrations&&o.length&&(n.integrations=o),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),bc(i,e,n,r,this,s).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:{...c.contexts?.trace,...od(r)},...c.contexts};const a=fc(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(e,n={},r=V(),s=Ct()){return v&&Ds(e)&&_.log(`Captured error event \`${Lc(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(i=>i.event_id,i=>{v&&(Ro(i)?_.log(i.message):ko(i)?_.warn(i.message):_.warn(i))})}_processEvent(e,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,c=Fc(e),a=Ds(e),d=`before send for type \`${e.type||"error"}\``,l=typeof o>"u"?void 0:Ce(o);if(a&&typeof l=="number"&&ee()>l)return this.recordDroppedEvent("sample_rate","error"),gi(ds(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const p=Ao(e.type);return this._prepareEvent(e,n,r,s).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),ds("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return f;const m=hp(this,i,f,n);return pp(m,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),c){const y=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw ds(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(a&&h&&this._updateSessionFromEvent(h,f),c){const S=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=f.spans?f.spans.length:0,I=S-y;I>0&&this.recordDroppedEvent("before_send","span",I)}const m=f.transaction_info;if(c&&m&&f.transaction!==e.transaction){const S="custom";f.transaction_info={...m,source:S}}return this.sendEvent(f,n),f}).then(null,f=>{throw Ro(f)||ko(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),or(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${f}`))})}_process(e,n){this._numProcessing++,this._promiseBuffer.add(e).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===_i&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){v&&_.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){v&&_.log("No outcomes to send");return}if(!this._dsn){v&&_.log("No dsn provided, will not send outcomes");return}v&&_.log("Sending outcomes:",e);const n=ip(e,this._options.tunnel&&Ze(this._dsn));this.sendEnvelope(n)}}function Ao(t){return t==="replay_event"?"replay":t||"error"}function pp(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Rn(t))return t.then(r=>{if(!fr(r)&&r!==null)throw or(n);return r},r=>{throw or(`${e} rejected with ${r}`)});if(!fr(t)&&t!==null)throw or(n);return t}function hp(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,ignoreSpans:o}=e,c=!pc(e.beforeSendSpan)&&e.beforeSendSpan;let a=n;if(Ds(a)&&s)return s(a,r);if(Fc(a)){if(c||o){const u=op(a);if(o?.length&&gn({description:u.description,op:u.op,attributes:u.data},o))return null;if(c){const d=c(u);d?a=Mn(n,ap(d)):Ms()}if(a.spans){const d=[],l=a.spans;for(const f of l){if(o?.length&&gn({description:f.description,op:f.op,attributes:f.data},o)){Pd(l,f);continue}if(c){const h=c(f);h?d.push(h):(Ms(),d.push(f))}else d.push(f)}const p=a.spans.length-d.length;p&&t.recordDroppedEvent("before_send","span",p),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 Ds(t){return t.type===void 0}function Fc(t){return t.type==="transaction"}function mp(t){let e=0;return t.name&&(e+=t.name.length*2),e+=8,e+Bc(t.attributes)}function gp(t){let e=0;return t.message&&(e+=t.message.length*2),e+Bc(t.attributes)}function Bc(t){if(!t)return 0;let e=0;return Object.values(t).forEach(n=>{Array.isArray(n)?e+=n.length*Mo(n[0]):ke(n)?e+=Mo(n):e+=100}),e}function Mo(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}function _p(t,e){e.debug===!0&&(v?_.enable():oe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),V().update(e.initialScope);const r=new t(e);return Sp(r),r.init(),r}function Sp(t){V().setClient(t)}function yp(t,e){const n=e?.getDsn(),r=e?.getOptions().tunnel;return bp(t,n)||Ep(t,r)}function Ep(t,e){return e?xo(t)===xo(e):!1}function bp(t,e){const n=Br(t);return!n||hi(n)||!e?!1:vp(n.hostname,e.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function vp(t,e){return t===e||e.length>0&&t.endsWith(`.${e}`)}function xo(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Tp(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function $c(t,e,n=[e],r="npm"){const s=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${e}`,s.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:be})),s.version=be)}function Uc(t={}){const e=t.client||D();if(!Of()||!e)return{};const n=Ae(),r=Je(n);if(r.getTraceData)return r.getTraceData(t);
10const s=t.scope||V(),i=t.span||ht(),o=i?Md(i):Ip(s),c=i?zt(i):fc(e,s),a=hd(c);if(!Ja.test(o))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":o,baggage:a};return t.propagateTraceparent&&(d.traceparent=i?xd(i):wp(s)),d}function Ip(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Za(e,r,n)}function wp(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Qa(e,r,n)}function kp(t,e,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,e):0,c=n?.setTimeoutImpl||setTimeout;function a(){return u(),r=t(),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,e),o&&i===void 0&&(i=c(a,o)),r}return l.cancel=u,l.flush=d,l}const Rp=100;function se(t,e){const n=D(),r=Ct();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Rp}=n.getOptions();if(i<=0)return;const c={timestamp:Me(),...t},a=s?oe(()=>s(c,e)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,i))}let No;const Cp="FunctionToString",Oo=new WeakMap,Ap=(()=>({name:Cp,setupOnce(){No=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=ai(this),n=Oo.has(D())&&e!==void 0?e:this;return No.apply(n,t)}}catch{}},setup(t){Oo.set(t,!0)}})),Mp=Ap,xp=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Np="EventFilters",Op=(t={})=>{let e;return{name:Np,setup(n){const r=n.getOptions();e=Lo(t,r)},processEvent(n,r,s){if(!e){const i=s.getOptions();e=Lo(t,i)}return Dp(n,e)?null:n}}},Lp=((t={})=>({...Op(t),name:"InboundFilters"}));function Lo(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:xp],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Dp(t,e){if(t.type){if(t.type==="transaction"&&Fp(t,e.ignoreTransactions))return v&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${Se(t)}`),!0}else{if(Pp(t,e.ignoreErrors))return v&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${Se(t)}`),!0;if(Hp(t))return v&&_.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${Se(t)}`),!0;if(Bp(t,e.denyUrls))return v&&_.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${Se(t)}. 15Url: ${gr(t)}`),!0;if(!$p(t,e.allowUrls))return v&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${Se(t)}. 17Url: ${gr(t)}`),!0}return!1}function Pp(t,e){return e?.length?Lc(t).some(n=>$t(n,e)):!1}function Fp(t,e){if(!e?.length)return!1;const n=t.transaction;return n?$t(n,e):!1}function Bp(t,e){if(!e?.length)return!1;const n=gr(t);return n?$t(n,e):!1}function $p(t,e){if(!e?.length)return!0;const n=gr(t);return n?$t(n,e):!0}function Up(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function gr(t){try{const n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Up(n):null}catch{return v&&_.error(`Cannot extract url for event ${Se(t)}`),null}}function Hp(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Wp(t,e,n,r,s,i){if(!s.exception?.values||!i||!Re(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=Ps(t,e,r,i.originalException,n,s.exception.values,o,0))}function Ps(t,e,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(Re(r[s],Error)){Do(o,c,r);const u=t(e,r[s]),d=a.length;
17Po(u,s,d,c),a=Ps(t,e,n,r[s],s,[u,...a],u,d)}return Hc(r)&&r.errors.forEach((u,d)=>{if(Re(u,Error)){Do(o,c,r);const l=t(e,u),p=a.length;Po(l,`errors[${d}]`,p,c),a=Ps(t,e,n,u,s,[l,...a],l,p)}}),a}function Hc(t){return Array.isArray(t.errors)}function Do(t,e,n){t.mechanism={handled:!0,type:"auto.core.linked_errors",...Hc(n)&&{is_exception_group:!0},...t.mechanism,exception_id:e}}function Po(t,e,n,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function zp(t){return Or(t)&&"__sentry_fetch_url_host__"in t&&typeof t.__sentry_fetch_url_host__=="string"}function Fo(t){return zp(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}const Bo=new Set([]);function qp(t){const e="console",n=ae(e,t);return ce(e,jp),n}function jp(){"console"in L&&gl.forEach(function(t){t in L.console&&yt(L.console,t,function(e){return dr[t]=e,function(...n){const r=n[0],s=dr[t],i=Bo.size&&typeof r=="string"&&$t(r,Bo);i||kt("console",{args:n,level:t}),(!i||v&&_.isEnabled())&&s?.apply(L.console,n)}})})}function Wc(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Gp="Dedupe",Vp=(()=>{let t;return{name:Gp,processEvent(e){if(e.type)return e;try{if(Kp(e,t))return v&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}}),Yp=Vp;function Kp(t,e){return e?!!(Xp(t,e)||Jp(t,e)):!1}function Xp(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!qc(t,e)||!zc(t,e))}function Jp(t,e){const n=$o(e),r=$o(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!qc(t,e)||!zc(t,e))}function zc(t,e){let n=Gi(t),r=Gi(e);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 qc(t,e){let n=t.fingerprint,r=e.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 $o(t){return t.exception?.values?.[0]}const Zp="ConversationId",Qp=(()=>({name:Zp,setup(t){t.on("spanStart",e=>{const n=V().getScopeData(),r=Ct().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:i,data:o,description:c}=j(e);if(!i?.startsWith("gen_ai.")&&!o["ai.operationId"]&&!c?.startsWith("ai."))return;e.setAttribute(cd,s)}})}})),th=Qp;function eh(t,e,n,r,s){if(!t.fetchData)return;const{method:i,url:o}=t.fetchData,c=Lt()&&e(o);if(t.endTimestamp){const h=t.fetchData.__span;if(!h)return;const m=r[h];m&&(c&&(sh(m,t),nh(m,t,s)),delete r[h]);return}const{spanOrigin:a="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},d=D(),p=!!ht()||!!d&&qt(d),f=c&&p?fe(ah(o,i,a)):new Ut;if(c&&!p&&d?.recordDroppedEvent("no_parent_span","span"),t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(t.fetchData.url)){const h=t.args[0],m={...t.args[1]||{}},S=rh(h,m,Lt()&&p?f:void 0,u);S&&(t.args[1]=m,m.headers=S)}if(d){const h={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};d.emit("beforeOutgoingRequestSpan",f,h)}return f}function nh(t,e,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(t,{headers:e.response?.headers,error:e.error})}function rh(t,e,n,r){const s=Uc({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,c=s.traceparent;if(!i)return;const a=e.headers||(oi(t)?t.headers:void 0);if(a)if(ih(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?Vn(d)||u.set("baggage",`${d},${o}`):u.set("baggage",o)}return u}else if(oh(a)){const u=[...a];u.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&c&&!u.find(l=>l[0]==="traceparent")&&u.push(["traceparent",c]);const d=a.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&Vn(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,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(m=>Vn(m)):Vn(l));o&&!f&&p.push(o);const h=Object.assign({},a,{"sentry-trace":u??i,baggage:p.length>0?p.join(","):void 0});return r&&c&&!d&&(h.traceparent=c),h}else return{...s}}function sh(t,e){if(e.response){Ga(t,e.response.status);const n=e.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:lt,message:"internal_error"});t.end()}function Vn(t){return typeof t!="string"?!1:t.split(",").some(e=>e.trim().startsWith(mr))}function ih(t){return typeof Headers<"u"&&Re(t,Headers)}function oh(t){return Array.isArray(t)?t.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string"):!1}function ah(t,e,n){if(t.startsWith("data:")){const i=Ht(t);return{name:`${e} ${i}`,attributes:Uo(t,void 0,e,n)}}const r=Br(t),s=r?Ec(r):t;return{name:`${e} ${s}`,attributes:Uo(t,r,e,n)}}function Uo(t,e,n,r){const s={url:Ht(t),type:"fetch","http.method":n,[it]:r,[Rt]:"http.client"};return e&&(hi(e)||(s["http.url"]=Ht(e.href),s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function jc(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Sn=L;function ch(){return"history"in Sn&&!!Sn.history}function uh(){if(!("fetch"in Sn))return!1;
17try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Fs(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function lh(){if(typeof EdgeRuntime=="string")return!0;if(!uh())return!1;if(Fs(Sn.fetch))return!0;let t=!1;const e=Sn.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Fs(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){v&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function yi(t,e){const n="fetch",r=ae(n,t);return ce(n,()=>Gc(void 0,e)),r}function dh(t){const e="fetch-body-resolved",n=ae(e,t);return ce(e,()=>Gc(ph)),n}function Gc(t,e=!1){e&&!lh()||yt(L,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=hh(r),c={args:r,fetchData:{method:i,url:o},startTimestamp:ct()*1e3,virtualError:s,headers:mh(r)};return t||kt("fetch",{...c}),n.apply(L,r).then(async a=>(t?t(a):kt("fetch",{...c,endTimestamp:ct()*1e3,response:a}),a),a=>{kt("fetch",{...c,endTimestamp:ct()*1e3,error:a}),Or(a)&&a.stack===void 0&&(a.stack=s.stack,Et(a,"framesToPop",1));const d=D()?.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 f=new URL(c.fetchData.url).host;d==="always"?a.message=`${a.message} (${f})`:Et(a,"__sentry_fetch_url_host__",f)}catch{}throw a})}})}async function fh(t,e){if(t?.body){const n=t.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&&(e(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function ph(t){let e;try{e=t.clone()}catch{return}fh(e,()=>{kt("fetch-body-resolved",{endTimestamp:ct()*1e3,response:t})})}function ar(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Ho(t){return typeof t=="string"?t:t?ar(t,"url")?t.url:t.toString?t.toString():"":""}function hh(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Ho(n),method:ar(r,"method")?String(r.method).toUpperCase():oi(n)&&ar(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Ho(e),method:ar(e,"method")?String(e.method).toUpperCase():"GET"}}function mh(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(oi(e))return new Headers(e.headers)}catch{}}const Vc=L;function Qe(){try{return Vc.document.location.href}catch{return""}}function Yc(t,e=5){if(!Vc.HTMLElement)return null;let n=t;for(let r=0;r<e;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const N=L;let Bs=0;function Kc(){return Bs>0}function gh(){Bs++,setTimeout(()=>{Bs--})}function qe(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(ai(t))return t}catch{return t}const r=function(...s){L._sentryWrappedDepth=(L._sentryWrappedDepth||0)+1;try{const i=s.map(o=>qe(o,e));return t.apply(this,i)}catch(i){throw gh(),ci(o=>{o.addEventProcessor(c=>(e.mechanism&&(ks(c,void 0),ve(c,e.mechanism)),c.extra={...c.extra,arguments:s},c)),vc(i)}),i}finally{L._sentryWrappedDepth=(L._sentryWrappedDepth||0)-1}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}Fa(r,t),Et(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function _r(){const t=Qe(),{referrer:e}=N.document||{},{userAgent:n}=N.navigator||{},r={...e&&{Referer:e},...n&&{"User-Agent":n}};return{url:t,headers:r}}function Ei(t,e){const n=$r(t,e),r={type:bh(e),value:vh(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function _h(t,e,n,r){const i=D()?.getOptions().normalizeDepth,o=Rh(e),c={__serialized__:$a(e,i)};if(o)return{exception:{values:[Ei(t,o)]},extra:c};const a={exception:{values:[{type:Lr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:wh(e,{isUnhandledRejection:r})}]},extra:c};if(n){const u=$r(t,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function fs(t,e){return{exception:{values:[Ei(t,e)]}}}function $r(t,e){const n=e.stacktrace||e.stack||"",r=yh(e),s=Eh(e);try{return t(n,r,s)}catch{}return[]}const Sh=/Minified React error #\d+;/i;function yh(t){return t&&Sh.test(t.message)?1:0}function Eh(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Xc(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function bh(t){const e=t?.name;return!e&&Xc(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function vh(t){const e=t?.message;return Xc(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?Fo(e.error):Fo(t):"No error message"}function Th(t,e,n,r){const s=n?.syntheticException||void 0,i=bi(t,e,s,r);return ve(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),On(i)}function Ih(t,e,n="info",r,s){const i=r?.syntheticException||void 0,o=$s(t,e,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),On(o)}function bi(t,e,n,r,s){let i;if(Pa(e)&&e.error)return fs(t,e.error);if(Yi(e)||Rl(e)){const o=e;if("stack"in e){i=fs(t,e);const c=i.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const a=$r(t,n);a.length&&(c.stacktrace={frames:a},ve(i,{synthetic:!0}))}}else{const c=o.name||(Yi(o)?"DOMError":"DOMException"),a=o.message?`${c}: ${o.message}`:c;i=$s(t,a,n,r),ks(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Or(e)?fs(t,e):fr(e)||Lr(e)?(i=_h(t,e,n,s),ve(i,{synthetic:!0}),i):(i=$s(t,e,n,r),ks(i,`${e}`),ve(i,{synthetic:!0}),i)}function $s(t,e,n,r){const s={};if(r&&n){const i=$r(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]}),ve(s,{synthetic:!0})}
17if(ii(e)){const{__sentry_template_string__:i,__sentry_template_values__:o}=e;return s.logentry={message:i,params:o},s}return s.message=e,s}function wh(t,{isUnhandledRejection:e}){const n=Al(t),r=e?"promise rejection":"exception";return Pa(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Lr(t)?`Event \`${kh(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function kh(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Rh(t){return Object.values(t).find(e=>e instanceof Error)}class Ch extends fp{constructor(e){const n=Ah(e),r=N.SENTRY_SDK_SOURCE||qf();$c(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;N.document&&(i||o||u)&&N.document.addEventListener("visibilitychange",()=>{N.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&Ls(this),u&&Cc(this))}),s&&this.on("beforeSendSession",Tp)}eventFromException(e,n){return Th(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Ih(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}function Ah(t){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:N.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...t}}const Pt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,M=L,Mh=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Ln=(t,e,n,r)=>{let s,i;return o=>{e.value>=0&&(o||r)&&(i=e.value-(s??0),(i||s===void 0)&&(s=e.value,e.delta=i,e.rating=Mh(e.value,n),t(e)))}},Dn=(t=!0)=>{const e=M.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},tn=()=>Dn()?.activationStart??0;function ne(t,e,n){M.document&&M.addEventListener(t,e,n)}function Sr(t,e,n){M.document&&M.removeEventListener(t,e,n)}let Ue=-1;const Jc=new Set,xh=()=>M.document?.visibilityState==="hidden"&&!M.document?.prerendering?0:1/0,cr=t=>{if(Nh(t)&&Ue>-1){if(t.type==="visibilitychange"||t.type==="pagehide")for(const e of Jc)e();isFinite(Ue)||(Ue=t.type==="visibilitychange"?t.timeStamp:0,Sr("prerenderingchange",cr,!0))}},Pn=()=>{if(M.document&&Ue<0){const t=tn();Ue=(M.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>t)[0]?.startTime)??xh(),ne("visibilitychange",cr,!0),ne("pagehide",cr,!0),ne("prerenderingchange",cr,!0)}return{get firstHiddenTime(){return Ue},onHidden(t){Jc.add(t)}}};function Nh(t){return t.type==="pagehide"||M.document?.visibilityState==="hidden"}const Oh=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Fn=(t,e=-1)=>{const n=Dn();let r="navigate";return n&&(M.document?.prerendering||tn()>0?r="prerender":M.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:Oh(),navigationType:r}},ps=new WeakMap;function vi(t,e){try{return ps.get(t)||ps.set(t,new e),ps.get(t)}catch{return new e}}class Lh{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const en=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},Ti=t=>{let e=!1;return()=>{e||(t(),e=!0)}},Ur=t=>{M.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Dh=[1800,3e3],Ph=(t,e={})=>{Ur(()=>{const n=Pn(),r=Fn("FCP");let s;const o=en("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-tn(),0),r.entries.push(a),s(!0)))});o&&(s=Ln(t,r,Dh,e.reportAllChanges))})},Fh=[.1,.25],Bh=(t,e={})=>{Ph(Ti(()=>{const n=Fn("CLS",0);let r;const s=Pn(),i=vi(e,Lh),o=a=>{for(const u of a)i._processEntry(u);i._sessionValue>
17n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},c=en("layout-shift",o);c&&(r=Ln(t,n,Fh,e.reportAllChanges),s.onHidden(()=>{o(c.takeRecords()),r(!0)}),M?.setTimeout?.(r))}))};let Zc=0,hs=1/0,Yn=0;const $h=t=>{t.forEach(e=>{e.interactionId&&(hs=Math.min(hs,e.interactionId),Yn=Math.max(Yn,e.interactionId),Zc=Yn?(Yn-hs)/7+1:0)})};let Us;const Qc=()=>Us?Zc:performance.interactionCount||0,Uh=()=>{"interactionCount"in performance||Us||(Us=en("event",$h,{type:"event",buffered:!0,durationThreshold:0}))},ms=10;let tu=0;const Hh=()=>Qc()-tu;class Wh{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){tu=Qc(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor(Hh()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(e.interactionId);if(r||this._longestInteractionList.length<ms||e.duration>n._latency){if(r?e.duration>r._latency?(r.entries=[e],r._latency=e.duration):e.duration===r._latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,i)=>i._latency-s._latency),this._longestInteractionList.length>ms){const s=this._longestInteractionList.splice(ms);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const eu=t=>{const e=M.requestIdleCallback||M.setTimeout;M.document?.visibilityState==="hidden"?t():(t=Ti(t),ne("visibilitychange",t,{once:!0,capture:!0}),ne("pagehide",t,{once:!0,capture:!0}),e(()=>{t(),Sr("visibilitychange",t,{capture:!0}),Sr("pagehide",t,{capture:!0})}))},zh=[200,500],qh=40,jh=(t,e={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Pn();Ur(()=>{Uh();const r=Fn("INP");let s;const i=vi(e,Wh),o=a=>{eu(()=>{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=en("event",o,{durationThreshold:e.durationThreshold??qh});s=Ln(t,r,zh,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(c.takeRecords()),s(!0)}))})};class Gh{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const Vh=[2500,4e3],Yh=(t,e={})=>{Ur(()=>{const n=Pn(),r=Fn("LCP");let s;const i=vi(e,Gh),o=a=>{e.reportAllChanges||(a=a.slice(-1));for(const u of a)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-tn(),0),r.entries=[u],s())},c=en("largest-contentful-paint",o);if(c){s=Ln(t,r,Vh,e.reportAllChanges);const a=Ti(()=>{o(c.takeRecords()),c.disconnect(),s(!0)}),u=d=>{d.isTrusted&&(eu(a),Sr(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])ne(d,u,{capture:!0})}})},Kh=[800,1800],Hs=t=>{M.document?.prerendering?Ur(()=>Hs(t)):M.document?.readyState!=="complete"?addEventListener("load",()=>Hs(t),!0):setTimeout(t)},Xh=(t,e={})=>{const n=Fn("TTFB"),r=Ln(t,n,Kh,e.reportAllChanges);Hs(()=>{const s=Dn();s&&(n.value=Math.max(s.responseStart-tn(),0),n.entries=[s],r(!0))})},un={},yr={};let nu,ru,su,iu;function Hr(t,e=!1){return zr("cls",t,Zh,nu,e)}function Wr(t,e=!1){return zr("lcp",t,Qh,ru,e)}function Jh(t){return zr("ttfb",t,tm,su)}function Ii(t){return zr("inp",t,em,iu)}function je(t,e){return ou(t,e),yr[t]||(nm(t),yr[t]=!0),au(t,e)}function Bn(t,e){const n=un[t];if(n?.length)for(const r of n)try{r(e)}catch(s){Pt&&_.error(`Error while triggering instrumentation handler. 18Type: ${t} 19Name: ${Xt(r)} 20Error:`,s)}}function Zh(){return Bh(t=>{Bn("cls",{metric:t}),nu=t},{reportAllChanges:!0})}function Qh(){return Yh(t=>{Bn("lcp",{metric:t}),ru=t},{reportAllChanges:!0})}function tm(){return Xh(t=>{Bn("ttfb",{metric:t}),su=t})}function em(){return jh(t=>{Bn("inp",{metric:t}),iu=t})}function zr(t,e,n,r,s=!1){ou(t,e);let i;return yr[t]||(i=n(),yr[t]=!0),r&&e({metric:r}),au(t,e,s?i:void 0)}function nm(t){const e={};t==="event"&&(e.durationThreshold=0),en(t,n=>
20{Bn(t,{entries:n})},e)}function ou(t,e){un[t]=un[t]||[],un[t].push(e)}function au(t,e,n){return()=>{n&&n();const r=un[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function rm(t){return"duration"in t}const sm=80;function ut(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const c=" > ",a=c.length;let u;const d=Array.isArray(e)?e:e.keyAttrs,l=!Array.isArray(e)&&e.maxStringLength||sm;for(;n&&i++<r&&(u=im(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 im(t,e){const n=t,r=[];if(!n?.tagName)return"";if(typeof HTMLElement<"u"&&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=e?.length?e.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&Vt(i)){const o=i.split(/\s+/);for(const c of o)r.push(`.${c}`)}}for(const i of["aria-label","type","name","title","alt"]){const o=n.getAttribute(i);o&&r.push(`[${i}="${o}"]`)}return r.join("")}const om=t=>{const e=n=>{(n.type==="pagehide"||M.document?.visibilityState==="hidden")&&t(n)};ne("visibilitychange",e,{capture:!0,once:!0}),ne("pagehide",e,{capture:!0,once:!0})};function gs(t){return typeof t=="number"&&isFinite(t)}function ie(t,e,n,{...r}){const s=j(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),gc(t,()=>{const i=fe({startTime:e,...r});return i&&i.end(n),i})}function wi(t){const e=D();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:i}=t,{release:o,environment:c}=e.getOptions(),{userInfo:a}=e.getDataCollectionOptions(),d=e.getIntegrationByName("Replay")?.getReplayId(),l=V(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:c,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":M.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...s};return fe({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function $n(){return M.addEventListener&&M.performance}function rt(t){return t/1e3}function am(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function qr(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function jr(t,e){let n,r=!1;function s(c){!r&&n&&e(c,n.spanContext().spanId,n),r=!0}om(()=>{s("pagehide")});const i=t.on("beforeStartNavigationSpan",(c,a)=>{a?.isRedirect||(s("navigation"),i(),o())}),o=t.on("afterStartPageLoadSpan",c=>{n=c,o()})}function cm(t){let e=0,n;if(!qr("layout-shift"))return;const r=Hr(({metric:s})=>{const i=s.entries[s.entries.length-1];
20i&&(e=s.value,n=i)},!0);jr(t,(s,i)=>{um(e,n,i,s),r()})}function um(t,e,n,r){Pt&&_.log(`Sending CLS span (${t})`);const s=e?rt((dt()||0)+e.startTime):ct(),i=V().getScopeData().transactionName,o=e?ut(e.sources[0]?.node):"Layout shift",c={[it]:"auto.http.browser.cls",[Rt]:"ui.webvital.cls",[ue]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e?.sources&&e.sources.forEach((u,d)=>{c[`cls.source.${d+1}`]=ut(u.node)});const a=wi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("cls",{[xn]:"",[Nn]:t}),a.end(s))}const lm=6e4;function Un(t){return t!=null&&t>0&&t<=lm}function dm(t){let e=0,n;if(!qr("largest-contentful-paint"))return;const r=Wr(({metric:s})=>{const i=s.entries[s.entries.length-1];!i||!Un(s.value)||(e=s.value,n=i)},!0);jr(t,(s,i)=>{fm(e,n,i,s),r()})}function fm(t,e,n,r){if(!Un(t))return;Pt&&_.log(`Sending LCP span (${t})`);const s=rt((dt()||0)+(e?.startTime||0)),i=V().getScopeData().transactionName,o=e?ut(e.element):"Largest contentful paint",c={[it]:"auto.http.browser.lcp",[Rt]:"ui.webvital.lcp",[ue]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(c["lcp.element"]=ut(e.element)),e.id&&(c["lcp.id"]=e.id),e.url&&(c["lcp.url"]=e.url),e.loadTime!=null&&(c["lcp.loadTime"]=e.loadTime),e.renderTime!=null&&(c["lcp.renderTime"]=e.renderTime),e.size!=null&&(c["lcp.size"]=e.size));const a=wi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[xn]:"millisecond",[Nn]:t}),a.end(s))}function wt(t){return t&&((dt()||performance.timeOrigin)+t)/1e3}function cu(t){const e={};if(t.nextHopProtocol!=null){const{name:n,version:r}=am(t.nextHopProtocol);e["network.protocol.version"]=r,e["network.protocol.name"]=n}return dt()||$n()?.timeOrigin?pm({...e,"http.request.redirect_start":wt(t.redirectStart),"http.request.redirect_end":wt(t.redirectEnd),"http.request.worker_start":wt(t.workerStart),"http.request.fetch_start":wt(t.fetchStart),"http.request.domain_lookup_start":wt(t.domainLookupStart),"http.request.domain_lookup_end":wt(t.domainLookupEnd),"http.request.connect_start":wt(t.connectStart),"http.request.secure_connection_start":wt(t.secureConnectionStart),"http.request.connection_end":wt(t.connectEnd),"http.request.request_start":wt(t.requestStart),"http.request.response_start":wt(t.responseStart),"http.request.response_end":wt(t.responseEnd),"http.request.time_to_first_byte":t.responseStart!=null?t.responseStart/1e3:void 0}):e}function pm(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null))}const hm=2147483647;let Wo=0,gt={},St,Er;function mm({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=$n();if(r&&dt()){r.mark&&M.performance.mark("sentry-tracing-init");const s=e?dm(n):e===!1?Em():void 0,i=t?cm(n):t===!1?ym():void 0,o=bm();return()=>{o(),s?.(),i?.()}}return()=>{}}function gm(){je("longtask",({entries:t})=>{const e=ht();if(!e)return;const{op:n,start_timestamp:r}=j(e);for(const s of t){const i=rt(dt()+s.startTime),o=rt(s.duration);n==="navigation"&&r&&i<r||ie(e,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[it]:"auto.ui.browser.metrics"}})}})}function _m(){new PerformanceObserver(e=>{const n=ht();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=rt(dt()+r.startTime),{start_timestamp:i,op:o}=j(n);if(o==="navigation"&&i&&s<i)continue;const c=rt(r.duration),a={[it]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;a["browser.script.invoker"]=d,a["browser.script.invoker_type"]=l,p&&(a["code.filepath"]=p),f&&(a["code.function"]=f),h!==-1&&(a["browser.script.source_char_position"]=h),ie(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function Sm(){je("event",({entries:t})=>{const e=ht();if(e){for(const n of t)if(n.name==="click"){const r=rt(dt()+n.startTime),s=rt(n.duration),i={name:ut(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[it]:"auto.ui.browser.metrics"}},o=Yc(n.target);o&&(i.attributes["ui.component_name"]=o),ie(e,r,r+s,i)}}})}function ym(){return Hr(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(gt.cls={value:t.value,unit:""},Er=e)},!0)}function Em(){return Wr(({metric:t})=>{const e=t.entries[t.entries.length-1];!e||!Un(t.value)||(gt.lcp={value:t.value,unit:"millisecond"},St=e)},!0)}function bm(){return Jh(({metric:t})=>{t.entries[t.entries.length-1]&&(gt.ttfb={value:t.value,unit:"millisecond"})})}function vm(t,e){const n=$n(),r=dt();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:i,ignoreResourceSpans:o,recordClsOnPageloadSpan:c,recordLcpOnPageloadSpan:a}=e,u=rt(r),d=n.getEntries(),{op:l,start_timestamp:p}=j(t);
20if(d.slice(Wo).forEach(f=>{const h=rt(f.startTime),m=rt(Math.max(0,f.duration));if(!(l==="navigation"&&p&&u+h<p))switch(f.entryType){case"navigation":{km(t,f,u);break}case"mark":case"paint":case"measure":{Im(t,f,h,m,u,i);const S=Pn(),y=f.startTime<S.firstHiddenTime;f.name==="first-paint"&&y&&(gt.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&y&&(gt.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{Am(t,f,f.name,h,m,u,o);break}}}),Wo=Math.max(d.length-1,0),Mm(t,s),l==="pageload"){if(Om(gt),s){const f=(h,m,S)=>{const y=S??`browser.web_vital.${h}.value`;t.setAttribute(y,m),Pt&&_.log("Setting web vital attribute",{[y]:m},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{gt[h]&&f(h,gt[h].value)}),gt["ttfb.requestTime"]&&f("ttfb.requestTime",gt["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else c||delete gt.cls,a||delete gt.lcp,Object.entries(gt).forEach(([f,h])=>{Xd(f,h.value,h.unit)}),xm(t,e);t.setAttribute(s?"browser.performance.time_origin":"performance.timeOrigin",u),t.setAttribute(s?"browser.performance.navigation.activation_start":"performance.activationStart",tn())}St=void 0,Er=void 0,gt={}}function Tm(t){if(t?.entryType==="measure")try{return t.detail.devtools.track==="Components â"}catch{return}}function Im(t,e,n,r,s,i){if(Tm(e)||["mark","measure"].includes(e.entryType)&&$t(e.name,i))return;const o=Dn(!1),c=rt(o?o.requestStart:0),a=s+Math.max(n,c),u=s+n,d=u+r,l={[it]:"auto.resource.browser.metrics"};a!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),wm(l,e),a<=d&&ie(t,a,d,{name:e.name,op:e.entryType,attributes:l})}function wm(t,e){try{const n=e.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&ke(s))t[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{t[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(ke(n)){t["sentry.browser.measure.detail"]=n;return}try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function km(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Kn(t,e,r,n)}),Kn(t,e,"secureConnection",n,"TLS/SSL"),Kn(t,e,"fetch",n,"cache"),Kn(t,e,"domainLookup",n,"DNS"),Cm(t,e,n)}function Kn(t,e,n,r,s=n){const i=Rm(n),o=e[i],c=e[`${n}Start`];!c||!o||ie(t,r+rt(c),r+rt(o),{op:`browser.${s}`,name:e.name,attributes:{[it]:"auto.ui.browser.metrics",...n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{}}})}function Rm(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function Cm(t,e,n){const r=n+rt(e.requestStart),s=n+rt(e.responseEnd),i=n+rt(e.responseStart);e.responseEnd&&(ie(t,r,s,{op:"browser.request",name:e.name,attributes:{[it]:"auto.ui.browser.metrics"}}),ie(t,i,s,{op:"browser.response",name:e.name,attributes:{[it]:"auto.ui.browser.metrics"}}))}function Am(t,e,n,r,s,i,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const c=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(o?.includes(c))return;const a={[it]:"auto.resource.browser.metrics"},u=Ie(n);u.protocol&&(a["url.scheme"]=u.protocol.split(":").pop()),u.host&&(a["server.address"]=u.host),a["url.same_origin"]=n.includes(M.location.origin),Nm(e,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,...cu(e)},l=i+r,p=l+s;ie(t,l,p,{name:n.replace(M.location.origin,""),op:c,attributes:d})}function Mm(t,e){const n=M.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&t.setAttribute(e?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&t.setAttribute(e?"network.connection.type":"connectionType",r.type),gs(r.rtt)&&(gt["connection.rtt"]={value:r.rtt,unit:"millisecond"},e&&t.setAttribute("network.connection.rtt",r.rtt))),gs(n.deviceMemory)&&(e?t.setAttribute("device.memory.estimated_capacity",n.deviceMemory):t.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),gs(n.hardwareConcurrency)&&(e?t.setAttribute("device.processor_count",n.hardwareConcurrency):t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function xm(t,e){St&&e.recordLcpOnPageloadSpan&&(St.element&&t.setAttribute("lcp.element",ut(St.element)),St.id&&t.setAttribute("lcp.id",St.id),St.url&&t.setAttribute("lcp.url",St.url.trim().slice(0,200)),St.loadTime!=null&&t.setAttribute("lcp.loadTime",
20St.loadTime),St.renderTime!=null&&t.setAttribute("lcp.renderTime",St.renderTime),t.setAttribute("lcp.size",St.size)),Er?.sources&&e.recordClsOnPageloadSpan&&Er.sources.forEach((n,r)=>t.setAttribute(`cls.source.${r+1}`,ut(n.node)))}function Nm(t,e,n){n.forEach(([r,s])=>{const i=t[r];i!=null&&(typeof i=="number"&&i<hm||typeof i=="string")&&(e[s]=i)})}function Om(t){const e=Dn(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const _s=[],ln=new Map,Ne=new Map,uu=60;function Lm(){if($n()&&dt()){const e=Dm();return()=>{e()}}return()=>{}}const yn={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 Dm(){return Ii(Pm)}const Pm=({metric:t})=>{if(t.value==null)return;const e=rt(t.value);if(e>uu)return;const n=t.entries.find(h=>h.duration===t.value&&yn[h.name]);if(!n)return;const{interactionId:r}=n,s=yn[n.name],i=rt(dt()+n.startTime),o=ht(),c=o?pt(o):void 0,a=r!=null?ln.get(r):void 0,u=a?.span||
20c,d=u?j(u).description:V().getScopeData().transactionName,l=a?.elementName||ut(n.target),p={[it]:"auto.http.browser.inp",[Rt]:`ui.interaction.${s}`,[ue]:n.duration},f=wi({name:l,transaction:d,attributes:p,startTime:i});f&&(f.addEvent("inp",{[xn]:"millisecond",[Nn]:t.value}),f.end(i+e))};function Fm(t){return t!=null?ln.get(t):void 0}function Bm(){const t=Object.keys(yn);ze()&&t.forEach(s=>{M.addEventListener(s,e,{capture:!0,passive:!0})});function e(s){const i=s.target;if(!i)return;const o=ut(i),c=Math.round(s.timeStamp);if(Ne.set(c,o),Ne.size>50){const a=Ne.keys().next().value;a!==void 0&&Ne.delete(a)}}function n(s){const i=Math.round(s.startTime);let o=Ne.get(i);if(!o)for(let c=-5;c<=5;c++){const a=Ne.get(i+c);if(a){o=a;break}}return o||"<unknown>"}const r=({entries:s})=>{const i=ht(),o=i&&pt(i);s.forEach(c=>{if(!rm(c))return;const a=c.interactionId;if(a==null||ln.has(a))return;const u=c.target?ut(c.target):n(c);if(_s.length>10){const d=_s.shift();ln.delete(d)}_s.push(a),ln.set(a,{span:o,elementName:u})})};je("event",r),je("first-input",r)}function ki(t){const{name:e,op:n,origin:r,metricName:s,value:i,attributes:o,parentSpan:c,reportEvent:a,startTime:u,endTime:d}=t,l=V().getScopeData().transactionName,p={[it]:r,[Rt]:n,[ue]:0,[`browser.web_vital.${s}.value`]:i,"sentry.transaction":l,"user_agent.original":M.navigator?.userAgent,...o};c&&rc(c).attributes?.[Rt]==="pageload"&&(p["sentry.pageload.span_id"]=c.spanContext().spanId),a&&(p[`browser.web_vital.${s}.report_event`]=a);const f=fe({name:e,attributes:p,startTime:u,parentSpan:c});f&&f.end(d??u)}function $m(t){let e=0,n;if(!qr("largest-contentful-paint"))return;const r=Wr(({metric:s})=>{const i=s.entries[s.entries.length-1];
20!i||!Un(s.value)||(e=s.value,n=i)},!0);jr(t,(s,i,o)=>{Um(e,n,o,s),r()})}function Um(t,e,n,r){if(!Un(t))return;Pt&&_.log(`Sending LCP span (${t})`);const s=dt()||0,i=rt(s),o=rt(s+(e?.startTime||0)),c=e?ut(e.element):"Largest contentful paint",a={};e?.element&&(a["browser.web_vital.lcp.element"]=ut(e.element)),e?.id&&(a["browser.web_vital.lcp.id"]=e.id),e?.url&&(a["browser.web_vital.lcp.url"]=e.url),e?.loadTime!=null&&(a["browser.web_vital.lcp.load_time"]=e.loadTime),e?.renderTime!=null&&(a["browser.web_vital.lcp.render_time"]=e.renderTime),e?.size!=null&&(a["browser.web_vital.lcp.size"]=e.size),ki({name:c,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:t,attributes:a,parentSpan:n,reportEvent:r,startTime:i,endTime:o})}function Hm(t){let e=0,n;if(!qr("layout-shift"))return;const r=Hr(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(e=s.value,n=i)},!0);jr(t,(s,i,o)=>{Wm(e,n,o,s),r()})}function Wm(t,e,n,r){Pt&&_.log(`Sending CLS span (${t})`);const s=e?rt((dt()||0)+e.startTime):ct(),i=e?ut(e.sources[0]?.node):"Layout shift",o={};e?.sources&&e.sources.forEach((c,a)=>{o[`browser.web_vital.cls.source.${a+1}`]=ut(c.node)}),ki({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:t,attributes:o,parentSpan:n,reportEvent:r,startTime:s})}function zm(){if(!$n()||!dt())return;Ii(({metric:n})=>{if(n.value==null||rt(n.value)>uu)return;const s=n.entries.find(i=>i.duration===n.value&&yn[i.name]);s&&qm(n.value,s)})}function qm(t,e){Pt&&_.log(`Sending INP span (${t})`);const n=rt(dt()+e.startTime),r=rt(t),s=yn[e.name],i=Fm(e.interactionId),o=ht(),c=o?pt(o):void 0,a=i?.span||c,u=a?rc(a).name:V().getScopeData().transactionName,d=i?.elementName||ut(e.target);ki({name:d,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:t,attributes:{[ue]:e.duration,"sentry.transaction":u},startTime:n,endTime:n+r,parentSpan:a})}const jm=1e3;let zo,Ws,zs;function lu(t){ae("dom",t),ce("dom",Gm)}function Gm(){if(!M.document)return;const t=kt.bind(null,"dom"),e=qo(t,!0);M.document.addEventListener("click",e,!1),M.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const s=M[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(yt(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=qo(t);d.handler=l,i.call(this,o,l,a)}d.refCount++}catch{}return i.call(this,o,c,a)}}),yt(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 Vm(t){if(t.type!==Ws)return!1;try{if(!t.target||t.target._sentryId!==zs)return!1}catch{}return!0}function Ym(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function qo(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Km(n);if(Ym(n.type,r))return;Et(n,"_sentryCaptured",!0),r&&!r._sentryId&&Et(r,"_sentryId",Tt());
20const s=n.type==="keypress"?"input":n.type;Vm(n)||(t({event:n,name:s,global:e}),Ws=n.type,zs=r?r._sentryId:void 0),clearTimeout(zo),zo=M.setTimeout(()=>{zs=void 0,Ws=void 0},jm)}}function Km(t){try{return t.target}catch{return null}}let Xn;function Gr(t){const e="history";ae(e,t),ce(e,Xm)}function Xm(){if(M.addEventListener("popstate",()=>{const e=M.location.href,n=Xn;if(Xn=e,n===e)return;kt("history",{from:n,to:e})}),!ch())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Xn,i=Jm(String(r));if(Xn=i,s===i)return e.apply(this,n);kt("history",{from:s,to:i})}return e.apply(this,n)}}yt(M.history,"pushState",t),yt(M.history,"replaceState",t)}function Jm(t){try{return new URL(t,M.location.origin).toString()}catch{return t}}const ur={};function du(t){const e=ur[t];if(e)return e;let n=M[t];if(Fs(n))return ur[t]=n.bind(M);const r=M.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?.[t]&&(n=i[t]),r.head.removeChild(s)}catch(s){Pt&&_.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(ur[t]=n.bind(M))}function Zm(t){ur[t]=void 0}function Hn(...t){return du("setTimeout")(...t)}const ye="__sentry_xhr_v3__";function fu(t){ae("xhr",t),ce("xhr",Qm)}function Qm(){if(!M.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,i=ct()*1e3,o=Vt(r[0])?r[0].toUpperCase():void 0,c=tg(r[1]);if(!o||!c)return e.apply(n,r);n[ye]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[ye];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:ct()*1e3,startTimestamp:i,xhr:n,virtualError:s};kt("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[p,f]=l,h=d[ye];return h&&Vt(p)&&Vt(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[ye];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:ct()*1e3,xhr:n};return kt("xhr",i),e.apply(n,r)}})}function tg(t){if(Vt(t))return t;try{return t.toString()}catch{}}const eg=Symbol.for("sentry__originalRequestBody");function pu(t){return new URLSearchParams(t).toString()}function hu(t,e=_){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[pu(t)];if(!t)return[void 0]}catch(n){return Pt&&e.error(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Pt&&e.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mu(t=[]){if(t.length>=2&&t[1]&&typeof t[1]=="object"&&"body"in t[1])return t[1].body;if(t.length>=1&&t[0]instanceof Request){const n=t[0][eg];return n!==void 0?n:void 0}}function gu(t){let e;try{e=t.getAllResponseHeaders()}catch(n){return Pt&&_.error(n,"Failed to get xhr response headers",t),{}}return e?e.split(`\r 21`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function ng(t){if(typeof Element>"u")return!1;try{return t instanceof Element}catch{return!1}}const rg=40;function sg(t,e=du("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:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{const a=await e(t.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 Zm("fetch"),a}finally{n-=o,r--}}return sp(t,s,Si(t.bufferSize||rg))}const It=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ig=30,og=50;function qs(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?we:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const ag=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,cg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ug=/\((\S*)(?::(\d+))(?::(\d+))\)/,lg=/at (.+?) ?\(data:(.+?),/,dg=t=>{const e=t.match(lg);
21if(e)return{filename:`<data:${e[2]}>`,function:e[1]};const n=ag.exec(t);if(n){const[,s,i,o]=n;return qs(s,we,+i,+o)}const r=cg.exec(t);if(r){if(r[2]?.indexOf("eval")===0){const c=ug.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,o]=_u(r[1]||we,r[2]);return qs(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},fg=[ig,dg],pg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,hg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mg=t=>{const e=pg.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=hg.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||we;return[s,r]=_u(s,r),qs(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},gg=[og,mg],_g=[fg,gg],Sg=Na(..._g),_u=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:we,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Jn=1024,yg="Breadcrumbs",Eg=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:yg,setup(n){e.console&&qp(Ig(n)),e.dom&&lu(Tg(n,e.dom)),e.xhr&&fu(wg(n)),e.fetch&&yi(kg(n)),e.history&&Gr(Rg(n)),e.sentry&&n.on("beforeSendEvent",vg(n))}}}),bg=Eg;function vg(t){return function(n){D()===t&&se({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Se(n)},{event:n})}}function Tg(t,e){return function(r){if(D()!==t)return;let s,i,o=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>Jn&&(It&&_.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=Cg(u)?u.target:u;s=ut(d,{keyAttrs:o,maxStringLength:c}),i=Yc(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};i&&(a.data={"ui.component_name":i}),se(a,{event:r.event,name:r.name,global:r.global})}}function Ig(t){return function(n){if(D()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Wc(n.level),message:Xi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Xi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;se(r,{input:n.args,level:n.level})}}function wg(t){return function(n){if(D()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[ye];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},p={category:"xhr",data:d,type:"http",level:jc(a)};t.emit("beforeOutgoingRequestBreadcrumb",p,l),se(p,l)}}function kg(t){return function(n){if(D()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},o={category:"fetch",data:n.fetchData,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",o,i),se(o,i)}else{const i=n.response,o={...n.fetchData,status_code:i?.status},c={input:n.args,response:i,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,type:"http",level:jc(o.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,c),se(a,c)}}}function Rg(t){return function(n){if(D()!==t)return;let r=n.from,s=n.to;const i=Ie(N.location.href);let o=r?Ie(r):void 0;const c=Ie(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),se({category:"navigation",data:{from:r,to:s}})}}function Cg(t){return!!t&&!!t.target}const Ag="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".
21split(","),Mg="BrowserApiErrors",xg=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:Mg,setupOnce(){e.setTimeout&&yt(N,"setTimeout",jo),e.setInterval&&yt(N,"setInterval",jo),e.requestAnimationFrame&&yt(N,"requestAnimationFrame",Og),e.XMLHttpRequest&&"XMLHttpRequest"in N&&yt(XMLHttpRequest.prototype,"send",Lg);const n=e.eventTarget;n&&(Array.isArray(n)?n:Ag).forEach(s=>Dg(s,e))}}}),Ng=xg;function jo(t){return function(...e){const n=e[0];return e[0]=qe(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Xt(t)}`}}),t.apply(this,e)}}function Og(t){return function(e){return t.apply(this,[qe(e,{mechanism:{data:{handler:Xt(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Lg(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&yt(n,s,function(i){const o={mechanism:{data:{handler:Xt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=ai(i);return c&&(o.mechanism.data.handler=Xt(c)),qe(i,o)})}),t.apply(this,e)}}function Dg(t,e){const r=N[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(yt(r,"addEventListener",function(s){return function(i,o,c){try{Pg(o)&&(o.handleEvent=qe(o.handleEvent,{mechanism:{data:{handler:Xt(o),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&Fg(this,i,o),s.apply(this,[i,qe(o,{mechanism:{data:{handler:Xt(o),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),c])}}),yt(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 Pg(t){return typeof t.handleEvent=="function"}function Fg(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}const Bg=(t={})=>{const e=t.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof N.document>"u"){It&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}bo({ignoreDuration:!0}),ls();const n=Ct();let r=n.getUser();n.addScopeListener(s=>{const i=s.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(ls(),r=i)}),e==="route"&&Gr(({from:s,to:i})=>{s!==i&&(bo({ignoreDuration:!0}),ls())})}}},$g="CultureContext",Ug=(()=>({name:$g,preprocessEvent(t){const e=Go();e&&(t.contexts={...t.contexts,culture:{...e,...t.contexts?.culture}})},processSegmentSpan(t){const e=Go();e&&mi(t,{"culture.locale":e.locale,"culture.timezone":e.timezone,"culture.calendar":e.calendar})}})),Hg=Ug;function Go(){try{const t=N.Intl;if(!t)return;const e=t.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone,calendar:e.calendar}}catch{return}}const Wg="GlobalHandlers",zg=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:Wg,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(jg(n),Vo("onerror")),e.onunhandledrejection&&(Gg(n),Vo("onunhandledrejection"))}}}),qg=zg;function jg(t){Oa(e=>{const{stackParser:n,attachStacktrace:r}=Su();if(D()!==t||Kc())return;const{msg:s,url:i,line:o,column:c,error:a}=e,u=Kg(bi(n,a||s,void 0,r,!1),i,o,c);u.level="error",Tc(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Gg(t){La(e=>{const{stackParser:n,attachStacktrace:r}=Su();if(D()!==t||Kc())return;const s=Vg(e),i=ke(s)?Yg(s):bi(n,s,void 0,r,!0);i.level="error",Tc(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Vg(t){if(ke(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Yg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Kg(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},c=o.stacktrace=o.stacktrace||{},a=c.frames=c.frames||[];return a.length===0&&a.push({colno:r,lineno:n,filename:Xg(e)??Qe(),function:we,in_app:!0}),t}function Vo(t){It&&_.log(`Global Handler attached: ${t}`)}function Su(){return D()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Xg(t){if(!(!Vt(t)||t.length===0))return t.startsWith("data:")?`<${Ht(t,!1)}>`:t}const Jg=()=>({name:"HttpContext",preprocessEvent(t){if(!N.navigator&&!N.location&&!N.document)return;const e=_r(),n={...e.headers,...t.request?.headers};t.request={...e,...t.request,headers:n}},processSegmentSpan(t){if(!N.navigator&&!N.location&&!N.document)return;const e=_r();mi(t,{"url.full":e.url||void 0,"http.request.header.user_agent":e.headers["User-Agent"],"http.request.header.referer":e.headers.Referer})}}),Zg="cause",Qg=5,t_="LinkedErrors",e_=((t={})=>{const e=t.limit||Qg,n=t.key||Zg;return{name:t_,preprocessEvent(r,s,i){const o=i.getOptions();Wp(Ei,o.stackParser,n,e,r,s)}}}),n_=e_,r_=/^HTML(\w*)Element$/;function s_(t){if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(ng(t)){const e=i_(t);if(r_.test(e))return`[HTMLElement: ${ut(t)}]`}}function i_(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function o_(){return a_()?(It&&oe(()=>{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 a_(){if(typeof N.window>"u")return!1;const t=N;if(t.nw||!(t.chrome||t.browser)?.runtime?.id)return!1;const n=Qe();return!(N===N.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function js(t){return[Lp(),Mp(),th(),Ng(),bg(),qg(),n_(),Yp(),Jg(),Hg(),Bg()]}function c_(t={}){const e=!t.skipBrowserExtensionCheck&&o_();let n=t.defaultIntegrations==null?js():t.defaultIntegrations;const r={...t,enabled:e?!1:t.enabled,stackParser:Tl(t.stackParser||Sg),integrations:Hf({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||sg};return Ll(s_),_p(Ch,r)}const tt=L,Ri="sentryReplaySession",u_="replay_event",Ci="Unable to send Replay",l_=3e5,d_=9e5,f_=5e3,p_=5500,h_=6e4,m_=5e3,g_=3,Yo=15e4,Zn=5e3,__=3e3,S_=300,Ai=2e7,y_=4999,E_=5e4,Ko=36e5;var b_=Object.defineProperty,v_=(t,e,n)=>e in t?b_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xo=(t,e,n)=>v_(t,typeof e!="symbol"?e+"":e,n),ot=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ot||{});function T_(t){return t.nodeType===t.ELEMENT_NODE}function dn(t){return t?.host?.shadowRoot===t}function fn(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function I_(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function w_(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}function br(t){try{const e=t.rules||t.cssRules;return e?I_(Array.from(e,yu).join("")):null}catch{return null}}function k_(t){let e="";for(let n=0;n<t.style.length;n++){const r=t.style,s=r[n],i=r.getPropertyPriority(s);e+=`${s}:${r.getPropertyValue(s)}
21${i?" !important":""};`}return`${t.selectorText} { ${e} }`}function yu(t){let e;if(C_(t))try{e=br(t.styleSheet)||w_(t)}catch{}else if(A_(t)){let n=t.cssText;const r=t.selectorText.includes(":"),s=typeof t.style.all=="string"&&t.style.all;if(s&&(n=k_(t)),r&&(n=R_(n)),r||s)return n}return e||t.cssText}function R_(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function C_(t){return"styleSheet"in t}function A_(t){return"selectorText"in t}class Eu{constructor(){Xo(this,"idNodeMap",new Map),Xo(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,n){const r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)}replace(e,n){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(e,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function M_(){return new Eu}function Vr({maskInputOptions:t,tagName:e,type:n}){return e==="OPTION"&&(e="SELECT"),!!(t[e.toLowerCase()]||n&&t[n]||n==="password"||e==="INPUT"&&!n&&t.text)}function En({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function Ge(t){return t.toLowerCase()}function Gs(t){return t.toUpperCase()}const Jo="__rrweb_original__";function x_(t){const e=t.getContext("2d");if(!e)return!0;const n=50;for(let r=0;r<t.width;r+=n)for(let s=0;s<t.height;s+=n){const i=e.getImageData,o=Jo in i?i[Jo]:i;if(new Uint32Array(o.call(e,r,s,Math.min(n,t.width-r),Math.min(n,t.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Mi(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ge(e):null}function vr(t,e,n){return e==="INPUT"&&(n==="radio"||n==="checkbox")?t.getAttribute("value")||"":t.value}function bu(t,e){let n;try{n=new URL(t,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Zo={};function vu(t){const e=Zo[t];if(e)return e;const n=window.document;let r=window[t];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[t]&&(r=i[t]),n.head.removeChild(s)}catch{}return Zo[t]=r.bind(window)}function Vs(...t){return vu("setTimeout")(...t)}function Tu(...t){return vu("clearTimeout")(...t)}function Iu(t){try{return t.contentDocument}catch{}}function N_(t){try{return t.contentWindow}catch{}}let O_=1;const L_=new RegExp("[^a-z0-9-_:]"),bn=-2;function xi(){return O_++}function D_(t){if(t instanceof HTMLFormElement)return"form";const e=Ge(t.tagName);return L_.test(e)?"div":e}function P_(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let Oe,Qo;const F_=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,B_=/^(?:[a-z+]+:)?\/\//i,$_=/^www\..*/i,U_=/^(data:)([^,]*),(.*)/i;function H_(t,e){if(!t||e.size===0)return t;try{const n=t.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();e.has(o)||r.push(s)}return r.join("; ")+(r.length>0&&t.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),t}}function Tr(t,e){return(t||"").replace(F_,(n,r,s,i,o,c)=>{const a=s||o||c,u=r||i||"";if(!a)return n;if(B_.test(a)||$_.test(a))return`url(${u}${a}${u})`;if(U_.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${P_(e)+a}${u})`;const d=e.split("/"),l=a.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const W_=/^[^ \t\n\r\u000c]+/,z_=/^[, \t\n\r\u000c]+/;function q_(t,e){if(e.trim()==="")return e;let n=0;function r(i){let o;const c=i.exec(e.substring(n));return c?(o=c[0],n+=o.length,o):""}const s=[];for(;r(z_),!(n>=e.length);){let i=r(W_);if(i.slice(-1)===",")i=Pe(t,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Pe(t,i);let c=!1;for(;;){const a=e.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 ta=new WeakMap;function Pe(t,e){return!e||e.trim()===""?e:Yr(t,e)}function j_(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Yr(t,e){let n=ta.get(t);if(n||(n=t.createElement("a"),ta.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function wu(t,e,n,r,s,i,o){if(!r)return r;if(n==="src"||n==="href"&&!(e==="use"&&r[0]==="#"))return Pe(t,r);
21if(n==="xlink:href"&&r[0]!=="#")return Pe(t,r);if(n==="background"&&(e==="table"||e==="td"||e==="th"))return Pe(t,r);if(n==="srcset")return q_(t,r);if(n==="style"){let c=Tr(r,Yr(t));return o&&o.size>0&&(c=H_(c,o)),c}else if(e==="object"&&n==="data")return Pe(t,r);return typeof i=="function"?i(n,r,s):r}function ku(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function G_(t,e,n,r){try{if(r&&t.matches(r))return!1;if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let s=t.classList.length;s--;){const i=t.classList[s];if(e.test(i))return!0}if(n)return t.matches(n)}catch{}return!1}function V_(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function Ee(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Ee(t.parentNode,e,n,r+1)}function Fe(t,e){return n=>{const r=n;if(r===null)return!1;try{if(t){if(typeof t=="string"){if(r.matches(`.${t}`))return!0}else if(V_(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function Ve(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.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=Ee(o,Fe(r,s)),a<0)return!0;c=Ee(o,Fe(e,n),a>=0?a:1/0)}else{if(c=Ee(o,Fe(e,n)),c<0)return!1;a=Ee(o,Fe(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function Y_(t,e,n){const r=N_(t);if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const c=Vs(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{Tu(c),s=!0,e()});return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src==="")return Vs(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function K_(t,e,n){let r=!1,s;try{s=t.sheet}catch{s=null}if(s)return;const i=Vs(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{Tu(i),r=!0,e()})}function X_(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:S,dataURLOptions:y={},inlineImages:I,recordCanvas:P,keepIframeSrcFn:B,newlyAddedElement:K=!1,ignoreCSSAttributes:x}=e,g=J_(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ot.Document,childNodes:[],compatMode:t.compatMode}:{type:ot.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ot.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:g};case t.ELEMENT_NODE:return Q_(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:f,maskAttributeFn:a,maskInputOptions:h,maskInputFn:S,dataURLOptions:y,inlineImages:I,recordCanvas:P,keepIframeSrcFn:B,newlyAddedElement:K,rootId:g,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,ignoreCSSAttributes:x});case t.TEXT_NODE:return Z_(t,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:S,rootId:g});case t.CDATA_SECTION_NODE:return{type:ot.CDATA,textContent:"",rootId:g};case t.COMMENT_NODE:return{type:ot.Comment,textContent:t.textContent||"",rootId:g};default:return!1}}function J_(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function Z_(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:d}=e,l=t.parentNode&&t.parentNode.tagName;let p=t.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(f&&p){try{t.nextSibling||t.previousSibling||t.parentNode.sheet?.cssRules&&(p=br(t.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,t)}p=Tr(p,Yr(e.doc))}h&&(p="SCRIPT_PLACEHOLDER");const S=Ve(t,r,i,s,o,n);if(!f&&!h&&!m&&p&&S&&(p=c?c(p,t.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(a.textarea||S)&&(p=u?u(p,t.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const y=Vr({type:null,tagName:l,maskInputOptions:a});p=En({isMasked:Ve(t,r,i,s,o,y),element:t,value:p,maskInputFn:u})}return{type:ot.Text,textContent:p||"",isStyle:f,rootId:d}}function Q_(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:S,unmaskTextClass:y,maskTextSelector:I,unmaskTextSelector:P,ignoreCSSAttributes:B}=e,K=G_(t,r,s,i),x=D_(t);let g={};const T=t.attributes.length;for(let b=0;b<T;b++){const w=t.attributes[b];w.name&&!ku(x,w.name,w.value)&&(g[w.name]=wu(n,x,Ge(w.name),w.value,t,a,B))}if(x==="link"&&o){const b=Array.from(n.styleSheets).find(U=>U.href===t.href);let w=null;b&&(w=br(b)),w&&(g.rel=null,g.href=null,g.crossorigin=null,g._cssText=Tr(w,b.href))}if(x==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const b=br(t.sheet);b&&(g._cssText=Tr(b,Yr(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const b=t,w=Mi(b),U=vr(b,Gs(x),w),q=b.checked;if(w!=="submit"&&w!=="button"&&U){const F=Ve(b,S,I,y,P,Vr({type:w,tagName:Gs(x),maskInputOptions:c}));g.value=En({isMasked:F,element:b,value:U,maskInputFn:u})}q&&(g.checked=q)}if(x==="option"&&(t.selected&&!c.select?g.selected=!0:delete g.selected),x==="canvas"&&p){if(t.__context==="2d")x_(t)||(g.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){const b=t.toDataURL(d.type,d.quality),w=n.createElement("canvas");w.width=t.width,w.height=t.height;const U=w.toDataURL(d.type,d.quality);b!==U&&(g.rr_dataURL=b)}}if(x==="img"&&l){Oe||(Oe=n.createElement("canvas"),Qo=Oe.getContext("2d"));const b=t,w=b.currentSrc||b.getAttribute("src")||"<unknown-src>",U=b.crossOrigin,q=()=>{b.removeEventListener("load",q);
21try{Oe.width=b.naturalWidth,Oe.height=b.naturalHeight,Qo.drawImage(b,0,0),g.rr_dataURL=Oe.toDataURL(d.type,d.quality)}catch(F){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?q():b.addEventListener("load",q);return}else console.warn(`Cannot inline img src=${w}! Error: ${F}`)}b.crossOrigin==="anonymous"&&(U?g.crossOrigin=U:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?q():b.addEventListener("load",q)}if((x==="audio"||x==="video")&&(g.rr_mediaState=t.paused?"paused":"played",g.rr_mediaCurrentTime=t.currentTime),h||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),K){const{width:b,height:w}=t.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${w}px`}}x==="iframe"&&!f(g.src)&&(!K&&!Iu(t)&&(g.rr_src=g.src),delete g.src);let et;try{customElements.get(x)&&(et=!0)}catch{}return{type:ot.Element,tagName:x,attributes:g,childNodes:[],isSVG:j_(t)||void 0,needBlock:K,rootId:m,isCustom:et}}function Q(t){return t==null?"":t.toLowerCase()}function tS(t,e){if(e.comment&&t.type===ot.Comment)return!0;if(t.type===ot.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&bu(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Q(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(t.attributes.name)==="application-name"||Q(t.attributes.rel)==="icon"||Q(t.attributes.rel)==="apple-touch-icon"||Q(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Q(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Q(t.attributes.property).match(/^(og|twitter|fb):/)||Q(t.attributes.name).match(/^(og|twitter):/)||Q(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Q(t.attributes.name)==="robots"||Q(t.attributes.name)==="googlebot"||Q(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Q(t.attributes.name)==="author"||Q(t.attributes.name)==="generator"||Q(t.attributes.name)==="framework"||Q(t.attributes.name)==="publisher"||Q(t.attributes.name)==="progid"||Q(t.attributes.property).match(/^article:/)||Q(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Q(t.attributes.name)==="google-site-verification"||Q(t.attributes.name)==="yandex-verification"||Q(t.attributes.name)==="csrf-token"||Q(t.attributes.name)==="p:domain_verify"||Q(t.attributes.name)==="verify-v1"||Q(t.attributes.name)==="verification"||Q(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Be(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:P={},inlineImages:B=!1,recordCanvas:K=!1,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T=5e3,onBlockedImageLoad:et,onStylesheetLoad:b,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:U=()=>!1,newlyAddedElement:q=!1,ignoreCSSAttributes:F}=e;let{preserveWhiteSpace:at=!0}=e;const X=X_(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,dataURLOptions:P,inlineImages:B,recordCanvas:K,keepIframeSrcFn:U,newlyAddedElement:q,ignoreCSSAttributes:F});if(!X)return console.warn(t,"not serialized"),null;let nt;r.hasNode(t)?nt=r.getId(t):tS(X,I)||!at&&X.type===ot.Text&&!X.isStyle&&!X.textContent.trim().length?nt=bn:nt=xi();const E=Object.assign(X,{id:nt});if(r.add(t,E),nt===bn)return null;x&&x(t);let Y=!p;if(E.type===ot.Element){Y=Y&&!E.needBlock;const A=t.shadowRoot;A&&fn(A)&&(E.isShadowHost=!0)}if((E.type===ot.Document||E.type===ot.Element)&&Y){I.headWhitespace&&E.type===ot.Element&&E.tagName==="head"&&(at=!1);const A={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:P,inlineImages:B,recordCanvas:K,preserveWhiteSpace:at,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onBlockedImageLoad:et,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:U,ignoreCSSAttributes:F},$=t.childNodes?Array.from(t.childNodes):[];for(const J of $){const Z=Be(J,A);Z&&E.childNodes.push(Z)}if(T_(t)&&t.shadowRoot)for(const J of Array.from(t.shadowRoot.childNodes)){const Z=Be(J,A);Z&&(fn(t.shadowRoot)&&(Z.isShadow=!0),E.childNodes.push(Z))}}if(t.parentNode&&dn(t.parentNode)&&fn(t.parentNode)&&(E.isShadow=!0),E.type===ot.Element&&E.tagName==="iframe"&&!E.needBlock&&Y_(t,()=>{const A=Iu(t);if(A&&g){const $=Be(A,{doc:A,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:P,inlineImages:B,recordCanvas:K,preserveWhiteSpace:at,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:U,ignoreCSSAttributes:F});$&&g(t,$)}},T),E.type===ot.Element&&E.tagName==="img"&&!t.complete&&E.needBlock){const A=t,$=()=>{if(A.isConnected&&!A.complete&&et)try{const J=A.getBoundingClientRect();J.width>0&&J.height>0&&et(A,E,J)}catch{}A.removeEventListener("load",$)};A.isConnected&&A.addEventListener("load",$)}return E.type===ot.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&bu(E.attributes.href)==="css")&&K_(t,()=>{if(b){const A=Be(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:P,inlineImages:B,recordCanvas:K,preserveWhiteSpace:at,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:U,ignoreCSSAttributes:F});A&&b(t,A)}},w),E.type===ot.Element&&delete E.needBlock,E}function eS(t,e){const{mirror:n=new Eu,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:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOM:I=!1,dataURLOptions:P,preserveWhiteSpace:B,onSerialize:K,onIframeLoad:x,iframeLoadTimeout:g,onBlockedImageLoad:T,onStylesheetLoad:et,stylesheetLoadTimeout:b,keepIframeSrcFn:w=()=>!1,ignoreCSSAttributes:U=new Set([])}=e||{};return Be(t,{doc:t,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:S,maskInputFn:y,slimDOMOptions:I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
21:I===!1?{}:I,dataURLOptions:P,inlineImages:p,recordCanvas:f,preserveWhiteSpace:B,onSerialize:K,onIframeLoad:x,iframeLoadTimeout:g,onBlockedImageLoad:T,onStylesheetLoad:et,stylesheetLoadTimeout:b,keepIframeSrcFn:w,newlyAddedElement:!1,ignoreCSSAttributes:U})}function _t(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Le=`Please stop import mirror directly. Instead of that,\r 22now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 23or you can use record.mirror to access the mirror instance during recording.`;let ea={map:{},getId(){return console.error(Le),-1},getNode(){return console.error(Le),null},removeNodeFromMap(){console.error(Le)},has(){return console.error(Le),!1},reset(){console.error(Le)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ea=new Proxy(ea,{get(t,e,n){return e==="map"&&console.error(Le),Reflect.get(t,e,n)}}));function vn(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const c=e-(o-s),a=this;c<=0||c>e?(r&&(cS(r),r=null),s=o,t.apply(a,i)):!r&&n.trailing!==!1&&(r=Kr(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(a,i)},c))}}function Ru(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(o){Kr(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Ru(t,e,i||{},!0)}function Ni(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch{return()=>{}}}let Ir=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ir=()=>new Date().getTime());function Cu(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:e?.documentElement.scrollLeft||e?.body?.parentElement?.scrollLeft||e?.body?.scrollLeft||0,top:e.scrollingElement?e.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:e?.documentElement.scrollTop||e?.body?.parentElement?.scrollTop||e?.body?.scrollTop||0}}function Au(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Mu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function xu(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function vt(t,e,n,r,s){if(!t)return!1;const i=xu(t);if(!i)return!1;const o=Fe(e,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const c=Ee(i,o);let a=-1;return c<0?!1:(r&&(a=Ee(i,Fe(null,r))),c>-1&&a<0?!0:c<a)}function nS(t,e){return e.getId(t)!==-1}function Ss(t,e){return e.getId(t)===bn}function Nu(t,e){if(dn(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Nu(t.parentNode,e):!0:!0}function Ys(t){return!!t.changedTouches}function rS(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let n=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Ou(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Lu(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ks(t){return!!t?.shadowRoot}class sS{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,n){if(this.has(e))return this.getId(e);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Du(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function iS(t){let e=t,n;for(;n=Du(e);)e=n;return e}function oS(t){const e=t.ownerDocument;if(!e)return!1;const n=iS(t);return e.contains(n)}function Pu(t){const e=t.ownerDocument;return e?e.contains(t)||oS(t):!1}const na={};function Oi(t){const e=na[t];if(e)return e;const n=window.document;let r=window[t];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[t]&&(r=i[t]),n.head.removeChild(s)}catch{}return na[t]=r.bind(window)}function aS(...t){return Oi("requestAnimationFrame")(...t)}function Kr(...t){return Oi("setTimeout")(...t)}function cS(...t){return Oi("clearTimeout")(...t)}var O=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(O||{}),C=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.In
23put=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(C||{}),mt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(mt||{}),Gt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Gt||{}),De=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(De||{});let pn;function uS(t){pn=t}function lS(){pn=void 0}const z=t=>pn?((...n)=>{try{return t(...n)}catch(r){if(pn&&pn(r)===!0)return()=>{};throw r}}):t;var ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Qn=0;Qn<ra.length;Qn++)dS[ra.charCodeAt(Qn)]=Qn;class sa{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Li(t){try{return t.contentDocument}catch{}}function Tn(t){try{return t.contentWindow}catch{}}class fS{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{const n=new CSSStyleSheet;n.replaceSync(`x { ${e} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(e){const n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",e),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function ia(t){return"__ln"in t}class pS{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&ia(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&ia(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.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(e){const n=e.__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),e.__ln&&delete e.__ln,this.length--)}}const oa=(t,e)=>`${t}@${e}`;class hS{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Set,r=new pS,s=a=>{let u=a,d=bn;for(;d===bn;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=a=>{if(!a.parentNode||!Pu(a))return;const u=dn(a.parentNode)?this.mirror.getId(Du(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=Be(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.inl
23ineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Ou(p,this.mirror)&&!vt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),Lu(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ks(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(vt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);const h=Tn(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(e.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)aa(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!ca(this.droppedSet,a)&&!aa(this.removes,a,this.mirror)||ca(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 f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.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:e};!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=e=>{if(!Ss(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!vt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:Ve(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,xu(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){const o=Mi(n),c=n.tagName;s=vr(n,c,o);const a=Vr({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),u=Ve(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=En({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(vt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!Li(n))r="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
23,this.attributes.push(i),this.attributeMap.set(e.target,i)),r==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!ku(n.tagName,r)&&(i.attributes[r]=wu(this.doc,Ge(n.tagName),Ge(r),s,n,this.maskAttributeFn),r==="style")){const o=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==(o?.getPropertyValue(c)||"")||u!==(o?.getPropertyPriority(c)||"")?u===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,u]:i._unchangedStyles[c]=[a,u]}if(o)for(const c of Array.from(o))n.style.getPropertyValue(c)===""&&(i.styleDiff[c]=!1)}break}case"childList":{if(vt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=dn(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);vt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ss(n,this.mirror)||!nS(n,this.mirror)||(this.addedSet.has(n)?(Xs(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Nu(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[oa(r,s)]?Xs(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:dn(e.target)&&fn(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ss(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[oa(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);vt(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(r=>this.genAdds(r)),Ks(e)&&e.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=e[n]}),this.styleDeclarationParser=new fS(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Xs(t,e){t.delete(e),e.childNodes?.forEach(n=>Xs(t,n))}function aa(t,e,n){return t.length===0?!1:mS(t,e,n)}function mS(t,e,n){let r=e.parentNode;for(;r;){const s=n.getId(r);if(t.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function ca(t,e){return t.size===0?!1:Fu(t,e)}function Fu(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Fu(t,n):!1}const $e=[];function Wn(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Bu(t,e){const n=new hS;$e.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(z(o=>{t.onMutation&&t.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function gS({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],c;const a=vn(z(l=>{const p=Date.now()-c;t(o.map(f=>(f.timeOffset-=p,f)),l),o=[],c=null}),i),u=z(vn(z(l=>{const p=Wn(l),{clientX:f,clientY:h}=Ys(l)?l.changedTouches[0]:l;c||(c=Ir()),o.push({x:f,y:h,id:r.getId(p),timeOffset:Ir()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?C.Drag:l instanceof MouseEvent?C.MouseMove:C.TouchMove)}),s,{trailing:!1}
vendor: 4,723 bytes, line 23
23)),d=[_t("mousemove",u,n),_t("touchmove",u,n),_t("drag",u,n)];return z(()=>{d.forEach(l=>l())})}function _S({mouseInteractionCb:t,doc:e,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=>p=>{const f=Wn(p);if(vt(f,r,s,i,!0))return;let h=null,m=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=Gt.Mouse;break;case"touch":h=Gt.Touch;break;case"pen":h=Gt.Pen;break}h===Gt.Touch?mt[l]===mt.MouseDown?m="TouchStart":mt[l]===mt.MouseUp&&(m="TouchEnd"):Gt.Pen}else Ys(p)&&(h=Gt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===Gt.Touch||m.startsWith("Mouse")&&h===Gt.Mouse)&&(h=null)):mt[l]===mt.Click&&(h=u,u=null);const S=Ys(p)?p.changedTouches[0]:p;if(!S)return;const y=n.getId(f),{clientX:I,clientY:P}=S;z(t)({type:mt[m],id:y,x:I,y:P,...h!==null&&{pointerType:h}})};return Object.keys(mt).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEach(l=>{let p=Ge(l);const f=d(l);if(window.PointerEvent)switch(mt[l]){case mt.MouseDown:case mt.MouseUp:p=p.replace("mouse","pointer");break;case mt.TouchStart:case mt.TouchEnd:return}a.push(_t(p,f,e))}),z(()=>{a.forEach(l=>l())})}function $u({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const c=z(vn(z(a=>{const u=Wn(a);if(!u||vt(u,r,s,i,!0))return;const d=n.getId(u);if(u===e&&e.defaultView){const l=Cu(e.defaultView);t({id:d,x:l.left,y:l.top})}else t({id:d,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return _t("scroll",c,e)}function SS({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=z(vn(z(()=>{const i=Au(),o=Mu();(n!==i||r!==o)&&(t({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return _t("resize",s,e)}const yS=["INPUT","TEXTAREA","SELECT"],ua=new WeakMap;function ES({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function S(g){let T=Wn(g);const et=g.isTrusted,b=T&&Gs(T.tagName);if(b==="OPTION"&&(T=T.parentElement),!T||!b||yS.indexOf(b)<0||vt(T,r,s,i,!0))return;const w=T;if(w.classList.contains(o)||c&&w.matches(c))return;const U=Mi(T);let q=vr(w,b,U),F=!1;const at=Vr({maskInputOptions:a,tagName:b,type:U}),X=Ve(T,p,h,f,m,at);(U==="radio"||U==="checkbox")&&(F=T.checked),q=En({isMasked:X,element:T,value:q,maskInputFn:u}),y(T,l?{text:q,isChecked:F,userTriggered:et}:{text:q,isChecked:F});const nt=T.name;U==="radio"&&nt&&F&&e.querySelectorAll(`input[type="radio"][name="${nt}"]`).forEach(E=>{if(E!==T){const Y=En({isMasked:X,element:E,value:vr(E,b,U),maskInputFn:u});y(E,l?{text:Y,isChecked:!F,userTriggered:!1}:{text:Y,isChecked:!F})}})}function y(g,T){const et=ua.get(g);if(!et||et.text!==T.text||et.isChecked!==T.isChecked){ua.set(g,T);const b=n.getId(g);z(t)({...T,id:b})}}const P=(d.input==="last"?["change"]:["input","change"]).map(g=>_t(g,z(S),e)),B=e.defaultView;if(!B)return()=>{P.forEach(g=>g())};const K=B.Object.getOwnPropertyDescriptor(B.HTMLInputElement.prototype,"value"),x=[[B.HTMLInputElement.prototype,"value"],[B.HTMLInputElement.prototype,"checked"],[B.HTMLSelectElement.prototype,"value"],[B.HTMLTextAreaElement.prototype,"value"],[B.HTMLSelectElement.prototype,"selectedIndex"],[B.HTMLOptionElement.prototype,"selected"]];return K&&K.set&&P.push(...x.map(g=>Ru(g[0],g[1],{set(){z(S)({target:this,isTrusted:!1})}},!1,B))),z(()=>{P.forEach(g=>g())})}function wr(t){const e=[];function n(r,s){if(tr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||tr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||tr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||tr("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(t,e)}function Qt(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function bS({styleSheetRuleCb:t,mirror:e,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:z((d,l,p)=>{const[f,h]=p,{id:m,styleId:S}=Qt(l,e,n.styleMirror);return(m&&m!==-1||S&&S!==-1)&&t({id:m,styleId:S,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:z((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Qt(l,e,n.styleMirror);
23return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,removes:[{index:f}]}),d.apply(l,p)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:z((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Qt(l,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replace:f}),d.apply(l,p)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:z((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Qt(l,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replaceSync:f}),d.apply(l,p)})}));const a={};er("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(er("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),er("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),er("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:z((p,f,h)=>{const[m,S]=h,{id:y,styleId:I}=Qt(f.parentStyleSheet,e,n.styleMirror);return(y&&y!==-1||I&&I!==-1)&&t({id:y,styleId:I,adds:[{rule:m,index:[...wr(f),S||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:z((p,f,h)=>{const[m]=h,{id:S,styleId:y}=Qt(f.parentStyleSheet,e,n.styleMirror);return(S&&S!==-1||y&&y!==-1)&&t({id:S,styleId:y,removes:[{index:[...wr(f),m]}]}),p.apply(f,h)})})}),z(()=>{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 Uu({mirror:t,stylesheetManager:e},n){let r=null;n.nodeName==="#document"?r=t.getId(n):r=t.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{e.adoptStyleSheets(o,r)}catch{}return c}}),z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function vS({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:z((c,a,u)=>{const[d,l,p]=u;if(n.has(d))return i.apply(a,[d,l,p]);const{id:f,styleId:h}=Qt(a.parentRule?.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&t({id:f,styleId:h,set:{property:d,value:l,priority:p},index:wr(a.parentRule)}),c.apply(a,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:z((c,a,u)=>{const[d]=u;if(n.has(d))return o.apply(a,[d]);const{id:l,styleId:p}=Qt(a.parentRule?.parentStyleSheet,e,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&t({id:l,styleId:p,remove:{property:d},index:wr(a.parentRule)}),c.apply(a,u)})}),z(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function TS({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=z(u=>vn(z(d=>{const l=Wn(d);if(!l||vt(l,e,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:m}=l;t({type:u,id:s.getId(l),currentTime:p,volume:f,muted:h,playbackRate:m})}),i.media||500)),a=[_t("play",c(De.Play),o),_t("pause",c(De.Pause),o),_t("seeked",c(De.Seeked),o),_t("volumechange",c(De.VolumeChange),o),_t("ratechange",c(De.RateChange),o)];return z(()=>{a.forEach(u=>u())})}function IS({fontCb:t,doc:e}){const n=e.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=Ni(e.fonts,"add",function(c){return function(a){return Kr(z(()=>{const u=s.get(a);u&&(t(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=i}),r.push(o),z(()=>{r.forEach(c=>c())})}function wS(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let c=!0;const a=z(()=>{const u=e.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:m,endContainer:S,endOffset:y}=f;vt(h,r,s,i,!0)||vt(S,r,s,i,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(S),endOffset:y})}o({ranges:d})});return a(),_t("selectionchange",a)}function kS({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:Ni(n.customElements,"define",function(s){return function(i,o,c){try{e({define:{name:i}})}catch{}
23return s.apply(this,[i,o,c])}})}function RS(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=Bu(t,t.doc));const s=gS(t),i=_S(t),o=$u(t),c=SS(t,{win:n}),a=ES(t),u=TS(t);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};t.recordDOM&&(d=bS(t,{win:n}),l=Uu(t,t.doc),p=vS(t,{win:n}),t.collectFonts&&(f=IS(t)));const h=wS(t),m=kS(t),S=[];for(const y of t.plugins)S.push(y.observer(y.callback,n,y.options));return z(()=>{$e.forEach(y=>y.reset()),r?.disconnect(),s(),i(),o(),c(),a(),u(),d(),l(),p(),f(),h(),m(),S.forEach(y=>y())})}function tr(t){return typeof window[t]<"u"}function er(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Js{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,n,r,s){const i=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let c=i.get(n);return c||(c=this.generateIdFn(),i.set(n,c),o.set(c,n)),c}getIds(e,n){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return n.map(i=>this.getId(e,i,r,s))}getRemoteId(e,n,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(e,n){const r=this.getRemoteIdToIdMap(e);return n.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let n=this.iframeIdToRemoteIdMap.get(e);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(e,n)),n}getRemoteIdToIdMap(e){let n=this.iframeRemoteIdToIdMap.get(e);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(e,n)),n}}class CS{constructor(){this.crossOriginIframeMirror=new Js(xi),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class AS{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Js(xi),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Js(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);const n=Tn(e);n&&this.crossOriginIframeMap.set(n,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,n){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&Tn(e)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const r=Li(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){const n=e;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(e,n){switch(n.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(n.data.node,e);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:O.IncrementalSnapshot,data:{source:C.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return n;case O.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case O.IncrementalSnapshot:switch(n.data.source){case C.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(r.node,s)}
23),n.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case C.Drag:case C.TouchMove:case C.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case C.ViewportResize:return!1;case C.MediaInteraction:case C.MouseInteraction:case C.Scroll:case C.CanvasMutation:case C.Input:return this.replaceIds(n.data,e,["id"]),n;case C.StyleSheetRule:case C.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case C.Font:return n;case C.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case C.AdoptedStyleSheet:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),n}}return!1}replace(e,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=e.getIds(r,n[i]):n[i]=e.getId(r,n[i]));return n}replaceIds(e,n,r){return this.replace(this.crossOriginIframeMirror,e,n,r)}replaceStyleIds(e,n,r){return this.replace(this.crossOriginIframeStyleMirror,e,n,r)}replaceIdOnNode(e,n){this.replaceIds(e,n,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(e,n){e.type!==ot.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class MS{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class xS{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,n){if(!fn(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const r=Bu({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push($u({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Kr(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Uu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const n=Li(e),r=Tn(e);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(Ni(e.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Pu(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class NS{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new sS,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,n){if(e.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of e){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:yu(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(e){}}class OS{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,n){const r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==n)}add(e,n){this.active||(this.active=!0,aS(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let st,kr;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=t.contentWindow?.Array.from||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const xt=M_();function Dt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr
23-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:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:S,slimDOMOptions:y,maskAttributeFn:I,maskInputFn:P,maskTextFn:B,maxCanvasSize:K=null,packFn:x,sampling:g={},dataURLOptions:T={},mousemoveWait:et,recordDOM:b=!0,recordCanvas:w=!1,recordCrossOriginIframes:U=!1,recordAfter:q=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:at=!1,inlineImages:X=!1,plugins:nt,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:A,onMutation:$,getCanvasManager:J}=t;uS(A);const Z=U?window.parent===window:!0;let bt=!1;if(!Z)try{window.parent.document&&(bt=!1)}catch{bt=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!bt)return()=>{};et!==void 0&&g.mousemove===void 0&&(g.mousemove=et),xt.reset();const At=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}:S!==void 0?S:{},Ft=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};rS();let jt,pe=0;const nn=G=>{for(const Mt of nt||[])Mt.eventProcessor&&(G=Mt.eventProcessor(G));return x&&!bt&&(G=x(G)),G};st=(G,Mt)=>{const H=G;if(H.timestamp=Ir(),$e[0]?.isFrozen()&&H.type!==O.FullSnapshot&&!(H.type===O.IncrementalSnapshot&&H.data.source===C.Mutation)&&$e.forEach(ft=>ft.unfreeze()),Z)e?.(nn(H),Mt);else if(bt){const ft={type:"rrweb",event:nn(H),origin:window.location.origin,isCheckout:Mt};window.parent.postMessage(ft,"*")}if(H.type===O.FullSnapshot)jt=H,pe=0;else if(H.type===O.IncrementalSnapshot){if(H.data.source===C.Mutation&&H.data.isAttachIframe)return;pe++;const ft=r&&pe>=r,W=n&&jt&&H.timestamp-jt.timestamp>n;(ft||W)&&rs(!0)}};const he=G=>{st({type:O.IncrementalSnapshot,data:{source:C.Mutation,...G}})},zi=G=>st({type:O.IncrementalSnapshot,data:{source:C.Scroll,...G}}),hl=G=>st({type:O.IncrementalSnapshot,data:{source:C.CanvasMutation,...G}}),ml=G=>st({type:O.IncrementalSnapshot,data:{source:C.AdoptedStyleSheet,...G}}),me=new NS({mutationCb:he,adoptedStyleSheetCb:ml}),ge=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new CS:new AS({mirror:xt,mutationCb:he,stylesheetManager:me,recordCrossOriginIframes:U,wrappedEmit:st});for(const G of nt||[])G.getMirror&&G.getMirror({nodeMirror:xt,crossOriginIframeMirror:ge.crossOriginIframeMirror,crossOriginIframeStyleMirror:ge.crossOriginIframeStyleMirror});const es=new OS,ns=DS(J,{mirror:xt,win:window,mutationCb:G=>st({type:O.IncrementalSnapshot,data:{source:C.CanvasMutation,...G}}),recordCanvas:w,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:K,sampling:g.canvas,dataURLOptions:T,errorHandler:A}),qn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new MS:new xS({mutationCb:he,scrollCb:zi,bypassOptions:{onMutation:$,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:At,dataURLOptions:T,maskAttributeFn:I,maskTextFn:B,maskInputFn:P,recordCanvas:w,inlineImages:X,sampling:g,slimDOMOptions:Ft,iframeManager:ge,stylesheetManager:me,canvasManager:ns,keepIframeSrcFn:E,processedNodeManager:es,ignoreCSSAttributes:Y},mirror:xt}),rs=(G=!1)=>{if(!b)return;st({type:O.Meta,data:{href:window.location.href,width:Mu(),height:Au()}},G),me.reset(),qn.init(),$e.forEach(H=>H.lock());const Mt=eS(document,{mirror:xt,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:At,maskAttributeFn:I,maskInputFn:P,maskTextFn:B,slimDOM:Ft,dataURLOptions:T,recordCanvas:w,inlineImages:X,onSerialize:H=>{Ou(H,xt)&&ge.addIframe(H),Lu(H,xt)&&me.trackLinkElement(H),Ks(H)&&qn.addShadowRoot(H.shadowRoot,document)},onIframeLoad:(H,ft)=>{ge.attachIframe(H,ft);const W=Tn(H);W&&ns.addWindow(W),qn.observeAttachShadow(H)},onStylesheetLoad:(H,ft)=>{me.attachLinkElement(H,ft)},onBlockedImageLoad:(H,ft,{width:W,height:rn})=>{he({adds:[],removes:[],texts:[],attributes:[{id:ft.id,attributes:{style:{width:`${W}px`,height:`${rn}
23px`}}}]})},keepIframeSrcFn:E,ignoreCSSAttributes:Y});if(!Mt)return console.warn("Failed to snapshot the document");st({type:O.FullSnapshot,data:{node:Mt,initialOffset:Cu(window)}}),$e.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,xt.getId(document))};kr=rs;try{const G=[],Mt=ft=>z(RS)({onMutation:$,mutationCb:he,mousemoveCb:(W,rn)=>st({type:O.IncrementalSnapshot,data:{source:rn,positions:W}}),mouseInteractionCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.MouseInteraction,...W}}),scrollCb:zi,viewportResizeCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.ViewportResize,...W}}),inputCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.Input,...W}}),mediaInteractionCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.MediaInteraction,...W}}),styleSheetRuleCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.StyleSheetRule,...W}}),styleDeclarationCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.StyleDeclaration,...W}}),canvasMutationCb:hl,fontCb:W=>st({type:O.IncrementalSnapshot,data:{source:C.Font,...W}}),selectionCb:W=>{st({type:O.IncrementalSnapshot,data:{source:C.Selection,...W}})},customElementCb:W=>{st({type:O.IncrementalSnapshot,data:{source:C.CustomElement,...W}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:At,inlineStylesheet:h,sampling:g,recordDOM:b,recordCanvas:w,inlineImages:X,userTriggeredOnInput:F,collectFonts:at,doc:ft,maskAttributeFn:I,maskInputFn:P,maskTextFn:B,keepIframeSrcFn:E,blockSelector:i,unblockSelector:o,slimDOMOptions:Ft,dataURLOptions:T,mirror:xt,iframeManager:ge,stylesheetManager:me,shadowDomManager:qn,processedNodeManager:es,canvasManager:ns,ignoreCSSAttributes:Y,plugins:nt?.filter(W=>W.observer)?.map(W=>({observer:W.observer,options:W.options,callback:rn=>st({type:O.Plugin,data:{plugin:W.name,payload:rn}})}))||[]},{});ge.addLoadListener(ft=>{try{G.push(Mt(ft.contentDocument))}catch(W){console.warn(W)}});const H=()=>{rs(),G.push(Mt(document))};return document.readyState==="interactive"||document.readyState==="complete"?H():(G.push(_t("DOMContentLoaded",()=>{st({type:O.DomContentLoaded,data:{}}),q==="DOMContentLoaded"&&H()})),G.push(_t("load",()=>{st({type:O.Load,data:{}}),q==="load"&&H()},window))),()=>{G.forEach(ft=>ft()),es.destroy(),kr=void 0,lS()}}catch(G){console.warn(G)}}function LS(t){if(!kr)throw new Error("please take full snapshot after start recording");kr(t)}Dt.mirror=xt;Dt.takeFullSnapshot=LS;function DS(t,e){try{return t?t(e):new sa}catch{return console.warn("Unable to initialize CanvasManager"),new sa}}var la;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(la||(la={}));const PS=3,FS=5;function Di(t){return t>9999999999?t:t*1e3}function ys(t){return t>9999999999?t/1e3:t}function zn(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:O.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Nt(e,10,1e3)}}),e.category==="console")))}const BS="button,a";function Hu(t){return t.closest(BS)||t}function Wu(t){const e=zu(t);return!e||!(e instanceof Element)?e:Hu(e)}function zu(t){return $S(t)?t.target:t}function $S(t){return typeof t=="object"&&!!t&&"target"in t}let te;function US(t){return te||(te=[],HS()),te.push(t),()=>{const e=te?te.indexOf(t):-1;e>-1&&te.splice(e,1)}}function HS(){yt(tt,"open",function(t){return function(...e){if(te)try{te.forEach(n=>n())}catch{}return t.apply(tt,e)}
23})}const WS=new Set([C.Mutation,C.StyleSheetRule,C.StyleDeclaration,C.AdoptedStyleSheet,C.CanvasMutation,C.Selection,C.MediaInteraction]);function zS(t,e,n){t.handleClick(e,n)}class qS{constructor(e,n,r=zn){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=e,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const e=US(()=>{this._lastMutation=da()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,n){if(GS(n,this._ignoreSelector)||!VS(e))return;const r={timestamp:ys(e.timestamp),clickBreadcrumb:e,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(e=Date.now()){this._lastMutation=ys(e)}registerScroll(e=Date.now()){this._lastScroll=ys(e)}registerClick(e){const n=Hu(e);this._handleMultiClick(n)}_handleMultiClick(e){this._getClicks(e).forEach(n=>{n.clickCount++})}_getClicks(e){return this._clicks.filter(n=>n.node===e)}_checkClicks(){const e=[],n=da();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&&e.push(r)});for(const r of e){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const n=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,s=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:c}=e;if(i){const a=Math.min(e.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:tt.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:tt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Hn(()=>this._checkClicks(),1e3)}}const jS=["A","BUTTON","INPUT"];function GS(t,e){return!!(!jS.includes(t.tagName)||t.tagName==="INPUT"&&!["submit","button"].includes(t.getAttribute("type")||"")||t.tagName==="A"&&(t.hasAttribute("download")||t.hasAttribute("target")&&t.getAttribute("target")!=="_self")||e&&t.matches(e))}function VS(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function da(){return Date.now()/1e3}function YS(t,e){try{if(!KS(e))return;const{source:n}=e.data;if(WS.has(n)&&t.registerMutation(e.timestamp),n===C.Scroll&&t.registerScroll(e.timestamp),XS(e)){const{type:r,id:s}=e.data,i=Dt.mirror.getNode(s);i instanceof HTMLElement&&r===mt.Click&&t.registerClick(i)}}catch{}}function KS(t){return t.type===PS}function XS(t){return t.data.source===C.MouseInteraction}function Bt(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Xr=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Xr||{});const JS=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function ZS(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(JS.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}const QS=t=>e=>{if(!t.isEnabled())return;const n=ty(e);if(!n)return;
23const r=e.name==="click",s=r?e.event:void 0;r&&t.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&zS(t.clickDetector,n,Wu(e.event)),zn(t,n)};function qu(t,e){const n=Dt.mirror.getId(t),r=n&&Dt.mirror.getNode(n),s=r&&Dt.mirror.getMeta(r),i=s&&ny(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Xr.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:ZS(i.attributes)}}:{}}}function ty(t){const{target:e,message:n}=ey(t);return Bt({category:`ui.${t.name}`,...qu(e,n)})}function ey(t){const e=t.name==="click";let n,r=null;try{r=e?Wu(t.event):zu(t.event),n=ut(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ny(t){return t.type===Xr.Element}function ry(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=sy(e);n&&zn(t,n)}function sy(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||iy(o)||!i)return null;const c=e||r||s,a=i.length===1;if(!c&&a)return null;const u=ut(o,{maxStringLength:200})||"<unknown>",d=qu(o,u);return Bt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function iy(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const oy={resource:dy,paint:uy,navigation:ly};function Es(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function ay(t){return t.map(cy).filter(Boolean)}function cy(t){const e=oy[t.entryType];return e?e(t):null}function Ye(t){return((dt()||tt.performance.timeOrigin)+t)/1e3}function uy(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=Ye(s);return{type:n,name:r,start:i,end:i+e,data:void 0}}function ly(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:m}=t;return s===0?null:{type:`${e}.${m}`,start:Ye(f),end:Ye(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:p}}}function dy(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Ye(i),end:Ye(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function fy(t){const e=t.entries[t.entries.length-1],n=e?.element?[e.element]:void 0;return Pi(t,"largest-contentful-paint",n)}function py(t){return t.sources!==void 0}function hy(t){const e=[],n=[];for(const r of t.entries)if(py(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Dt.mirror.getId(i.node);o&&s.push(o)}e.push({value:r.value,nodeIds:s.length?s:void 0})}return Pi(t,"cumulative-layout-shift",n,e)}function my(t){const e=t.entries[t.entries.length-1],n=e?.target?[e.target]:void 0;return Pi(t,"interaction-to-next-paint",n)}function Pi(t,e,n,r){const s=t.value,i=t.rating,o=Ye(s);return{type:"web-vital",name:e,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(c=>Dt.mirror.getId(c)):void 0,attributions:r}}}function gy(t){function e(s){t.performanceEntries.includes(s)||t.performanceEntries.push(s)}function n({entries:s}){s.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(je(s,n))}),r.push(Wr(Es(fy,t)),Hr(Es(hy,t)),Ii(Es(my,t))),()=>{r.forEach(s=>s())}}const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_y='
vendor: 10,329 bytes, line 23
23var 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});
23';function Sy(){const t=new Blob([_y]);return URL.createObjectURL(t)}const fa=["log","warn","error"],lr="[Replay] ";function bs(t,e="info"){se({category:"console",data:{logger:"replay"},level:e,message:`${lr}${t}`},{level:e})}function yy(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=!!r.captureExceptions,e=!!r.traceInternals}};return k?(fa.forEach(r=>{n[r]=(...s)=>{_[r](lr,...s),e&&bs(s.join(""),Wc(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),_.error(lr,r),t?vc(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):e&&bs(r,"error")},n.infoTick=(...r)=>{_.log(lr,...r),e&&setTimeout(()=>bs(r[0]),0)}):fa.forEach(r=>{n[r]=()=>{}}),n}const R=yy();class Fi extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ai}.`)}}class ju{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const n=JSON.stringify(e).length;if(this._totalSize+=n,this._totalSize>Ai)throw new Fi;this.events.push(e)}finish(){return new Promise(e=>{const n=this.events;this.clear(),e(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(const{timestamp:n}of this.events)(e===null||n<e)&&(e=n);return e===null?e:Di(e)}}class Ey{constructor(e){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const s=this._pending.get(r.id);if(!(!s||s.method!==r.method)){if(this._pending.delete(r.id),!r.success){k&&R.error("Error in compression worker: ",r.response),s.reject(new Error("Error in compression worker"));return}s.resolve(r.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():(k&&R.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{k&&R.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(){k&&R.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(e=>e.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(e,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{this._pending.set(r,{method:e,resolve:s,reject:i});try{this._worker.postMessage({id:r,method:e,arg:n})}catch(o){this._pending.delete(r),i(o)}})}_getAndIncrementId(){return this._id++}}class by{constructor(e){this._worker=new Ey(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const n=Di(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Ai?Promise.reject(new Fi):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{k&&R.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class vy{constructor(e){this._fallback=new ju,this._compression=new by(e),this._used=this._fallback,this._ensureWorkerIsLoadedProm
23ise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){k&&R.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of e)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){k&&R.exception(i,"Failed to add events when switching buffers.")}}}function Ty({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=Iy(e);if(n)return n}return k&&R.log("Using simple buffer"),new ju}function Iy(t){try{const e=t||wy();if(!e)return;k&&R.log(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new vy(n)}catch(e){k&&R.exception(e,"Failed to create compression worker")}}function wy(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Sy():""}function Bi(){try{return"sessionStorage"in tt&&!!tt.sessionStorage}catch{return!1}}function ky(t){Ry(),t.session=void 0}function Ry(){if(Bi())try{tt.sessionStorage.removeItem(Ri)}catch{}}function Gu(t){return t===void 0?!1:Math.random()<t}function Jr(t){if(Bi())try{tt.sessionStorage.setItem(Ri,JSON.stringify(t))}catch{}}function Vu(t){const e=Date.now(),n=t.id||Tt(),r=t.started||e,s=t.lastActivity||e,i=t.segmentId||0,o=t.sampled,c=t.previousSessionId,a=t.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:c,dirty:a}}function Cy(t,e){return Gu(t)?"session":e?"buffer":!1}function pa({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=Cy(t,e),i=Vu({sampled:s,previousSessionId:r});return n&&Jr(i),i}function Ay(){if(!Bi())return null;try{const t=tt.sessionStorage.getItem(Ri);if(!t)return null;const e=JSON.parse(t);return k&&R.infoTick("Loading existing session"),Vu(e)}catch{return null}}function Zs(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function My(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Zs(t.started,e,r)||Zs(t.lastActivity,n,r)}function Rr(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!My(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function vs({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const s=r.stickySession&&Ay();return s?Rr(s,{sessionIdleExpire:t,maxReplayDuration:e})?(k&&R.infoTick("Session in sessionStorage is expired, creating new one..."),pa(r,{previousSessionId:s.id})):s:(k&&R.infoTick("Creating new session"),pa(r,{previousSessionId:n}))}function xy(t){return t.type===O.Custom}function $i(t,e,n){return Ku(t,e)?(Yu(t,e,n),!0):!1}function Ny(t,e,n){return Ku(t,e)?Yu(t,e,n):Promise.resolve(null)}async function Yu(t,e,n){const{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;const s=t.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=t.getOptions(),o=Oy(e,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof Fi,c=o?"eventBufferOverflow":"eventBufferError",a=D();if(a){const u=o?"buffer_overflow":"internal_sdk_error";a.recordDroppedEvent(u,"replay")}if(o&&s)return r.clear(),r.waitForCheckout=!0,null;t.handleException(i),await t.stop({reason:c})}}function Ku(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Di(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(k&&R.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Oy(t,e){try{if(typeof e=="function"&&xy(t))return e(t)}catch(n){return k&&R.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}function Ui(t){return!t.type}function Qs(t){return t.type==="transaction"}function Ly(t){return t.type==="replay_event"}function ha(t){return t.type==="feedback"}function Dy(t){return(e,n)=>{if(!t.isEnabled()||!Ui(e)&&!Qs(e))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Qs(e)){Py(t,e);return}Fy(t,e)}}}function Py(t,e){const n=t.getContext();e.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}function Fy(t,e){const n=t.getContext();if(e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id),t.recordingMode!=="buffer"||!e.tags?.replayId)return;const{beforeErrorSampling:r}=t.getOptions();typeof r=="function"&&!r(e)||Hn(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(s){t.handleException(s)}})}function By(t){return e=>
23{!t.isEnabled()||!Ui(e)||$y(t,e)}}function $y(t,e){const n=e.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=Bt({category:"replay.hydrate-error",data:{url:Qe()}});zn(t,r)}}function Uy(t){const e=D();e&&e.on("beforeAddBreadcrumb",n=>Hy(t,n))}function Hy(t,e){if(!t.isEnabled()||!Xu(e))return;const n=Wy(e);n&&zn(t,n)}function Wy(t){return!Xu(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?zy(t):Bt(t)}function zy(t){const e=t.data?.arguments;if(!Array.isArray(e)||e.length===0)return Bt(t);let n=!1;const r=e.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Zn?(n=!0,`${s.slice(0,Zn)}â¦`):s;if(typeof s=="object")try{const i=Nt(s,7);return JSON.stringify(i).length>Zn?(n=!0,`${JSON.stringify(i,null,2).slice(0,Zn)}â¦`):i}catch{}return s});return Bt({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Xu(t){return!!t.category}function qy(t,e){return t.type||!t.exception?.values?.length?!1:!!e.originalException?.__rrweb__}function Cr(){const t=V().getPropagationContext().dsc;t&&delete t.replay_id;const e=ht();if(e){const n=zt(e);delete n.replay_id}}function ma(t){const e=V().getPropagationContext().dsc;e&&(e.replay_id=t);const n=ht();if(n){const r=zt(n);r.replay_id=t}}function jy(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:O.Custom,timestamp:e.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1):!0)}function Gy(t,e){return t.recordingMode!=="buffer"||e.message===Ci||!e.exception||e.type?!1:Gu(t.getOptions().errorSampleRate)}function Vy(t){return Object.assign((e,n)=>{if(t.session&&Rr(t.session,{maxReplayDuration:t.getOptions().maxReplayDuration,sessionIdleExpire:t.timeouts.sessionIdleExpire})&&Cr(),!t.isEnabled()||t.isPaused())return e;if(Ly(e))return delete e.breadcrumbs,e;if(!Ui(e)&&!Qs(e)&&!ha(e))return e;if(!t.checkAndHandleExpiredSession())return Cr(),e;if(ha(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),jy(t,e),e;if(qy(e,n)&&!t.getOptions()._experiments.captureExceptions)return k&&R.log("Ignoring error from rrweb internals",e),null;const s=Gy(t,e);if((s||t.recordingMode==="session")&&(e.tags={...e.tags,replayId:t.getSessionId()}),s&&t.recordingMode==="buffer"&&t.session?.sampled==="buffer"){const o=t.session;o.dirty=!0,t.getOptions().stickySession&&Jr(o)}return e},{id:"Replay"})}function Zr(t,e){return e.map(({type:n,start:r,end:s,name:i,data:o})=>{const c=t.throttledAddEvent({type:O.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 Yy(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}function Ky(t){return e=>{if(!t.isEnabled())return;const n=Yy(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(Zr(t,[n]),!1)))}}function Xy(t,e){return k&&t.getOptions()._experiments.traceInternals?!1:yp(e,D())}function Ju(t,e){t.isEnabled()&&e!==null&&(Xy(t,e.name)||t.addUpdate(()=>(Zr(t,[e]),!0)))}function Qr(t){if(!t)return;const e=new TextEncoder;try{if(typeof t=="string")return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=pu(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function Zu(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Ar(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Qu(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:c,response:a}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:c,response:a}}}function In(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function re(t,e,n){if(!e&&Object.keys(t).length===0)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=Jy(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function ti(t,e){return Object.entries(t).reduce((n,[r,s])=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=s),n},{})}function Jy(t){if(!t||typeof t!="string")return{body:t};const e=t.length>Yo,n=Zy(t);if(e){const r=t.slice(0,Yo);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}â¦`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch{}return{body:t}}function Zy(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function Mr(t,e){const n=Qy(t);return $t(n,e)}function Qy(t,e=tt.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(tt.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function tE(t,e,n){try{const r=await nE(t,e,n),s=Qu("resource.fetch",r);Ju(n.replay,s)}catch(r){k&&R.exception(r,"Failed to capture fetch breadcrumb")}}function eE(t,e){const{input:n,response:r}=e,s=n?mu(n):void 0,i=Qr(s),o=r?Zu(r.headers.get("content-length")):void 0;i!==void 0&&(t.data.request_body_size=i),o!==void 0&&(t.data.response_body_size=o)}async function nE(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:d}=t.data,l=Mr(o,n.networkDetailAllowUrls)&&!Mr(o,n.networkDetailDenyUrls),p=l?rE(n,e.input,u):In(u),f=await sE(l,n,e.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:p,response:f}}function rE({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?aE(n,e):{};if(!t)return re(s,r,void 0);const i=mu(n),[o,c]=hu(i,R),a=re(s,r,o);return c?Ar(a,c):a}async function sE(t,{networkCaptureBodies:e,networkResponseHeaders:n}
23,r,s){if(!t&&s!==void 0)return In(s);const i=r?tl(r.headers,n):{};if(!r||!e&&s!==void 0)return re(i,s,void 0);const[o,c]=await oE(r),a=iE(o,{networkCaptureBodies:e,responseBodySize:s,captureDetails:t,headers:i});return c?Ar(a,c):a}function iE(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:s}){try{const i=t?.length&&n===void 0?Qr(t):n;return r?e?re(s,i,t):re(s,i,void 0):In(i)}catch(i){return k&&R.exception(i,"Failed to serialize response body"),re(s,n,void 0)}}async function oE(t){const e=cE(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await uE(e)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(k&&R.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(k&&R.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function tl(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function aE(t,e){return t.length===1&&typeof t[0]!="string"?ga(t[0],e):t.length===2?ga(t[1],e):{}}function ga(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?tl(n,e):Array.isArray(n)?{}:ti(n,e):{}}function cE(t){try{return t.clone()}catch(e){k&&R.exception(e,"Failed to clone response body")}}function uE(t){return new Promise((e,n)=>{const r=Hn(()=>n(new Error("Timeout while trying to read response body")),500);lE(t).then(s=>e(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function lE(t){return await t.text()}async function dE(t,e,n){try{const r=pE(t,e,n),s=Qu("resource.xhr",r);Ju(n.replay,s)}catch(r){k&&R.exception(r,"Failed to capture xhr breadcrumb")}}function fE(t,e){const{xhr:n,input:r}=e;if(!n)return;const s=Qr(r),i=n.getResponseHeader("content-length")?Zu(n.getResponseHeader("content-length")):gE(n.response,n.responseType);s!==void 0&&(t.data.request_body_size=s),i!==void 0&&(t.data.response_body_size=i)}function pE(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:c}=e,{url:a,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=t.data;if(!a)return null;if(!c||!Mr(a,n.networkDetailAllowUrls)||Mr(a,n.networkDetailDenyUrls)){const x=In(l),g=In(p);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:x,response:g}}const f=c[ye],h=f?ti(f.request_headers,n.networkRequestHeaders):{},m=ti(gu(c),n.networkResponseHeaders),[S,y]=n.networkCaptureBodies?hu(o,R):[void 0],[I,P]=n.networkCaptureBodies?hE(c):[void 0],B=re(h,l,S),K=re(m,p,I);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:y?Ar(B,y):B,response:P?Ar(K,P):K}}function hE(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return mE(t.response,t.responseType)}catch(n){e.push(n)}return k&&R.warn("Failed to get xhr response body",...e),[void 0]}function mE(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&t&&typeof t=="object")return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return k&&R.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return k&&R.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gE(t,e){try{const n=e==="json"&&t&&typeof t=="object"?JSON.stringify(t):t;return Qr(n)}catch{return}}function _E(t){const e=D();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=t.getOptions(),c={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};e&&e.on("beforeAddBreadcrumb",(a,u)=>SE(c,a,u))}catch{}}function SE(t,e,n){if(e.data)try{yE(e)&&bE(n)&&(fE(e,n),dE(e,n,t)),EE(e)&&vE(n)&&(eE(e,n),tE(e,n,t))}catch(r){k&&R.exception(r,"Error when enriching network breadcrumb")}}function yE(t){return t.category==="xhr"}function EE(t){return t.category==="fetch"}function bE(t){return t?.xhr}function vE(t){return t?.input!==void 0}function TE(t){const e=D();lu(QS(t)),Gr(Ky(t)),Uy(t),_E(t);const n=Vy(t);Lf(n),e&&(e.on("beforeSendEvent",By(t)),e.on("afterSendEvent",Dy(t)),e.on("createDsc",r=>{const s=t.getSessionId();s&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(r.replay_id=s)}),e.on("spanStart",r=>{t.lastActiveSpan=r}),e.on("spanEnd",r=>{t.lastActiveSpan=r}),e.on("beforeSendFeedback",async(r,s)=>{const i=t.getSessionId();s?.includeReplay&&t.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await t.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),e.on("openFeedbackWidget",async()=>{await t.sendBufferedReplayOrFlush()}))}async function IE(t){try{return Promise.all(Zr(t,[wE(tt.performance.memory)]))}catch{return[]}}function wE(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function kE(t,e,n){return kp(t,e,{...n,setTimeoutImpl:Hn})}const nr=L.navigator;function RE(){return/iPhone|iPad|iPod/i.test(nr?.userAgent??"")||/Macintosh/i.test(nr?.userAgent??"")&&nr?.maxTouchPoints&&nr?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function CE(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession()){k&&R.warn("Received replay event after session expired.");return}const s=r||!e;e=!0,AE(n),t.clickDetector&&YS(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&s&&t.setInitialState(),!$i(t,n,s))return!0;
23if(!s)return!1;const i=t.session;if(xE(t,s),t.recordingMode==="buffer"&&i&&t.eventBuffer&&!i.dirty){const o=t.eventBuffer.getEarliestTimestamp();o&&(k&&R.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,t.getOptions().stickySession&&Jr(i))}return i?.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}}function AE(t){const e=t.data;if(!(t.type!==O.IncrementalSnapshot||!e||typeof e!="object"||!("source"in e)||e.source!==C.Mutation||!("attributes"in e)||!Array.isArray(e.attributes)))for(const n of e.attributes){const r=Dt.mirror.getNode(n.id),s=r&&Dt.mirror.getMeta(r);if(s?.type===Xr.Element)for(const[i,o]of Object.entries(n.attributes))o===null?delete s.attributes[i]:s.attributes[i]=o}}function ME(t){const e=t.getOptions();return{type:O.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:t.eventBuffer?t.eventBuffer.type==="worker":!1,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}function xE(t,e){!e||t.session?.segmentId!==0||$i(t,ME(t),!1)}function NE(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function OE(t,e,n,r){return de(mc(t,fi(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function LE({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)} 24`;if(typeof t=="string")n=`${r}${t}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+t.length),n.set(i),n.set(t,i.length)}return n}async function DE({client:t,scope:e,replayId:n,event:r}){const s=typeof t._integrations=="object"&&t._integrations!==null&&!Array.isArray(t._integrations)?Object.keys(t._integrations):void 0,i={event_id:n,integrations:s};t.emit("preprocessEvent",r,i);const o=await bc(t.getOptions(),r,i,e,t,Ct());if(!o)return null;t.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const c=t.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 PE({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=LE({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=D(),p=V(),f=l?.getTransport(),h=l?.getDsn();if(!l||!f||!h||!i.sampled)return Promise.resolve({});const m={type:u_,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:i.sampled},S=await DE({scope:p,client:l,replayId:e,event:m});if(!S)return l.recordDroppedEvent("event_processor","replay"),k&&R.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete S.sdkProcessingMetadata;const y=OE(S,o,h,l.getOptions().tunnel);let I;try{I=await f.send(y)}catch(B){const K=new Error(Ci);try{K.cause=B}catch{}throw K}const P=Nc({},I);if(xc(P,"replay"))throw new Hi(P);if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new el(I.statusCode);return I}class el extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Hi extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}
24class _a extends Error{constructor(){super("Session is too long, not sending replay")}}async function nl(t,e={count:0,interval:m_}){const{recordingData:n,onError:r}=t;if(n.length)try{return await PE(t),!0}catch(s){if(s instanceof el||s instanceof Hi)throw s;if(Nf("Replays",{_retryCount:e.count}),r&&r(s),e.count>=g_){const i=new Error(`${Ci} - max retries exceeded`);try{i.cause=s}catch{}throw i}return e.interval*=++e.count,new Promise((i,o)=>{Hn(async()=>{try{await nl(t,e),i(!0)}catch(c){o(c)}},e.interval)})}}const rl="__THROTTLED",FE="__SKIPPED";function BE(t,e,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()>=e){const d=o;return o=!0,d?FE:rl}o=!1;const u=r.get(a)||0;return r.set(a,u+1),t(...c)}}class $E{constructor({options:e,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:l_,sessionIdleExpire:d_},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=e,this._debouncedFlush=kE(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}
24),this._throttledAddEvent=BE((o,c)=>Ny(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(__,r),timeout:r,scrollTimeout:S_,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new qS(this,i)),k){const o=e._experiments;R.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{tt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=Bt({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=Bt({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(e){k&&R.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(e),!this.session){k&&R.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",k&&R.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){k&&R.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){k&&R.log("Buffering is in progress, call `flush()` to save the replay");return}k&&R.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=vs({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){k&&R.log("Buffering is in progress, call `flush()` to save the replay");return}k&&R.infoTick("Starting replay in buffer mode");const e=vs({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Dt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:h_}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:CE(this),...RE(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";D()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{k&&R.log(`Stopping Replay triggered by ${r}`),Cr(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ky(this)}catch(s){this.handleException(s)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),k&&R.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),k&&R.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();k&&R.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!e||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession(),ma(this.session.id)),this.startRecording())}addUpdate(e){const n=e();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(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}
24checkAndHandleExpiredSession(){if(this._lastActivity&&Zs(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${tt.location.pathname}${tt.location.hash}${tt.location.search}`,n=`${tt.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(e,n){const r=this._throttledAddEvent(e,n);if(r===rl){const s=Bt({category:"replay.throttled"});this.addUpdate(()=>!$i(this,{type:FS,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastActiveSpan||ht(),n=e&&pt(e),s=(n&&j(n).data||{})[Ot];if(!(!n||!s||!["route","custom"].includes(s)))return j(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ty({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&D()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&ma(this.session.id)}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=vs({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const e=this.session;return Rr(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(e.id))}_addListeners(){try{tt.document.addEventListener("visibilitychange",this._handleVisibilityChange),tt.addEventListener("blur",this._handleWindowBlur),tt.addEventListener("focus",this._handleWindowFocus),tt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(TE(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=gy(this)}_removeListeners(){try{tt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),tt.removeEventListener("blur",this._handleWindowBlur),tt.removeEventListener("focus",this._handleWindowFocus),tt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;if(Rr(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Cr();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){k&&R.log("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:O.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=ay(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;e=e.filter(r=>r.start>=n)}return Promise.all(Zr(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:n}=this;if(!e||!n||this._requiresManualStart||e.segmentId)return;
24const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){k&&R.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await IE(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new _a;const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await nl({replayId:e,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=D();if(r){let s;n instanceof Hi?s="ratelimit_backoff":n instanceof _a?s="invalid":s="send_error",r.recordDroppedEvent(s,"replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){k&&R.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){k&&R.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&&k&&R.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&&Jr(this.session)}_onMutationHandler(e){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&e.some(c=>{const a=NE(c.target),u=n.join(",");return a?.matches(u)}))return!1;const r=e.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const c=Bt({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(t,e){return[...t,...e].join(",")}function UE({mask:t,unmask:e,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=on(t,[".sentry-mask","[data-sentry-mask]"]),c=on(e,[]);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 HE({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){if(s.unmaskTextSelector&&t.matches(s.unmaskTextSelector))return i;const o=n.includes(e),c=r&&e==="value"&&t.tagName==="INPUT"&&["submit","button"].includes(t.getAttribute("type")||"");return o||c?i.replace(/[\S]/g,"*"):i}const Sa='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',WE=["content-length","content-type","accept"],zE=Symbol.for("sentry__originalRequestBody");let ya=!1,Ea=!1;function qE(){if(typeof Request>"u"||Ea)return;const t=Request;try{const e=function(n,r){const s=new t(n,r);return r?.body!=null&&(s[zE]=r.body),s};e.prototype=t.prototype,L.Request=e,Ea=!0}catch{}}const jE=(t=>new GE(t));class GE{constructor({flushMinDelay:e=f_,flushMaxDelay:n=p_,minReplayDuration:r=y_,maxReplayDuration:s=Ko,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:y=[],networkCaptureBodies:I=!0,networkRequestHeaders:P=[],networkResponseHeaders:B=[],mask:K=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:g=[],block:T=[],unblock:et=[],ignore:b=[],maskFn:w,beforeAddRecordingEvent:U,beforeErrorSampling:q,onError:F,attachRawBodyFromRequest:at=!1}={}){this.name="Replay";const X=UE({mask:K,unmask:g,block:T,unblock:et,ignore:b});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:w,maskInputFn:w,maskAttributeFn:(nt,E,Y)=>HE({maskAttributes:x,maskAllText:u,privacyOptions:X,key:nt,value:E,el:Y}),...X,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:nt=>{try{nt.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,E_),maxReplayDuration:Math.min(s,Ko),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:S,networkDetailDenyUrls:y,networkCaptureBodies:I,networkRequestHeaders:ba(P),networkResponseHeaders:ba(B),beforeAddRecordingEvent:U,beforeErrorSampling:q,onError:F,attachRawBodyFromRequest:at,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Sa}`:Sa,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ze())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ya}set _isInitialized(e){ya=e}afterAllSetup(e){!ze()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&qE(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
24startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){const n=this.getReplayId(!0);n&&mi(e,{"sentry.replay_id":n})}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const n=VE(this._initialOptions,e);this._replay=new $E({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function VE(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...t},s=Ce(n.replaysSessionSampleRate),i=Ce(n.replaysOnErrorSampleRate);return s==null&&i==null&&oe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function ba(t){return[...WE,...t.map(e=>e.toLowerCase())]}function YE(t){return t.split(",").some(e=>e.trim().startsWith("sentry-"))}function sl(t){try{return new URL(t,N.location.origin).href}catch{return}}function KE(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function il(t){try{return new Headers(t)}catch{return}}const ol={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function XE(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:c,onRequestSpanEnd:a}={...ol,...e},u=typeof s=="function"?s:f=>!0,d=f=>ZE(f,o),l={},p=t.getOptions().propagateTraceparent;n&&yi(f=>{const h=eh(f,u,d,l,{propagateTraceparent:p,onRequestSpanEnd:a});if(h){const m=sl(f.fetchData.url),S=m?Ie(m).host:void 0;h.setAttributes({"http.url":m?Ht(m):void 0,"server.address":S}),i&&va(h,t),c?.(h,{headers:f.headers})}}),r&&fu(f=>{const h=QE(f,u,d,l,p,a);h&&(i&&va(h,t),c?.(h,{headers:il(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}const JE=300;function va(t,e){const{url:n}=j(t).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(s)};if(qt(e)){const i=t.end.bind(t);t.end=o=>{const c=o??ct();let a=!1;const u=()=>{a||(a=!0,setTimeout(s),i(c),clearTimeout(d))};r=u;const d=setTimeout(u,JE)}}const s=je("resource",({entries:i})=>{i.forEach(o=>{KE(o)&&o.name.endsWith(n)&&(t.setAttributes(cu(o)),r())})})}function ZE(t,e){const n=Qe();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return e?$t(r.toString(),e)||i&&$t(r.pathname,e):i}else{const r=!!t.match(/^\/(?!\/)/);return e?$t(t,e):r}}function QE(t,e,n,r,s,i){const o=t.xhr,c=o?.[ye];if(!o||o.__sentry_own_request__||!c)return;const{url:a,method:u}=c,d=Lt()&&e(a);if(t.endTimestamp){const I=o.__sentry_xhr_span_id__;if(!I)return;const P=r[I];P&&(d&&c.status_code!==void 0&&(Ga(P,c.status_code),P.end(),i?.(P,{headers:il(gu(o)),error:t.error})),delete r[I]);return}const l=sl(a),p=Ie(l||a),f=Ht(yf(a)),h=D(),S=!!ht()||!!h&&qt(h),y=d&&S?fe({name:`${u} ${f}`,attributes:{url:Ht(a),type:"xhr","http.method":u,"http.url":l?Ht(l):void 0,"server.address":p?.host,[it]:"auto.http.browser",[Rt]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Ut;return d&&!S&&h?.recordDroppedEvent("no_parent_span","span"),o.__sentry_xhr_span_id__=y.spanContext().spanId,r[o.__sentry_xhr_span_id__]=y,n(a)&&tb(o,Lt()&&S?y:void 0,s),h&&h.emit("beforeOutgoingRequestSpan",y,t),y}function tb(t,e,n){const{"sentry-trace":r,baggage:s,traceparent:i}=Uc({span:e,propagateTraceparent:n});r&&eb(t,r,s,i)}function eb(t,e,n,r){const s=t.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!t.setRequestHeader))try{if(t.setRequestHeader("sentry-trace",e),r&&!s?.traceparent&&t.setRequestHeader("traceparent",r),n){const i=s?.baggage;(!i||!YE(i))&&t.setRequestHeader("baggage",n)}}catch{}}const Ta=new WeakMap,Ia=new WeakMap,nb=9e4,rb=["text/event-stream","application/x-ndjson","application/stream+json"],sb=()=>({name:"FetchStreamPerformance",setup(){dh(t=>{if(t.response){const e=Ta.get(t.response);if(e&&t.endTimestamp){e.end(t.endTimestamp);const n=Ia.get(t.response);n&&clearTimeout(n)}}}),yi(t=>{if(t.endTimestamp&&t.response){const e=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!rb.some(a=>e.startsWith(a)))return;const n=t.fetchData?.url||"",r=t.fetchData?.method||"GET",s=Br(n),i=n.startsWith("data:")?Ht(n):s?Ec(s):n,o=fe({name:`${r} ${i}`,startTime:t.endTimestamp,attributes:{url:Ht(n),"http.method":r,type:"fetch",[Rt]:"http.client.stream",[it]:"auto.http.browser.stream"}});Ta.set(t.response,o);const c=setTimeout(()=>{o.isRecording()&&o.end()},nb);Ia.set(t.response,c)}})}});function ib(){N.document?N.document.addEventListener("visibilitychange",()=>{const t=ht();if(!t)return;const e=pt(t);if(N.document.hidden&&e){const n="cancelled",{op:r,status:s}=j(e);It&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:lt,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):It&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const ob=3600,al="sentry_previous_trace",ab="sentry.previous_trace";function cb(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r=e==="session-storage";
24let s=r?db():void 0;t.on("spanStart",o=>{if(pt(o)!==o)return;const c=V().getPropagationContext();s=ub(s,o,c),r&&lb(s)});let i=!0;n&&t.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(ei(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=ei(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[qa]:s.sampleRate}})}function ub(t,e,n){const r=j(e);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[ui])}catch{return 0}}const i={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!t)return i;const o=t.spanContext;return o.traceId===r.trace_id?t:(Date.now()/1e3-t.startTimestamp<=ob&&(It&&_.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...e.spanContext()})}\``),e.addLink({context:o,attributes:{[ad]:"previous_trace"}}),e.setAttribute(ab,`${o.traceId}-${o.spanId}-${ei(o)?1:0}`)),i)}function lb(t){try{N.sessionStorage.setItem(al,JSON.stringify(t))}catch(e){It&&_.warn("Could not store previous trace in sessionStorage",e)}}function db(){try{const t=N.sessionStorage?.getItem(al);return JSON.parse(t)}catch{return}}function ei(t){return t.traceFlags===1}const fb="BrowserTracing",pb=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function hb(){const t=N.navigator;return t?.userAgent?pb.test(t.userAgent):!1}const mb={...ir,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...ol},gb=((t={})=>{"enableElementTiming"in t&&oe(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const e={name:void 0,source:void 0},n=N.document,{enableInp:r,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a},beforeStartSpan:u,idleTimeout:d,finalTimeout:l,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:y,enableHTTPTimings:I,ignoreResourceSpans:P,ignorePerformanceApiSpans:B,instrumentPageLoad:K,instrumentNavigation:x,detectRedirects:g,linkPreviousTrace:T,consistentTraceSampling:et,enableReportPageLoaded:b,onRequestSpanStart:w,onRequestSpanEnd:U}={...mb,...t},q=hb();let F,at,X;function nt(E,Y,A=!0){const $=Y.op==="pageload",J=Y.name,Z=u?u(Y):Y,bt=Z.attributes||{};if(J!==Z.name&&(bt[Ot]="custom",Z.attributes=bt),!A){const jt=Me();fe({...Z,startTime:jt}).end(jt);return}e.name=Z.name,e.source=bt[Ot];const At=Sc(Z,{idleTimeout:d,finalTimeout:l,childSpanTimeout:p,disableAutoFinish:$,beforeSpanEnd:jt=>{F?.();const pe=qt(E);vm(jt,{recordClsOnPageloadSpan:!pe&&!c,recordLcpOnPageloadSpan:!pe&&!a,ignoreResourceSpans:P,ignorePerformanceApiSpans:B,spanStreamingEnabled:pe}),Ra(E,void 0);const nn=V(),he=nn.getPropagationContext();nn.setPropagationContext({...he,traceId:At.spanContext().traceId,sampled:le(At),dsc:zt(jt)}),$&&(X=void 0)},trimIdleSpanEndTimestamp:!b});$&&b&&(X=At),Ra(E,At);function Ft(){n&&["interactive","complete"].includes(n.readyState)&&E.emit("idleSpanEnableAutoFinish",At)}$&&!b&&n&&(n.addEventListener("readystatechange",()=>{Ft()}),Ft())}return{name:fb,setup(E){if(q){It&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}Ld();const Y=qt(E);if(F=mm({recordClsStandaloneSpans:Y?void 0:c||!1,recordLcpStandaloneSpans:Y?void 0:a||!1,client:E}),Y?($m(E),Hm(E),r&&zm()):r&&Lm(),i&&L.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?_m():s&&gm(),o&&Sm(),g&&n){const $=()=>{at=ct()};addEventListener("click",$,{capture:!0}),addEventListener("keydown",$,{capture:!0,passive:!0})}function A(){const $=wn(E);$&&!j($).timestamp&&(It&&_.log(`[Tracing] Finishing current active span with op: ${j($).op}`),$.setAttribute(mn,"cancelled"),$.end())}E.on("startNavigationSpan",($,J)=>{if(D()!==E)return;if(J?.isRedirect){It&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),nt(E,{op:"navigation.redirect",...$},!1);return}at=void 0,A(),Ct().setPropagationContext({traceId:Jt(),sampleRand:Math.random(),propagationSpanId:Lt()?void 0:Yt()});const Z=V();Z.setPropagationContext({traceId:Jt(),sampleRand:Math.random(),propagationSpanId:Lt()?void 0:Yt()}),Z.setSDKProcessingMetadata({normalizedRequest:void 0}),nt(E,{op:"navigation",...$,parentSpan:null,forceTransaction:!0})}),E.on("startPageLoadSpan",($,J={})=>
24{if(D()!==E)return;A();const Z=J.sentryTrace||wa("sentry-trace")||ka("sentry-trace"),bt=J.baggage||wa("baggage")||ka("baggage"),At=kd(Z,bt),Ft=V();Ft.setPropagationContext(At),Lt()||(Ft.getPropagationContext().propagationSpanId=Yt()),Ft.setSDKProcessingMetadata({normalizedRequest:_r()}),nt(E,{op:"pageload",...$})}),E.on("endPageloadSpan",()=>{b&&X&&(X.setAttribute(mn,"reportPageLoaded"),X.end())})},afterAllSetup(E){if(q)return;let Y=Qe();if(T!=="off"&&cb(E,{linkPreviousTrace:T,consistentTraceSampling:et}),N.location){if(K){const A=dt();cl(E,{name:N.location.pathname,startTime:A?A/1e3:void 0,attributes:{[Ot]:"url",[it]:"auto.pageload.browser"}})}x&&Gr(({to:A,from:$})=>{if($===void 0&&Y?.indexOf(A)!==-1){Y=void 0;return}Y=void 0;const J=Br(A),Z=wn(E),bt=Z&&g&&yb(Z,at);_b(E,{name:J?.pathname||N.location.pathname,attributes:{[Ot]:"url",[it]:"auto.navigation.browser"}},{url:A,isRedirect:bt})})}f&&ib(),o&&Sb(E,d,l,p,e),r&&Bm(),XE(E,{traceFetch:h,traceXHR:m,tracePropagationTargets:E.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:I,onRequestSpanStart:w,onRequestSpanEnd:U}),S&&E.addIntegration(sb())}}});function cl(t,e,n){t.emit("startPageLoadSpan",e,n),V().setTransactionName(e.name);const r=wn(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function _b(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s}),t.emit("startNavigationSpan",e,{isRedirect:s});const i=V();return i.setTransactionName(e.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{..._r(),url:r}}),wn(t)}function wa(t){return N.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function ka(t){return N.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===t)?.description}function Sb(t,e,n,r,s){const i=N.document;let o;const c=()=>{const a="ui.action.click",u=wn(t);if(u){const d=j(u).op;if(["navigation","pageload"].includes(d)){It&&_.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(mn,"interactionInterrupted"),o.end(),o=void 0),!s.name){It&&_.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Sc({name:s.name,op:a,attributes:{[Ot]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",c,{capture:!0})}const ul="_sentry_idleSpan";function wn(t){return t[ul]}function Ra(t,e){Et(t,ul,e)}const Ca=1.5;function yb(t,e){const n=j(t),r=Me(),s=n.start_timestamp;return!(r-s>Ca||e&&r-e<=Ca)}const Eb=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function bb(t){return N.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function ll(t={}){const e=gb({...t,instrumentPageLoad:!1});return{...e,afterAllSetup(n){if(e.afterAllSetup?.(n),N.location&&t.instrumentPageLoad!=!1){const r=dt(),{name:s,source:i}=vb();cl(n,{name:s,startTime:r?r/1e3:void 0,attributes:{[Ot]:i,[it]:"auto.pageload.astro"}})}}}}function vb(){try{const t=bb("sentry-route-name");if(t){const e=decodeURIComponent(t);return Eb&&_.log(`[Tracing] Using route name from Sentry HTML meta-tag: ${e}`),{name:e,source:"route"}}}catch{}return{name:N.location.pathname,source:"url"}}function Tb(t){const e={defaultIntegrations:Ib(),...t};return $c(e,"astro",["astro","browser"]),c_(e)}function Ib(t){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...js(),ll()]:js()}const wb="production",kb="wocap-website@",Rb="https://api.wocap.io";function Cb(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Tb({dsn:"https://5dd085cda9bbd5e4014daf60546baa20@o4508921912688640.ingest.de.sentry.io/4511439504539728",enabled:!0,environment:wb,release:kb,sendDefaultPii:!0,enableLogs:!1,integrations:[ll(),jE()],tracesSampleRate:.1,replaysSessionSampleRate:.01,replaysOnErrorSampleRate:.1,tracePropagationTargets:[/^\//,new RegExp(`^${Cb(Rb)}`)]});const Ab={},dl=new Set,xr=new WeakSet;let ni=!0,fl="viewport",Aa=!1;function Mb(t){Aa||(Aa=!0,ni??=!1,fl??="hover",xb(),Nb(),Ob(),Db())}function xb(){for(const t of["touchstart","mousedown"])document.addEventListener(t,e=>{const n=e.target.closest("a");kn(n,"tap")&&ts(n.href,{ignoreSlowConnection:!0}
24)},{passive:!0})}function Nb(){let t;document.body.addEventListener("focusin",r=>{const s=r.target.closest("a");kn(s,"hover")&&e(s.href)},{passive:!0}),document.body.addEventListener("focusout",n,{passive:!0}),Wi(()=>{for(const r of document.getElementsByTagName("a"))xr.has(r)||kn(r,"hover")&&(xr.add(r),r.addEventListener("mouseenter",s=>e(s.currentTarget.href),{passive:!0}),r.addEventListener("mouseleave",n,{passive:!0}))});function e(r){t&&clearTimeout(t),t=setTimeout(()=>{ts(r)},80)}function n(){t&&(clearTimeout(t),t=0)}}function Ob(){let t;Wi(()=>{for(const e of document.getElementsByTagName("a"))xr.has(e)||kn(e,"viewport")&&(xr.add(e),t??=Lb(),t.observe(e))})}function Lb(){const t=new WeakMap;return new IntersectionObserver((e,n)=>{for(const r of e){const s=r.target,i=t.get(s);r.isIntersecting?(i&&clearTimeout(i),t.set(s,setTimeout(()=>{n.unobserve(s),t.delete(s),ts(s.href)},300))):i&&(clearTimeout(i),t.delete(s))}})}function Db(){Wi(()=>{for(const t of document.getElementsByTagName("a"))kn(t,"load")&&ts(t.href)})}function ts(t,e){t=t.replace(/#.*/,"");const n=e?.ignoreSlowConnection??!1;if(Pb(t,n))if(dl.add(t),document.createElement("link").relList?.supports?.("prefetch")){const r=document.createElement("link");r.rel="prefetch",r.setAttribute("href",t),document.head.append(r)}else{const r=new Headers;for(const[s,i]of Object.entries(Ab))r.set(s,i);fetch(t,{priority:"low",headers:r})}}function Pb(t,e){if(!navigator.onLine||!e&&pl())return!1;try{const n=new URL(t,location.href);return location.origin===n.origin&&(location.pathname!==n.pathname||location.search!==n.search)&&!dl.has(t)}catch{}return!1}function kn(t,e){if(t?.tagName!=="A")return!1;const n=t.dataset.astroPrefetch;return n==="false"?!1:e==="tap"&&(n!=null||ni)&&pl()?!0:n==null&&ni||n===""?e===fl:n===e}function pl(){if("connection"in navigator){const t=navigator.connection;return t.saveData||/2g/.test(t.effectiveType)}return!1}function Wi(t){t();let e=!1;document.addEventListener("astro:page-load",()=>{if(!e){e=!0;return}t()})}Mb();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.