1import{v as Ml}from"./chunk-62JRHF6Z-jkuFFj9Y.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"milbudget-web@49475e45b2ecd2ec24ab669defd3db4d8858455a"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="97075d90-e0a1-4a90-8e5f-63221451b2dd",t._sentryDebugIdIdentifier="sentry-dbid-97075d90-e0a1-4a90-8e5f-63221451b2dd")}catch{}})();const b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,D=globalThis,ke="10.65.0";function ie(){return Fn(D),D}function Fn(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||ke,e[ke]=e[ke]||{}}function rn(t,e,n=D){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[ke]=r[ke]||{};return s[t]||(s[t]=e())}const za=["debug","info","warn","error","log","assert","trace"],Nl="Sentry Logger ",br={};function oe(t){if(!("console"in D))return t();const e=D.console,n={},r=Object.keys(br);r.forEach(s=>{const i=br[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function Ol(){di().enabled=!0}function Ll(){di().enabled=!1}function qa(){return di().enabled}function Dl(...t){li("log",...t)}function Pl(...t){li("warn",...t)}function Fl(...t){li("error",...t)}function li(t,...e){b&&qa()&&oe(()=>{D.console[t](`${Nl}[${t}]:`,...e)})}function di(){return b?rn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:Ol,disable:Ll,isEnabled:qa,log:Dl,warn:Pl,error:Fl},ja=50,Ae="?",Ji=/\(error: (.*)\)/,Zi=/captureMessage|captureException/;function Ga(...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=Ji.test(a)?a.replace(Ji,"$1"):a;if(!u.includes("Error: ")){for(const d of e){const l=d(u);if(l){i.push(l);break}}if(i.length>=ja+s)break}}return $l(i.slice(s))}}function Bl(t){return Array.isArray(t)?Ga(...t):t}function $l(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(nr(e).function||"")&&e.pop(),e.reverse(),Zi.test(nr(e).function||"")&&(e.pop(),Zi.test(nr(e).function||"")&&e.pop()),e.slice(0,ja).map(n=>({...n,filename:n.filename||nr(e).filename,function:n.function||Ae}))}function nr(t){return t[t.length-1]||{}}const ps="<anonymous>";function Vt(t){try{return!t||typeof t!="function"?ps:t.name||ps}catch{return ps}}function Qi(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 mn={},to={};function ae(t,e){return mn[t]=mn[t]||[],mn[t].push(e),()=>{const n=mn[t];if(n){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}}function ce(t,e){if(!to[t]){to[t]=!0;try{e()}catch(n){b&&_.error(`Error while instrumenting ${t}`,n)}}}function At(t,e){const n=t&&mn[t];if(n)for(const r of n)try{r(e)}catch(s){b&&_.error(`Error while triggering instrumentation handler. 3Type: ${t} 4Name: ${Vt(r)} 5Error:`,s)}}let hs=null;function Va(t){const e="error";ae(e,t),ce(e,Ul)}function Ul(){hs=D.onerror,D.onerror=function(t,e,n,r,s){return At("error",{column:r,error:s,line:n,msg:t,url:e}),hs?hs.apply(this,arguments):!1},D.onerror.__SENTRY_INSTRUMENTED__=!0}let ms=null;function Ya(t){const e="unhandledrejection";ae(e,t),ce(e,Hl)}function Hl(){ms=D.onunhandledrejection,D.onunhandledrejection=function(t){return At("unhandledrejection",t),ms?ms.apply(this,arguments):!0},D.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ka=Object.prototype.toString;function Wr(t){switch(Ka.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Me(t,Error)}}function sn(t,e){return Ka.call(t)===`[object ${e}]`}function Xa(t){return sn(t,"ErrorEvent")}function eo(t){return sn(t,"DOMError")}function Wl(t){return sn(t,"DOMException")}function qt(t){return sn(t,"String")}function fi(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function xe(t){return t===null||fi(t)||typeof t!="object"&&typeof t!="function"}function vn(t){return sn(t,"Object")}function Pe(t){return typeof t=="object"&&t!==null}function zr(t){return typeof Event<"u"&&Me(t,Event)}function zl(t){return sn(t,"RegExp")}function Bn(t){return!!(t?.then&&typeof t.then=="function")}function Me(t,e){try{return t instanceof e}catch{return!1}}function pi(t){return typeof Request<"u"&&Me(t,Request)}function vt(t,e,n){if(!(e in t))return;const r=t[e];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Ja(s,r);try{t[e]=s}catch{b&&_.log(`Failed to replace method "${e}" in object`,t)}}function ht(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{b&&_.log(`Failed to add non-enumerable property "${String(e)}" to object`,t)}}function Ja(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,ht(t,"__sentry_original__",e)}catch{}}function hi(t){return t.__sentry_original__}function Za(t){if(Wr(t))return{message:t.message,name:t.name,stack:t.stack,...no(t)};
5if(zr(t)){const{type:e,target:n,currentTarget:r,detail:s}=t;return{type:e,target:n,currentTarget:r,...s?{detail:s}:{},...no(t)}}return t}function no(t){return Pe(t)?Object.fromEntries(Object.entries(t)):{}}function ql(t){const e=Object.keys(Za(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}let Be;function $n(t){if(Be!==void 0)return Be?Be(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=D;return e in n&&typeof n[e]=="function"?(Be=n[e],Be(t)):(Be=null,t())}function Qt(){return $n(()=>Math.random())}function ue(){return $n(()=>Date.now())}const jl=Symbol.for("sentry.skipNormalization"),Gl=Symbol.for("sentry.overrideNormalizationDepth");function Vl(t){return!!t[jl]}function Yl(t){const e=t[Gl];return typeof e=="number"?e:void 0}let Ns;function Qa(t){Ns=t}function Nt(t,e=100,n=1/0){try{return Os("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function tc(t,e=3,n=100*1024){const r=Nt(t,e);return Jl(r)>n?tc(t,e-1,n):r}function Os(t,e,n=1/0,r=1/0,s=Zl()){const[i,o]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=ec(t,e);if(!c.startsWith("[object "))return c;if(Vl(e))return e;const a=Yl(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 Os("",h,u-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let f=0;const p=Za(e);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(f>=r){l[h]="[MaxProperties ~]";break}const m=p[h];l[h]=Os(h,m,u-1,r,s),f++}return o(e),l}function ec(t,e){try{if(Ns){const r=Ns(e);if(r)return r}return typeof global<"u"&&e===global?"[Global]":typeof e=="number"&&!Number.isFinite(e)?`[${e}]`:typeof e=="function"?`[Function: ${Vt(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Kl(e)}]`}catch(n){return`**non-serializable** (${n})`}}function Kl(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Xl(t){return~-encodeURI(t).split(/%..|./).length}function Jl(t){return Xl(JSON.stringify(t))}function Zl(){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 Ls(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function vr(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];xe(s)?n.push(String(s)):s instanceof Error?n.push(s.message?`${s.name}: ${s.message}`:s.name):n.push(ec(void 0,s))}return n.join(e)}function gn(t,e,n=!1){return qt(t)?zl(e)?e.test(t):qt(e)?n?t===e:t.includes(e):typeof e=="function"?e(t):!1:!1}function Ft(t,e=[],n=!1){for(const r of e)if(gn(t,r,n))return!0;return!1}function Ql(){const t=D;return t.crypto||t.msCrypto}let gs;function td(){return Qt()*16}function It(t=Ql()){try{if(t?.randomUUID)return $n(()=>t.randomUUID()).replace(/-/g,"")}catch{}return gs||(gs="10000000100040008000"+1e11),gs.replace(/[018]/g,e=>(e^(td()&15)>>e/4).toString(16))}function nc(t){return t.exception?.values?.[0]}function ve(t){const{message:e,event_id:n}=t;if(e)return e;const r=nc(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ds(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 te(t,e){const n=nc(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 ro(t){if(ed(t))return!0;try{ht(t,"__sentry_captured__",!0)}catch{}return!1}function ed(t){try{return t.__sentry_captured__}catch{}}const rc=1e3;
5function Fe(){return ue()/rc}function nd(){const{performance:t}=D;if(!t?.now||!t.timeOrigin)return Fe;const e=t.timeOrigin;return()=>(e+$n(()=>t.now()))/rc}let so;function ct(){return(so??(so=nd()))()}let _s=null;function rd(){const{performance:t}=D;if(!t?.now)return;const e=3e5,n=$n(()=>t.now()),r=ue(),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 _s===null&&(_s=rd()),_s}function sd(t){const e=ct(),n={sid:It(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>od(n)};return t&&Ke(n,t),n}function Ke(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:It()),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),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function id(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),Ke(t,n)}function od(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 Un(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]=Un(r[s],e[s],n-1));return r}function Yt(){return It()}function jt(){return It().substring(16)}function sc(t){try{const e=D.WeakRef;if(typeof e=="function")return new e(t)}catch{}return t}function ic(t){if(t){if(typeof t=="object"&&"deref"in t&&typeof t.deref=="function")try{return t.deref()}catch{return}return t}}const Ps="_sentrySpan";function Tn(t,e){e?ht(t,Ps,sc(e)):delete t[Ps]}function Tr(t){return ic(t[Ps])}const ad=100;class $t{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:Yt(),sampleRand:Qt()}}clone(){const e=new $t;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,Tn(e,Tr(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&&Ke(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 $t?n.getScopeData():vn(n)?e:void 0,{tags:s,attributes:i,extra:o,user:c,contexts:a,level:u,fingerprint:d=[],propagationContext:l,conversationId:f}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},c&&Object.keys(c).length&&(this._user=c),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),f&&(this._conversationId=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Tn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Yt(),sampleRand:Qt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:ad;if(r<=0)return this;const s={timestamp:Fe(),...e,message:e.message?Ls(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:Tr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Un(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||It();if(!this._client)return b&&_.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||It();if(!this._client)return b&&_.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||It();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(b&&_.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 cd(){return rn("defaultCurrentScope",()=>new $t)}function ud(){return rn("defaultIsolationScope",()=>new $t)}const io=t=>t instanceof Promise&&!t[oc],oc=Symbol("chained PromiseLike"),ld=(t,e,n)=>{const r=t.then(s=>(e(s),s),s=>{throw n(s),s});return io(r)&&io(t)?r:dd(t,r)},dd=(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,{[oc]:!0}),e};class fd{constructor(e,n){let r;e?r=e:r=new $t;let s;n?s=n:s=new $t,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 Bn(r)?ld(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 Xe(){const t=ie(),e=Fn(t);return e.stack=e.stack||new fd(cd(),ud())}function pd(t){return Xe().withScope(t)}function hd(t,e){const n=Xe();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function oo(t){return Xe().withScope(()=>t(Xe().getIsolationScope()))}function md(){return{withIsolationScope:oo,withScope:pd,withSetScope:hd,withSetIsolationScope:(t,e)=>oo(e),getCurrentScope:()=>Xe().getScope(),getIsolationScope:()=>Xe().getIsolationScope()}}function on(t){const e=Fn(t);return e.acs?e.acs:md()}function gd(t){return typeof t=="object"&&t!=null&&!Array.isArray(t)&&Object.keys(t).includes("value")}function _d(t,e){const{value:n,unit:r}=gd(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 ao(t,e=!1){const n={};for(const[r,s]of Object.entries(t??{})){const i=_d(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 G(){const t=ie();return on(t).getCurrentScope()}function yt(){const t=ie();return on(t).getIsolationScope()}function yd(){return rn("globalScope",()=>new $t)}function Hn(...t){const e=ie(),n=on(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function P(){return G().getClient()}function Ed(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,i={trace_id:n,span_id:s||jt()};return r&&(i.parent_span_id=r),i}const Ot="sentry.source",mi="sentry.sample_rate",ac="sentry.previous_trace_sample_rate",Rt="sentry.op",at="sentry.origin",bd="sentry.status.message",In="sentry.idle_span_finish_reason",Wn="sentry.measurement_unit",zn="sentry.measurement_value",co="sentry.custom_span_name",gi="sentry.profile_id",le="sentry.exclusive_time",vd="url.full",Td="sentry.link.type",Id="gen_ai.conversation.id",cc=0,qr=1,lt=2;function wd(t){if(t<400&&t>=100)return{code:qr};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 uc(t,e){t.setAttribute("http.response.status_code",e);const n=wd(e);n.message!=="unknown_error"&&t.setStatus(n)}const lc="_sentryScope",dc="_sentryIsolationScope",kd=Symbol.for("sentry.otelSourceInference"),Rd=Symbol.for("sentry.otelSourceExplicitlySet"),Cd=Symbol.for("sentry.tracerProviderSpan");function Je(t,e,n){t&&(ht(t,dc,sc(n)),ht(t,lc,e))}function Ve(t){const e=t;return{scope:e[lc],isolationScope:ic(e[dc])}}function uo(t){return t[kd]===!0}function Ad(t){ht(t,Rd,!0)}function lo(t){return t[Cd]===!0}const Ir="sentry-",xd=8192;function fc(t){const e=Nd(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,i])=>{if(s.startsWith(Ir)){const o=s.slice(Ir.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Md(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${Ir}${r}`]=s),n),{});return Od(e)}function Nd(t){if(!(!t||!qt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=fo(n);return Object.entries(r).forEach(([s,i])=>{e[s]=i}),e},{}):fo(t)}function fo(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 Od(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>xd?(b&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}const Ld=/^o(\d+)\./,Dd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Pd(t){return t==="http"||t==="https"}function an(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}`}
5function Fd(t){const e=Dd.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 pc({host:i,pass:s,path:a,projectId:u,port:o,protocol:n,publicKey:r})}function pc(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(!b)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+$/)?Pd(r)?e&&isNaN(parseInt(e,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function $d(t){return t.match(Ld)?.[1]}function Ud(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=$d(n)),r}function Hd(t){const e=typeof t=="string"?Fd(t):pc(t);if(!(!e||!Bd(e)))return e}function Ne(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 hc=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Wd(t){if(!t)return;const e=t.match(hc);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 zd(t,e){const n=Wd(t),r=fc(e);if(!n?.traceId)return{traceId:Yt(),sampleRand:Qt()};const s=qd(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 mc(t=Yt(),e=jt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function gc(t=Yt(),e=jt(),n){return`00-${t}-${e}-${n?"01":"00"}`}function qd(t,e){const n=Ne(e?.sample_rand);if(n!==void 0)return n;const r=Ne(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Qt()*r:r+Qt()*(1-r):Qt()}const _c=0,jr=1;let po=!1;function jd(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 Gd(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:j(t).parent_span_id,i=Ve(t).scope,o=r?i?.getPropagationContext().propagationSpanId||jt():e;return{parent_span_id:s,span_id:o,trace_id:n}}function Vd(t){const{traceId:e,spanId:n}=t.spanContext(),r=de(t);return mc(e,n,r)}function Yd(t){const{traceId:e,spanId:n}=t.spanContext(),r=de(t);return gc(e,n,r)}function Sc(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===jr,attributes:i,...s}))}function yc(t){if(t?.length)return t.map(({context:{spanId:e,traceId:n,traceFlags:r},attributes:s})=>({span_id:e,trace_id:n,sampled:r===jr,attributes:s}))}function Gt(t){return typeof t=="number"?ho(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ho(t.getTime()):ct()}function ho(t){return t>9999999999?t/1e3:t}function j(t){if(Tc(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(vc(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:bc(t),start_timestamp:Gt(s),timestamp:Gt(o)||void 0,status:Ic(c),op:r[Rt],origin:r[at],links:Sc(a)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function Ec(t){if(Tc(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(vc(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:bc(t),start_timestamp:Gt(s),end_timestamp:Gt(o),is_segment:t===$s(t),status:_i(c),attributes:wc(r,c),links:yc(a)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===$s(t)}}function bc(t){return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0}function Kd(t){return{...t,attributes:ao(t.attributes),links:t.links?.map(e=>({...e,attributes:ao(e.attributes)}))}}function vc(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function Tc(t){return typeof t.getSpanJSON=="function"}function de(t){const{traceFlags:e}=t.spanContext();return e===jr}function Ic(t){if(!(!t||t.code===cc))return t.code===qr?"ok":t.message||"internal_error"}function _i(t){return!t||t.code===qr||t.code===cc||t.message==="cancelled"?"ok":"error"}function wc(t,e){const n=_i(e)==="error"?e?.message:void 0;return{...n&&{[bd]:n},...t}}const Re="_sentryChildSpans",Fs="_sentryRootSpan";function Bs(t,e){const n=t[Fs]||t;ht(e,Fs,n),t[Re]?t[Re].add(e):ht(t,Re,new Set([e]))}function Xd(t,e){t[Re]&&t[Re].delete(e)}function hr(t){const e=new Set;function n(r){if(!e.has(r)&&de(r)){e.add(r);const s=r[Re]?Array.from(r[Re]):[];for(const i of s)n(i)}}return n(t),Array.from(e)}const pt=$s;function $s(t){return t[Fs]||t}function mt(){const t=ie(),e=on(t);return e.getActiveSpan?e.getActiveSpan():Tr(G())}function Us(){po||(oe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),po=!0)}let mo=!1;function Jd(){if(mo)return;function t(){const e=mt(),n=e&&pt(e);if(n){const r="internal_error";b&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:lt,message:r})}}mo=!0,Va(t),Ya(t)}function wt(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||P()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}function go(t){_.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function wn(t,e){if(!e?.length)return!1;for(const n of e){if(tf(n)){if(t.description&&gn(t.description,n))return b&&go(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&&gn(t.description,n.name):!0,i=n.op?t.op&&gn(t.op,n.op):!0,o=n.attributes?Object.entries(n.attributes).every(([c,a])=>Zd(t.attributes?.[c],a)):!0;if(s&&i&&o)return b&&go(t),!0}return!1}function Zd(t,e){return typeof t=="string"&&(typeof e=="string"||e instanceof RegExp)?gn(t,e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t===e}function Qd(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 tf(t){return typeof t=="string"||t instanceof RegExp}const kc=Symbol.for("sentry.nonRecordingSpan");class Oe{constructor(e={}){this._traceId=e.traceId||Yt(),this._spanId=e.spanId||jt(),this.dropReason=e.dropReason,ht(this,kc,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:_c}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
5addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function kn(t){return!!t&&t[kc]===!0}const Rc="sentry.segment.name",ef="sentry.span.source",Cc="sentry.transaction",nf="url.full",rf="url.path",Si="production",Ac="_frozenDsc";function _o(t,e){ht(t,Ac,e)}function xc(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||Si,release:n.release,public_key:r,trace_id:t,org_id:Ud(e)};return e.emit("createDsc",s),s}function yi(t,e){const n=e.getPropagationContext();return n.dsc||xc(n.traceId,t)}function fe(t){const e=P();if(!e)return{};const n=pt(t),r=j(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[mi]??s[ac];function c(h){return(typeof o=="number"||typeof o=="string")&&(h.sample_rate=`${o}`),h}const a=n[Ac];if(a)return c(a);if(kn(n)&&!wt(e.getOptions())){const h=Ve(n).scope;if(h)return c({...yi(e,h)})}const u=i?.get("sentry.dsc"),d=u&&fc(u);if(d)return c(d);const l=xc(t.spanContext().traceId,e),f=s[Ot]??s[ef],p=r.description;return f!=="url"&&p&&(l.transaction=p),wt()&&(l.sampled=String(de(n)),l.sample_rand=i?.get("sentry.sample_rand")??Ve(n).scope?.getPropagationContext().sampleRand.toString()),c(l),e.emit("createDsc",l,n),l}function Mc(t){return!!t&&typeof t=="function"&&"_streamed"in t&&!!t._streamed}function pe(t,e=[]){return[t,e]}function So(t,e){const[n,r]=t;return[n,[...r,e]]}function Hs(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 sf(t,e){return Hs(t,(n,r)=>e.includes(r))}function Ws(t){const e=Fn(D);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function of(t){const[e,n]=t;let r=JSON.stringify(e);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Ws(r),i]:r.push(typeof i=="string"?Ws(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:af(r)}function af(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 cf(t){return[{type:"span"},t]}function uf(t){const e=typeof t.data=="string"?Ws(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Nc={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 lf(t){return t in Nc}function yo(t){return lf(t)?Nc[t]:t}function Ei(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Oc(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date(ue()).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:an(r)},...s&&{trace:s}}}function df(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}function ff(t,e,n,r){const s=Ei(n),i={sent_at:new Date(ue()).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:an(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return pe(i,[o])}function pf(t,e,n,r){const s=Ei(n),i=t.type&&t.type!=="replay_event"?t.type:"event";df(t,n?.sdk);const o=Oc(t,s,r,e);return delete t.sdkProcessingMetadata,pe(o,[[{type:i},t]])}function hf(t,e){function n(p){return!!p.trace_id&&!!p.public_key}const r=fe(t[0]),s=e?.getDsn(),i=e?.getOptions().tunnel,o={sent_at:new Date(ue()).toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:an(s)}},{beforeSendSpan:c,ignoreSpans:a}=e?.getOptions()||{},u=a?.length?t.filter(p=>{const h=j(p);return!wn({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?p=>{const h=j(p),m=Mc(c)?h:c(h);return m||(Us(),h)}:j,f=[];for(const p of u){const h=l(p);h&&f.push(cf(h))}return pe(o,f)}function mf(t){if(!b)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=j(t),{spanId:s}=t.spanContext(),i=de(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 gf(t){if(!b)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 Lc(t,e,n,r=mt()){const s=r&&pt(r);
9s&&(b&&_.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[zn]:e,[Wn]:n}))}function Eo(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[Wn],i=r[zn];typeof s=="string"&&typeof i=="number"&&(e[n.name]={value:i,unit:s})}),e}function bo(){return Fn(ie()).segmentSpanCaptureStrategy}function Ut(t){return t.getOptions().traceLifecycle==="stream"}const vo=1e3;class Gr{constructor(e={}){this._traceId=e.traceId||Yt(),this._spanId=e.spanId||jt(),this._startTime=e.startTimestamp||ct(),this._links=e.links,this._attributes={},this.setAttributes({[at]:"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._frozen?this:(this._links?this._links.push(e):this._links=[e],this)}addLinks(e){return this._frozen?this:(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?jr:_c}}setAttribute(e,n){return this._frozen?this:(n===void 0?delete this._attributes[e]:this._attributes[e]=n,e===Ot&&n!==void 0&&uo(this)&&Ad(this),this)}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._frozen||(this._startTime=Gt(e))}setStatus(e){return this._frozen?this:(this._status=e,this)}updateName(e){return this._frozen?this:(this._name=e,uo(this)||this.setAttribute(Ot,"custom"),this)}end(e){if(this._endTime){this._frozen=lo(this);return}this._endTime=Gt(e),gf(this),this._onSpanEnded(),this._frozen=lo(this)}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:Ic(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[at],profile_id:this._attributes[gi],exclusive_time:this._attributes[le],measurements:Eo(this._events),is_segment:this._isStandaloneSpan&&pt(this)===this||void 0,segment_id:this._isStandaloneSpan?pt(this).spanContext().spanId:void 0,links:Sc(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:_i(this._status),attributes:wc(this._attributes,this._status),links:yc(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){if(this._frozen)return this;b&&_.log("[Tracing] Adding an event to span:",e);const s=To(n)?n:r||ct(),i=To(n)?{}:n||{},o={name:e,time:Gt(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=P();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const n=pt(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?Sf(hf([this],e)):(b&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}if(!r){const o=bo();if(o){const c=Ve(this).scope||G();o.onChildSpanEnded(this,n,a=>this._convertSpanToTransaction(a),c)}return}if(e&&Ut(e)){e.emit("afterSegmentSpanEnd",this);return}const s=Ve(this).scope||G(),i=bo();if(i)i.onSegmentSpanEnded(o=>this._convertSpanToTransaction(o),s);else{const o=this._convertSpanToTransaction();o&&s.captureEvent(o)}}_convertSpanToTransaction(e={}){if(!Io(j(this)))return;this._name||(b&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=Ve(this),s=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);const i=[];for(const l of hr(this)){if(l===this||_f(l)||e.isSpanAlreadyCaptured?.(l))continue;const f=j(l);Io(f)&&(e.onSpanCaptured?.(l),i.push(f))}const o=this._attributes[Ot];delete this._attributes[co];let c=!1;
9i.forEach(l=>{delete l.data[co],l.op?.startsWith("gen_ai.")&&(c=!0)});const a={contexts:{trace:jd(this)},spans:i.length>vo?i.sort((l,f)=>l.start_timestamp-f.start_timestamp).slice(0,vo):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:fe(this),hasGenAiSpans:c},request:s,...o&&{transaction_info:{source:o}}},u=Eo(this._events);return u&&Object.keys(u).length&&(b&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),a.measurements=u),a}}function To(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Io(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function _f(t){return t instanceof Gr&&t.isStandaloneSpan()}function Sf(t){const e=P();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function yf(t,e,n){if(!wt(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=Ne(s);if(i===void 0)return b&&_.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 b&&_.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||b&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const Ef="__SENTRY_SUPPRESS_TRACING__";function he(t){const e=vi();return e.startInactiveSpan?e.startInactiveSpan(t):bf(t)}function bf(t){const e=If(t),{forceTransaction:n,parentSpan:r}=t;return(t.scope?i=>Hn(t.scope,i):r!==void 0?i=>Dc(r,i):i=>i())(()=>{const i=G(),o=kf(i,r),c=P();return t.onlyIfParent&&!o?vf(i,c):Tf({parentSpan:o,spanArguments:e,forceTransaction:n,scope:i})})}function Dc(t,e){const n=vi();return n.withActiveSpan?n.withActiveSpan(t,e):Hn(r=>(Tn(r,t||void 0),e(r)))}function bi(t=G()){const e=vi();return e.isTracingSuppressed?e.isTracingSuppressed(t):t.getScopeData().sdkProcessingMetadata[Ef]===!0}function vf(t,e){e?.recordDroppedEvent("no_parent_span","span");const n=new Oe({traceId:t.getPropagationContext().traceId});return Je(n,t,yt()),n}function Tf({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){const s=yt();if(!wt()){const c={...s.getPropagationContext(),...r.getPropagationContext()},a=t?t.spanContext().traceId:c.traceId,u=new Oe({traceId:a});return t&&!n&&Bs(t,u),Je(u,r,s),u}const i=P();if(Rf(i,e)){bi(r)||i?.recordDroppedEvent("ignored","span");const c=new Oe({dropReason:"ignored",traceId:t?.spanContext().traceId??r.getPropagationContext().traceId});return Je(c,r,s),c}let o;if(t&&!n)o=wf(t,r,e,s),Bs(t,o);else if(t){const c=fe(t),{traceId:a,spanId:u}=t.spanContext(),d=de(t);o=wo({traceId:a,parentSpanId:u,...e},r,s,d),_o(o,c)}else{const{traceId:c,dsc:a,parentSpanId:u,sampled:d}={...s.getPropagationContext(),...r.getPropagationContext()};o=wo({traceId:c,parentSpanId:u,...e},r,s,d),a&&_o(o,a)}return mf(o),o}function If(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Gt(t.startTime),delete r.startTime,r}return n}function vi(){const t=ie();return on(t)}function wo(t,e,n,r){const s=P(),i=s?.getOptions()||{},{name:o=""}=t,c={spanAttributes:{...t.attributes},spanName:o,parentSampled:r};s?.emit("beforeSampling",c,{decision:!1});const a=c.parentSampled??r,u=c.spanAttributes,d=e.getPropagationContext(),l=bi(e),[f,p,h]=l?[!1]:yf(i,{name:o,parentSampled:a,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Ne(d.dsc?.sample_rate)},d.sampleRand),m=new Gr({...t,attributes:{[Ot]:"custom",[mi]:p!==void 0&&h?p:void 0,...u},sampled:f});return!f&&s&&!l&&(b&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate",Ut(s)?"span":"transaction")),Je(m,e,n),s&&s.emit("spanStart",m),m}function wf(t,e,n,r){const{spanId:s,traceId:i}=t.spanContext(),o=bi(e),c=o?!1:de(t),a=c?new Gr({...n,parentSpanId:s,traceId:i,sampled:c}):new Oe({traceId:i});Bs(t,a),Je(a,e,r);const u=P();return u&&(Ut(u)&&kn(a)&&(kn(t)&&t.dropReason?(a.dropReason=t.dropReason,u.recordDroppedEvent(t.dropReason,"span")):o||(a.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",a),n.endTimestamp&&(u.emit("spanEnd",a),u.emit("afterSpanEnd",a))),a}function kf(t,e){if(e)return e;if(e===null)return;const n=Tr(t);if(!n)return;const r=P();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?pt(n):n}function Rf(t,e){const n=t?.getOptions().ignoreSpans;return!t||!Ut(t)||!n?.length?!1:wn({description:e.name||"",op:e.attributes?.[Rt]||e.op,attributes:e.attributes},n)}const mr={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Cf="heartbeatFailed",Af="idleTimeout",xf="finalTimeout",Mf="externalFinish";function Pc(t,e={}){const n=new Map;let r=!1,s,i=Mf,o=!e.disableAutoFinish;const c=[],{idleTimeout:a=mr.idleTimeout,finalTimeout:u=mr.finalTimeout,childSpanTimeout:d=mr.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:f=!0}=e,p=P(),h=G();if(!p||!wt()){const g=new Oe({traceId:h.getPropagationContext().traceId});return Je(g,h,yt()),g}const m=mt(),S=Nf(t);S.end=new Proxy(S.end,{apply(g,T,tt){if(l&&l(S),kn(T))return;const[E,...I]=tt,H=E||ct(),V=Gt(H),$=hr(S).filter(M=>M!==S),it=j(S);if(!$.length||!f)return x(V),Reflect.apply(g,T,[V,...I]);const et=p.getOptions().ignoreSpans,C=$?.reduce((M,X)=>{const nt=j(X);return!nt.timestamp||et&&wn({description:nt.description,op:nt.op,attributes:nt.data},et)?M:M?Math.max(M,nt.timestamp):nt.timestamp},void 0),v=it.start_timestamp,F=Math.min(v?v+u/1e3:1/0,Math.max(v||-1/0,Math.min(V,C||1/0)));return x(F),Reflect.apply(g,T,[F,...I])}});function y(){s&&(clearTimeout(s),s=void 0)}function R(g){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=Af,S.end(g))},a)}function O(g){s=setTimeout(()=>{!r&&o&&(i=Cf,S.end(g))},d)}function L(g){y(),n.set(g,!0);const T=ct();O(T+d/1e3)}function K(g){if(n.has(g)&&n.delete(g),n.size===0){const T=ct();R(T+a/1e3)}}
9function x(g){r=!0,n.clear(),c.forEach($=>$()),Tn(h,m);const T=j(S),{start_timestamp:tt}=T;if(!tt)return;T.data[In]||S.setAttribute(In,i);const I=T.status;(!I||I==="unknown")&&S.setStatus({code:qr}),_.log(`[Tracing] Idle span "${T.op}" finished`);const H=hr(S).filter($=>$!==S);let V=0;H.forEach($=>{$.isRecording()&&($.setStatus({code:lt,message:"cancelled"}),$.end(g),b&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify($,void 0,2)));const it=j($),{timestamp:et=0,start_timestamp:C=0}=it,v=C<=g,F=(u+a)/1e3,M=et-C<=F;if(b){const X=JSON.stringify($,void 0,2);v?M||_.log("[Tracing] Discarding span since it finished after idle span final timeout",X):_.log("[Tracing] Discarding span since it happened after idle span was finished",X)}(!M||!v)&&(Xd(S,$),V++)}),V>0&&S.setAttribute("sentry.idle_span_discarded_spans",V)}return c.push(p.on("spanStart",g=>{if(r||g===S||j(g).timestamp||g instanceof Gr&&g.isStandaloneSpan())return;hr(S).includes(g)&&L(g.spanContext().spanId)})),c.push(p.on("spanEnd",g=>{r||K(g.spanContext().spanId)})),c.push(p.on("idleSpanEnableAutoFinish",g=>{g===S&&(o=!0,R(),n.size&&O())})),e.disableAutoFinish||R(),setTimeout(()=>{r||(S.setStatus({code:lt,message:"deadline_exceeded"}),i=xf,S.end())},u),S}function Nf(t){const e=he(t);return Tn(G(),e),b&&_.log("[Tracing] Started span is an idle span"),e}function Of(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}function Lf(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;Df(t,e),r&&Bf(t,r),$f(t,n),Pf(t,s),Ff(t,i)}function ko(t,e){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:c,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:f,propagationContext:p,transactionName:h,span:m}=e;pn(t,"extra",n),pn(t,"tags",r),pn(t,"attributes",s),pn(t,"user",i),pn(t,"contexts",o),t.sdkProcessingMetadata=Un(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]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...p}}function pn(t,e,n){t[e]=Un(t[e],n,1)}function Fc(t,e){const n=yd().getScopeData();return t&&ko(n,t.getScopeData()),e&&ko(n,e.getScopeData()),n}function Df(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 Pf(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Ff(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Bf(t,e){t.contexts={trace:Gd(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:fe(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}function wr(t,e){const n=t.attributes??(t.attributes={});Object.entries(e).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const Ss=0,Ro=1,Co=2;function qn(t){return new Rn(e=>{e(t)})}function Ti(t){return new Rn((e,n)=>{n(t)})}class Rn{constructor(e){this._state=Ss,this._handlers=[],this._runExecutor(e)}then(e,n){return new Rn((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 Rn((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>
9{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Ss)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Ro&&n[1](this._value),this._state===Co&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(i,o)=>{if(this._state===Ss){if(Bn(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Ro,i)},s=i=>{n(Co,i)};try{e(r,s)}catch(i){s(i)}}}function Uf(t,e,n,r=0){try{const s=zs(e,n,t,r);return Bn(s)?s:qn(s)}catch(s){return Ti(s)}}function zs(t,e,n,r){const s=n[r];if(!t||!s)return t;const i=s({...t},e);return b&&i===null&&_.log(`Event processor "${s.id||"?"}" dropped event`),Bn(i)?i.then(o=>zs(o,e,n,r+1)):zs(i,e,n,r+1)}let Ee,Ao,xo,Kt;function Hf(t){const e=D._sentryDebugIds,n=D._debugIds;if(!e&&!n)return{};const r=e?Object.keys(e):[],s=n?Object.keys(n):[];if(Kt&&r.length===Ao&&s.length===xo)return Kt;Ao=r.length,xo=s.length,Kt={},Ee||(Ee={});const i=(o,c)=>{for(const a of o){const u=c[a],d=Ee?.[a];if(d&&Kt&&u)Kt[d[0]]=u,Ee&&(Ee[a]=[d[0],u]);else if(u){const l=t(a);for(let f=l.length-1;f>=0;f--){const h=l[f]?.filename;if(h&&Kt&&Ee){Kt[h]=u,Ee[a]=[h,u];break}}}}};return e&&i(r,e),n&&i(s,n),Kt}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||It(),timestamp:e.timestamp||Fe()},u=n.integrations||t.integrations.map(y=>y.name);Wf(a,t),jf(a,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&zf(a,t.stackParser);const d=Vf(r,n.captureContext);n.mechanism&&te(a,n.mechanism);const l=s?s.getEventProcessors():[],f=Fc(i,d),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Lf(a,f);const h=[...l,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?qn(a):Uf(h,a,n)).then(y=>(y&&qf(y),typeof o=="number"&&o>0?Gf(y,o,c):y))}function Wf(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||Si,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&i&&(o.url=Ls(o.url,i)),i&&t.exception?.values?.forEach(c=>{c.value&&(c.value=Ls(c.value,i))})}function zf(t,e){const n=Hf(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function qf(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 jf(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Gf(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 Vf(t,e){if(!e)return t;const n=t?t.clone():new $t;return n.update(e),n}function Yf(t){if(t)return Kf(t)?{captureContext:t}:Jf(t)?{captureContext:t}:t}function Kf(t){return t instanceof $t||typeof t=="function"}const Xf=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jf(t){return Object.keys(t).some(e=>Xf.includes(e))}function jn(t,e){return G().captureException(t,Yf(e))}function $c(t,e){return G().captureEvent(t,e)}function Uc(t,e){yt().setContext(t,e)}function Zf(t){yt().setUser(t)}function Qf(){const t=P();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function tp(t){yt().addEventProcessor(t)}function Mo(t){const e=yt(),{user:n}=Fc(e,G()),{userAgent:r}=D.navigator||{},s=sd({user:n,...r&&{userAgent:r},...t}),i=e.getSession();return i?.status==="ok"&&Ke(i,{status:"exited"}),Hc(),e.setSession(s),s}function Hc(){const t=yt(),n=G().getSession()||t.getSession();n&&id(n),Wc(),t.setSession()}function Wc(){const t=yt(),e=P(),n=t.getSession();n&&e&&e.captureSession(n)}function ys(t=!1){if(t){Hc();return}Wc()}function zc(t){return typeof t=="object"&&typeof t.unref=="function"&&t.unref(),t}const ep="7";function np(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function rp(t){return`${np(t)}${t.projectId}/envelope/`}function sp(t,e){const n={sentry_version:ep};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function ip(t,e,n){return e||`${rp(t)}?${sp(t,n)}`}const No=[];function op(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 ap(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 op(r)}function cp(t,e){const n={};return e.forEach(r=>{r?.beforeSetup&&r.beforeSetup(t)}),e.forEach(r=>{r&&qc(t,r,n)}),n}function Oo(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function qc(t,e,n){if(n[e.name]){b&&_.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,!No.includes(e.name)&&typeof e.setupOnce=="function"&&(e.setupOnce(),No.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))}),b&&_.log(`Integration installed: ${e.name}`)}function up(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function lp(){return"npm"}function dp(){return!up()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ze(){return typeof window<"u"&&(!dp()||fp())}function fp(){return D.process?.type==="renderer"}function pp(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 hp(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=an(r)),pe(i,[pp(t,s)])}function Lo(t,e){const n=e??mp(t)??[];
9if(n.length===0)return;const r=t.getOptions(),s=hp(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);jc().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function mp(t){return jc().get(t)}function jc(){return rn("clientToLogBufferMap",()=>new WeakMap)}function gp(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 _p(t,e,n,r,s){const i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=an(r)),pe(i,[gp(t,s)])}function Sp(t,e){const n=e??yp(t)??[];if(n.length===0)return;const r=t.getOptions(),s=_p(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);Gc().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(s)}function yp(t){return Gc().get(t)}function Gc(){return rn("clientToMetricBufferMap",()=>new WeakMap)}function Ep(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 Kd(e)}function bp(t,e){if(t.type!=="transaction"||!t.spans?.length||!t.sdkProcessingMetadata?.hasGenAiSpans||e.getOptions().streamGenAiSpans===!1||Ut(e))return;const n=[],r=[];for(const i of t.spans)i.op?.startsWith("gen_ai.")?n.push(Ep(i)):r.push(i);if(n.length===0)return;t.spans=r;const s=e.getDataCollectionOptions().userInfo?"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}]}const Ii=Symbol.for("SentryBufferFullError");function wi(t=100){const e=new Set;function n(){return e.size<t}function r(o){e.delete(o)}function s(o){if(!n())return Ti(Ii);const c=o();return e.add(c),c.then(()=>r(c),()=>r(c)),c}function i(o){if(!e.size)return qn(!0);const c=Promise.allSettled(Array.from(e)).then(()=>!0);if(!o)return c;const a=[c,new Promise(u=>zc(setTimeout(()=>u(!1),o)))];return Promise.race(a)}return{get $(){return Array.from(e)},add:s,drain:i}}const vp=60*1e3;function Tp(t,e=ue()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?vp:r-e}function Ip(t,e){return t[e]||t.all||0}function Vc(t,e,n=ue()){return Ip(t,e)>n}function Yc(t,{statusCode:e,headers:n},r=ue()){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),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+Tp(o,r):e===429&&(s.all=r+60*1e3);return s}const Kc=64;function wp(t,e,n=wi(t.bufferSize||Kc)){let r={};const s=o=>n.drain(o);function i(o){const c=[];if(Hs(o,(l,f)=>{const p=yo(f);Vc(r,p)?t.recordDroppedEvent("ratelimit_backoff",p):c.push(l)}),c.length===0)return Promise.resolve({});const a=pe(o[0],c),u=l=>{if(sf(a,["client_report"])){b&&_.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Hs(a,(f,p)=>{t.recordDroppedEvent(l,yo(p))})},d=()=>e({body:of(a)}).then(l=>l.statusCode===413?(b&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(b&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Yc(r,l),l),l=>{throw u("network_error"),b&&_.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===Ii)return b&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:i,flush:s}}function kp(t,e,n){const r=[{type:"client_report"},{timestamp:Fe(),discarded_events:t}];return pe(e?{dsn:e}:{},[r])}function Xc(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 Rp(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?.[gi],exclusive_time:o?.[le],measurements:t.measurements,is_segment:!0}}function Cp(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&&{[gi]:t.profile_id},...t.exclusive_time&&{[le]:t.exclusive_time}}}},measurements:t.measurements}}const rr=["forwarded","-ip","remote-","via","-user"];function Ap(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:7}:{userInfo:!1,cookies:{deny:rr},httpHeaders:{request:{deny:rr},response:{deny:rr}},httpBodies:[],queryParams:{deny:rr},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}const xp={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function Mp(t){const e=t.dataCollection!=null?xp:Ap(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 Do="Not capturing exception because it's already been captured.",Po="Discarded session because of missing or non-string release",Jc=Symbol.for("SentryInternalError"),Zc=Symbol.for("SentryDoNotSendEventError"),Np=5e3;function gr(t){return{message:t,[Jc]:!0}}function Es(t){return{message:t,[Zc]:!0}}function Fo(t){return Pe(t)&&Jc in t}function Bo(t){return Pe(t)&&Zc in t}function $o(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??Np;u>0&&(c=!0,o=zc(setTimeout(()=>{s(t)},u)))}}),t.on("flush",()=>{s(t)})}class Op{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=wi(e.transportOptions?.bufferSize??Kc),this._dataCollection=Mp(e),e.dsn?this._dsn=Hd(e.dsn):b&&_.warn("No DSN provided, client will not send events."),this._dsn){const r=ip(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&&$o(this,"afterCaptureLog","flushLogs",Fp,Lo),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&$o(this,"afterCaptureMetric","flushMetrics",Pp,Sp)}captureException(e,n,r){const s=It();if(ro(e))return b&&_.log(Do),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:It(),...r},o=fi(e)?e:String(e),c=xe(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=It();if(n?.originalException&&ro(n.originalException))return b&&_.log(Do),s;const i={event_id:s,...n},o=e.sdkProcessingMetadata||{},c=o.capturedSpanScope,a=o.capturedSpanIsolationScope,u=Uo(e.type);return this._process(()=>this._captureEvent(e,i,c||r,a),u),i.event_id}captureSession(e){this.sendSession(e),Ke(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){Lo(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),qc(this,e,this._integrations),n||Oo(this,[e])}sendEvent(e,n={}
9){this.emit("beforeSendEvent",e,n);const r=bp(e,this);let s=pf(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])s=So(s,uf(i));r&&(s=So(s,r)),this.sendEnvelope(s).then(i=>this.emit("afterSendEvent",e,i))}sendSession(e){const{release:n,environment:r=Si}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!n){b&&_.warn(Po);return}i.release=i.release||n,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!n){b&&_.warn(Po);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=ff(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}`;b&&_.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 b&&_.error("Error while sending envelope:",n),{}}return b&&_.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=cp(this,e),Oo(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)&&(Ke(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,...Ed(r)},...c.contexts};const a=yi(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(e,n={},r=G(),s=yt()){return b&&qs(e)&&_.log(`Captured error event \`${Xc(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(i=>i.event_id,i=>{b&&(Bo(i)?_.log(i.message):Fo(i)?_.warn(i.message):_.warn(i))})}_processEvent(e,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,c=Qc(e),a=qs(e),d=`before send for type \`${e.type||"error"}\``,l=typeof o>"u"?void 0:Ne(o);if(a&&typeof l=="number"&&Qt()>l)return this.recordDroppedEvent("sample_rate","error"),Ti(Es(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=Uo(e.type);return this._prepareEvent(e,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Es("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return p;const m=Dp(this,i,p,n);return Lp(m,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),c){const y=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Es(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||s.getSession();if(a&&h&&this._updateSessionFromEvent(h,p),c){const S=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=p.spans?p.spans.length:0,R=S-y;R>0&&this.recordDroppedEvent("before_send","span",R)}const m=p.transaction_info;if(c&&m&&p.transaction!==e.transaction){const S="custom";p.transaction_info={...m,source:S}}return this.sendEvent(p,n),p}).then(null,p=>{throw Bo(p)||Fo(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),gr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${p}`))})}_process(e,n){this._numProcessing++,this._promiseBuffer.add(e).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ii&&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(){b&&_.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){b&&_.log("No outcomes to send");return}if(!this._dsn){b&&_.log("No dsn provided, will not send outcomes");return}b&&_.log("Sending outcomes:",e);const n=kp(e,this._options.tunnel&&an(this._dsn));this.sendEnvelope(n)}}function Uo(t){return t==="replay_event"?"replay":t||"error"}function Lp(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Bn(t))return t.then(r=>{if(!vn(r)&&r!==null)throw gr(n);return r},r=>{throw gr(`${e} rejected with ${r}`)});if(!vn(t)&&t!==null)throw gr(n);return t}function Dp(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,ignoreSpans:o}=e,c=!Mc(e.beforeSendSpan)&&e.beforeSendSpan;let a=n;if(qs(a)&&s)return s(a,r);if(Qc(a)){if(c||o){const u=Rp(a);if(o?.length&&wn({description:u.description,op:u.op,attributes:u.data},o))return null;if(c){const d=c(u);d?a=Un(n,Cp(d)):Us()}if(a.spans){const d=[],l=a.spans;for(const p of l){if(o?.length&&wn({description:p.description,op:p.op,attributes:p.data},o)){Qd(l,p);continue}if(c){const h=c(p);h?d.push(h):(Us(),d.push(p))}else d.push(p)}const f=a.spans.length-d.length;f&&t.recordDroppedEvent("before_send","span",f),a.spans=d}}if(i){if(a.spans){const u=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(a,r)}}return a}function qs(t){return t.type===void 0}function Qc(t){return t.type==="transaction"}function Pp(t){let e=0;return t.name&&(e+=t.name.length*2),e+=8,e+tu(t.attributes)}function Fp(t){let e=0;return t.message&&(e+=t.message.length*2),e+tu(t.attributes)}function tu(t){if(!t)return 0;let e=0;return Object.values(t).forEach(n=>{Array.isArray(n)?e+=n.length*Ho(n[0]):xe(n)?e+=Ho(n):e+=100}),e}function Ho(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}function Bp(t,e){e.debug===!0&&(b?_.enable():oe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),G().update(e.initialScope);const r=new t(e);return $p(r),r.init(),r}function $p(t){G().setClient(t)}const Up="thismessage:/";function Vr(t){return"isRelative"in t}function Cn(t,e){const n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=n?Up: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 eu(t){if(Vr(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 Ce(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 Hp(t){return t.split(/[?#]/,1)[0]}function Bt(t,e=!0){if(t.startsWith("data:")){const n=t.match(/^data:([^;
10,]+)/),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 Wp(t,e){const n=e?.getDsn(),r=e?.getOptions().tunnel;return qp(t,n)||zp(t,r)}function zp(t,e){return e?Wo(t)===Wo(e):!1}function qp(t,e){const n=Cn(t);return!n||Vr(n)||!e?!1:jp(n.hostname,e.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function jp(t,e){return t===e||e.length>0&&t.endsWith(`.${e}`)}function Wo(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function Gp(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 nu(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:ke})),s.version=ke)}function ru(t={}){const e=t.client||P();if(!Qf()||!e)return{};const n=ie(),r=on(n);if(r.getTraceData)return r.getTraceData(t);const s=t.scope||G(),i=t.span||mt(),o=kn(i)&&!wt(e.getOptions()),c=i&&!o?Vd(i):Vp(s),a=i?fe(i):yi(e,s),u=Md(a);if(!hc.test(c))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":c,baggage:u};return t.propagateTraceparent&&(l.traceparent=i&&!o?Yd(i):Yp(s)),l}function Vp(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return mc(e,r,n)}function Yp(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return gc(e,r,n)}const Kp=100;function re(t,e){const n=P(),r=yt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Kp}=n.getOptions();if(i<=0)return;const c={timestamp:Fe(),...t},a=s?oe(()=>s(c,e)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,i))}let zo;const Xp="FunctionToString",qo=new WeakMap,Jp=(()=>({name:Xp,setupOnce(){zo=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=hi(this),n=qo.has(P())&&e!==void 0?e:this;return zo.apply(n,t)}}catch{}},setup(t){qo.set(t,!0)}})),Zp=Jp,Qp=[/^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$/],th="EventFilters",eh=(t={})=>{let e;return{name:th,setup(n){const r=n.getOptions();e=jo(t,r)},processEvent(n,r,s){if(!e){const i=s.getOptions();e=jo(t,i)}return rh(n,e)?null:n}}},nh=((t={})=>({...eh(t),name:"InboundFilters"}));function jo(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Qp],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function rh(t,e){if(t.type){if(t.type==="transaction"&&ih(t,e.ignoreTransactions))return b&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${ve(t)}`),!0}else{if(sh(t,e.ignoreErrors))return b&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${ve(t)}`),!0;if(uh(t))return b&&_.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${ve(t)}`),!0;if(oh(t,e.denyUrls))return b&&_.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${ve(t)}. 15Url: ${kr(t)}`),!0;if(!ah(t,e.allowUrls))return b&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${ve(t)}. 17Url: ${kr(t)}`),!0}return!1}function sh(t,e){return e?.length?Xc(t).some(n=>Ft(n,e)):!1}function ih(t,e){if(!e?.length)return!1;const n=t.transaction;return n?Ft(n,e):!1}function oh(t,e){if(!e?.length)return!1;const n=kr(t);return n?Ft(n,e):!1}function ah(t,e){if(!e?.length)return!0;const n=kr(t);return n?Ft(n,e):!0}function ch(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 kr(t){try{const n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?ch(n):null}catch{return b&&_.error(`Cannot extract url for event ${ve(t)}`),null}}function uh(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function lh(t,e,n,r,s,i){if(!s.exception?.values||!i||!Me(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=js(t,e,r,i.originalException,n,s.exception.values,o,0))}function js(t,e,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(Me(r[s],Error)){Go(o,c,r);const u=t(e,r[s]),d=a.length;
17Vo(u,s,d,c),a=js(t,e,n,r[s],s,[u,...a],u,d)}return su(r)&&r.errors.forEach((u,d)=>{if(Me(u,Error)){Go(o,c,r);const l=t(e,u),f=a.length;Vo(l,`errors[${d}]`,f,c),a=js(t,e,n,u,s,[l,...a],l,f)}}),a}function su(t){return Array.isArray(t.errors)}function Go(t,e,n){t.mechanism={handled:!0,type:"auto.core.linked_errors",...su(n)&&{is_exception_group:!0},...t.mechanism,exception_id:e}}function Vo(t,e,n,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function dh(t){return Wr(t)&&"__sentry_fetch_url_host__"in t&&typeof t.__sentry_fetch_url_host__=="string"}function Yo(t){return dh(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}const Ko=new Set([]);function iu(t){const e="console",n=ae(e,t);return ce(e,fh),n}function fh(){"console"in D&&za.forEach(function(t){t in D.console&&vt(D.console,t,function(e){return br[t]=e,function(...n){const r=n[0],s=br[t],i=Ko.size&&typeof r=="string"&&Ft(r,Ko);i||At("console",{args:n,level:t}),(!i||b&&_.isEnabled())&&s?.apply(D.console,n)}})})}function Rr(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const ph="CaptureConsole",hh=((t={})=>{const e=t.levels||za,n=t.handled??!0;return{name:ph,setup(r){"console"in D&&iu(({args:s,level:i})=>{P()!==r||!e.includes(i)||gh(s,i,n)})}}}),mh=hh;function gh(t,e,n){const r=Rr(e),s=new Error,i={level:Rr(e),extra:{arguments:t}};Hn(o=>{if(o.addEventProcessor(u=>(u.logger="console",te(u,{handled:n,type:"auto.core.capture_console"}),u)),e==="assert"){if(!t[0]){const u=`Assertion failed: ${vr(t.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",t.slice(1)),o.captureMessage(u,r,{captureContext:i,syntheticException:s})}return}const c=t.find(u=>u instanceof Error);if(c){jn(c,i);return}const a=vr(t," ");o.captureMessage(a,r,{captureContext:i,syntheticException:s})})}const _h="Dedupe",Sh=(()=>{let t;return{name:_h,processEvent(e){if(e.type)return e;try{if(Eh(e,t))return b&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}}),yh=Sh;function Eh(t,e){return e?!!(bh(t,e)||vh(t,e)):!1}function bh(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!au(t,e)||!ou(t,e))}function vh(t,e){const n=Xo(e),r=Xo(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!au(t,e)||!ou(t,e))}function ou(t,e){let n=Qi(t),r=Qi(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 au(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 Xo(t){return t.exception?.values?.[0]}const Th="ConversationId",Ih=(()=>({name:Th,setup(t){t.on("spanStart",e=>{const n=G().getScopeData(),r=yt().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(Id,s)}})}})),wh=Ih;function kh(t,e,n,r,s){if(!t.fetchData)return;const{method:i,url:o}=t.fetchData,c=wt()&&e(o);if(t.endTimestamp){const h=t.fetchData.__span;if(!h)return;const m=r[h];m&&(c&&(Ah(m,t),Rh(m,t,s)),delete r[h]);return}const{spanOrigin:a="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},d=P(),f=!!mt()||!!d&&Ut(d),p=c&&f?he(Nh(o,i,a)):new Oe;if(c&&!f&&d?.recordDroppedEvent("no_parent_span","span"),t.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(t.fetchData.url)){const h=t.args[0],m={...t.args[1]||{}},S=Ch(h,m,wt()&&f?p: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",p,h)}return p}function Rh(t,e,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(t,{headers:e.response?.headers,error:e.error})}function Ch(t,e,n,r){const s=ru({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,c=s.traceparent;if(!i)return;const a=e.headers||(pi(t)?t.headers:void 0);if(a)if(xh(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?sr(d)||u.set("baggage",`${d},${o}`):u.set("baggage",o)}return u}else if(Mh(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"&&sr(l[1]));return o&&!d&&u.push(["baggage",o]),u}else{const u="sentry-trace"in a?a["sentry-trace"]:void 0,d="traceparent"in a?a.traceparent:void 0,l="baggage"in a?a.baggage:void 0,f=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>sr(m)):sr(l));o&&!p&&f.push(o);const h=Object.assign({},a,{"sentry-trace":u??i,baggage:f.length>0?f.join(","):void 0});return r&&c&&!d&&(h.traceparent=c),h}else return{...s}}function Ah(t,e){if(e.response){uc(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 sr(t){return typeof t!="string"?!1:t.split(",").some(e=>e.trim().startsWith(Ir))}function xh(t){return typeof Headers<"u"&&Me(t,Headers)}function Mh(t){return Array.isArray(t)?t.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string"):!1}function Nh(t,e,n){if(t.startsWith("data:")){const i=Bt(t);return{name:`${e} ${i}`,attributes:Jo(t,void 0,e,n)}}const r=Cn(t),s=r?eu(r):t;return{name:`${e} ${s}`,attributes:Jo(t,r,e,n)}}function Jo(t,e,n,r){const s={url:Bt(t),type:"fetch","http.method":n,[at]:r,[Rt]:"http.client"};return e&&(Vr(e)||(s["http.url"]=Bt(e.href),s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function cu(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const An=D;
17function Oh(){return"history"in An&&!!An.history}function Lh(){if(!("fetch"in An))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Gs(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Dh(){if(typeof EdgeRuntime=="string")return!0;if(!Lh())return!1;if(Gs(An.fetch))return!0;let t=!1;const e=An.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Gs(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){b&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function ki(t,e){const n="fetch",r=ae(n,t);return ce(n,()=>uu(void 0,e)),r}function Ph(t){const e="fetch-body-resolved",n=ae(e,t);return ce(e,()=>uu(Bh)),n}function uu(t,e=!1){e&&!Dh()||vt(D,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=$h(r),c={args:r,fetchData:{method:i,url:o},startTimestamp:ct()*1e3,virtualError:s,headers:Uh(r)};return t||At("fetch",{...c}),n.apply(D,r).then(async a=>(t?t(a):At("fetch",{...c,endTimestamp:ct()*1e3,response:a}),a),a=>{At("fetch",{...c,endTimestamp:ct()*1e3,error:a}),Wr(a)&&a.stack===void 0&&(a.stack=s.stack,ht(a,"framesToPop",1));const d=P()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&a instanceof TypeError&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(c.fetchData.url).host;d==="always"?a.message=`${a.message} (${p})`:ht(a,"__sentry_fetch_url_host__",p)}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 Bh(t){let e;try{e=t.clone()}catch{return}Fh(e,()=>{At("fetch-body-resolved",{endTimestamp:ct()*1e3,response:t})})}function _r(t,e){return Pe(t)&&!!t[e]}function Zo(t){return typeof t=="string"?t:t?_r(t,"url")?t.url:t.toString?t.toString():"":""}function $h(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Zo(n),method:_r(r,"method")?String(r.method).toUpperCase():pi(n)&&_r(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Zo(e),method:_r(e,"method")?String(e.method).toUpperCase():"GET"}}function Uh(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(pi(e))return new Headers(e.headers)}catch{}}const lu=D;function Le(){try{return lu.document.location.href}catch{return""}}function du(t,e=5){if(!lu.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 U=D;let Vs=0;function fu(){return Vs>0}function Hh(){Vs++,setTimeout(()=>{Vs--})}function Qe(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{if(Object.prototype.hasOwnProperty.call(t,"__sentry_wrapped__")){const i=t.__sentry_wrapped__;return typeof i=="function"?i:t}if(hi(t))return t}catch{return t}const r=function(...s){D._sentryWrappedDepth=(D._sentryWrappedDepth||0)+1;try{const i=s.map(o=>Qe(o,e));return t.apply(this,i)}catch(i){throw Hh(),Hn(o=>{o.addEventProcessor(c=>(e.mechanism&&(Ds(c,void 0),te(c,e.mechanism)),c.extra={...c.extra,arguments:s},c)),jn(i)}),i}finally{D._sentryWrappedDepth=(D._sentryWrappedDepth||0)-1}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}Ja(r,t),ht(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Cr(){const t=Le(),{referrer:e}=U.document||{},{userAgent:n}=U.navigator||{},r={...e&&{Referer:e},...n&&{"User-Agent":n}};return{url:t,headers:r}}function Ri(t,e){const n=Yr(t,e),r={type:Gh(e),value:Vh(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Wh(t,e,n,r){const i=P()?.getOptions().normalizeDepth,o=Zh(e),c={__serialized__:tc(e,i)};if(o)return{exception:{values:[Ri(t,o)]},extra:c};const a={exception:{values:[{type:zr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Xh(e,{isUnhandledRejection:r})}]},extra:c};if(n){const u=Yr(t,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function bs(t,e){return{exception:{values:[Ri(t,e)]}}}function Yr(t,e){const n=e.stacktrace||e.stack||"",r=qh(e),s=jh(e);try{return t(n,r,s)}catch{}return[]}const zh=/Minified React error #\d+;/i;function qh(t){return t&&zh.test(t.message)?1:0}function jh(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function pu(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Gh(t){const e=t?.name;return!e&&pu(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 pu(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?Yo(e.error):Yo(t):"No error message"}function Yh(t,e,n,r){const s=n?.syntheticException||void 0,i=Ci(t,e,s,r);return te(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),qn(i)}function Kh(t,e,n="info",r,s){const i=r?.syntheticException||void 0,o=Ys(t,e,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),qn(o)}function Ci(t,e,n,r,s){let i;if(Xa(e)&&e.error)return bs(t,e.error);if(eo(e)||Wl(e)){const o=e;if("stack"in e){i=bs(t,e);const c=i.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const a=Yr(t,n);a.length&&(c.stacktrace={frames:a},te(i,{synthetic:!0}))}}else{const c=o.name||(eo(o)?"DOMError":"DOMException"),a=o.message?`${c}: ${o.message}`:c;i=Ys(t,a,n,r),Ds(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Wr(e)?bs(t,e):vn(e)||zr(e)?(i=Wh(t,e,n,s),te(i,{synthetic:!0}),i):(i=Ys(t,e,n,r),Ds(i,`${e}`),te(i,{synthetic:!0}),i)}function Ys(t,e,n,r){const s={};if(r&&n){const i=Yr(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]}),te(s,{synthetic:!0})}
17if(fi(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 Xh(t,{isUnhandledRejection:e}){const n=ql(t),r=e?"promise rejection":"exception";return Xa(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:zr(t)?`Event \`${Jh(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Jh(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Zh(t){return Object.values(t).find(e=>e instanceof Error)}class Qh extends Op{constructor(e){const n=tm(e),r=U.SENTRY_SDK_SOURCE||lp();nu(n,"browser",["browser"],r),super(n);const{userInfo:s}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:s?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:i}=this._options;U.document&&U.document.addEventListener("visibilitychange",()=>{U.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),s&&this.on("beforeSendSession",Gp)}eventFromException(e,n){return Yh(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Kh(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 tm(t){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:U.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...t}}const Dt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,N=D,em=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Gn=(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=em(e.value,n),t(e)))}},Vn=(t=!0)=>{const e=N.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},cn=()=>Vn()?.activationStart??0;function ee(t,e,n){N.document&&N.addEventListener(t,e,n)}function Ar(t,e,n){N.document&&N.removeEventListener(t,e,n)}let Ye=-1;const hu=new Set,nm=()=>N.document?.visibilityState==="hidden"&&!N.document?.prerendering?0:1/0,Sr=t=>{if(rm(t)&&Ye>-1){if(t.type==="visibilitychange"||t.type==="pagehide")for(const e of hu)e();isFinite(Ye)||(Ye=t.type==="visibilitychange"?t.timeStamp:0,Ar("prerenderingchange",Sr,!0))}},Yn=()=>{if(N.document&&Ye<0){const t=cn();Ye=(N.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>t)[0]?.startTime)??nm(),ee("visibilitychange",Sr,!0),ee("pagehide",Sr,!0),ee("prerenderingchange",Sr,!0)}return{get firstHiddenTime(){return Ye},onHidden(t){hu.add(t)}}};function rm(t){return t.type==="pagehide"||N.document?.visibilityState==="hidden"}const sm=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Kn=(t,e=-1)=>{const n=Vn();let r="navigate";return n&&(N.document?.prerendering||cn()>0?r="prerender":N.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:sm(),navigationType:r}},vs=new WeakMap;function Ai(t,e){try{return vs.get(t)||vs.set(t,new e),vs.get(t)}catch{return new e}}class im{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 un=(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{}},xi=t=>{let e=!1;return()=>{e||(t(),e=!0)}},Kr=t=>{N.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},om=[1800,3e3],am=(t,e={})=>{Kr(()=>{const n=Yn(),r=Kn("FCP");let s;const o=un("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-cn(),0),r.entries.push(a),s(!0)))});o&&(s=Gn(t,r,om,e.reportAllChanges))})},cm=[.1,.25],um=(t,e={})=>{am(xi(()=>{const n=Kn("CLS",0);let r;const s=Yn(),i=Ai(e,im),o=a=>{for(const u of a)i._processEntry(u);i._sessionValue>
17n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},c=un("layout-shift",o);c&&(r=Gn(t,n,cm,e.reportAllChanges),s.onHidden(()=>{o(c.takeRecords()),r(!0)}),N?.setTimeout?.(r))}))};let mu=0,Ts=1/0,ir=0;const lm=t=>{t.forEach(e=>{e.interactionId&&(Ts=Math.min(Ts,e.interactionId),ir=Math.max(ir,e.interactionId),mu=ir?(ir-Ts)/7+1:0)})};let Ks;const gu=()=>Ks?mu:performance.interactionCount||0,dm=()=>{"interactionCount"in performance||Ks||(Ks=un("event",lm,{type:"event",buffered:!0,durationThreshold:0}))},Is=10;let _u=0;const fm=()=>gu()-_u;class pm{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){_u=gu(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor(fm()/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<Is||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>Is){const s=this._longestInteractionList.splice(Is);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Mi=t=>{const e=N.requestIdleCallback||N.setTimeout;N.document?.visibilityState==="hidden"?t():(t=xi(t),ee("visibilitychange",t,{once:!0,capture:!0}),ee("pagehide",t,{once:!0,capture:!0}),e(()=>{t(),Ar("visibilitychange",t,{capture:!0}),Ar("pagehide",t,{capture:!0})}))},hm=[200,500],mm=40,gm=(t,e={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Yn();Kr(()=>{dm();const r=Kn("INP");let s;const i=Ai(e,pm),o=a=>{Mi(()=>{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=un("event",o,{durationThreshold:e.durationThreshold??mm});s=Gn(t,r,hm,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(c.takeRecords()),s(!0)}))})};class _m{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const Sm=[2500,4e3],ym=(t,e={})=>{Kr(()=>{const n=Yn(),r=Kn("LCP");let s;const i=Ai(e,_m),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-cn(),0),r.entries=[u],s())},c=un("largest-contentful-paint",o);if(c){s=Gn(t,r,Sm,e.reportAllChanges);const a=xi(()=>{o(c.takeRecords()),c.disconnect(),s(!0)}),u=d=>{d.isTrusted&&(Mi(a),Ar(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])ee(d,u,{capture:!0})}})},Em=[800,1800],Xs=t=>{N.document?.prerendering?Kr(()=>Xs(t)):N.document?.readyState!=="complete"?addEventListener("load",()=>Xs(t),!0):setTimeout(t)},bm=(t,e={})=>{const n=Kn("TTFB"),r=Gn(t,n,Em,e.reportAllChanges);Xs(()=>{const s=Vn();s&&(n.value=Math.max(s.responseStart-cn(),0),n.entries=[s],r(!0))})},_n={},xr={};let Su,yu,Eu,bu;function Xr(t,e=!1){return Zr("cls",t,Tm,Su,e)}function Jr(t,e=!1){return Zr("lcp",t,Im,yu,e)}function vm(t){return Zr("ttfb",t,wm,Eu)}function Ni(t){return Zr("inp",t,km,bu)}function De(t,e){return vu(t,e),xr[t]||(Rm(t),xr[t]=!0),Tu(t,e)}function Xn(t,e){const n=_n[t];if(n?.length)for(const r of n)try{r(e)}catch(s){Dt&&_.error(`Error while triggering instrumentation handler. 18Type: ${t} 19Name: ${Vt(r)} 20Error:`,s)}}function Tm(){return um(t=>{Xn("cls",{metric:t}),Su=t},{reportAllChanges:!0})}function Im(){return ym(t=>{Xn("lcp",{metric:t}),yu=t},{reportAllChanges:!0})}function wm(){return bm(t=>{Xn("ttfb",{metric:t}),Eu=t})}function km(){return gm(t=>{Xn("inp",{metric:t}),bu=t})}function Zr(t,e,n,r,s=!1){vu(t,e);let i;return xr[t]||(i=n(),xr[t]=!0),r&&e({metric:r}),Tu(t,e,s?i:void 0)}function Rm(t){const e={};t==="event"&&(e.durationThreshold=0),un(t,n=>
20{Xn(t,{entries:n})},e)}function vu(t,e){_n[t]=_n[t]||[],_n[t].push(e)}function Tu(t,e,n){return()=>{n&&n();const r=_n[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function Cm(t){return"duration"in t}const Am=80,be={};try{typeof Node<"u"&&(be.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(be.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,be.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,be.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,be.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(be.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Xt(t,e,n){const r=be[e];if(r)try{return r.call(t,n)}catch{}const s=t[e];return typeof s=="function"?s.call(t,n):s}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||Am;for(;n&&i++<r&&(u=xm(n,d),!(u==="html"||i>1&&o+s.length*a+u.length>=l));)s.push(u),o+=u.length,n=Xt(n,"parentNode");return s.reverse().join(c)}catch{return"<unknown>"}}function xm(t,e){const n=[],r=Xt(t,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&t instanceof HTMLElement){const i=Xt(t,"dataset");if(i){if(i.sentryComponent)return i.sentryComponent;if(i.sentryElement)return i.sentryElement}}n.push(r.toLowerCase());const s=e?.length?e.filter(i=>Xt(t,"getAttribute",i)).map(i=>[i,Xt(t,"getAttribute",i)]):null;if(s?.length)s.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{const i=Xt(t,"id");i&&n.push(`#${i}`);const o=Xt(t,"className");if(o&&qt(o)){const c=o.split(/\s+/);for(const a of c)n.push(`.${a}`)}}for(const i of["aria-label","type","name","title","alt"]){const o=Xt(t,"getAttribute",i);o&&n.push(`[${i}="${o}"]`)}return n.join("")}const Mm=t=>{const e=n=>{(n.type==="pagehide"||N.document?.visibilityState==="hidden")&&t(n)};ee("visibilitychange",e,{capture:!0,once:!0}),ee("pagehide",e,{capture:!0,once:!0})};function ws(t){return typeof t=="number"&&isFinite(t)}function se(t,e,n,{...r}){const s=j(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Dc(t,()=>{const i=he({startTime:e,...r});return i&&i.end(n),i})}function Oi(t){const e=P();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=G(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:c,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":N.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...s};return he({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function ln(){return N.addEventListener&&N.performance}function Q(t){return t/1e3}function Nm(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 ts(t,e){let n,r=!1;function s(c){!r&&n&&e(c,n.spanContext().spanId,n),r=!0}Mm(()=>{s("pagehide")});const i=t.on("beforeStartNavigationSpan",(c,a)=>{a?.isRedirect||(s("navigation"),i(),o())}),o=t.on("afterStartPageLoadSpan",c=>{n=c,o()})}function Om(t){let e=0,n;if(!Qr("layout-shift"))return;const r=Xr(({metric:s})=>{const i=s.entries[s.entries.length-1];
20i&&(e=s.value,n=i)},!0);ts(t,(s,i)=>{Lm(e,n,i,s),r()})}function Lm(t,e,n,r){Dt&&_.log(`Sending CLS span (${t})`);const s=e?Q((dt()||0)+e.startTime):ct(),i=G().getScopeData().transactionName,o=e?ut(e.sources[0]?.node):"Layout shift",c={[at]:"auto.http.browser.cls",[Rt]:"ui.webvital.cls",[le]: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=Oi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("cls",{[Wn]:"",[zn]:t}),a.end(s))}const Dm=6e4;function Jn(t){return t!=null&&t>0&&t<=Dm}function Pm(t){let e=0,n;if(!Qr("largest-contentful-paint"))return;const r=Jr(({metric:s})=>{const i=s.entries[s.entries.length-1];!i||!Jn(s.value)||(e=s.value,n=i)},!0);ts(t,(s,i)=>{Fm(e,n,i,s),r()})}function Fm(t,e,n,r){if(!Jn(t))return;Dt&&_.log(`Sending LCP span (${t})`);const s=Q((dt()||0)+(e?.startTime||0)),i=G().getScopeData().transactionName,o=e?ut(e.element):"Largest contentful paint",c={[at]:"auto.http.browser.lcp",[Rt]:"ui.webvital.lcp",[le]: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=Oi({name:o,transaction:i,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[Wn]:"millisecond",[zn]:t}),a.end(s))}function Ct(t){return t&&((dt()||performance.timeOrigin)+t)/1e3}function Iu(t){const e={};if(t.nextHopProtocol!=null){const{name:n,version:r}=Nm(t.nextHopProtocol);e["network.protocol.version"]=r,e["network.protocol.name"]=n}return dt()||ln()?.timeOrigin?Bm({...e,"http.request.redirect_start":Ct(t.redirectStart),"http.request.redirect_end":Ct(t.redirectEnd),"http.request.worker_start":Ct(t.workerStart),"http.request.fetch_start":Ct(t.fetchStart),"http.request.domain_lookup_start":Ct(t.domainLookupStart),"http.request.domain_lookup_end":Ct(t.domainLookupEnd),"http.request.connect_start":Ct(t.connectStart),"http.request.secure_connection_start":Ct(t.secureConnectionStart),"http.request.connection_end":Ct(t.connectEnd),"http.request.request_start":Ct(t.requestStart),"http.request.response_start":Ct(t.responseStart),"http.request.response_end":Ct(t.responseEnd),"http.request.time_to_first_byte":t.responseStart!=null?t.responseStart/1e3:void 0}):e}function Bm(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null))}const $m=2147483647;let Qo=0,bt={},Et,Mr;function Um({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=ln();if(r&&dt()){r.mark&&N.performance.mark("sentry-tracing-init");const s=e?Pm(n):e===!1?jm():void 0,i=t?Om(n):t===!1?qm():void 0,o=Gm(),c=Vm();return()=>{o(),c(),s?.(),i?.()}}return()=>{}}function Hm(){De("longtask",({entries:t})=>{const e=mt();if(!e)return;const{op:n,start_timestamp:r}=j(e);for(const s of t){const i=Q(dt()+s.startTime),o=Q(s.duration);n==="navigation"&&r&&i<r||se(e,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[at]:"auto.ui.browser.metrics"}})}})}function Wm(){new PerformanceObserver(e=>{const n=mt();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=Q(dt()+r.startTime),{start_timestamp:i,op:o}=j(n);if(o==="navigation"&&i&&s<i)continue;const c=Q(r.duration),a={[at]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;a["browser.script.invoker"]=d,a["browser.script.invoker_type"]=l,f&&(a["code.filepath"]=f),p&&(a["code.function"]=p),h!==-1&&(a["browser.script.source_char_position"]=h),se(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function zm(){De("event",({entries:t})=>{const e=mt();if(e){for(const n of t)if(n.name==="click"){const r=Q(dt()+n.startTime),s=Q(n.duration),i={name:ut(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[at]:"auto.ui.browser.metrics"}},o=du(n.target);o&&(i.attributes["ui.component_name"]=o),se(e,r,r+s,i)}}})}function qm(){return Xr(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(bt.cls={value:t.value,unit:""},Mr=e)},!0)}function jm(){return Jr(({metric:t})=>{const e=t.entries[t.entries.length-1];!e||!Jn(t.value)||(bt.lcp={value:t.value,unit:"millisecond"},Et=e)},!0)}function Gm(){return vm(({metric:t})=>{t.entries[t.entries.length-1]&&(bt.ttfb={value:t.value,unit:"millisecond"})})}function Vm(){return De("paint",({entries:t})=>{const e=Yn();for(const n of t){const r=n.startTime<e.firstHiddenTime;n.name==="first-paint"&&r&&(bt.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(bt.fcp={value:n.startTime,unit:"millisecond"})}})}function Ym(t,e){const n=ln(),r=dt();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:i,ignoreResourceSpans:o}=e,c=Q(r),a=n.getEntries(),{op:u,start_timestamp:d}=j(t);
20a.slice(Qo).forEach(l=>{const f=Q(l.startTime),p=Q(Math.max(0,l.duration));if(!(u==="navigation"&&d&&c+f<d))switch(l.entryType){case"navigation":{Qm(t,l,c);break}case"mark":case"paint":case"measure":{Jm(t,l,f,p,c,i);break}case"resource":{ng(t,l,l.name,f,p,c,o);break}}}),Qo=Math.max(a.length-1,0),rg(t,s)}function Km(t,e){const n=dt();if(!ln()?.getEntries||!n){ta();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:i}=e,o=Q(n);if(j(t).op==="pageload"){if(og(bt),r){const c=(a,u,d)=>{const l=d??`browser.web_vital.${a}.value`;t.setAttribute(l,u),Dt&&_.log("Setting web vital attribute",{[l]:u},"on pageload span")};["ttfb","fp","fcp"].forEach(a=>{bt[a]&&c(a,bt[a].value)}),bt["ttfb.requestTime"]&&c("ttfb.requestTime",bt["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else s||delete bt.cls,i||delete bt.lcp,Object.entries(bt).forEach(([c,a])=>{Lc(c,a.value,a.unit,t)}),sg(t,e);t.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",o),t.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",cn())}ta()}function ta(){Et=void 0,Mr=void 0,bt={}}function Xm(t){if(t?.entryType==="measure")try{return t.detail.devtools.track==="Components â"}catch{return}}function Jm(t,e,n,r,s,i){if(Xm(e)||["mark","measure"].includes(e.entryType)&&Ft(e.name,i))return;const o=Vn(!1),c=Q(o?o.requestStart:0),a=s+Math.max(n,c),u=s+n,d=u+r,l={[at]:"auto.resource.browser.metrics"};a!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=a),Zm(l,e),a<=d&&se(t,a,d,{name:e.name,op:e.entryType,attributes:l})}function Zm(t,e){try{const n=e.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&xe(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(xe(n)){t["sentry.browser.measure.detail"]=n;return}try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Qm(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{or(t,e,r,n)}),or(t,e,"secureConnection",n,"TLS/SSL"),or(t,e,"fetch",n,"cache"),or(t,e,"domainLookup",n,"DNS"),eg(t,e,n)}function or(t,e,n,r,s=n){const i=tg(n),o=e[i],c=e[`${n}Start`];!c||!o||se(t,r+Q(c),r+Q(o),{op:`browser.${s}`,name:e.name,attributes:{[at]:"auto.ui.browser.metrics",...n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{}}})}function tg(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function eg(t,e,n){const r=n+Q(e.requestStart),s=n+Q(e.responseEnd),i=n+Q(e.responseStart);e.responseEnd&&(se(t,r,s,{op:"browser.request",name:e.name,attributes:{[at]:"auto.ui.browser.metrics"}}),se(t,i,s,{op:"browser.response",name:e.name,attributes:{[at]:"auto.ui.browser.metrics"}}))}function ng(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={[at]:"auto.resource.browser.metrics"},u=Ce(n);u.protocol&&(a["url.scheme"]=u.protocol.split(":").pop()),u.host&&(a["server.address"]=u.host),a["url.same_origin"]=n.includes(N.location.origin),a[vd]=n,ig(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,...Iu(e)},l=i+r,f=l+s;se(t,l,f,{name:n.replace(N.location.origin,""),op:c,attributes:d})}function rg(t,e){const n=N.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),ws(r.rtt)&&(e?t.setAttribute("network.connection.rtt",r.rtt):j(t).op==="pageload"&&Lc("connection.rtt",r.rtt,"millisecond"))),ws(n.deviceMemory)&&(e?t.setAttribute("device.memory.estimated_capacity",n.deviceMemory):t.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),ws(n.hardwareConcurrency)&&(e?t.setAttribute("device.processor_count",n.hardwareConcurrency):t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function sg(t,e){Et&&e.recordLcpOnPageloadSpan&&(Et.element&&t.setAttribute("lcp.element",ut(Et.element)),Et.id&&t.setAttribute("lcp.id",Et.id),Et.url&&t.setAttribute("lcp.url",Et.url.trim().slice(0,200)),Et.loadTime!=null&&t.setAttribute("lcp.loadTime",Et.loadTime),Et.renderTime!=null&&t.setAttribute("lcp.renderTime",Et.renderTime),t.setAttribute("lcp.size",Et.size)),Mr?.sources&&e.recordClsOnPageloadSpan&&Mr.sources.forEac
20h((n,r)=>t.setAttribute(`cls.source.${r+1}`,ut(n.node)))}function ig(t,e,n){n.forEach(([r,s])=>{const i=t[r];i!=null&&(typeof i=="number"&&i<$m||typeof i=="string")&&(e[s]=i)})}function og(t){const e=Vn(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const ks=[],Sn=new Map,$e=new Map,wu=60;function ag(){if(ln()&&dt()){const e=cg();return()=>{e()}}return()=>{}}const xn={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 cg(){return Ni(ug)}const ug=({metric:t})=>{if(t.value==null)return;const e=Q(t.value);if(e>wu)return;const n=t.entries.find(h=>h.duration===t.value&&xn[h.name]);if(!n)return;const{interactionId:r}=n,s=xn[n.name],i=Q(dt()+n.startTime),o=mt(),c=o?pt(o):void 0,a=r!=null?Sn.get(r):void 0,u=a?.span||
20c,d=u?j(u).description:G().getScopeData().transactionName,l=a?.elementName||ut(n.target),f={[at]:"auto.http.browser.inp",[Rt]:`ui.interaction.${s}`,[le]:n.duration},p=Oi({name:l,transaction:d,attributes:f,startTime:i});p&&(p.addEvent("inp",{[Wn]:"millisecond",[zn]:t.value}),p.end(i+e))};function lg(t){return t!=null?Sn.get(t):void 0}function dg(){const t=Object.keys(xn);Ze()&&t.forEach(s=>{N.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($e.set(c,o),$e.size>50){const a=$e.keys().next().value;a!==void 0&&$e.delete(a)}}function n(s){const i=Math.round(s.startTime);let o=$e.get(i);if(!o)for(let c=-5;c<=5;c++){const a=$e.get(i+c);if(a){o=a;break}}return o||"<unknown>"}const r=({entries:s})=>{const i=mt(),o=i&&pt(i);s.forEach(c=>{if(!Cm(c))return;const a=c.interactionId;if(a==null||Sn.has(a))return;const u=c.target?ut(c.target):n(c);if(ks.length>10){const d=ks.shift();Sn.delete(d)}ks.push(a),Sn.set(a,{span:o,elementName:u})})};De("event",r),De("first-input",r)}function Li(t){const{name:e,op:n,origin:r,metricName:s,value:i,attributes:o,parentSpan:c,reportEvent:a,startTime:u,endTime:d}=t,l=G().getScopeData().transactionName,f={[at]:r,[Rt]:n,[le]:0,[`browser.web_vital.${s}.value`]:i,[Cc]:l,[Rc]:l,"user_agent.original":N.navigator?.userAgent,...o};c&&Ec(c).attributes?.[Rt]==="pageload"&&(f["sentry.pageload.span_id"]=c.spanContext().spanId),a&&(f[`browser.web_vital.${s}.report_event`]=a);const p=he({name:e,attributes:f,startTime:u,parentSpan:c});p&&p.end(d??u)}function fg(t){let e=0,n;if(!Qr("largest-contentful-paint"))return;const r=Jr(({metric:s})=>{const i=s.entries[s.entries.length-1];
20!i||!Jn(s.value)||(e=s.value,n=i)},!0);ts(t,(s,i,o)=>{pg(e,n,o,s),r()})}function pg(t,e,n,r){if(!Jn(t))return;Dt&&_.log(`Sending LCP span (${t})`);const s=dt()||0,i=Q(s),o=Q(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),Li({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 hg(t){let e=0,n;if(!Qr("layout-shift"))return;const r=Xr(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(e=s.value,n=i)},!0);ts(t,(s,i,o)=>{mg(e,n,o,s),r()})}function mg(t,e,n,r){Dt&&_.log(`Sending CLS span (${t})`);const s=e?Q((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)}),Li({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:t,attributes:o,parentSpan:n,reportEvent:r,startTime:s})}function gg(){if(!ln()||!dt())return;Ni(({metric:n})=>{if(n.value==null||Q(n.value)>wu)return;const s=n.entries.find(i=>i.duration===n.value&&xn[i.name]);s&&_g(n.value,s)})}function _g(t,e){Dt&&_.log(`Sending INP span (${t})`);const n=Q(dt()+e.startTime),r=Q(t),s=xn[e.name],i=lg(e.interactionId),o=mt(),c=o?pt(o):void 0,a=i?.span||c,u=a?Ec(a).name:G().getScopeData().transactionName,d=i?.elementName||ut(e.target);Li({name:d,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:t,attributes:{[le]:e.duration,[Cc]:u,[Rc]:u},startTime:n,endTime:n+r,parentSpan:a})}const Sg=1e3;let ea,Js,Zs;function ku(t){ae("dom",t),ce("dom",yg)}function yg(){if(!N.document)return;const t=At.bind(null,"dom"),e=na(t,!0);N.document.addEventListener("click",e,!1),N.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const s=N[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(vt(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=na(t);d.handler=l,i.call(this,o,l,a)}d.refCount++}catch{}return i.call(this,o,c,a)}}),vt(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 Eg(t){if(t.type!==Js)return!1;try{if(!t.target||t.target._sentryId!==Zs)return!1}catch{}return!0}function bg(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function na(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=vg(n);if(bg(n.type,r))return;ht(n,"_sentryCaptured",!0),r&&!r._sentryId&&ht(r,"_sentryId",It());
20const s=n.type==="keypress"?"input":n.type;Eg(n)||(t({event:n,name:s,global:e}),Js=n.type,Zs=r?r._sentryId:void 0),clearTimeout(ea),ea=N.setTimeout(()=>{Zs=void 0,Js=void 0},Sg)}}function vg(t){try{return t.target}catch{return null}}let ar;function es(t){const e="history";ae(e,t),ce(e,Tg)}function Tg(){if(N.addEventListener("popstate",()=>{const e=N.location.href,n=ar;if(ar=e,n===e)return;At("history",{from:n,to:e})}),!Oh())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=ar,i=Ig(String(r));if(ar=i,s===i)return e.apply(this,n);At("history",{from:s,to:i})}return e.apply(this,n)}}vt(N.history,"pushState",t),vt(N.history,"replaceState",t)}function Ig(t){try{return new URL(t,N.location.origin).toString()}catch{return t}}const yr={};function Ru(t){const e=yr[t];if(e)return e;let n=N[t];if(Gs(n))return yr[t]=n.bind(N);const r=N.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){Dt&&_.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(yr[t]=n.bind(N))}function wg(t){yr[t]=void 0}function Zn(...t){return Ru("setTimeout")(...t)}const Te="__sentry_xhr_v3__";function Cu(t){ae("xhr",t),ce("xhr",kg)}function kg(){if(!N.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,i=ct()*1e3,o=qt(r[0])?r[0].toUpperCase():void 0,c=Rg(r[1]);if(!o||!c)return e.apply(n,r);n[Te]={method:o,url:c,request_headers:{}},o==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[Te];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:ct()*1e3,startTimestamp:i,xhr:n,virtualError:s};At("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return a(),u.apply(d,l)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,h=d[Te];return h&&qt(f)&&qt(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[Te];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:ct()*1e3,xhr:n};return At("xhr",i),e.apply(n,r)}})}function Rg(t){if(qt(t))return t;try{return t.toString()}catch{}}const Cg=Symbol.for("sentry__originalRequestBody");function Au(t){return new URLSearchParams(t).toString()}function xu(t,e=_){try{if(typeof t=="string")return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Au(t)];if(!t)return[void 0]}catch(n){return Dt&&e.error(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Dt&&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][Cg];return n!==void 0?n:void 0}}function Nu(t){let e;try{e=t.getAllResponseHeaders()}catch(n){return Dt&&_.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 Ag(t){if(typeof Element>"u")return!1;try{return t instanceof Element}catch{return!1}}const xg=40;function Mg(t,e=Ru("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 wg("fetch"),a}finally{n-=o,r--}}return wp(t,s,wi(t.bufferSize||xg))}const kt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ng=30,Og=50;function Qs(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?Ae:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Lg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Dg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pg=/\((\S*)(?::(\d+))(?::(\d+))\)/,Fg=/at (.+?) ?\(data:(.+?),/,Bg=t=>{const e=t.match(Fg);
21if(e)return{filename:`<data:${e[2]}>`,function:e[1]};const n=Lg.exec(t);if(n){const[,s,i,o]=n;return Qs(s,Ae,+i,+o)}const r=Dg.exec(t);if(r){if(r[2]?.indexOf("eval")===0){const c=Pg.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,o]=Ou(r[1]||Ae,r[2]);return Qs(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},$g=[Ng,Bg],Ug=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wg=t=>{const e=Ug.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]||Ae;return[s,r]=Ou(s,r),Qs(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},zg=[Og,Wg],qg=[$g,zg],jg=Ga(...qg),Ou=(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]:Ae,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},cr=1024,Gg="Breadcrumbs",Vg=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Gg,setup(n){e.console&&iu(Jg(n)),e.dom&&ku(Xg(n,e.dom)),e.xhr&&Cu(Zg(n)),e.fetch&&ki(Qg(n)),e.history&&es(t_(n)),e.sentry&&n.on("beforeSendEvent",Kg(n))}}}),Yg=Vg;function Kg(t){return function(n){P()===t&&re({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ve(n)},{event:n})}}function Xg(t,e){return function(r){if(P()!==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>cr&&(kt&&_.warn(`\`dom.maxStringLength\` cannot exceed ${cr}, but a value of ${c} was configured. Sentry will use ${cr} instead.`),c=cr),typeof o=="string"&&(o=[o]);try{const u=r.event,d=e_(u)?u.target:u;s=ut(d,{keyAttrs:o,maxStringLength:c}),i=du(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};i&&(a.data={"ui.component_name":i}),re(a,{event:r.event,name:r.name,global:r.global})}}function Jg(t){return function(n){if(P()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Rr(n.level),message:vr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${vr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;re(r,{input:n.args,level:n.level})}}function Zg(t){return function(n){if(P()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Te];if(!r||!s||!i)return;const{method:o,url:c,status_code:a,body:u}=i,d={method:o,url:c,status_code:a},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:d,type:"http",level:cu(a)};t.emit("beforeOutgoingRequestBreadcrumb",f,l),re(f,l)}}function Qg(t){return function(n){if(P()!==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),re(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:cu(o.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,c),re(a,c)}}}function t_(t){return function(n){if(P()!==t)return;let r=n.from,s=n.to;const i=Ce(U.location.href);let o=r?Ce(r):void 0;const c=Ce(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),re({category:"navigation",data:{from:r,to:s}})}}function e_(t){return!!t&&!!t.target}const n_="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(","),r_="BrowserApiErrors",s_=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:r_,setupOnce(){e.setTimeout&&vt(U,"setTimeout",ra),e.setInterval&&vt(U,"setInterval",ra),e.requestAnimationFrame&&vt(U,"requestAnimationFrame",o_),e.XMLHttpRequest&&"XMLHttpRequest"in U&&vt(XMLHttpRequest.prototype,"send",a_);const n=e.eventTarget;n&&(Array.isArray(n)?n:n_).forEach(s=>c_(s,e))}}}),i_=s_;function ra(t){return function(...e){const n=e[0];return e[0]=Qe(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Vt(t)}`}}),t.apply(this,e)}}function o_(t){return function(e){return t.apply(this,[Qe(e,{mechanism:{data:{handler:Vt(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function a_(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&vt(n,s,function(i){const o={mechanism:{data:{handler:Vt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=hi(i);return c&&(o.mechanism.data.handler=Vt(c)),Qe(i,o)})}),t.apply(this,e)}}function c_(t,e){const r=U[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(vt(r,"addEventListener",function(s){return function(i,o,c){try{u_(o)&&(o.handleEvent=Qe(o.handleEvent,{mechanism:{data:{handler:Vt(o),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&l_(this,i,o),s.apply(this,[i,Qe(o,{mechanism:{data:{handler:Vt(o),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),c])}}),vt(r,"removeEventListener",function(s){return function(i,o,c){try{if(Object.prototype.hasOwnProperty.call(o,"__sentry_wrapped__")){const a=o.__sentry_wrapped__;a&&s.call(this,i,a,c)}}catch{}return s.call(this,i,o,c)}}))}function u_(t){return typeof t.handleEvent=="function"}function l_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}const d_=(t={})=>{const e=t.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof U.document>"u"){kt&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Mo({ignoreDuration:!0});let n=!1;Mi(()=>{n||(ys(),n=!0)});const r=yt();let s=r.getUser();r.addScopeListener(i=>{const o=i.getUser();(s?.id!==o?.id||s?.ip_address!==o?.ip_address)&&(s=o,n&&ys())}),e==="route"&&es(({from:i,to:o})=>{i!==o&&(Mo({ignoreDuration:!0}),ys(),n=!0)})}}},f_="CultureContext",p_=(()=>({name:f_,preprocessEvent(t){const e=sa();e&&(t.contexts={...t.contexts,culture:{...e,...t.contexts?.culture}})},processSegmentSpan(t){const e=sa();e&&wr(t,{"culture.locale":e.locale,"culture.timezone":e.timezone,"culture.calendar":e.calendar})}})),h_=p_;function sa(){try{const t=U.Intl;if(!t)return;const e=t.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone,calendar:e.calendar}}catch{return}}const m_="GlobalHandlers",g_=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:m_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(S_(n),ia("onerror")),e.onunhandledrejection&&(y_(n),ia("onunhandledrejection"))}}}),__=g_;function S_(t){Va(e=>{const{stackParser:n,attachStacktrace:r}=Lu();if(P()!==t||fu())return;const{msg:s,url:i,line:o,column:c,error:a}=e,u=v_(Ci(n,a||s,void 0,r,!1),i,o,c);u.level="error",$c(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function y_(t){Ya(e=>{const{stackParser:n,attachStacktrace:r}=Lu();if(P()!==t||fu())return;const s=E_(e),i=xe(s)?b_(s):Ci(n,s,void 0,r,!0);i.level="error",$c(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function E_(t){if(xe(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 b_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function v_(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:T_(e)??Le(),function:Ae,in_app:!0}),t}function ia(t){kt&&_.log(`Global Handler attached: ${t}`)}function Lu(){return P()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function T_(t){if(!(!qt(t)||t.length===0))return t.startsWith("data:")?`<${Bt(t,!1)}>`:t}const I_=()=>({name:"HttpContext",preprocessEvent(t){if(!U.navigator&&!U.location&&!U.document)return;const e=Cr(),n={...e.headers,...t.request?.headers};t.request={...e,...t.request,headers:n}},processSegmentSpan(t){const e=t.attributes?.[Rt];if(!U.navigator&&!U.location&&!U.document)return;const n=Cr();wr(t,{"url.full":e!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),w_="cause",k_=5,R_="LinkedErrors",C_=((t={})=>{const e=t.limit||k_,n=t.key||w_;return{name:R_,preprocessEvent(r,s,i){const o=i.getOptions();lh(Ri,o.stackParser,n,e,r,s)}}}),A_=C_,x_=/^HTML(\w*)Element$/;function Du(t){if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ag(t)){const e=M_(t);if(x_.test(e))return`[HTMLElement: ${ut(t)}]`}}function M_(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function N_(){return O_()?(kt&&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 O_(){if(typeof U.window>"u")return!1;const t=U;
21if(t.nw||!(t.chrome||t.browser)?.runtime?.id)return!1;const n=Le();return!(U===U.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function L_(t){return[nh(),Zp(),wh(),i_(),Yg(),__(),A_(),yh(),I_(),h_(),d_()]}function D_(t={}){const e=!t.skipBrowserExtensionCheck&&N_();let n=t.defaultIntegrations==null?L_():t.defaultIntegrations;const r={...t,enabled:e?!1:t.enabled,stackParser:Bl(t.stackParser||jg),integrations:ap({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||Mg};return Qa(Du),Bp(Qh,r)}const Z=D,Di="sentryReplaySession",P_="replay_event",Pi="Unable to send Replay",F_=3e5,B_=9e5,$_=5e3,U_=5500,H_=6e4,W_=5e3,z_=3,oa=15e4,ur=5e3,q_=3e3,j_=300,Fi=2e7,G_=4999,V_=5e4,aa=36e5;var Y_=Object.defineProperty,K_=(t,e,n)=>e in t?Y_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ca=(t,e,n)=>K_(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 X_(t){return t.nodeType===t.ELEMENT_NODE}function yn(t){return t?.host?.shadowRoot===t}function En(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function J_(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 Z_(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 Nr(t){try{const e=t.rules||t.cssRules;return e?J_(Array.from(e,Pu).join("")):null}catch{return null}}function Q_(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)}${i?" !important":""};`}return`${t.selectorText} { ${e} }`}function Pu(t){let e;if(eS(t))try{e=Nr(t.styleSheet)||Z_(t)}catch{}else if(nS(t)){let n=t.cssText;const r=t.selectorText.includes(":"),s=typeof t.style.all=="string"&&t.style.all;if(s&&(n=Q_(t)),r&&(n=tS(n)),r||s)return n}return e||t.cssText}function tS(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function eS(t){return"styleSheet"in t}function nS(t){return"selectorText"in t}class Fu{constructor(){ca(this,"idNodeMap",new Map),ca(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 rS(){return new Fu}function ns({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 Mn({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function tn(t){return t.toLowerCase()}function ti(t){return t.toUpperCase()}const ua="__rrweb_original__";function sS(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=ua in i?i[ua]: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 Bi(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?tn(e):null}function Or(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 la={};function $u(t){const e=la[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 la[t]=r.bind(window)}function ei(...t){return $u("setTimeout")(...t)}function Uu(...t){return $u("clearTimeout")(...t)}function Hu(t){try{return t.contentDocument}catch{}}function iS(t){try{return t.contentWindow}catch{}}let oS=1;const aS=new RegExp("[^a-z0-9-_:]"),Nn=-2;function $i(){return oS++}function cS(t){if(t instanceof HTMLFormElement)return"form";const e=tn(t.tagName);return aS.test(e)?"div":e}function uS(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}let Ue,da;const lS=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dS=/^(?:[a-z+]+:)?\/\//i,fS=/^www\..*/i,pS=/^(data:)([^,]*),(.*)/i;function hS(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 Lr(t,e){return(t||"").replace(lS,(n,r,s,i,o,c)=>{const a=s||o||c,u=r||i||"";if(!a)return n;if(dS.test(a)||fS.test(a))return`url(${u}${a}${u})`;if(pS.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${uS(e)+a}${u})`;const d=e.split("/"),l=a.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const mS=/^[^ \t\n\r\u000c]+/,gS=/^[, \t\n\r\u000c]+/;function _S(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(gS),!(n>=e.length);){let i=r(mS);if(i.slice(-1)===",")i=ze(t,i.substring(0,i.length-1)),s.push(i);else{let o="";i=ze(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 fa=new WeakMap;function ze(t,e){return!e||e.trim()===""?e:rs(t,e)}function SS(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function rs(t,e){let n=fa.get(t);if(n||(n=t.createElement("a"),fa.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 ze(t,r);
21if(n==="xlink:href"&&r[0]!=="#")return ze(t,r);if(n==="background"&&(e==="table"||e==="td"||e==="th"))return ze(t,r);if(n==="srcset")return _S(t,r);if(n==="style"){let c=Lr(r,rs(t));return o&&o.size>0&&(c=hS(c,o)),c}else if(e==="object"&&n==="data")return ze(t,r);return typeof i=="function"?i(n,r,s):r}function zu(t,e,n){return(t==="video"||t==="audio")&&e==="autoplay"}function yS(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 ES(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}function Ie(t,e,n=1/0,r=0){return!t||t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Ie(t.parentNode,e,n,r+1)}function qe(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(ES(r,t))return!0}return!!(e&&r.matches(e))}catch{return!1}}}function en(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=Ie(o,qe(r,s)),a<0)return!0;c=Ie(o,qe(e,n),a>=0?a:1/0)}else{if(c=Ie(o,qe(e,n)),c<0)return!1;a=Ie(o,qe(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function bS(t,e,n){const r=iS(t);if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const c=ei(()=>{s||(e(),s=!0)},n);t.addEventListener("load",()=>{Uu(c),s=!0,e()});return}const o="about:blank";if(r.location.href!==o||t.src===o||t.src==="")return ei(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function vS(t,e,n){let r=!1,s;try{s=t.sheet}catch{s=null}if(s)return;const i=ei(()=>{r||(e(),r=!0)},n);t.addEventListener("load",()=>{Uu(i),r=!0,e()})}function TS(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:S,dataURLOptions:y={},inlineImages:R,recordCanvas:O,keepIframeSrcFn:L,newlyAddedElement:K=!1,ignoreCSSAttributes:x}=e,g=IS(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 kS(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:a,maskInputOptions:h,maskInputFn:S,dataURLOptions:y,inlineImages:R,recordCanvas:O,keepIframeSrcFn:L,newlyAddedElement:K,rootId:g,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,ignoreCSSAttributes:x});case t.TEXT_NODE:return wS(t,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,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 IS(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function wS(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 f=t.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&f){try{t.nextSibling||t.previousSibling||t.parentNode.sheet?.cssRules&&(f=Nr(t.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,t)}f=Lr(f,rs(e.doc))}h&&(f="SCRIPT_PLACEHOLDER");const S=en(t,r,i,s,o,n);if(!p&&!h&&!m&&f&&S&&(f=c?c(f,t.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(a.textarea||S)&&(f=u?u(f,t.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const y=ns({type:null,tagName:l,maskInputOptions:a});f=Mn({isMasked:en(t,r,i,s,o,y),element:t,value:f,maskInputFn:u})}return{type:ot.Text,textContent:f||"",isStyle:p,rootId:d}}function kS(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:S,unmaskTextClass:y,maskTextSelector:R,unmaskTextSelector:O,ignoreCSSAttributes:L}=e,K=yS(t,r,s,i),x=cS(t);let g={};const T=t.attributes.length;for(let E=0;E<T;E++){const I=t.attributes[E];I.name&&!zu(x,I.name,I.value)&&(g[I.name]=Wu(n,x,tn(I.name),I.value,t,a,L))}if(x==="link"&&o){const E=Array.from(n.styleSheets).find(H=>H.href===t.href);let I=null;E&&(I=Nr(E)),I&&(g.rel=null,g.href=null,g.crossorigin=null,g._cssText=Lr(I,E.href))}if(x==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const E=Nr(t.sheet);E&&(g._cssText=Lr(E,rs(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const E=t,I=Bi(E),H=Or(E,ti(x),I),V=E.checked;if(I!=="submit"&&I!=="button"&&H){const $=en(E,S,R,y,O,ns({type:I,tagName:ti(x),maskInputOptions:c}));g.value=Mn({isMasked:$,element:E,value:H,maskInputFn:u})}V&&(g.checked=V)}if(x==="option"&&(t.selected&&!c.select?g.selected=!0:delete g.selected),x==="canvas"&&f){if(t.__context==="2d")sS(t)||(g.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){const E=t.toDataURL(d.type,d.quality),I=n.createElement("canvas");I.width=t.width,I.height=t.height;const H=I.toDataURL(d.type,d.quality);
21E!==H&&(g.rr_dataURL=E)}}if(x==="img"&&l){Ue||(Ue=n.createElement("canvas"),da=Ue.getContext("2d"));const E=t,I=E.currentSrc||E.getAttribute("src")||"<unknown-src>",H=E.crossOrigin,V=()=>{E.removeEventListener("load",V);try{Ue.width=E.naturalWidth,Ue.height=E.naturalHeight,da.drawImage(E,0,0),g.rr_dataURL=Ue.toDataURL(d.type,d.quality)}catch($){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V);return}else console.warn(`Cannot inline img src=${I}! Error: ${$}`)}E.crossOrigin==="anonymous"&&(H?g.crossOrigin=H:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?V():E.addEventListener("load",V)}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:E,height:I}=t.getBoundingClientRect();g={class:g.class,rr_width:`${E}px`,rr_height:`${I}px`}}x==="iframe"&&!p(g.src)&&(!K&&!Hu(t)&&(g.rr_src=g.src),delete g.src);let tt;try{customElements.get(x)&&(tt=!0)}catch{}return{type:ot.Element,tagName:x,attributes:g,childNodes:[],isSVG:SS(t)||void 0,needBlock:K,rootId:m,isCustom:tt}}function J(t){return t==null?"":t.toLowerCase()}function RS(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"&&(J(t.attributes.name).match(/^msapplication-tile(image|color)$/)||J(t.attributes.name)==="application-name"||J(t.attributes.rel)==="icon"||J(t.attributes.rel)==="apple-touch-icon"||J(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&J(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(J(t.attributes.property).match(/^(og|twitter|fb):/)||J(t.attributes.name).match(/^(og|twitter):/)||J(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(J(t.attributes.name)==="robots"||J(t.attributes.name)==="googlebot"||J(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(J(t.attributes.name)==="author"||J(t.attributes.name)==="generator"||J(t.attributes.name)==="framework"||J(t.attributes.name)==="publisher"||J(t.attributes.name)==="progid"||J(t.attributes.property).match(/^article:/)||J(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(J(t.attributes.name)==="google-site-verification"||J(t.attributes.name)==="yandex-verification"||J(t.attributes.name)==="csrf-token"||J(t.attributes.name)==="p:domain_verify"||J(t.attributes.name)==="verify-v1"||J(t.attributes.name)==="verification"||J(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:R,dataURLOptions:O={},inlineImages:L=!1,recordCanvas:K=!1,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T=5e3,onBlockedImageLoad:tt,onStylesheetLoad:E,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:H=()=>!1,newlyAddedElement:V=!1,ignoreCSSAttributes:$}=e;let{preserveWhiteSpace:it=!0}=e;const et=TS(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,dataURLOptions:O,inlineImages:L,recordCanvas:K,keepIframeSrcFn:H,newlyAddedElement:V,ignoreCSSAttributes:$});if(!et)return console.warn(t,"not serialized"),null;let C;r.hasNode(t)?C=r.getId(t):RS(et,R)||!it&&et.type===ot.Text&&!et.isStyle&&!et.textContent.trim().length?C=Nn:C=$i();const v=Object.assign(et,{id:C});if(r.add(t,v),C===Nn)return null;x&&x(t);let F=!f;if(v.type===ot.Element){F=F&&!v.needBlock;const M=t.shadowRoot;M&&En(M)&&(v.isShadowHost=!0)}if((v.type===ot.Document||v.type===ot.Element)&&F){R.headWhitespace&&v.type===ot.Element&&v.tagName==="head"&&(it=!1);const M={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:R,dataURLOptions:O,inlineImages:L,recordCanvas:K,preserveWhiteSpace:it,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onBlockedImageLoad:tt,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:H,ignoreCSSAttributes:$},X=t.childNodes?Array.from(t.childNodes):[];for(const nt of X){const rt=je(nt,M);rt&&v.childNodes.push(rt)}if(X_(t)&&t.shadowRoot)for(const nt of Array.from(t.shadowRoot.childNodes)){const rt=je(nt,M);rt&&(En(t.shadowRoot)&&(rt.isShadow=!0),v.childNodes.push(rt))}}if(t.parentNode&&yn(t.parentNode)&&En(t.parentNode)&&(v.isShadow=!0),v.type===ot.Element&&v.tagName==="iframe"&&!v.needBlock&&bS(t,()=>{const M=Hu(t);if(M&&g){const X=je(M,{doc:M,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:R,dataURLOptions:O,inlineImages:L,recordCanvas:K,preserveWhiteSpace:it,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:H,ignoreCSSAttributes:$});X&&g(t,X)}},T),v.type===ot.Element&&v.tagName==="img"&&!t.complete&&v.needBlock){const M=t,X=()=>
21{if(M.isConnected&&!M.complete&&tt)try{const nt=M.getBoundingClientRect();nt.width>0&&nt.height>0&&tt(M,v,nt)}catch{}M.removeEventListener("load",X)};M.isConnected&&M.addEventListener("load",X)}return v.type===ot.Element&&v.tagName==="link"&&typeof v.attributes.rel=="string"&&(v.attributes.rel==="stylesheet"||v.attributes.rel==="preload"&&typeof v.attributes.href=="string"&&Bu(v.attributes.href)==="css")&&vS(t,()=>{if(E){const M=je(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOMOptions:R,dataURLOptions:O,inlineImages:L,recordCanvas:K,preserveWhiteSpace:it,onSerialize:x,onIframeLoad:g,iframeLoadTimeout:T,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:H,ignoreCSSAttributes:$});M&&E(t,M)}},I),v.type===ot.Element&&delete v.needBlock,v}function CS(t,e){const{mirror:n=new Fu,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:S,maskInputFn:y,slimDOM:R=!1,dataURLOptions:O,preserveWhiteSpace:L,onSerialize:K,onIframeLoad:x,iframeLoadTimeout:g,onBlockedImageLoad:T,onStylesheetLoad:tt,stylesheetLoadTimeout:E,keepIframeSrcFn:I=()=>!1,ignoreCSSAttributes:H=new Set([])}=e||{};return je(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:R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:R==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:R===!1?{}:R,dataURLOptions:O,inlineImages:f,recordCanvas:p,preserveWhiteSpace:L,onSerialize:K,onIframeLoad:x,iframeLoadTimeout:g,onBlockedImageLoad:T,onStylesheetLoad:tt,stylesheetLoadTimeout:E,keepIframeSrcFn:I,newlyAddedElement:!1,ignoreCSSAttributes:H})}function St(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const He=`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 pa={map:{},getId(){return console.error(He),-1},getNode(){return console.error(He),null},removeNodeFromMap(){console.error(He)},has(){return console.error(He),!1},reset(){console.error(He)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(pa=new Proxy(pa,{get(t,e,n){return e==="map"&&console.error(He),Reflect.get(t,e,n)}}));function On(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&&(DS(r),r=null),s=o,t.apply(a,i)):!r&&n.trailing!==!1&&(r=ss(()=>{s=n.leading===!1?0:Date.now(),r=null,t.apply(a,i)},c))}}function qu(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(o){ss(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>qu(t,e,i||{},!0)}function Ui(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 Dr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Dr=()=>new Date().getTime());function ju(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 Gu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yu(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function Tt(t,e,n,r,s){if(!t)return!1;const i=Yu(t);if(!i)return!1;const o=qe(e,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const c=Ie(i,o);let a=-1;return c<0?!1:(r&&(a=Ie(i,qe(null,r))),c>-1&&a<0?!0:c<a)}function AS(t,e){return e.getId(t)!==-1}function Rs(t,e){return e.getId(t)===Nn}function Ku(t,e){if(yn(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Ku(t.parentNode,e):!0:!0}function ni(t){return!!t.changedTouches}function xS(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.N
23odeList.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 Xu(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ju(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function ri(t){return!!t?.shadowRoot}class MS{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 Zu(t){let e=null;return t.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function NS(t){let e=t,n;for(;n=Zu(e);)e=n;return e}function OS(t){const e=t.ownerDocument;if(!e)return!1;const n=NS(t);return e.contains(n)}function Qu(t){const e=t.ownerDocument;return e?e.contains(t)||OS(t):!1}const ha={};function Hi(t){const e=ha[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 ha[t]=r.bind(window)}function LS(...t){return Hi("requestAnimationFrame")(...t)}function ss(...t){return Hi("setTimeout")(...t)}function DS(...t){return Hi("clearTimeout")(...t)}var B=(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))(B||{}),A=(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.Input=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))(A||{}),_t=(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))(_t||{}),zt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(zt||{}),We=(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))(We||{});let bn;function PS(t){bn=t}function FS(){bn=void 0}const q=t=>bn?((...n)=>{try{return t(...n)}catch(r){if(bn&&bn(r)===!0)return()=>{};throw r}}):t;var ma="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BS=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var lr=0;lr<ma.length;lr++)BS[ma.charCodeAt(lr)]=lr;class ga{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Wi(t){try{return t.contentDocument}catch{}}function Ln(t){try{return t.contentWindow}catch{}}class $S{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];
23return!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 _a(t){return"__ln"in t}class US{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&&_a(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&&_a(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 Sa=(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 US,s=a=>{let u=a,d=Nn;for(;d===Nn;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=a=>{if(!a.parentNode||!Qu(a))return;const u=yn(a.parentNode)?this.mirror.getId(Zu(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=je(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Xu(f,this.mirror)&&!Tt(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Ju(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ri(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{if(Tt(f,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(f,p);const h=Ln(f);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(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)ya(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!Ea(this.droppedSet,a)&&!ya(this.removes,a,this.mirror)||Ea(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(o.value.parentNode),d=s(o.value);u!==-1&&d!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(l!==-1){a=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds: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(!Rs(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!Tt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:en(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Yu(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=Bi(n),c=n.tagName;s=Or(n,c,o);const a=ns({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),u=en(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=Mn({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Tt(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(!Wi(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"),!zu(n.tagName,r)&&(i.attributes[r]=Wu(this.doc,tn(n.tagName),tn(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(Tt(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=yn(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Tt(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Rs(n,this.mirror)||!AS(n,this.mirror)||(this.addedSet.has(n)?(si(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Ku(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Sa(r,s)]?si(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:yn(e.target)&&En(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(Rs(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[Sa(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Tt(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(r=>this.genAdds(r)),ri(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 $S(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 si(t,e){t.delete(e),e.childNodes?.forEach(n=>si(t,n))}function ya(t,e,n){return t.length===0?!1:WS(t,e,n)}function WS(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 Ea(t,e){return t.size===0?!1:tl(t,e)}function tl(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:tl(t,n):!1}const Ge=[];function Qn(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 el(t,e){const n=new HS;Ge.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(q(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 zS({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=On(q(l=>{const f=Date.now()-c;t(o.map(p=>(p.timeOffset-=f,p)),l),o=[],c=null}),i),u=q(On(q(l=>{const f=Qn(l),{clientX:p,clientY:h}=ni(l)?l.changedTouches[0]:l;c||(c=Dr()),o.push({x:p,y:h,id:r.getId(f),timeOffset:Dr()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?A.Drag:l instanceof MouseEvent?A.MouseMove:A.TouchMove)}),s,{trailing:!1})),d=[St("mousemove",u,n),St("touchmove",u,n),St("drag",u,n)];return q(()=>{d.forEach(l=>l())})}function qS({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=>f=>{const p=Qn(f);if(Tt(p,r,s,i,!0))return;let h=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=zt.Mouse;break;case"touch":h=zt.Touch;break;case"pen":h=zt.Pen;break}h===zt.Touch?_t[l]===_t.MouseDown?m="TouchStart":_t[l]===_t.MouseUp&&(m="TouchEnd"):zt.Pen}else ni(f)&&(h=zt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===zt.Touch||m.startsWith("Mouse")&&h===zt.Mouse)&&(h=null)):_t[l]===_t.Click&&(h=u,u=null);const S=ni(f)?f.changedTouches[0]:f;if(!S)return;const y=n.getId(p),{clientX:R,clientY:O}=S;q(t)({type:_t[m],id:y,x:R,y:O,...h!==null&&{pointerType:h}})};return Object.keys(_t).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEac
23h(l=>{let f=tn(l);const p=d(l);if(window.PointerEvent)switch(_t[l]){case _t.MouseDown:case _t.MouseUp:f=f.replace("mouse","pointer");break;case _t.TouchStart:case _t.TouchEnd:return}a.push(St(f,p,e))}),q(()=>{a.forEach(l=>l())})}function nl({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const c=q(On(q(a=>{const u=Qn(a);if(!u||Tt(u,r,s,i,!0))return;const d=n.getId(u);if(u===e&&e.defaultView){const l=ju(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 St("scroll",c,e)}function jS({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=q(On(q(()=>{const i=Gu(),o=Vu();(n!==i||r!==o)&&(t({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return St("resize",s,e)}const GS=["INPUT","TEXTAREA","SELECT"],ba=new WeakMap;function VS({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:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function S(g){let T=Qn(g);const tt=g.isTrusted,E=T&&ti(T.tagName);if(E==="OPTION"&&(T=T.parentElement),!T||!E||GS.indexOf(E)<0||Tt(T,r,s,i,!0))return;const I=T;if(I.classList.contains(o)||c&&I.matches(c))return;const H=Bi(T);let V=Or(I,E,H),$=!1;const it=ns({maskInputOptions:a,tagName:E,type:H}),et=en(T,f,h,p,m,it);(H==="radio"||H==="checkbox")&&($=T.checked),V=Mn({isMasked:et,element:T,value:V,maskInputFn:u}),y(T,l?{text:V,isChecked:$,userTriggered:tt}:{text:V,isChecked:$});const C=T.name;H==="radio"&&C&&$&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(v=>{if(v!==T){const F=Mn({isMasked:et,element:v,value:Or(v,E,H),maskInputFn:u});y(v,l?{text:F,isChecked:!$,userTriggered:!1}:{text:F,isChecked:!$})}})}function y(g,T){const tt=ba.get(g);if(!tt||tt.text!==T.text||tt.isChecked!==T.isChecked){ba.set(g,T);const E=n.getId(g);q(t)({...T,id:E})}}const O=(d.input==="last"?["change"]:["input","change"]).map(g=>St(g,q(S),e)),L=e.defaultView;if(!L)return()=>{O.forEach(g=>g())};const K=L.Object.getOwnPropertyDescriptor(L.HTMLInputElement.prototype,"value"),x=[[L.HTMLInputElement.prototype,"value"],[L.HTMLInputElement.prototype,"checked"],[L.HTMLSelectElement.prototype,"value"],[L.HTMLTextAreaElement.prototype,"value"],[L.HTMLSelectElement.prototype,"selectedIndex"],[L.HTMLOptionElement.prototype,"selected"]];return K&&K.set&&O.push(...x.map(g=>qu(g[0],g[1],{set(){q(S)({target:this,isTrusted:!1})}},!1,L))),q(()=>{O.forEach(g=>g())})}function Pr(t){const e=[];function n(r,s){if(dr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||dr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||dr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||dr("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 Jt(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function YS({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:q((d,l,f)=>{const[p,h]=f,{id:m,styleId:S}=Jt(l,e,n.styleMirror);return(m&&m!==-1||S&&S!==-1)&&t({id:m,styleId:S,adds:[{rule:p,index:h}]}),d.apply(l,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:q((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Jt(l,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,removes:[{index:p}]}),d.apply(l,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:q((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Jt(l,e,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replace:p}),d.apply(l,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:q((d,l,f)=>{const[p]=f,{id:h,styleId:m}=Jt(l,e,n.styleMirror);
23return(h&&h!==-1||m&&m!==-1)&&t({id:h,styleId:m,replaceSync:p}),d.apply(l,f)})}));const a={};fr("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(fr("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),fr("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),fr("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:q((f,p,h)=>{const[m,S]=h,{id:y,styleId:R}=Jt(p.parentStyleSheet,e,n.styleMirror);return(y&&y!==-1||R&&R!==-1)&&t({id:y,styleId:R,adds:[{rule:m,index:[...Pr(p),S||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:q((f,p,h)=>{const[m]=h,{id:S,styleId:y}=Jt(p.parentStyleSheet,e,n.styleMirror);return(S&&S!==-1||y&&y!==-1)&&t({id:S,styleId:y,removes:[{index:[...Pr(p),m]}]}),f.apply(p,h)})})}),q(()=>{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 rl({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}}),q(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function KS({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:q((c,a,u)=>{const[d,l,f]=u;if(n.has(d))return i.apply(a,[d,l,f]);const{id:p,styleId:h}=Jt(a.parentRule?.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&t({id:p,styleId:h,set:{property:d,value:l,priority:f},index:Pr(a.parentRule)}),c.apply(a,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:q((c,a,u)=>{const[d]=u;if(n.has(d))return o.apply(a,[d]);const{id:l,styleId:f}=Jt(a.parentRule?.parentStyleSheet,e,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&t({id:l,styleId:f,remove:{property:d},index:Pr(a.parentRule)}),c.apply(a,u)})}),q(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function XS({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=q(u=>On(q(d=>{const l=Qn(d);if(!l||Tt(l,e,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:m}=l;t({type:u,id:s.getId(l),currentTime:f,volume:p,muted:h,playbackRate:m})}),i.media||500)),a=[St("play",c(We.Play),o),St("pause",c(We.Pause),o),St("seeked",c(We.Seeked),o),St("volumechange",c(We.VolumeChange),o),St("ratechange",c(We.RateChange),o)];return q(()=>{a.forEach(u=>u())})}function JS({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=Ui(e.fonts,"add",function(c){return function(a){return ss(q(()=>{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),q(()=>{r.forEach(c=>c())})}function ZS(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let c=!0;const a=q(()=>{const u=e.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const p=u.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:S,endOffset:y}=p;Tt(h,r,s,i,!0)||Tt(S,r,s,i,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(S),endOffset:y})}o({ranges:d})});return a(),St("selectionchange",a)}function QS({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:Ui(n.customElements,"define",function(s){return function(i,o,c){try{e({define:{name:i}})}catch{}
23return s.apply(this,[i,o,c])}})}function ty(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;t.recordDOM&&(r=el(t,t.doc));const s=zS(t),i=qS(t),o=nl(t),c=jS(t,{win:n}),a=VS(t),u=XS(t);let d=()=>{},l=()=>{},f=()=>{},p=()=>{};t.recordDOM&&(d=YS(t,{win:n}),l=rl(t,t.doc),f=KS(t,{win:n}),t.collectFonts&&(p=JS(t)));const h=ZS(t),m=QS(t),S=[];for(const y of t.plugins)S.push(y.observer(y.callback,n,y.options));return q(()=>{Ge.forEach(y=>y.reset()),r?.disconnect(),s(),i(),o(),c(),a(),u(),d(),l(),f(),p(),h(),m(),S.forEach(y=>y())})}function dr(t){return typeof window[t]<"u"}function fr(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ii{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 ey{constructor(){this.crossOriginIframeMirror=new ii($i),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class ny{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ii($i),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ii(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=Ln(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&&Ln(e)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const r=Wi(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 B.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:B.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case B.Meta:case B.Load:case B.DomContentLoaded:return!1;case B.Plugin:return n;case B.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case B.IncrementalSnapshot:switch(n.data.source){case A.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 A.Drag:case A.TouchMove:case A.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),n;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(n.data,e,["id"]),n;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case A.Font:return n;case A.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),n;case A.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 ry{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class sy{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(!En(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const r=el({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(nl({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),ss(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(rl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const n=Wi(e),r=Ln(e);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(e,n){const r=this;this.restoreHandlers.push(Ui(e.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Qu(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 iy{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new MS,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:Pu(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 oy{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,LS(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(n))}destroy(){}}let st,Fr;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 Mt=rS();function Lt(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:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:S,slimDOMOptions:y,maskAttributeFn:R,maskInputFn:O,maskTextFn:L,maxCanvasSize:K=null,packFn:x,sampling:g={},dataURLOptions:T={},mousemoveWait:tt,recordDOM:E=!0,recordCanvas:I=!1,recordCrossOriginIframes:H=!1,recordAfter:V=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:it=!1,inlineImages:et=!1,plugins:C,keepIframeSrcFn:v=()=>!1,ignoreCSSAttributes:F=new Set([]),errorHandler:M,onMutation:X,getCanvasManager:nt}=t;PS(M);const rt=H?window.parent===window:!0;let gt=!1;if(!rt)try{window.parent.document&&(gt=!1)}catch{gt=!0}if(rt&&!e)throw new Error("emit function is required");if(!rt&&!gt)return()=>{};tt!==void 0&&g.mousemove===void 0&&(g.mousemove=tt),Mt.reset();const me=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:{},Ht=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||{};xS();let ge,Wt=0;const dn=Y=>{for(const xt of C||[])xt.eventProcessor&&(Y=xt.eventProcessor(Y));return x&&!gt&&(Y=x(Y)),Y};st=(Y,xt)=>{const W=Y;if(W.timestamp=Dr(),Ge[0]?.isFrozen()&&W.type!==B.FullSnapshot&&!(W.type===B.IncrementalSnapshot&&W.data.source===A.Mutation)&&Ge.forEach(ft=>ft.unfreeze()),rt)e?.(dn(W),xt);else if(gt){const ft={type:"rrweb",event:dn(W),origin:window.location.origin,isCheckout:xt};window.parent.postMessage(ft,"*")}if(W.type===B.FullSnapshot)ge=W,Wt=0;else if(W.type===B.IncrementalSnapshot){if(W.data.source===A.Mutation&&W.data.isAttachIframe)return;Wt++;const ft=r&&Wt>=r,z=n&&ge&&W.timestamp-ge.timestamp>n;(ft||z)&&fs(!0)}};const _e=Y=>{st({type:B.IncrementalSnapshot,data:{source:A.Mutation,...Y}})},Xi=Y=>st({type:B.IncrementalSnapshot,data:{source:A.Scroll,...Y}}),Al=Y=>st({type:B.IncrementalSnapshot,data:{source:A.CanvasMutation,...Y}}),xl=Y=>st({type:B.IncrementalSnapshot,data:{source:A.AdoptedStyleSheet,...Y}}),Se=new iy({mutationCb:_e,adoptedStyleSheetCb:xl}),ye=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new ey:new ny({mirror:Mt,mutationCb:_e,stylesheetManager:Se,recordCrossOriginIframes:H,wrappedEmit:st});for(const Y of C||[])Y.getMirror&&Y.getMirror({nodeMirror:Mt,crossOriginIframeMirror:ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:ye.crossOriginIframeStyleMirror});const ls=new oy,ds=cy(nt,{mirror:Mt,win:window,mutationCb:Y=>st({type:B.IncrementalSnapshot,data:{source:A.CanvasMutation,...Y}}),recordCanvas:I,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:K,sampling:g.canvas,dataURLOptions:T,errorHandler:M}),er=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ry:new sy({mutationCb:_e,scrollCb:Xi,bypassOptions:{onMutation:X,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:me,dataURLOptions:T,maskAttributeFn:R,maskTextFn:L,maskInputFn:O,recordCanvas:I,inlineImages:et,sampling:g,slimDOMOptions:Ht,iframeManager:ye,stylesheetManager:Se,canvasManager:ds,keepIframeSrcFn:v,processedNodeManager:ls,ignoreCSSAttributes:F},mirror:Mt}),fs=(Y=!1)=>{if(!E)return;st({type:B.Meta,data:{href:window.location.href,width:Vu(),height:Gu()}},Y),Se.reset(),er.init(),Ge.forEach(W=>W.lock());const xt=CS(document,{mirror:Mt,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:me,maskAttributeFn:R,maskInputFn:O,maskTextFn:L,slimDOM:Ht,dataURLOptions:T,recordCanvas:I,inlineImages:et,onSerialize:W=>{Xu(W,Mt)&&ye.addIframe(W),Ju(W,Mt)&&Se.trackLinkElement(W),ri(W)&&er.addShadowRoot(W.shadowRoot,document)},onIframeLoad:(W,ft)=>{ye.attachIframe(W,ft);const z=Ln(W);z&&ds.addWindow(z),er.observeAttachShadow(W)},onStylesheetLoad:(W,ft)=>{Se.attachLinkElement(W,ft)},onBlockedImageLoad:(W,ft,{width:z,height:fn})=>{_e({adds:[],removes:[],texts:[],attributes:[{id:ft.id,attributes:{style:{width:`${z}px`,height:`${fn}px`}}}]})},keepIframeSrcFn:v,ignoreCSSAttributes:F});if(!xt)return console.warn("Failed to snapshot the document");st({type:B.FullSnapshot,data:{node:xt,initialOffset:ju(window)}}),Ge.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,Mt.getId(document))};Fr=fs;try{const Y=[],xt=ft=>q(ty)({onMutation:X,mutationCb:_e,mousemoveCb:(z,fn)=>st({type:B.IncrementalSnapshot,data:{source:fn,positions:z}}),mouseInteractionCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.MouseInteraction,...z}}),scrollCb:Xi,viewportResizeCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.ViewportResize,...z}}),inputCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.Input,...z}}),mediaInteractionCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.MediaInteraction,...z}}),styleSheetRuleCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.StyleSheetRule,...z}}),styleDeclarationCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.StyleDeclaration,...z}}),canvasMutationCb:Al,fontCb:z=>st({type:B.IncrementalSnapshot,data:{source:A.Font,...z}}),selectionCb:z=>{st({type:B.IncrementalSnapshot,data:{source:A.Selection,...z}})},customElementCb:z=>{st({type:B.IncrementalSnapshot,data:{source:A.CustomElement,...z}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:me,inlineStylesheet:h,sampling:g,recordDOM:E,recordCanvas:I,inlineImages:et,userTriggeredOnInput:$,collectFonts:it,doc:ft,maskAttributeFn:R,maskInputFn:O,maskTextFn:L,keepIframeSrcFn:v,blockSelector:i,unblockSelector:o,slimDOMOptions:Ht,dataURLOptions:T,mirror:Mt,iframeManager:ye,stylesheetManager:Se,shadowDomManager:er,processedNodeManager:ls,canvasManager:ds,ignoreCSSAttributes:F,plugins:C?.f
23ilter(z=>z.observer)?.map(z=>({observer:z.observer,options:z.options,callback:fn=>st({type:B.Plugin,data:{plugin:z.name,payload:fn}})}))||[]},{});ye.addLoadListener(ft=>{try{Y.push(xt(ft.contentDocument))}catch(z){console.warn(z)}});const W=()=>{fs(),Y.push(xt(document))};return document.readyState==="interactive"||document.readyState==="complete"?W():(Y.push(St("DOMContentLoaded",()=>{st({type:B.DomContentLoaded,data:{}}),V==="DOMContentLoaded"&&W()})),Y.push(St("load",()=>{st({type:B.Load,data:{}}),V==="load"&&W()},window))),()=>{Y.forEach(ft=>ft()),ls.destroy(),Fr=void 0,FS()}}catch(Y){console.warn(Y)}}function ay(t){if(!Fr)throw new Error("please take full snapshot after start recording");Fr(t)}Lt.mirror=Mt;Lt.takeFullSnapshot=ay;function cy(t,e){try{return t?t(e):new ga}catch{return console.warn("Unable to initialize CanvasManager"),new ga}}var va;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(va||(va={}));const uy=3,ly=5;function zi(t){return t>9999999999?t:t*1e3}function Cs(t){return t>9999999999?t/1e3:t}function tr(t,e){e.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(t.throttledAddEvent({type:B.Custom,timestamp:(e.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Nt(e,10,1e3)}}),e.category==="console")))}const dy="button,a";function sl(t){return t.closest(dy)||t}function il(t){const e=ol(t);return!e||!(e instanceof Element)?e:sl(e)}function ol(t){return fy(t)?t.target:t}function fy(t){return Pe(t)&&"target"in t}let Zt;function py(t){return Zt||(Zt=[],hy()),Zt.push(t),()=>{const e=Zt?Zt.indexOf(t):-1;e>-1&&Zt.splice(e,1)}}function hy(){vt(Z,"open",function(t){return function(...e){if(Zt)try{Zt.forEach(n=>n())}catch{}return t.apply(Z,e)}})}const my=new Set([A.Mutation,A.StyleSheetRule,A.StyleDeclaration,A.AdoptedStyleSheet,A.CanvasMutation,A.Selection,A.MediaInteraction]);function gy(t,e,n){t.handleClick(e,n)}class _y{constructor(e,n,r=tr){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=py(()=>{this._lastMutation=Ta()});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(yy(n,this._ignoreSelector)||!Ey(e))return;const r={timestamp:Cs(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=Cs(e)}registerScroll(e=Date.now()){this._lastScroll=Cs(e)}registerClick(e){const n=sl(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=Ta();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:Z.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,d);return}if(o>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:Z.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}
23_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Zn(()=>this._checkClicks(),1e3)}}const Sy=["A","BUTTON","INPUT"];function yy(t,e){return!!(!Sy.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 Ey(t){return!!(t.data&&typeof t.data.nodeId=="number"&&t.timestamp)}function Ta(){return Date.now()/1e3}function by(t,e){try{if(!vy(e))return;const{source:n}=e.data;if(my.has(n)&&t.registerMutation(e.timestamp),n===A.Scroll&&t.registerScroll(e.timestamp),Ty(e)){const{type:r,id:s}=e.data,i=Lt.mirror.getNode(s);i instanceof HTMLElement&&r===_t.Click&&t.registerClick(i)}}catch{}}function vy(t){return t.type===uy}function Ty(t){return t.data.source===A.MouseInteraction}function Pt(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var is=(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))(is||{});const Iy=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function wy(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(Iy.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),e[r]=t[n]}return e}const ky=t=>e=>{if(!t.isEnabled())return;const n=Ry(e);if(!n)return;const r=e.name==="click",s=r?e.event:void 0;r&&t.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&gy(t.clickDetector,n,il(e.event)),tr(t,n)};function al(t,e){const n=Lt.mirror.getId(t),r=n&&Lt.mirror.getNode(n),s=r&&Lt.mirror.getMeta(r),i=s&&Ay(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===is.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:wy(i.attributes)}}:{}}}function Ry(t){const{target:e,message:n}=Cy(t);return Pt({category:`ui.${t.name}`,...al(e,n)})}function Cy(t){const e=t.name==="click";let n,r=null;try{r=e?il(t.event):ol(t.event),n=ut(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Ay(t){return t.type===is.Element}function xy(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=My(e);n&&tr(t,n)}function My(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||Ny(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=al(o,u);return Pt({category:"ui.keyDown",message:u,data:{...d.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Ny(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable}const Oy={resource:By,paint:Py,navigation:Fy};function As(t,e){return({metric:n})=>{e.replayPerformanceEntries.push(t(n))}}function Ly(t){return t.map(Dy).filter(Boolean)}function Dy(t){const e=Oy[t.entryType];return e?e(t):null}function nn(t){return((dt()||Z.performance.timeOrigin)+t)/1e3}function Py(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=nn(s);return{type:n,name:r,start:i,end:i+e,data:void 0}}function Fy(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:f,startTime:p,transferSize:h,type:m}=t;return s===0?null:{type:`${e}.${m}`,start:nn(p),end:nn(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function By(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:nn(i),end:nn(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function $y(t){const e=t.entries[t.entries.length-1],n=e?.element?[e.element]:void 0;return qi(t,"largest-contentful-paint",n)}function Uy(t){return t.sources!==void 0}function Hy(t){const e=[],n=[];for(const r of t.entries)if(Uy(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Lt.mirror.getId(i.node);o&&s.push(o)}e.push({value:r.value,nodeIds:s.length?s:void 0})}return qi(t,"cumulative-layout-shift",n,e)}function Wy(t){const e=t.entries[t.entries.length-1],n=e?.target?[e.target]:void 0;return qi(t,"interaction-to-next-paint",n)}function qi(t,e,n,r){const s=t.value,i=t.rating,o=nn(s);return{type:"web-vital",name:e,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(c=>Lt.mirror.getId(c)):void 0,attributions:r}}}function zy(t){function e(s){t.performanceEntries.includes(s)||t.performanceEntries.push(s)}function n({entries:s}
23){s.forEach(e)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(De(s,n))}),r.push(Jr(As($y,t)),Xr(As(Hy,t)),Ni(As(Wy,t))),()=>{r.forEach(s=>s())}}const w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qy='
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 jy(){const t=new Blob([qy]);return URL.createObjectURL(t)}const Ia=["log","warn","error"],Er="[Replay] ";function xs(t,e="info"){re({category:"console",data:{logger:"replay"},level:e,message:`${Er}${t}`},{level:e})}function Gy(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{t=!!r.captureExceptions,e=!!r.traceInternals}};return w?(Ia.forEach(r=>{n[r]=(...s)=>{_[r](Er,...s),e&&xs(s.join(""),Rr(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),_.error(Er,r),t?jn(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):e&&xs(r,"error")},n.infoTick=(...r)=>{_.log(Er,...r),e&&setTimeout(()=>xs(r[0]),0)}):Ia.forEach(r=>{n[r]=()=>{}}),n}const k=Gy();class ji extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Fi}.`)}}class cl{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>Fi)throw new ji;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:zi(e)}}class Vy{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){w&&k.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():(w&&k.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{w&&k.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(){w&&k.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 Yy{constructor(e){this._worker=new Vy(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=zi(e.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(e);return this._totalSize+=r.length,this._totalSize>Fi?Promise.reject(new ji):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{w&&k.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 Ky{constructor(e){this._fallback=new cl,this._compression=new Yy(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){w&&k.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){w&&k.exception(i,"Failed to add events when switching buffers.")}}}function Xy({useCompression:t,workerUrl:e}){if(t&&window.Worker){const n=Jy(e);if(n)return n}return w&&k.log("Using simple buffer"),new cl}function Jy(t){try{const e=t||Zy();if(!e)return;w&&k.log(`Using compression worker${t?` from ${t}`:""}`);const n=new Worker(e);return new Ky(n)}catch(e){w&&k.exception(e,"Failed to create compression worker")}}function Zy(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?jy():""}function Gi(){try{return"sessionStorage"in Z&&!!Z.sessionStorage}catch{return!1}}function Qy(t){tE(),t.session=void 0}function tE(){if(Gi())try{Z.sessionStorage.removeItem(Di)}catch{}}function ul(t){return t===void 0?!1:Math.random()<t}function os(t){if(Gi())try{Z.sessionStorage.setItem(Di,JSON.stringify(t))}catch{}}function ll(t){const e=Date.now(),n=t.id||It(),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 eE(t,e){return ul(t)?"session":e?"buffer":!1}function wa({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=eE(t,e),i=ll({sampled:s,previousSessionId:r});return n&&os(i),i}function nE(){if(!Gi())return null;try{const t=Z.sessionStorage.getItem(Di);if(!t)return null;const e=JSON.parse(t);return w&&k.infoTick("Loading existing session"),ll(e)}catch{return null}}function oi(t,e,n=+new Date){return t===null||e===void 0||e<0?!0:e===0?!1:t+e<=n}function rE(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return oi(t.started,e,r)||oi(t.lastActivity,n,r)}function Br(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!(!rE(t,{sessionIdleExpire:e,maxReplayDuration:n})||t.sampled==="buffer"&&t.segmentId===0)}function Ms({sessionIdleExpire:t,maxReplayDuration:e,previousSessionId:n},r){const s=r.stickySession&&nE();return s?Br(s,{sessionIdleExpire:t,maxReplayDuration:e})?(w&&k.infoTick("Session in sessionStorage is expired, creating new one..."),wa(r,{previousSessionId:s.id})):s:(w&&k.infoTick("Creating new session"),wa(r,{previousSessionId:n}))}function sE(t){return t.type===B.Custom}function Vi(t,e,n){return fl(t,e)?(dl(t,e,n),!0):!1}function iE(t,e,n){return fl(t,e)?dl(t,e,n):Promise.resolve(null)}async function dl(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=oE(e,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){if(!t.isEnabled())return t.handleException(i),null;const o=i&&i instanceof ji,c=o?"eventBufferOverflow":"eventBufferError",a=P();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 fl(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=zi(e.timestamp);return n+t.timeouts.sessionIdlePause<Date.now()?!1:n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration?(w&&k.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function oE(t,e){try{if(typeof e=="function"&&sE(t))return e(t)}catch(n){return w&&k.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}const ka=100;function pl(t,e,n){const r=t.getContext();e&&r.traceIds.size<ka&&r.traceIds.add(e),n&&r.segmentNames.size<ka&&r.segmentNames.add(n)}function aE(t){return e=>{t.isEnabled()&&pl(t,e.trace_id,e.name||void 0)}}function Yi(t){return!t.type}function ai(t){return t.type==="transaction"}function cE(t){return t.type==="replay_event"}function Ra(t){return t.type==="feedback"}function uE(t){return(e,n)=>{if(!t.isEnabled()||!Yi(e)&&!ai(e))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(ai(e)){lE(t,e);return}dE(t,e)}}}function lE(t,e){pl(t,e.contexts?.trace?.trace_id,e.transaction)}function dE(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)||Zn(async()=>{try{await t.sendBufferedReplayOrFlush()}catch(s){t.handleException(s)}})}function fE(t){return e=>{!t.isEnabled()||!Yi(e)||pE(t,e)}}function pE(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=Pt({category:"replay.hydrate-error",data:{url:Le()}});tr(t,r)}}function hE(t){const e=P();e&&e.on("beforeAddBreadcrumb",n=>mE(t,n))}function mE(t,e){if(!t.isEnabled()||!hl(e))return;const n=gE(e);n&&tr(t,n)}function gE(t){return!hl(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:t.category==="console"?_E(t):Pt(t)}function _E(t){const e=t.data?.arguments;if(!Array.isArray(e)||e.length===0)return Pt(t);let n=!1;const r=e.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>ur?(n=!0,`${s.slice(0,ur)}â¦`):s;if(typeof s=="object")try{const i=Nt(s,7);return JSON.stringify(i).length>ur?(n=!0,`${JSON.stringify(i,null,2).slice(0,ur)}â¦`):i}catch{}return s});return Pt({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function hl(t){return!!t.category}function SE(t,e){return t.type||!t.exception?.values?.length?!1:!!e.originalException?.__rrweb__}function $r(){const t=G().getPropagationContext().dsc;t&&delete t.replay_id;const e=mt();if(e){const n=fe(e);delete n.replay_id}}function Ca(t){const e=G().getPropagationContext().dsc;e&&(e.replay_id=t);const n=mt();if(n){const r=fe(n);r.replay_id=t}}function yE(t,e){t.triggerUserActivity(),t.addUpdate(()=>e.timestamp?(t.throttledAddEvent({type:B.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 EE(t,e){return t.recordingMode!=="buffer"||e.message===Pi||!e.exception||e.type?!1:ul(t.getOptions().errorSampleRate)}function bE(t){return Object.assign((e,n)=>{if(t.session&&Br(t.session,{maxReplayDuration:t.getOptions().maxReplayDuration,sessionIdleExpire:t.timeouts.sessionIdleExpire})&&$r(),!t.isEnabled()||t.isPaused())return e;if(cE(e))return delete e.breadcrumbs,e;if(!Yi(e)&&!ai(e)&&!Ra(e))return e;if(!t.checkAndHandleExpiredSession())return $r(),e;if(Ra(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),yE(t,e),e;if(SE(e,n)&&!t.getOptions()._experiments.captureExceptions)return w&&k.log("Ignoring error from rrweb internals",e),null;const s=EE(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&&os(o)}return e},{id:"Replay"})}function as(t,e){return e.map(({type:n,start:r,end:s,name:i,data:o})=>{const c=t.throttledAddEvent({type:B.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 vE(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 TE(t){return e=>{if(!t.isEnabled())return;const n=vE(e);n!==null&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(as(t,[n]),!1)))}}function IE(t,e){return w&&t.getOptions()._experiments.traceInternals?!1:Wp(e,P())}
23function ml(t,e){t.isEnabled()&&e!==null&&(IE(t,e.name)||t.addUpdate(()=>(as(t,[e]),!0)))}function cs(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=Au(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch{}}function gl(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Ur(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 _l(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 Dn(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function ne(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}=wE(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function ci(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 wE(t){if(!t||typeof t!="string")return{body:t};const e=t.length>oa,n=kE(t);if(e){const r=t.slice(0,oa);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 kE(t){const e=t[0],n=t[t.length-1];return e==="["&&n==="]"||e==="{"&&n==="}"}function Hr(t,e){const n=RE(t);return Ft(n,e)}function RE(t,e=Z.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(Z.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 CE(t,e,n){try{const r=await xE(t,e,n),s=_l("resource.fetch",r);ml(n.replay,s)}catch(r){w&&k.exception(r,"Failed to capture fetch breadcrumb")}}function AE(t,e){const{input:n,response:r}=e,s=n?Mu(n):void 0,i=cs(s),o=r?gl(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 xE(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=Hr(o,n.networkDetailAllowUrls)&&!Hr(o,n.networkDetailDenyUrls),f=l?ME(n,e.input,u):Dn(u),p=await NE(l,n,e.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:f,response:p}}function ME({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?DE(n,e):{};if(!t)return ne(s,r,void 0);const i=Mu(n),[o,c]=xu(i,k),a=ne(s,r,o);return c?Ur(a,c):a}async function NE(t,{networkCaptureBodies:e,networkResponseHeaders:n},r,s){if(!t&&s!==void 0)return Dn(s);const i=r?Sl(r.headers,n):{};if(!r||!e&&s!==void 0)return ne(i,s,void 0);const[o,c]=await LE(r),a=OE(o,{networkCaptureBodies:e,responseBodySize:s,captureDetails:t,headers:i});return c?Ur(a,c):a}function OE(t,{networkCaptureBodies:e,responseBodySize:n,captureDetails:r,headers:s}){try{const i=t?.length&&n===void 0?cs(t):n;return r?e?ne(s,i,t):ne(s,i,void 0):Dn(i)}catch(i){return w&&k.exception(i,"Failed to serialize response body"),ne(s,n,void 0)}}async function LE(t){const e=PE(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{return[await FE(e)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(w&&k.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(w&&k.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Sl(t,e){const n={};return e.forEach(r=>{t.get(r)&&(n[r]=t.get(r))}),n}function DE(t,e){return t.length===1&&typeof t[0]!="string"?Aa(t[0],e):t.length===2?Aa(t[1],e):{}}function Aa(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Sl(n,e):Array.isArray(n)?{}:ci(n,e):{}}function PE(t){try{return t.clone()}catch(e){w&&k.exception(e,"Failed to clone response body")}}
23function FE(t){return new Promise((e,n)=>{const r=Zn(()=>n(new Error("Timeout while trying to read response body")),500);BE(t).then(s=>e(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function BE(t){return await t.text()}async function $E(t,e,n){try{const r=HE(t,e,n),s=_l("resource.xhr",r);ml(n.replay,s)}catch(r){w&&k.exception(r,"Failed to capture xhr breadcrumb")}}function UE(t,e){const{xhr:n,input:r}=e;if(!n)return;const s=cs(r),i=n.getResponseHeader("content-length")?gl(n.getResponseHeader("content-length")):qE(n.response,n.responseType);s!==void 0&&(t.data.request_body_size=s),i!==void 0&&(t.data.response_body_size=i)}function HE(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:f}=t.data;if(!a)return null;if(!c||!Hr(a,n.networkDetailAllowUrls)||Hr(a,n.networkDetailDenyUrls)){const x=Dn(l),g=Dn(f);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:x,response:g}}const p=c[Te],h=p?ci(p.request_headers,n.networkRequestHeaders):{},m=ci(Nu(c),n.networkResponseHeaders),[S,y]=n.networkCaptureBodies?xu(o,k):[void 0],[R,O]=n.networkCaptureBodies?WE(c):[void 0],L=ne(h,l,S),K=ne(m,f,R);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:y?Ur(L,y):L,response:O?Ur(K,O):K}}function WE(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return zE(t.response,t.responseType)}catch(n){e.push(n)}return w&&k.warn("Failed to get xhr response body",...e),[void 0]}function zE(t,e){try{if(typeof t=="string")return[t];if(t instanceof Document)return[t.body.outerHTML];if(e==="json"&&Pe(t))return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return w&&k.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return w&&k.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qE(t,e){try{const n=e==="json"&&Pe(t)?JSON.stringify(t):t;return cs(n)}catch{return}}function jE(t){const e=P();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)=>GE(c,a,u))}catch{}}function GE(t,e,n){if(e.data)try{VE(e)&&KE(n)&&(UE(e,n),$E(e,n,t)),YE(e)&&XE(n)&&(AE(e,n),CE(e,n,t))}catch(r){w&&k.exception(r,"Error when enriching network breadcrumb")}}function VE(t){return t.category==="xhr"}function YE(t){return t.category==="fetch"}function KE(t){return t?.xhr}function XE(t){return t?.input!==void 0}function JE(t){const e=P();ku(ky(t)),es(TE(t)),hE(t),jE(t);const n=bE(t);tp(n),e&&(e.on("beforeSendEvent",fE(t)),e.on("afterSendEvent",uE(t)),e.on("createDsc",r=>{const s=t.getSessionId();s&&t.isEnabled()&&t.recordingMode==="session"&&t.checkAndHandleExpiredSession()&&(r.replay_id=s)}),e.on("processSegmentSpan",aE(t)),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 ZE(t){try{return Promise.all(as(t,[QE(Z.performance.memory)]))}catch{return[]}}function QE(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 tb(t,e,n){return Of(t,e,{...n,setTimeoutImpl:Zn})}const pr=D.navigator;function eb(){return/iPhone|iPad|iPod/i.test(pr?.userAgent??"")||/Macintosh/i.test(pr?.userAgent??"")&&pr?.maxTouchPoints&&pr?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function nb(t){let e=!1;return(n,r)=>{try{if(!t.checkAndHandleExpiredSession()){w&&k.warn("Received replay event after session expired.");return}const s=r||!e;e=!0,rb(n),t.clickDetector&&by(t.clickDetector,n),t.addUpdate(()=>{if(t.recordingMode==="buffer"&&s&&t.setInitialState(),!Vi(t,n,s))return!0;
23if(!s)return!1;const i=t.session;if(ib(t,s),t.recordingMode==="buffer"&&i&&t.eventBuffer&&!i.dirty){const o=t.eventBuffer.getEarliestTimestamp();o&&(w&&k.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,t.getOptions().stickySession&&os(i))}return i?.previousSessionId||t.recordingMode==="session"&&t.flush(),!0})}catch(s){t.handleException(s)}}}function rb(t){const e=t.data;if(!(t.type!==B.IncrementalSnapshot||!e||typeof e!="object"||!("source"in e)||e.source!==A.Mutation||!("attributes"in e)||!Array.isArray(e.attributes)))for(const n of e.attributes){const r=Lt.mirror.getNode(n.id),s=r&&Lt.mirror.getMeta(r);if(s?.type===is.Element)for(const[i,o]of Object.entries(n.attributes))o===null?delete s.attributes[i]:s.attributes[i]=o}}function sb(t){const e=t.getOptions();return{type:B.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 ib(t,e){!e||t.session?.segmentId!==0||Vi(t,sb(t),!1)}function ob(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch{return null}}function ab(t,e,n,r){return pe(Oc(t,Ei(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:typeof e=="string"?new TextEncoder().encode(e).length:e.length},e]])}function cb({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 ub({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,yt());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 lb({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=cb({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,segmentNames:d,initialTimestamp:l}=r,f=P(),p=G(),h=f?.getTransport(),m=f?.getDsn();if(!f||!h||!m||!i.sampled)return Promise.resolve({});const S={type:P_,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,segment_names:d,urls:c,replay_id:e,segment_id:n,replay_type:i.sampled},y=await ub({scope:p,client:f,replayId:e,event:S});if(!y)return f.recordDroppedEvent("event_processor","replay"),w&&k.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const R=ab(y,o,m,f.getOptions().tunnel);let O;try{O=await h.send(R)}catch(K){const x=new Error(Pi);try{x.cause=K}catch{}throw x}const L=Yc({},O);if(Vc(L,"replay"))throw new Ki(L);if(typeof O.statusCode=="number"&&(O.statusCode<200||O.statusCode>=300))throw new yl(O.statusCode);return O}class yl extends Error{constructor(e){super(`Transport returned status code ${e}`)}}
24class Ki extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class xa extends Error{constructor(){super("Session is too long, not sending replay")}}async function El(t,e={count:0,interval:W_}){const{recordingData:n,onError:r}=t;if(n.length)try{return await lb(t),!0}catch(s){if(s instanceof yl||s instanceof Ki)throw s;if(Uc("Replays",{_retryCount:e.count}),r&&r(s),e.count>=z_){const i=new Error(`${Pi} - max retries exceeded`);try{i.cause=s}catch{}throw i}return e.interval*=++e.count,new Promise((i,o)=>{Zn(async()=>{try{await El(t,e),i(!0)}catch(c){o(c)}},e.interval)})}}const bl="__THROTTLED",db="__SKIPPED";function fb(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?db:bl}o=!1;const u=r.get(a)||0;return r.set(a,u+1),t(...c)}}class pb{constructor({options:e,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:F_,sessionIdleExpire:B_},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=e,this._debouncedFlush=tb(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=fb((o,c)=>iE(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(q_,r),timeout:r,scrollTimeout:j_,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new _y(this,i)),w){const o=e._experiments;k.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{Z.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=Pt({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=Pt({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{xy(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){w&&k.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){w&&k.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",w&&k.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){w&&k.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){w&&k.log("Buffering is in progress, call `flush()` to save the replay");return}w&&k.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Ms({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){w&&k.log("Buffering is in progress, call `flush()` to save the replay");return}w&&k.infoTick("Starting replay in buffer mode");const e=Ms({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=Lt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:H_}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:nb(this),...eb(),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";P()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{w&&k.log(`Stopping Replay triggered by ${r}`),$r(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Qy(this)}catch(s){this.handleException(s)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),w&&k.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),w&&k.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();w&&k.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(),Ca(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&&oi(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${Z.location.pathname}${Z.location.hash}${Z.location.search}`,n=`${Z.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===bl){const s=Pt({category:"replay.throttled"});this.addUpdate(()=>!Vi(this,{type:ly,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const e=this.lastActiveSpan||mt(),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=Xy({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&P()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&Ca(this.session.id)}_initializeSessionForSampling(e){const n=this._options.errorSampleRate>0,r=Ms({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 Br(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{Z.document.addEventListener("visibilitychange",this._handleVisibilityChange),Z.addEventListener("blur",this._handleWindowBlur),Z.addEventListener("focus",this._handleWindowFocus),Z.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(JE(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=zy(this)}_removeListeners(){try{Z.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Z.removeEventListener("blur",this._handleWindowBlur),Z.removeEventListener("focus",this._handleWindowFocus),Z.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;if(Br(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){$r();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}_doChangeToForegroundTasks(e){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){w&&k.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:B.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=Ly(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(as(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.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),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){w&&k.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await ZE(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new xa;const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await El({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=P();if(r){let s;n instanceof Ki?s="ratelimit_backoff":n instanceof xa?s="invalid":s="send_error",r.recordDroppedEvent(s,"replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){w&&k.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){w&&k.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&&w&&k.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&&os(this.session)}_onMutationHandler(e){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&e.some(c=>{const a=ob(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=Pt({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(c)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function hn(t,e){return[...t,...e].join(",")}function hb({mask:t,unmask:e,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=hn(t,[".sentry-mask","[data-sentry-mask]"]),c=hn(e,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:hn(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:hn(r,[]),ignoreSelector:hn(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function mb({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 Ma='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',gb=["content-length","content-type","accept"],_b=Symbol.for("sentry__originalRequestBody");let Na=!1,Oa=!1;function Sb(){if(typeof Request>"u"||Oa)return;const t=Request;try{const e=function(n,r){const s=new t(n,r);return r?.body!=null&&(s[_b]=r.body),s};e.prototype=t.prototype,D.Request=e,Oa=!0}catch{}}const yb=(t=>new Eb(t));class Eb{constructor({flushMinDelay:e=$_,flushMaxDelay:n=U_,minReplayDuration:r=G_,maxReplayDuration:s=aa,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:y=[],networkCaptureBodies:R=!0,networkRequestHeaders:O=[],networkResponseHeaders:L=[],mask:K=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:g=[],block:T=[],unblock:tt=[],ignore:E=[],maskFn:I,beforeAddRecordingEvent:H,beforeErrorSampling:V,onError:$,attachRawBodyFromRequest:it=!1}={}){this.name="Replay";const et=hb({mask:K,unmask:g,block:T,unblock:tt,ignore:E});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(C,v,F)=>mb({maskAttributes:x,maskAllText:u,privacyOptions:et,key:C,value:v,el:F}),...et,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:C=>{try{C.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:n,minReplayDuration:Math.min(r,V_),maxReplayDuration:Math.min(s,aa),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:S,networkDetailDenyUrls:y,networkCaptureBodies:R,networkRequestHeaders:La(O),networkResponseHeaders:La(L),beforeAddRecordingEvent:H,beforeErrorSampling:V,onError:$,attachRawBodyFromRequest:it,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ma}`:Ma,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Ze()
24)throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Na}set _isInitialized(e){Na=e}afterAllSetup(e){!Ze()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Sb(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){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&&(wr(e,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&wr(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const n=bb(this._initialOptions,e);this._replay=new pb({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const n=e.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function bb(t,e){const n=e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...t},s=Ne(n.replaysSessionSampleRate),i=Ne(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 La(t){return[...gb,...t.map(e=>e.toLowerCase())]}function vb(t){return t.split(",").some(e=>e.trim().startsWith("sentry-"))}function vl(t){try{return new URL(t,U.location.origin).href}catch{return}}function Tb(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Tl(t){try{return new Headers(t)}catch{return}}const Il={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ib(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:c,onRequestSpanEnd:a}={...Il,...e},u=typeof s=="function"?s:p=>!0,d=p=>kb(p,o),l={},f=t.getOptions().propagateTraceparent;n&&ki(p=>{const h=kh(p,u,d,l,{propagateTraceparent:f,onRequestSpanEnd:a});if(h){const m=vl(p.fetchData.url),S=m?Ce(m).host:void 0,y=m?Bt(m):void 0;h.setAttributes({"http.url":y,"url.full":y,"server.address":S}),i&&Da(h,t),c?.(h,{headers:p.headers})}}),r&&Cu(p=>{const h=Rb(p,u,d,l,f,a);h&&(i&&Da(h,t),c?.(h,{headers:Tl(p.xhr.__sentry_xhr_v3__?.request_headers)}))})}const wb=300;function Da(t,e){const{url:n}=j(t).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(s)};if(Ut(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,wb)}}const s=De("resource",({entries:i})=>{i.forEach(o=>{Tb(o)&&o.name.endsWith(n)&&(t.setAttributes(Iu(o)),r())})})}function kb(t,e){const n=Le();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?Ft(r.toString(),e)||i&&Ft(r.pathname,e):i}else{const r=!!t.match(/^\/(?!\/)/);return e?Ft(t,e):r}}function Rb(t,e,n,r,s,i){const o=t.xhr,c=o?.[Te];if(!o||o.__sentry_own_request__||!c)return;const{url:a,method:u}=c,d=wt()&&e(a);if(t.endTimestamp){const O=o.__sentry_xhr_span_id__;if(!O)return;const L=r[O];L&&(d&&c.status_code!==void 0&&(uc(L,c.status_code),L.end(),i?.(L,{headers:Tl(Nu(o)),error:t.error})),delete r[O]);return}const l=vl(a),f=Ce(l||a),p=l?Bt(l):void 0,h=Bt(Hp(a)),m=P(),y=!!mt()||!!m&&Ut(m),R=d&&y?he({name:`${u} ${h}`,attributes:{url:Bt(a),type:"xhr","http.method":u,"http.url":p,"url.full":p,"server.address":f?.host,[at]:"auto.http.browser",[Rt]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Oe;return d&&!y&&m?.recordDroppedEvent("no_parent_span","span"),o.__sentry_xhr_span_id__=R.spanContext().spanId,r[o.__sentry_xhr_span_id__]=R,n(a)&&Cb(o,wt()&&y?R:void 0,s),m&&m.emit("beforeOutgoingRequestSpan",R,t),R}function Cb(t,e,n){const{"sentry-trace":r,baggage:s,traceparent:i}=ru({span:e,propagateTraceparent:n});r&&Ab(t,r,s,i)}function Ab(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||!vb(i))&&t.setRequestHeader("baggage",n)}}catch{}}const Pa=new WeakMap,Fa=new WeakMap,xb=9e4,Mb=["text/event-stream","application/x-ndjson","application/stream+json"],Nb=()=>({name:"FetchStreamPerformance",setup(){Ph(t=>{if(t.response){const e=Pa.get(t.response);if(e&&t.endTimestamp){e.end(t.endTimestamp);const n=Fa.get(t.response);n&&clearTimeout(n)}}}),ki(t=>{if(t.endTimestamp&&t.response){const e=t.response.headers?.get("content-type")||"";
24if(t.response.headers?.get("content-length")||!Mb.some(a=>e.startsWith(a)))return;const n=t.fetchData?.url||"",r=t.fetchData?.method||"GET",s=Cn(n),i=n.startsWith("data:")?Bt(n):s?eu(s):n,o=he({name:`${r} ${i}`,startTime:t.endTimestamp,attributes:{url:Bt(n),"http.method":r,type:"fetch",[Rt]:"http.client.stream",[at]:"auto.http.browser.stream"}});Pa.set(t.response,o);const c=setTimeout(()=>{o.isRecording()&&o.end()},xb);Fa.set(t.response,c)}})}}),wl="WebVitals",Ob=(t={})=>{const e=new Set(t.ignore??[]);return{name:wl,setup(n){const r=Ut(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:i}=t._experiments??{},o=r||e.has("cls")?void 0:s||!1,c=r||e.has("lcp")?void 0:i||!1,a=Um({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:c,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",d=>{u.add(d)}),n.on("spanEnd",d=>{u.delete(d)&&(a(),Km(d,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:c===!1,spanStreamingEnabled:r}))}),r?(e.has("lcp")||fg(n),e.has("cls")||hg(n),e.has("inp")||gg()):e.has("inp")||ag()},afterAllSetup(){e.has("inp")||dg()}}};
24function Lb(){U.document?U.document.addEventListener("visibilitychange",()=>{const t=mt();if(!t)return;const e=pt(t);if(U.document.hidden&&e){const n="cancelled",{op:r,status:s}=j(e);kt&&_.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()}}):kt&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Db=3600,kl="sentry_previous_trace",Pb="sentry.previous_trace";function Fb(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r=e==="session-storage";let s=r?Ub():void 0;t.on("spanStart",o=>{if(pt(o)!==o)return;const c=G().getPropagationContext();s=Bb(s,o,c),r&&$b(s)});let i=!0;n&&t.on("beforeSampling",o=>{if(!s)return;const c=G(),a=c.getPropagationContext();if(i&&a.parentSpanId){i=!1;return}c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(s.sampleRate),sampled:String(ui(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=ui(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[ac]:s.sampleRate}})}function Bb(t,e,n){const r=j(e);function s(){try{const c=Number(r.data?.[mi]??n.dsc?.sample_rate);return Number.isNaN(c)?0:c}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<=Db&&(kt&&_.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...e.spanContext()})}\``),e.addLink({context:o,attributes:{[Td]:"previous_trace"}}),e.setAttribute(Pb,`${o.traceId}-${o.spanId}-${ui(o)?1:0}`)),i)}function $b(t){try{U.sessionStorage.setItem(kl,JSON.stringify(t))}catch(e){kt&&_.warn("Could not store previous trace in sessionStorage",e)}}function Ub(){try{const t=U.sessionStorage?.getItem(kl);return JSON.parse(t)}catch{return}}function ui(t){return t.traceFlags===1}const Hb="BrowserTracing",Wb=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function zb(){const t=U.navigator;return t?.userAgent?Wb.test(t.userAgent):!1}const qb={...mr,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Il},jb=((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=U.document,{enableInp:r,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a},beforeStartSpan:u,idleTimeout:d,finalTimeout:l,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:y,enableHTTPTimings:R,ignoreResourceSpans:O,ignorePerformanceApiSpans:L,instrumentPageLoad:K,instrumentNavigation:x,detectRedirects:g,linkPreviousTrace:T,consistentTraceSampling:tt,enableReportPageLoaded:E,onRequestSpanStart:I,onRequestSpanEnd:H}={...qb,...t},V=zb();let $,it;function et(C,v,F=!0,M){const X=v.op==="pageload",nt=v.name,rt=u?u(v):v,gt=Cn(M||Le()),me={...gt?.pathname&&{[rf]:gt.pathname},...gt&&!Vr(gt)&&{[nf]:gt.href},...rt.attributes};if(nt!==rt.name&&(me[Ot]="custom"),rt.attributes=me,!F){const Wt=Fe();he({...rt,startTime:Wt}).end(Wt);return}e.name=rt.name,e.source=me[Ot];const Ht=Pc(rt,{idleTimeout:d,finalTimeout:l,childSpanTimeout:f,disableAutoFinish:X,beforeSpanEnd:Wt=>{Ym(Wt,{ignoreResourceSpans:O,ignorePerformanceApiSpans:L,spanStreamingEnabled:Ut(C)}),Ua(C,void 0);const dn=G(),_e=dn.getPropagationContext();dn.setPropagationContext({..._e,traceId:Ht.spanContext().traceId,sampled:de(Ht),dsc:fe(Wt)}),X&&(it=void 0)},trimIdleSpanEndTimestamp:!E});X&&E&&(it=Ht),Ua(C,Ht);function ge(){n&&["interactive","complete"].includes(n.readyState)&&(C.emit("idleSpanEnableAutoFinish",Ht),n.removeEventListener("readystatechange",ge))}X&&!E&&n&&(n.addEventListener("readystatechange",ge),ge())}return{name:Hb,setup(C){if(V){kt&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(Jd(),i&&D.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Wm():s&&Hm(),o&&zm(),g&&n){const F=()=>{$=ct()};addEventListener("click",F,{capture:!0}),addEventListener("keydown",F,{capture:!0,passive:!0})}function v(){const F=Pn(C);F&&!j(F).timestamp&&(kt&&_.log(`[Tracing] Finishing current active span with op: ${j(F).op}`),F.setAttribute(In,"cancelled"),F.end())}C.on("startNavigationSpan",(F,M)=>
24{if(P()!==C)return;if(M?.isRedirect){kt&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),et(C,{op:"navigation.redirect",...F},!1,M.url);return}$=void 0,v(),yt().setPropagationContext({traceId:Yt(),sampleRand:Math.random(),propagationSpanId:wt()?void 0:jt()});const X=G();X.setPropagationContext({traceId:Yt(),sampleRand:Math.random(),propagationSpanId:wt()?void 0:jt()}),X.setSDKProcessingMetadata({normalizedRequest:void 0}),et(C,{op:"navigation",...F,parentSpan:null,forceTransaction:!0},!0,M?.url)}),C.on("startPageLoadSpan",(F,M={})=>{if(P()!==C)return;v();const X=M.sentryTrace||Ba("sentry-trace")||$a("sentry-trace"),nt=M.baggage||Ba("baggage")||$a("baggage"),rt=zd(X,nt),gt=G();gt.setPropagationContext(rt),wt()||(gt.getPropagationContext().propagationSpanId=jt()),gt.setSDKProcessingMetadata({normalizedRequest:Cr()}),et(C,{op:"pageload",...F})}),C.on("endPageloadSpan",()=>{E&&it&&(it.setAttribute(In,"reportPageLoaded"),it.end())})},afterAllSetup(C){if(V)return;C.addIntegration&&!C.getIntegrationByName?.(wl)&&C.addIntegration(Ob({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a}}));let v=Le();if(T!=="off"&&Fb(C,{linkPreviousTrace:T,consistentTraceSampling:tt}),U.location){if(K){const F=dt();Gb(C,{name:U.location.pathname,startTime:F?F/1e3:void 0,attributes:{[Ot]:"url",[at]:"auto.pageload.browser"}})}x&&es(({to:F,from:M})=>{if(M===void 0&&v?.indexOf(F)!==-1){v=void 0;return}v=void 0;const X=Cn(F),nt=Pn(C),rt=nt&&g&&Kb(nt,$);Vb(C,{name:X?.pathname||U.location.pathname,attributes:{[Ot]:"url",[at]:"auto.navigation.browser"}},{url:F,isRedirect:rt})})}p&&Lb(),o&&Yb(C,d,l,f,e),Ib(C,{traceFetch:h,traceXHR:m,tracePropagationTargets:C.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:R,onRequestSpanStart:I,onRequestSpanEnd:H}),S&&C.addIntegration(Nb())}}});function Gb(t,e,n){t.emit("startPageLoadSpan",e,n),G().setTransactionName(e.name);const r=Pn(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function Vb(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s,url:r}),t.emit("startNavigationSpan",e,{isRedirect:s,url:r});const i=G();return i.setTransactionName(e.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...Cr(),url:r}}),Pn(t)}function Ba(t){return U.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function $a(t){return U.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===t)?.description}function Yb(t,e,n,r,s){const i=U.document;let o;const c=()=>{const a="ui.action.click",u=Pn(t);if(u){const d=j(u).op;if(["navigation","pageload"].includes(d)){kt&&_.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(In,"interactionInterrupted"),o.end(),o=void 0),!s.name){kt&&_.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Pc({name:s.name,op:a,attributes:{[Ot]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",c,{capture:!0})}const Rl="_sentry_idleSpan";function Pn(t){return t[Rl]}function Ua(t,e){ht(t,Rl,e)}const Ha=1.5;function Kb(t,e){const n=j(t),r=Fe(),s=n.start_timestamp;return!(r-s>Ha||e&&r-e<=Ha)}function Xb(t){return vn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Jb(t){const e={...t};nu(e,"react"),Uc("react",{version:Ml.version});const n=D_(e);return Qa(Zb),n}function Zb(t){return Xb(t)?"[SyntheticEvent]":Du(t)}const Qb=/(authorization|cookie|token|secret|password|passwd|ssn|social|account|routing|card|stripe|supabase|key|les|document|pdf|body|raw|content|file|url)/i;function we(t,e=0){return e>4?"[Scrubbed]":Array.isArray(t)?t.map(n=>we(n,e+1)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Qb.test(n)?"[Scrubbed]":we(r,e+1)])):t}function Cl(t){if(!t)return t;try{const e=new URL(t,window.location.origin);return e.search=e.search?"?redacted=1":"",e.hash="",e.toString()}catch{return t.split("?")[0]?.split("#")[0]}}const tv="https://3ed74f5258fdba8e67e0ac8c91172d5a@o4511328719667200.ingest.us.sentry.io/4511328788545536",ev=[/Failed to fetch dynamically imported module/i,/Importing a module script failed/i,/Error loading route module `\/assets\//i],nv=[/(?:TypeError|AuthRetryableFetchError)[\s\S]*(?:Load failed|Failed to fetch)\s*\([^)]*\.supabase\.co\)/i,/AuthApiError[\s\S]*Invalid Refresh Token[\s\S]*
24Refresh Token Not Found/i,/TypeError[\s\S]*(?:Load failed|Failed to fetch)\s*\(milmoney-server\.fly\.dev\)/i,/TypeError[\s\S]*(?:Load failed|Failed to fetch)\s*\(milbudget\.app\)/i],rv=/(?:Error:\s*525|AuthApiError[\s\S]*\b525\b)/i,sv=/Failed to fetch manifest patches/i,iv=/\b(?:Error:\s*)?5\d{2}\b/i,ov=/Error invoking (?:enableButtonsClickedMetaDataLogging|postMessage):\s*Java object is gone/i,av=/^iabjs:\/\/navigation_performance_logger_android/i,cv=new Set(["auto.browser.global_handlers.onerror","auto.browser.browserapierrors.addEventListener"]);function uv(t){const e=[t.message];for(const n of t.exception?.values??[])e.push(n.type,n.value);return e.filter(Boolean).join(` 25`)}function lv(t){if(t.logger!=="console")return!1;const e=t.contexts?.browser,n=typeof e?.name=="string"?e.name:t.tags?.browser;return typeof n!="string"||!/Mobile Safari/i.test(n)?!1:(t.exception?.values??[]).some(r=>r.type==="TypeError"&&r.value==="Load failed"&&r.mechanism?.handled===!0&&r.mechanism.type==="auto.core.capture_console")}function dv(t){return[t.request?.url,t.transaction].some(n=>{if(typeof n!="string")return!1;try{const r=new URL(n,typeof window<"u"?window.location.origin:"https://milbudget.app");return r.pathname==="/login"||r.pathname==="/auth/callback"}catch{const r=n.split("?")[0]?.split("#")[0];return r==="/login"||r==="/auth/callback"}})}function fv(t,e){return t.logger!=="console"||!rv.test(e)||!dv(t)?!1:(t.exception?.values??[]).some(n=>n.mechanism?.handled===!0&&n.mechanism.type==="auto.core.capture_console")}function pv(t,e){return t.logger!=="console"||!sv.test(e)?!1:(t.exception?.values??[]).some(n=>n.mechanism?.handled===!0&&n.mechanism.type==="auto.core.capture_console"&&iv.test(`${n.type??""} 26${n.value??""}`))}function hv(t,e){const n=t.tags?.browser;return typeof n!="string"||!/Instagram/i.test(n)||!ov.test(e)?!1:(t.exception?.values??[]).some(r=>r.mechanism?.handled===!1&&cv.has(r.mechanism.type??"")&&r.stacktrace?.frames?.some(s=>{const i=s.filename;return typeof i=="string"&&av.test(i)}))}function mv(t){const e=uv(t);return lv(t)||fv(t,e)||pv(t,e)||hv(t,e)||[...ev,...nv].some(n=>n.test(e))}function gv(t){return mv(t)?null:(t.request&&(t.request.url=Cl(t.request.url),t.request.headers=we(t.request.headers),t.request.cookies={redacted:"[Scrubbed]"},t.request.data=we(t.request.data)),t.extra=we(t.extra),t.contexts=we(t.contexts),t)}let Wa=!1;function us(){Wa||(Jb({dsn:tv,environment:"production",release:"milbudget-web@49475e45b2ecd2ec24ab669defd3db4d8858455a",integrations:[jb(),yb({maskAllText:!0,blockAllMedia:!0}),mh({levels:["error"]})],tracesSampleRate:.02,replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:gv,beforeBreadcrumb(t){return(t.category==="fetch"||t.category==="xhr")&&(t.data=we(t.data),typeof t.data?.url=="string"&&(t.data.url=Cl(t.data.url))),t}}),Wa=!0)}function Sv(){typeof window>"u"||us()}function yv(t){typeof window>"u"||(us(),jn(t))}function Ev(t,e){typeof window>"u"||(us(),Hn(n=>{n.setLevel("error"),n.setTag("handled","true"),n.setTag("feature",e.feature),n.setTag("operation",e.operation),n.setTag("failure_stage",e.stage),n.setTag("error_code",e.code),e.attemptId&&n.setTag("attempt_id",e.attemptId),n.setContext("handled_failure",{stage:e.stage,code:e.code,status:e.status,attemptId:e.attemptId}),jn(t,{mechanism:{type:"app.handled",handled:!0}})}))}function bv(t){typeof window>"u"||(us(),Zf(t?{id:t}:null))}export{Ev as captureHandledError,yv as captureRouteError,Sv as initBrowserSentry,gv as prepareBrowserSentryEvent,bv as setBrowserSentryUser,mv as shouldDropNoisyBrowserEvent};
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.