PageSourceSearch

https://triathlon.org/events/_nuxt/qj6ErX7K.js

js triathlon.org collected 2026-09-24 09:02:25 UTC 166,910 bytes, 12 lines download raw bytes

1import{d as yn,c as Ye,i as dt,g as rs,r as _n,a as ss,s as Sn,f as Kn,D as P,b as R,e as Fi,h as Pi,j as Yn,k as is,S as os,l as as,m as Bi,u as $e,n as Xn,o as Jn,p as Ui,q as Qn,t as $i,v as Wi,w as Hi,x as cs,y as zi,z as ji,A as us,B as qi,C as Gi,E as we,F as Xe,G as Vi,H as ls,I as kt,J as Xt,K as Ki,L as Zn,M as er,N as Yi,O as Xi,P as Ji,Q as Jt,R as ds,T as It,U as Qi,V as Zi,W as tr,X as q,Y as ne,Z as fs,_ as Ee,$ as Je,a0 as Qt,a1 as hs,a2 as ps,a3 as be,a4 as eo,a5 as ae,a6 as nr,a7 as ms,a8 as rr,a9 as Zt,aa as to,ab as gs,ac as sr,ad as no,ae as ir,af as En,ag as ft,ah as ro,ai as so,aj as H,ak as io,al as he,am as or,an as oo,ao,ap as co,aq as Oe,ar as uo,as as lo,at as bn,au as ys,av as Wt,aw as Tt,ax as vn,ay as fo,az as ar,aA as je,aB as Ae,aC as cr,aD as Ht,aE as ho,aF as _s,aG as Ss,aH as po,aI as wn,aJ as mo,aK as go,aL as ur,aM as yo,aN as _o,aO as kn,aP as So,aQ as Eo,aR as Es,aS as bo,aT as vo,aU as wo,aV as ko,aW as Io,aX as To,aY as bs,aZ as Co,a_ as Ro,a$ as vs,b0 as Mo,b1 as xo,b2 as Oo,b3 as ws,b4 as Ao}from"./JKDaP0K2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ad1e722f-b0e0-40e1-b3cd-d2c979a398ed",e._sentryDebugIdIdentifier="sentry-dbid-ad1e722f-b0e0-40e1-b3cd-d2c979a398ed")}catch{}})();function ks(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const No="7";function Do(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Lo(e){return`${Do(e)}${e.projectId}/envelope/`}function Fo(e,t){const n={sentry_version:No};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Po(e,t,n){return t||`${Lo(e)}?${Fo(e,n)}`}function Bo(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...dt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Uo(e,t,n,r,s){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=yn(r)),Ye(i,[Bo(e,s)])}function en(e,t){const n=t??$o(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Uo(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);Is().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function $o(e){return Is().get(e)}function Is(){return rs("clientToLogBufferMap",()=>new WeakMap)}function Wo(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...dt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ho(e,t,n,r,s){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=yn(r)),Ye(i,[Wo(e,s)])}function Ts(e,t){const n=t??zo(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Ho(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);Cs().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function zo(e){return Cs().get(e)}function Cs(){return rs("clientToMetricBufferMap",()=>new WeakMap)}function Rs(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const In=Symbol.for("SentryBufferFullError");function Tn(e=100){const t=new Set;function n(){return t.size<e}function r(o){t.delete(o)}function s(o){if(!n())return ss(In);const c=o();return t.add(c),c.then(()=>r(c),()=>r(c)),c}function i(o){if(!t.size)return _n(!0);const c=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return c;const a=[c,new Promise(u=>Rs(setTimeout(()=>u(!1),o)))];return Promise.race(a)}return{get $(){return Array.from(t)},add:s,drain:i}}const jo=60*1e3;function qo(e,t=Sn()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?jo:r-t}function Go(e,t){return e[t]||e.all||0}function Ms(e,t,n=Sn()){return Go(e,t)>n}function xs(e,{statusCode:t,headers:n},r=Sn()){const s={...e},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const c of i.trim().split(",")){const[a,u,,,d]=c.split(":",5),l=parseInt(a,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else o?s.all=r+qo(o,r):t===429&&(s.all=r+60*1e3);return s}const Os=64;function Vo(e,t,n=Tn(e.bufferSize||Os)){let r={};const s=o=>n.drain(o);function i(o){const c=[];if(Kn(o,(l,f)=>{const h=Yn(f);
1Ms(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):c.push(l)}),c.length===0)return Promise.resolve({});const a=Ye(o[0],c),u=l=>{if(Pi(a,["client_report"])){P&&R.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Kn(a,(f,h)=>{e.recordDroppedEvent(l,Yn(h))})},d=()=>t({body:Fi(a)}).then(l=>l.statusCode===413?(P&&R.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(P&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&R.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=xs(r,l),l),l=>{throw u("network_error"),P&&R.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===In)return P&&R.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:i,flush:s}}function Ko(e,t,n){const r=[{type:"client_report"},{timestamp:is(),discarded_events:e}];return Ye(t?{dsn:t}:{},[r])}function As(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Yo(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:c}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o?.[as],exclusive_time:o?.[os],measurements:e.measurements,is_segment:!0}}function Xo(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[as]:e.profile_id},...e.exclusive_time&&{[os]:e.exclusive_time}}}},measurements:e.measurements}}const lr="Not capturing exception because it's already been captured.",dr="Discarded session because of missing or non-string release",Ns=Symbol.for("SentryInternalError"),Ds=Symbol.for("SentryDoNotSendEventError"),Jo=5e3;function ct(e){return{message:e,[Ns]:!0}}function zt(e){return{message:e,[Ds]:!0}}function fr(e){return!!e&&typeof e=="object"&&Ns in e}function hr(e){return!!e&&typeof e=="object"&&Ds in e}function pr(e,t,n,r,s){let i=0,o,c=!1;e.on(n,()=>{i=0,clearTimeout(o),c=!1}),e.on(t,a=>{i+=r(a),i>=8e5?s(e):c||(c=!0,o=Rs(setTimeout(()=>{s(e)},Jo)))}),e.on("flush",()=>{s(e)})}class Qo{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Tn(t.transportOptions?.bufferSize??Os),t.dsn?this._dsn=Bi(t.dsn):P&&R.warn("No DSN provided, client will not send events."),this._dsn){const r=Po(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&pr(this,"afterCaptureLog","flushLogs",na,en),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&pr(this,"afterCaptureMetric","flushMetrics",ta,Ts)}captureException(t,n,r){const s=$e();if(Xn(t))return P&&R.log(lr),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:$e(),...r},o=ls(t)?t:String(t),c=kt(t),a=c?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(()=>a.then(u=>this._captureEvent(u,i,s)),c?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=$e();if(n?.originalException&&Xn(n.originalException))return P&&R.log(lr),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},c=o.capturedSpanScope,a=o.capturedSpanIsolationScope,u=mr(t.type);return this._process(()=>this._captureEvent(t,i,c||r,a),u),i.event_id}captureSession(t){this.sendSession(t),Jn(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;
1if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){en(this);const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Ui(this,t,this._integrations),n||Qn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=$i(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=Wi(r,Hi(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=cs}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){P&&R.warn(dr);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){P&&R.warn(dr);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=zi(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;P&&R.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return P&&R.error("Error while sending envelope:",n),{}}return P&&R.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=ji(this,t),Qn(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0,r=!1;for(const a of i)if(a.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Jn(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),us(i,t,n,r,this,s).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:{...c.contexts?.trace,...qi(r)},...c.contexts};const a=Gi(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(t,n={},r=we(),s=Xe()){return P&&tn(t)&&R.log(`Captured error event \`${As(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{P&&(hr(i)?R.log(i.message):fr(i)?R.warn(i.message):R.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,c=Ls(t),a=tn(t),d=`before send for type \`${t.type||"error"}\``,l=typeof o>"u"?void 0:Xt(o);if(a&&typeof l=="number"&&Vi()>l)return this.recordDroppedEvent("sample_rate","error"),ss(zt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=mr(t.type);return this._prepareEvent(t,n,r,s).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),zt("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return h;const m=ea(this,i,h,n);return Zo(m,d)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",f),c){const _=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw zt(`${d} returned \`null\`, will not send event.`)}const p=r.getSession()||s.getSession();if(a&&p&&this._updateSessionFromEvent(p,h),c){const S=h.sdkProcessingMetadata?.spanCountBeforeProcessing||0,_=h.spans?h.spans.length:0,w=S-_;w>0&&this.recordDroppedEvent("before_send","span",w)}const m=h.transaction_info;if(c&&m&&h.transaction!==t.transaction){const S="custom";h.transaction_info={...m,source:S}}return this.sendEvent(h,n),h}).then(null,h=>{throw hr(h)||fr(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),ct(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
2Reason: ${h}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===In&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){P&&R.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){P&&R.log("No outcomes to send");return}if(!this._dsn){P&&R.log("No dsn provided, will not send outcomes");return}P&&R.log("Sending outcomes:",t);const n=Ko(t,this._options.tunnel&&yn(this._dsn));this.sendEnvelope(n)}}function mr(e){return e==="replay_event"?"replay":e||"error"}function Zo(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ji(e))return e.then(r=>{if(!Jt(r)&&r!==null)throw ct(n);return r},r=>{throw ct(`${t} rejected with ${r}`)});if(!Jt(e)&&e!==null)throw ct(n);return e}function ea(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,ignoreSpans:o}=t,c=!Ki(t.beforeSendSpan)&&t.beforeSendSpan;let a=n;if(tn(a)&&s)return s(a,r);if(Ls(a)){if(c||o){const u=Yo(a);if(o?.length&&Zn({description:u.description,op:u.op,attributes:u.data},o))return null;if(c){const d=c(u);d?a=Yi(n,Xo(d)):er()}if(a.spans){const d=[],l=a.spans;for(const h of l){if(o?.length&&Zn({description:h.description,op:h.op,attributes:h.data},o)){Xi(l,h);continue}
2if(c){const p=c(h);p?d.push(p):(er(),d.push(h))}else d.push(h)}const f=a.spans.length-d.length;f&&e.recordDroppedEvent("before_send","span",f),a.spans=d}}if(i){if(a.spans){const u=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(a,r)}}return a}function tn(e){return e.type===void 0}function Ls(e){return e.type==="transaction"}function ta(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Fs(e.attributes)}function na(e){let t=0;return e.message&&(t+=e.message.length*2),t+Fs(e.attributes)}function Fs(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*gr(n[0]):kt(n)?t+=gr(n):t+=100}),t}function gr(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function ra(e){return ds(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function yr(e){return ra(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function sa(e,t){t.debug===!0&&(P?R.enable():It(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),we().update(t.initialScope);const r=new e(t);return ia(r),r.init(),r}function ia(e){we().setClient(e)}function oa(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return ca(e,n)||aa(e,r)}function aa(e,t){return t?_r(e)===_r(t):!1}function ca(e,t){const n=Qi(e);return!n||Zi(n)||!t?!1:ua(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function ua(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function _r(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function la(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Ps(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:tr})),s.version=tr)}function da(e,t,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,t):0,c=n?.setTimeoutImpl||setTimeout;function a(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function d(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=c(a,t),o&&i===void 0&&(i=c(a,o)),r}return l.cancel=u,l.flush=d,l}const fa=100;function ye(e,t){const n=q(),r=Xe();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=fa}=n.getOptions();if(i<=0)return;const c={timestamp:is(),...e},a=s?It(()=>s(c,t)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,i))}let Sr;const ha="FunctionToString",Er=new WeakMap,pa=(()=>({name:ha,setupOnce(){Sr=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=fs(this),n=Er.has(q())&&t!==void 0?t:this;return Sr.apply(n,e)}}catch{}},setup(e){Er.set(e,!0)}})),ma=ne(pa),ga=[/^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$/],ya="EventFilters",_a=ne((e={})=>{let t;return{name:ya,setup(n){const r=n.getOptions();t=br(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=br(e,i)}return Ea(n,t)?null:n}}}),Sa=ne(((e={})=>({..._a(e),name:"InboundFilters"})));function br(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ga],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ea(e,t){if(e.type){if(e.type==="transaction"&&va(e,t.ignoreTransactions))return P&&R.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
3Event: ${Ee(e)}`),!0}else{if(ba(e,t.ignoreErrors))return P&&R.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
4Event: ${Ee(e)}`),!0;if(Ta(e))return P&&R.warn(`Event dropped due to not having an error message, error type or stacktrace.
5Event: ${Ee(e)}`),!0;if(wa(e,t.denyUrls))return P&&R.warn(`Event dropped due to being matched by \`denyUrls\` option.
6Event: ${Ee(e)}.
7Url: ${ht(e)}`),!0;if(!ka(e,t.allowUrls))return P&&R.warn(`Event dropped due to not being matched by \`allowUrls\` option.
8Event: ${Ee(e)}.
9Url: ${ht(e)}`),!0}return!1}function ba(e,t){return t?.length?As(e).some(n=>Je(n,t)):!1}function va(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Je(n,t):!1}function wa(e,t){if(!t?.length)return!1;const n=ht(e);return n?Je(n,t):!1}function ka(e,t){if(!t?.length)return!0;const n=ht(e);return n?Je(n,t):!0}function Ia(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ht(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Ia(n):null}catch{return P&&R.error(`Cannot extract url for event ${Ee(e)}`),null}}function Ta(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ca(e,t,n,r,s,i){if(!s.exception?.values||!i||!Qt(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=nn(e,t,r,i.originalException,n,s.exception.values,o,0))}function nn(e,t,n,r,s,i,o,c){if(i.length>=n+1)return i;let a=[...i];if(Qt(r[s],Error)){vr(o,c,r);const u=e(t,r[s]),d=a.length;
9wr(u,s,d,c),a=nn(e,t,n,r[s],s,[u,...a],u,d)}return Bs(r)&&r.errors.forEach((u,d)=>{if(Qt(u,Error)){vr(o,c,r);const l=e(t,u),f=a.length;wr(l,`errors[${d}]`,f,c),a=nn(e,t,n,u,s,[l,...a],l,f)}}),a}function Bs(e){return Array.isArray(e.errors)}function vr(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Bs(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function wr(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ra(e){const t="console",n=hs(t,e);return ps(t,Ma),n}function Ma(){"console"in be&&eo.forEach(function(e){e in be.console&&ae(be.console,e,function(t){return nr[e]=t,function(...n){ms("console",{args:n,level:e}),nr[e]?.apply(be.console,n)}})})}function Us(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const xa="Dedupe",Oa=(()=>{let e;return{name:xa,processEvent(t){if(t.type)return t;try{if(Na(t,e))return P&&R.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Aa=ne(Oa);function Na(e,t){return t?!!(Da(e,t)||La(e,t)):!1}function Da(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ws(e,t)||!$s(e,t))}function La(e,t){const n=kr(t),r=kr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ws(e,t)||!$s(e,t))}function $s(e,t){let n=rr(e),r=rr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Ws(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function kr(e){return e.exception?.values?.[0]}const Fa="ConversationId",Pa=(()=>({name:Fa,setup(e){e.on("spanStart",t=>{const n=we().getScopeData(),r=Xe().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:i,data:o,description:c}=Zt(t);if(!i?.startsWith("gen_ai.")&&!o["ai.operationId"]&&!c?.startsWith("ai."))return;t.setAttribute(to,s)}})}})),Ba=ne(Pa);function Hs(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}function Cn(e,t){const n=Rn(e,t),r={type:za(t),value:ja(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ua(e,t,n,r){const i=q()?.getOptions().normalizeDepth,o=Ya(t),c={__serialized__:ro(t,i)};if(o)return{exception:{values:[Cn(e,o)]},extra:c};const a={exception:{values:[{type:En(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Va(t,{isUnhandledRejection:r})}]},extra:c};if(n){const u=Rn(e,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function jt(e,t){return{exception:{values:[Cn(e,t)]}}}function Rn(e,t){const n=t.stacktrace||t.stack||"",r=Wa(t),s=Ha(t);try{return e(n,r,s)}catch{}return[]}const $a=/Minified React error #\d+;/i;function Wa(e){return e&&$a.test(e.message)?1:0}function Ha(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function zs(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function za(e){const t=e?.name;return!t&&zs(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ja(e){const t=e?.message;return zs(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?yr(t.error):yr(e):"No error message"}function qa(e,t,n,r){const s=n?.syntheticException||void 0,i=Mn(e,t,s,r);return ft(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),_n(i)}function Ga(e,t,n="info",r,s){const i=r?.syntheticException||void 0,o=rn(e,t,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),_n(o)}function Mn(e,t,n,r,s){let i;if(gs(t)&&t.error)return jt(e,t.error);if(sr(t)||no(t)){const o=t;if("stack"in t)i=jt(e,t);else{const c=o.name||(sr(o)?"DOMError":"DOMException"),a=o.message?`${c}: ${o.message}`:c;i=rn(e,a,n,r),ir(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return ds(t)?jt(e,t):Jt(t)||En(t)?(i=Ua(e,t,n,s),ft(i,{synthetic:!0}),i):(i=rn(e,t,n,r),ir(i,`${t}`),ft(i,{synthetic:!0}),i)}function rn(e,t,n,r){const s={};if(r&&n){const i=Rn(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),ft(s,{synthetic:!0})}
9if(ls(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Va(e,{isUnhandledRejection:t}){const n=so(e),r=t?"promise rejection":"exception";return gs(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:En(e)?`Event \`${Ka(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ka(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ya(e){return Object.values(e).find(t=>t instanceof Error)}class Xa extends Qo{constructor(t){const n=Ja(t),r=H.SENTRY_SDK_SOURCE||io();Ps(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:c,enableMetrics:a}=this._options,u=a??c?.enableMetrics??!0;H.document&&(i||o||u)&&H.document.addEventListener("visibilitychange",()=>{H.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&en(this),u&&Ts(this))}),s&&this.on("beforeSendSession",la)}eventFromException(t,n){return qa(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Ga(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function Ja(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:H.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Qa=1e3;let Ir,sn,on;function js(e){hs("dom",e),ps("dom",Za)}function Za(){if(!he.document)return;const e=ms.bind(null,"dom"),t=Tr(e,!0);he.document.addEventListener("click",t,!1),he.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=he[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(ae(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=Tr(e);d.handler=l,i.call(this,o,l,a)}d.refCount++}catch{}return i.call(this,o,c,a)}}),ae(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 ec(e){if(e.type!==sn)return!1;try{if(!e.target||e.target._sentryId!==on)return!1}catch{}return!0}function tc(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Tr(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=nc(n);if(tc(n.type,r))return;or(n,"_sentryCaptured",!0),r&&!r._sentryId&&or(r,"_sentryId",$e());
9const s=n.type==="keypress"?"input":n.type;ec(n)||(e({event:n,name:s,global:t}),sn=n.type,on=r?r._sentryId:void 0),clearTimeout(Ir),Ir=he.setTimeout(()=>{on=void 0,sn=void 0},Qa)}}function nc(e){try{return e.target}catch{return null}}const ut={};function qs(e){const t=ut[e];if(t)return t;let n=he[e];if(oo(n))return ut[e]=n.bind(he);const r=he.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ao&&R.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(ut[e]=n.bind(he))}function rc(e){ut[e]=void 0}function Qe(...e){return qs("setTimeout")(...e)}const sc=40;function ic(e,t=qs("fetch")){let n=0,r=0;async function s(i){const o=i.body.length;n+=o,r++;const c={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const a=await t(e.url,c);return{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}}catch(a){throw rc("fetch"),a}finally{n-=o,r--}}return Vo(e,s,Tn(e.bufferSize||sc))}const oc=30,ac=50;function an(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?Oe:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const cc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,uc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,lc=/\((\S*)(?::(\d+))(?::(\d+))\)/,dc=/at (.+?) ?\(data:(.+?),/,fc=e=>{const t=e.match(dc);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=cc.exec(e);if(n){const[,s,i,o]=n;return an(s,Oe,+i,+o)}const r=uc.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const c=lc.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,o]=Gs(r[1]||Oe,r[2]);return an(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},hc=[oc,fc],pc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gc=e=>{const t=pc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=mc.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Oe;return[s,r]=Gs(s,r),an(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},yc=[ac,gc],_c=[hc,yc],Sc=co(..._c),Gs=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Oe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},nt=1024,Ec="Breadcrumbs",bc=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Ec,setup(n){t.console&&Ra(Ic(n)),t.dom&&js(kc(n,t.dom)),t.xhr&&uo(Tc(n)),t.fetch&&lo(Cc(n)),t.history&&bn(Rc(n)),t.sentry&&n.on("beforeSendEvent",wc(n))}}}),vc=ne(bc);function wc(e){return function(n){q()===e&&ye({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ee(n)},{event:n})}}function kc(e,t){return function(r){if(q()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>nt&&(Tt&&R.warn(`\`dom.maxStringLength\` cannot exceed ${nt}, but a value of ${c} was configured. Sentry will use ${nt} instead.`),c=nt),typeof o=="string"&&(o=[o]);try{const u=r.event,d=Mc(u)?u.target:u;s=vn(d,{keyAttrs:o,maxStringLength:c}),i=fo(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};i&&(a.data={"ui.component_name":i}),ye(a,{event:r.event,name:r.name,global:r.global})}}function Ic(e){return function(n){if(q()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Us(n.level),message:ar(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ar(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ye(r,{input:n.args,level:n.level})}}function Tc(e){return function(n){if(q()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[ys];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:Hs(a)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),ye(f,l)}}function Cc(e){return function(n){if(q()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;
9if(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"};e.emit("beforeOutgoingRequestBreadcrumb",o,i),ye(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:Hs(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,c),ye(a,c)}}}function Rc(e){return function(n){if(q()!==e)return;let r=n.from,s=n.to;const i=Wt(H.location.href);let o=r?Wt(r):void 0;const c=Wt(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),ye({category:"navigation",data:{from:r,to:s}})}}function Mc(e){return!!e&&!!e.target}const xc="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".split(","),Oc="BrowserApiErrors",Ac=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Oc,setupOnce(){t.setTimeout&&ae(H,"setTimeout",Cr),t.setInterval&&ae(H,"setInterval",Cr),t.requestAnimationFrame&&ae(H,"requestAnimationFrame",Dc),t.XMLHttpRequest&&"XMLHttpRequest"in H&&ae(XMLHttpRequest.prototype,"send",Lc);const n=t.eventTarget;n&&(Array.isArray(n)?n:xc).forEach(s=>Fc(s,t))}}}),Nc=ne(Ac);function Cr(e){return function(...t){const n=t[0];return t[0]=je(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ae(e)}`}}),e.apply(this,t)}}function Dc(e){return function(t){return e.apply(this,[je(t,{mechanism:{data:{handler:Ae(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Lc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&ae(n,s,function(i){const o={mechanism:{data:{handler:Ae(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=fs(i);return c&&(o.mechanism.data.handler=Ae(c)),je(i,o)})}),e.apply(this,t)}}function Fc(e,t){const r=H[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ae(r,"addEventListener",function(s){return function(i,o,c){try{Pc(o)&&(o.handleEvent=je(o.handleEvent,{mechanism:{data:{handler:Ae(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Bc(this,i,o),s.apply(this,[i,je(o,{mechanism:{data:{handler:Ae(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),c])}}),ae(r,"removeEventListener",function(s){return function(i,o,c){try{const a=o.__sentry_wrapped__;a&&s.call(this,i,a,c)}catch{}return s.call(this,i,o,c)}}))}function Pc(e){return typeof e.handleEvent=="function"}function Bc(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const Uc=ne((e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof H.document>"u"){Tt&&R.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}cr({ignoreDuration:!0}),Ht();const n=Xe();let r=n.getUser();n.addScopeListener(s=>{const i=s.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(Ht(),r=i)}),t==="route"&&bn(({from:s,to:i})=>{s!==i&&(cr({ignoreDuration:!0}),Ht())})}}}),$c="CultureContext",Wc=(()=>({name:$c,preprocessEvent(e){const t=Rr();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Rr();t&&ks(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),Hc=ne(Wc);function Rr(){try{const e=H.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const zc="GlobalHandlers",jc=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:zc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Gc(n),Mr("onerror")),t.onunhandledrejection&&(Vc(n),Mr("onunhandledrejection"))}}}),qc=ne(jc);function Gc(e){ho(t=>{const{stackParser:n,attachStacktrace:r}=Vs();if(q()!==e||_s())return;const{msg:s,url:i,line:o,column:c,error:a}=t,u=Xc(Mn(n,a||s,void 0,r,!1),i,o,c);u.level="error",Ss(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Vc(e){po(t=>{const{stackParser:n,attachStacktrace:r}=Vs();if(q()!==e||_s())return;const s=Kc(t),i=kt(s)?Yc(s):Mn(n,s,void 0,r,!0);i.level="error",Ss(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Kc(e){if(kt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Yc(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Xc(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},c=o.stacktrace=o.stacktrace||{},a=c.frames=c.frames||[];return a.length===0&&a.push({colno:r,lineno:n,filename:Jc(t)??wn(),function:Oe,in_a
9pp:!0}),e}function Mr(e){Tt&&R.log(`Global Handler attached: ${e}`)}function Vs(){return q()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Jc(e){if(!(!mo(e)||e.length===0))return e.startsWith("data:")?`<${go(e,!1)}>`:e}const Qc=ne(()=>({name:"HttpContext",preprocessEvent(e){if(!H.navigator&&!H.location&&!H.document)return;const t=ur(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!H.navigator&&!H.location&&!H.document)return;const t=ur();ks(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}})),Zc="cause",eu=5,tu="LinkedErrors",nu=((e={})=>{const t=e.limit||eu,n=e.key||Zc;return{name:tu,preprocessEvent(r,s,i){const o=i.getOptions();Ca(Cn,o.stackParser,n,t,r,s)}}}),ru=ne(nu);function su(){return iu()?(Tt&&It(()=>{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 iu(){if(typeof H.window>"u")return!1;const e=H;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=wn();return!(H===H.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function Ks(e){return[Sa(),ma(),Ba(),Nc(),vc(),qc(),ru(),Aa(),Qc(),Hc(),Uc()]}function ou(e={}){const t=!e.skipBrowserExtensionCheck&&su();let n=e.defaultIntegrations==null?Ks():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:_o(e.stackParser||Sc),integrations:yo({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ic};return sa(Xa,r)}const U=be,xn="sentryReplaySession",au="replay_event",On="Unable to send Replay",cu=3e5,uu=9e5,lu=5e3,du=5500,fu=6e4,hu=5e3,pu=3,xr=15e4,rt=5e3,mu=3e3,gu=300,An=2e7,yu=4999,_u=5e4,Or=36e5;var Su=Object.defineProperty,Eu=(e,t,n)=>t in e?Su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ar=(e,t,n)=>Eu(e,typeof t!="symbol"?t+"":t,n),V=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(V||{});function bu(e){return e.nodeType===e.ELEMENT_NODE}function We(e){return e?.host?.shadowRoot===e}function He(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function vu(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function wu(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function pt(e){try{const t=e.rules||e.cssRules;return t?vu(Array.from(t,Ys).join("")):null}catch{return null}}function ku(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function Ys(e){let t;if(Tu(e))try{t=pt(e.styleSheet)||wu(e)}catch{}else if(Cu(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=ku(e)),r&&(n=Iu(n)),r||s)return n}return t||e.cssText}function Iu(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Tu(e){return"styleSheet"in e}function Cu(e){return"selectorText"in e}class Xs{constructor(){Ar(this,"idNodeMap",new Map),Ar(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ru(){return new Xs}function Ct({maskInputOptions:e,tagName:t,type:n}
9){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function qe({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ne(e){return e.toLowerCase()}function cn(e){return e.toUpperCase()}const Nr="__rrweb_original__";function Mu(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=Nr in i?i[Nr]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Nn(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ne(t):null}function mt(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Js(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Dr={};function Qs(e){const t=Dr[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Dr[e]=r.bind(window)}function un(...e){return Qs("setTimeout")(...e)}function Zs(...e){return Qs("clearTimeout")(...e)}function ei(e){try{return e.contentDocument}catch{}}let xu=1;const Ou=new RegExp("[^a-z0-9-_:]"),Ge=-2;function Dn(){return xu++}function Au(e){if(e instanceof HTMLFormElement)return"form";const t=Ne(e.tagName);return Ou.test(t)?"div":t}function Nu(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let ke,Lr;const Du=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Lu=/^(?:[a-z+]+:)?\/\//i,Fu=/^www\..*/i,Pu=/^(data:)([^,]*),(.*)/i;function Bu(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let s of n){if(s=s.trim(),!s)continue;const i=s.indexOf(":");if(i===-1){r.push(s);continue}const o=s.slice(0,i).trim();t.has(o)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function gt(e,t){return(e||"").replace(Du,(n,r,s,i,o,c)=>{const a=s||o||c,u=r||i||"";if(!a)return n;if(Lu.test(a)||Fu.test(a))return`url(${u}${a}${u})`;if(Pu.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Nu(t)+a}${u})`;const d=t.split("/"),l=a.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const Uu=/^[^ \t\n\r\u000c]+/,$u=/^[, \t\n\r\u000c]+/;function Wu(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const c=i.exec(t.substring(n));return c?(o=c[0],n+=o.length,o):""}const s=[];for(;r($u),!(n>=t.length);){let i=r(Uu);if(i.slice(-1)===",")i=Ce(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Ce(e,i);let c=!1;for(;;){const a=t.charAt(n);if(a===""){s.push((i+o).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((i+o).trim());break}else a==="("&&(c=!0);o+=a,n+=1}}}return s.join(", ")}const Fr=new WeakMap;function Ce(e,t){return!t||t.trim()===""?t:Rt(e,t)}function Hu(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Rt(e,t){let n=Fr.get(e);if(n||(n=e.createElement("a"),Fr.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function ti(e,t,n,r,s,i,o){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Ce(e,r);if(n==="xlink:href"&&r[0]!=="#")return Ce(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Ce(e,r);if(n==="srcset")return Wu(e,r);if(n==="style"){let c=gt(r,Rt(e));return o&&o.size>0&&(c=Bu(c,o)),c}else if(t==="object"&&n==="data")return Ce(e,r);return typeof i=="function"?i(n,r,s):r}function ni(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function zu(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function ju(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ve(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ve(e.parentNode,t,n,r+1)}function Re(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(ju(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function De(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let c=-1,a=-1;if(i){if(a=ve(o,Re(r,s)),a<0)return!0;c=ve(o,Re(t,n),a>=0?a:1/0)}else{if(c=ve(o,Re(t,n)),c<0)return!1;a=ve(o,Re(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function qu(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const c=un(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Zs(c),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return un(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Gu(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;
9const i=un(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Zs(i),r=!0,t()})}function Vu(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:S,dataURLOptions:_={},inlineImages:w,recordCanvas:L,keepIframeSrcFn:A,newlyAddedElement:$=!1,ignoreCSSAttributes:C}=t,g=Ku(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:V.Document,childNodes:[],compatMode:e.compatMode}:{type:V.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:V.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Xu(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:p,maskInputFn:S,dataURLOptions:_,inlineImages:w,recordCanvas:L,keepIframeSrcFn:A,newlyAddedElement:$,rootId:g,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,ignoreCSSAttributes:C});case e.TEXT_NODE:return Yu(e,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:S,rootId:g});case e.CDATA_SECTION_NODE:return{type:V.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:V.Comment,textContent:e.textContent||"",rootId:g};default:return!1}}function Ku(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Yu(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=pt(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}f=gt(f,Rt(t.doc))}p&&(f="SCRIPT_PLACEHOLDER");const S=De(e,r,i,s,o,n);if(!h&&!p&&!m&&f&&S&&(f=c?c(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(a.textarea||S)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const _=Ct({type:null,tagName:l,maskInputOptions:a});f=qe({isMasked:De(e,r,i,s,o,_),element:e,value:f,maskInputFn:u})}return{type:V.Text,textContent:f||"",isStyle:h,rootId:d}}function Xu(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskTextClass:S,unmaskTextClass:_,maskTextSelector:w,unmaskTextSelector:L,ignoreCSSAttributes:A}=t,$=zu(e,r,s,i),C=Au(e);let g={};const M=e.attributes.length;for(let y=0;y<M;y++){const k=e.attributes[y];k.name&&!ni(C,k.name,k.value)&&(g[k.name]=ti(n,C,Ne(k.name),k.value,e,a,A))}if(C==="link"&&o){const y=Array.from(n.styleSheets).find(F=>F.href===e.href);let k=null;y&&(k=pt(y)),k&&(g.rel=null,g.href=null,g.crossorigin=null,g._cssText=gt(k,y.href))}if(C==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const y=pt(e.sheet);y&&(g._cssText=gt(y,Rt(n)))}if(C==="input"||C==="textarea"||C==="select"||C==="option"){const y=e,k=Nn(y),F=mt(y,cn(C),k),j=y.checked;if(k!=="submit"&&k!=="button"&&F){const G=De(y,S,w,_,L,Ct({type:k,tagName:cn(C),maskInputOptions:c}));g.value=qe({isMasked:G,element:y,value:F,maskInputFn:u})}j&&(g.checked=j)}if(C==="option"&&(e.selected&&!c.select?g.selected=!0:delete g.selected),C==="canvas"&&f){if(e.__context==="2d")Mu(e)||(g.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const y=e.toDataURL(d.type,d.quality),k=n.createElement("canvas");k.width=e.width,k.height=e.height;const F=k.toDataURL(d.type,d.quality);y!==F&&(g.rr_dataURL=y)}}if(C==="img"&&l){ke||(ke=n.createElement("canvas"),Lr=ke.getContext("2d"));const y=e,k=y.currentSrc||y.getAttribute("src")||"<unknown-src>",F=y.crossOrigin,j=()=>{y.removeEventListener("load",j);
9try{ke.width=y.naturalWidth,ke.height=y.naturalHeight,Lr.drawImage(y,0,0),g.rr_dataURL=ke.toDataURL(d.type,d.quality)}catch(G){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?j():y.addEventListener("load",j);return}else console.warn(`Cannot inline img src=${k}! Error: ${G}`)}y.crossOrigin==="anonymous"&&(F?g.crossOrigin=F:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?j():y.addEventListener("load",j)}if((C==="audio"||C==="video")&&(g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),$){const{width:y,height:k}=e.getBoundingClientRect();g={class:g.class,rr_width:`${y}px`,rr_height:`${k}px`}}C==="iframe"&&!h(g.src)&&(!$&&!ei(e)&&(g.rr_src=g.src),delete g.src);let K;try{customElements.get(C)&&(K=!0)}catch{}return{type:V.Element,tagName:C,attributes:g,childNodes:[],isSVG:Hu(e)||void 0,needBlock:$,rootId:m,isCustom:K}}function B(e){return e==null?"":e.toLowerCase()}function Ju(e,t){if(t.comment&&e.type===V.Comment)return!0;if(e.type===V.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Js(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(B(e.attributes.name).match(/^msapplication-tile(image|color)$/)||B(e.attributes.name)==="application-name"||B(e.attributes.rel)==="icon"||B(e.attributes.rel)==="apple-touch-icon"||B(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&B(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(B(e.attributes.property).match(/^(og|twitter|fb):/)||B(e.attributes.name).match(/^(og|twitter):/)||B(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(B(e.attributes.name)==="robots"||B(e.attributes.name)==="googlebot"||B(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(B(e.attributes.name)==="author"||B(e.attributes.name)==="generator"||B(e.attributes.name)==="framework"||B(e.attributes.name)==="publisher"||B(e.attributes.name)==="progid"||B(e.attributes.property).match(/^article:/)||B(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(B(e.attributes.name)==="google-site-verification"||B(e.attributes.name)==="yandex-verification"||B(e.attributes.name)==="csrf-token"||B(e.attributes.name)==="p:domain_verify"||B(e.attributes.name)==="verify-v1"||B(e.attributes.name)==="verification"||B(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Me(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOMOptions:w,dataURLOptions:L={},inlineImages:A=!1,recordCanvas:$=!1,onSerialize:C,onIframeLoad:g,iframeLoadTimeout:M=5e3,onBlockedImageLoad:K,onStylesheetLoad:y,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:F=()=>!1,newlyAddedElement:j=!1,ignoreCSSAttributes:G}=t;let{preserveWhiteSpace:re=!0}=t;const X=Vu(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,dataURLOptions:L,inlineImages:A,recordCanvas:$,keepIframeSrcFn:F,newlyAddedElement:j,ignoreCSSAttributes:G});if(!X)return console.warn(e,"not serialized"),null;let J;r.hasNode(e)?J=r.getId(e):Ju(X,w)||!re&&X.type===V.Text&&!X.isStyle&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?J=Ge:J=Dn();const T=Object.assign(X,{id:J});if(r.add(e,T),J===Ge)return null;C&&C(e);let te=!f;if(T.type===V.Element){te=te&&!T.needBlock;const W=e.shadowRoot;W&&He(W)&&(T.isShadowHost=!0)}if((T.type===V.Document||T.type===V.Element)&&te){w.headWhitespace&&T.type===V.Element&&T.tagName==="head"&&(re=!1);const W={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOMOptions:w,dataURLOptions:L,inlineImages:A,recordCanvas:$,preserveWhiteSpace:re,onSerialize:C,onIframeLoad:g,iframeLoadTimeout:M,onBlockedImageLoad:K,onStylesheetLoad:y,stylesheetLoadTimeout:k,keepIframeSrcFn:F,ignoreCSSAttributes:G},ue=e.childNodes?Array.from(e.childNodes):[];for(const le of ue){const se=Me(le,W);se&&T.childNodes.push(se)}if(bu(e)&&e.shadowRoot)for(const le of Array.from(e.shadowRoot.childNodes)){const se=Me(le,W);se&&(He(e.shadowRoot)&&(se.isShadow=!0),T.childNodes.push(se))}}if(e.parentNode&&We(e.parentNode)&&He(e.parentNode)&&(T.isShadow=!0),T.type===V.Element&&T.tagName==="iframe"&&!T.needBlock&&qu(e,()=>{const W=ei(e);if(W&&g){const ue=Me(W,{doc:W,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOMOptions:w,dataURLOptions:L,inlineImages:A,recordCanvas:$,preserveWhiteSpace:re,onSerialize:C,onIframeLoad:g,iframeLoadTimeout:M,onStylesheetLoad:y,stylesheetLoadTimeout:k,keepIframeSrcFn:F,ignoreCSSAttributes:G});ue&&g(e,ue)}},M),T.type===V.Element&&T.tagName==="img"&&!e.complete&&T.needBlock){const W=e,ue=()=>{if(W.isConnected&&!W.complete&&K)try{const le=W.getBoundingClientRect();le.width>0&&le.height>0&&K(W,T,le)}catch{}W.removeEventListener("load",ue)};W.isConnected&&W.addEventListener("load",ue)}return T.type===V.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Js(T.attributes.href)==="css")&&Gu(e,()=>{if(y){const W=Me(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOMOptions:w,dataURLOptions:L,inlineImages:A,recordCanvas:$,preserveWhiteSpace:re,onSerialize:C,onIframeLoad:g,iframeLoadTimeout:M,onStylesheetLoad:y,stylesheetLoadTimeout:k,keepIframeSrcFn:F,ignoreCSSAttributes:G});W&&y(e,W)}},k),T.type===V.Element&&delete T.needBlock,T}function Qu(e,t){const{mirror:n=new Xs,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:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOM:w=!1,dataURLOptions:L,preserveWhiteSpace:A,onSerialize:$,onIframeLoad:C,iframeLoadTimeout:g,onBlockedImageLoad:M,onStylesheetLoad:K,stylesheetLoadTimeout:y,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:F=new Set([])}=t||{};return Me(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:m,maskTextFn:S,maskInputFn:_,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
9:w===!1?{}:w,dataURLOptions:L,inlineImages:f,recordCanvas:h,preserveWhiteSpace:A,onSerialize:$,onIframeLoad:C,iframeLoadTimeout:g,onBlockedImageLoad:M,onStylesheetLoad:K,stylesheetLoadTimeout:y,keepIframeSrcFn:k,newlyAddedElement:!1,ignoreCSSAttributes:F})}function Z(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ie=`Please stop import mirror directly. Instead of that,\r
10now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
11or you can use record.mirror to access the mirror instance during recording.`;let Pr={map:{},getId(){return console.error(Ie),-1},getNode(){return console.error(Ie),null},removeNodeFromMap(){console.error(Ie)},has(){return console.error(Ie),!1},reset(){console.error(Ie)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Pr=new Proxy(Pr,{get(e,t,n){return t==="map"&&console.error(Ie),Reflect.get(e,t,n)}}));function Ve(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const c=t-(o-s),a=this;c<=0||c>t?(r&&(il(r),r=null),s=o,e.apply(a,i)):!r&&n.trailing!==!1&&(r=Mt(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,i)},c))}}function ri(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Mt(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>ri(e,t,i||{},!0)}function Ln(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let yt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yt=()=>new Date().getTime());function si(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function ii(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function oi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ai(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ee(e,t,n,r,s){if(!e)return!1;const i=ai(e);if(!i)return!1;const o=Re(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const c=ve(i,o);let a=-1;return c<0?!1:(r&&(a=ve(i,Re(null,r))),c>-1&&a<0?!0:c<a)}function Zu(e,t){return t.getId(e)!==-1}function qt(e,t){return t.getId(e)===Ge}function ci(e,t){if(We(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ci(e.parentNode,t):!0:!0}function ln(e){return!!e.changedTouches}function el(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function ui(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function li(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function dn(e){return!!e?.shadowRoot}class tl{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function di(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function nl(e){let t=e,n;for(;n=di(t);)t=n;return t}function rl(e){const t=e.ownerDocument;if(!t)return!1;const n=nl(e);return t.contains(n)}function fi(e){const t=e.ownerDocument;return t?t.contains(e)||rl(e):!1}const Br={};function Fn(e){const t=Br[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Br[e]=r.bind(window)}function sl(...e){return Fn("requestAnimationFrame")(...e)}
11function Mt(...e){return Fn("setTimeout")(...e)}function il(...e){return Fn("clearTimeout")(...e)}var I=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(I||{}),v=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(v||{}),Q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Q||{}),fe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(fe||{}),Te=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Te||{});function Pn(e){try{return e.contentDocument}catch{}}function ol(e){try{return e.contentWindow}catch{}}function Ur(e){return"__ln"in e}class al{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Ur(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Ur(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const $r=(e,t)=>`${e}@${t}`;class cl{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new al,s=a=>{let u=a,d=Ge;for(;d===Ge;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=a=>{if(!a.parentNode||!fi(a))return;const u=We(a.parentNode)?this.mirror.getId(di(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=Me(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=>{ui(f,this.mirror)&&!ee(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),li(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),dn(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{ee(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)},onBlockedImageLoad:(f,h,{width:p,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:h.id,attributes:{style:{width:`${p}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Wr(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!Hr(this.droppedSet,a)&&!Wr(this.removes,a,this.mirror)||Hr(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);
11if(s(d.value)===-1)continue;if(l!==-1){a=d;break}else{const h=d.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!qt(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:De(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ai(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Nn(n),c=n.tagName;s=mt(n,c,o);const a=Ct({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),u=De(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=qe({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!Pn(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!ni(n.tagName,r)&&(i.attributes[r]=ti(this.doc,Ne(n.tagName),Ne(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==o.style.getPropertyValue(c)||u!==o.style.getPropertyPriority(c)?u===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,u]:i._unchangedStyles[c]=[a,u]}for(const c of Array.from(o.style))n.style.getPropertyValue(c)===""&&(i.styleDiff[c]=!1)}break}case"childList":{if(ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=We(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ee(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||qt(n,this.mirror)||!Zu(n,this.mirror)||(this.addedSet.has(n)?(fn(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||ci(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[$r(r,s)]?fn(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:We(t.target)&&He(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(qt(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[$r(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ee(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
11h(r=>this.genAdds(r)),dn(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function fn(e,t){e.delete(t),t.childNodes?.forEach(n=>fn(e,n))}function Wr(e,t,n){return e.length===0?!1:ul(e,t,n)}function ul(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function Hr(e,t){return e.size===0?!1:hi(e,t)}function hi(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:hi(e,n):!1}let ze;function ll(e){ze=e}function dl(){ze=void 0}const O=e=>ze?(...n)=>{try{return e(...n)}catch(r){if(ze&&ze(r)===!0)return()=>{};throw r}}:e,xe=[];function Ze(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function pi(e,t){const n=new cl;xe.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(O(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function fl({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],c;const a=Ve(O(l=>{const f=Date.now()-c;e(o.map(h=>(h.timeOffset-=f,h)),l),o=[],c=null}),i),u=O(Ve(O(l=>{const f=Ze(l),{clientX:h,clientY:p}=ln(l)?l.changedTouches[0]:l;c||(c=yt()),o.push({x:h,y:p,id:r.getId(f),timeOffset:yt()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?v.Drag:l instanceof MouseEvent?v.MouseMove:v.TouchMove)}),s,{trailing:!1})),d=[Z("mousemove",u,n),Z("touchmove",u,n),Z("drag",u,n)];return O(()=>{d.forEach(l=>l())})}function hl({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let u=null;const d=l=>f=>{const h=Ze(f);if(ee(h,r,s,i,!0))return;let p=null,m=l;if("pointerType"in f){switch(f.pointerType){case"mouse":p=fe.Mouse;break;case"touch":p=fe.Touch;break;case"pen":p=fe.Pen;break}p===fe.Touch?Q[l]===Q.MouseDown?m="TouchStart":Q[l]===Q.MouseUp&&(m="TouchEnd"):fe.Pen}else ln(f)&&(p=fe.Touch);p!==null?(u=p,(m.startsWith("Touch")&&p===fe.Touch||m.startsWith("Mouse")&&p===fe.Mouse)&&(p=null)):Q[l]===Q.Click&&(p=u,u=null);const S=ln(f)?f.changedTouches[0]:f;if(!S)return;const _=n.getId(h),{clientX:w,clientY:L}=S;O(e)({type:Q[m],id:_,x:w,y:L,...p!==null&&{pointerType:p}})};return Object.keys(Q).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEach(l=>{let f=Ne(l);const h=d(l);if(window.PointerEvent)switch(Q[l]){case Q.MouseDown:case Q.MouseUp:f=f.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}a.push(Z(f,h,t))}),O(()=>{a.forEach(l=>l())})}function mi({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const c=O(Ve(O(a=>{const u=Ze(a);if(!u||ee(u,r,s,i,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=si(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return Z("scroll",c,t)}function pl({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=O(Ve(O(()=>{const i=ii(),o=oi();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return Z("resize",s,t)}const ml=["INPUT","TEXTAREA","SELECT"],zr=new WeakMap;function gl({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTr
11iggeredOnInput:l,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function S(g){let M=Ze(g);const K=g.isTrusted,y=M&&cn(M.tagName);if(y==="OPTION"&&(M=M.parentElement),!M||!y||ml.indexOf(y)<0||ee(M,r,s,i,!0))return;const k=M;if(k.classList.contains(o)||c&&k.matches(c))return;const F=Nn(M);let j=mt(k,y,F),G=!1;const re=Ct({maskInputOptions:a,tagName:y,type:F}),X=De(M,f,p,h,m,re);(F==="radio"||F==="checkbox")&&(G=M.checked),j=qe({isMasked:X,element:M,value:j,maskInputFn:u}),_(M,l?{text:j,isChecked:G,userTriggered:K}:{text:j,isChecked:G});const J=M.name;F==="radio"&&J&&G&&t.querySelectorAll(`input[type="radio"][name="${J}"]`).forEach(T=>{if(T!==M){const te=qe({isMasked:X,element:T,value:mt(T,y,F),maskInputFn:u});_(T,l?{text:te,isChecked:!G,userTriggered:!1}:{text:te,isChecked:!G})}})}function _(g,M){const K=zr.get(g);if(!K||K.text!==M.text||K.isChecked!==M.isChecked){zr.set(g,M);const y=n.getId(g);O(e)({...M,id:y})}}const L=(d.input==="last"?["change"]:["input","change"]).map(g=>Z(g,O(S),t)),A=t.defaultView;if(!A)return()=>{L.forEach(g=>g())};const $=A.Object.getOwnPropertyDescriptor(A.HTMLInputElement.prototype,"value"),C=[[A.HTMLInputElement.prototype,"value"],[A.HTMLInputElement.prototype,"checked"],[A.HTMLSelectElement.prototype,"value"],[A.HTMLTextAreaElement.prototype,"value"],[A.HTMLSelectElement.prototype,"selectedIndex"],[A.HTMLOptionElement.prototype,"selected"]];return $&&$.set&&L.push(...C.map(g=>ri(g[0],g[1],{set(){O(S)({target:this,isTrusted:!1})}},!1,A))),O(()=>{L.forEach(g=>g())})}function _t(e){const t=[];function n(r,s){if(st("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function pe(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function yl({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:O((d,l,f)=>{const[h,p]=f,{id:m,styleId:S}=pe(l,t,n.styleMirror);return(m&&m!==-1||S&&S!==-1)&&e({id:m,styleId:S,adds:[{rule:h,index:p}]}),d.apply(l,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:O((d,l,f)=>{const[h]=f,{id:p,styleId:m}=pe(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,removes:[{index:h}]}),d.apply(l,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:O((d,l,f)=>{const[h]=f,{id:p,styleId:m}=pe(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replace:h}),d.apply(l,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:O((d,l,f)=>{const[h]=f,{id:p,styleId:m}=pe(l,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replaceSync:h}),d.apply(l,f)})}));const a={};it("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(it("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),it("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),it("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:O((f,h,p)=>{const[m,S]=p,{id:_,styleId:w}=pe(h.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||w&&w!==-1)&&e({id:_,styleId:w,adds:[{rule:m,index:[..._t(h),S||0]}]}),f.apply(h,p)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:O((f,h,p)=>{const[m]=p,{id:S,styleId:_}=pe(h.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||_&&_!==-1)&&e({id:S,styleId:_,removes:[{index:[..._t(h),m]}]}),f.apply(h,p)})})}),O(()=>{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).forEac
11h(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function gi({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(o){const c=i.set?.call(this,o);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return c}}),O(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function _l({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:O((c,a,u)=>{const[d,l,f]=u;if(n.has(d))return i.apply(a,[d,l,f]);const{id:h,styleId:p}=pe(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:d,value:l,priority:f},index:_t(a.parentRule)}),c.apply(a,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:O((c,a,u)=>{const[d]=u;if(n.has(d))return o.apply(a,[d]);const{id:l,styleId:f}=pe(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:_t(a.parentRule)}),c.apply(a,u)})}),O(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Sl({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const c=O(u=>Ve(O(d=>{const l=Ze(d);if(!l||ee(l,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:m}=l;e({type:u,id:s.getId(l),currentTime:f,volume:h,muted:p,playbackRate:m})}),i.media||500)),a=[Z("play",c(Te.Play),o),Z("pause",c(Te.Pause),o),Z("seeked",c(Te.Seeked),o),Z("volumechange",c(Te.VolumeChange),o),Z("ratechange",c(Te.RateChange),o)];return O(()=>{a.forEach(u=>u())})}function El({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(a,u,d){const l=new i(a,u,d);return s.set(l,{family:a,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const o=Ln(t.fonts,"add",function(c){return function(a){return Mt(O(()=>{const u=s.get(a);u&&(e(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=i}),r.push(o),O(()=>{r.forEach(c=>c())})}function bl(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let c=!0;const a=O(()=>{const u=t.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const h=u.getRangeAt(f),{startContainer:p,startOffset:m,endContainer:S,endOffset:_}=h;ee(p,r,s,i,!0)||ee(S,r,s,i,!0)||d.push({start:n.getId(p),startOffset:m,end:n.getId(S),endOffset:_})}o({ranges:d})});return a(),Z("selectionchange",a)}function vl({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ln(n.customElements,"define",function(s){return function(i,o,c){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,c])}})}function wl(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=pi(e,e.doc));const s=fl(e),i=hl(e),o=mi(e),c=pl(e,{win:n}),a=gl(e),u=Sl(e);let d=()=>{},l=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(d=yl(e,{win:n}),l=gi(e,e.doc),f=_l(e,{win:n}),e.collectFonts&&(h=El(e)));const p=bl(e),m=vl(e),S=[];for(const _ of e.plugins)S.push(_.observer(_.callback,n,_.options));return O(()=>{xe.forEach(_=>_.reset()),r?.disconnect(),s(),i(),o(),c(),a(),u(),d(),l(),f(),h(),p(),m(),S.forEach(_=>_())})}function st(e){return typeof window[e]<"u"}function it(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class hn{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let c=i.get(n);return c||(c=this.generateIdFn(),i.set(n,c),o.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
11class kl{constructor(){this.crossOriginIframeMirror=new hn(Dn),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Il{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new hn(Dn),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new hn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Pn(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:I.IncrementalSnapshot,data:{source:v.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return n;case I.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case I.IncrementalSnapshot:switch(n.data.source){case v.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case v.Drag:case v.TouchMove:case v.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case v.ViewportResize:return!1;case v.MediaInteraction:case v.MouseInteraction:case v.Scroll:case v.CanvasMutation:case v.Input:return this.replaceIds(n.data,t,["id"]),n;case v.StyleSheetRule:case v.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case v.Font:return n;case v.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case v.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==V.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Tl{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Cl{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!He(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=pi({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mi({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Mt(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(gi({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Pn(t),r=ol(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ln(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&fi(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}
11reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ot=0;ot<jr.length;ot++)Rl[jr.charCodeAt(ot)]=ot;class qr{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Ml{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new tl,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(c,a)=>({rule:Ys(c),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class xl{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,sl(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let z,St;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const oe=Ru();function ce(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:S,slimDOMOptions:_,maskAttributeFn:w,maskInputFn:L,maskTextFn:A,maxCanvasSize:$=null,packFn:C,sampling:g={},dataURLOptions:M={},mousemoveWait:K,recordDOM:y=!0,recordCanvas:k=!1,recordCrossOriginIframes:F=!1,recordAfter:j=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:re=!1,inlineImages:X=!1,plugins:J,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:W,onMutation:ue,getCanvasManager:le}=e;ll(W);const se=F?window.parent===window:!0;let Fe=!1;if(!se)try{window.parent.document&&(Fe=!1)}catch{Fe=!0}if(se&&!t)throw new Error("emit function is required");if(!se&&!Fe)return()=>{};K!==void 0&&g.mousemove===void 0&&(g.mousemove=K),oe.reset();const Dt=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:{},Lt=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};el();let Ft,Pt=0;const Gn=N=>{for(const ie of J||[])ie.eventProcessor&&(N=ie.eventProcessor(N));return C&&!Fe&&(N=C(N)),N};z=(N,ie)=>{const x=N;if(x.timestamp=yt(),xe[0]?.isFrozen()&&x.type!==I.FullSnapshot&&!(x.type===I.IncrementalSnapshot&&x.data.source===v.Mutation)&&xe.forEach(Y=>Y.unfreeze()),se)t?.(Gn(x),ie);else if(Fe){const Y={type:"rrweb",event:Gn(x),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(Y,"*")}if(x.type===I.FullSnapshot)Ft=x,Pt=0;else if(x.type===I.IncrementalSnapshot){if(x.data.source===v.Mutation&&x.data.isAttachIframe)return;Pt++;const Y=r&&Pt>=r,D=n&&Ft&&x.timestamp-Ft.timestamp>n;(Y||D)&&$t(!0)}};const Pe=N=>{z({type:I.IncrementalSnapshot,data:{source:v.Mutation,...N}})},Vn=N=>z({type:I.IncrementalSnapshot,data:{source:v.Scroll,...N}}),Di=N=>z({type:I.IncrementalSnapshot,data:{source:v.CanvasMutation,...N}}),Li=N=>z({type:I.IncrementalSnapshot,data:{source:v.AdoptedStyleSheet,...N}}),_e=new Ml({mutationCb:Pe,adoptedStyleSheetCb:Li}),Se=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new kl:new Il({mirror:oe,mutationCb:Pe,stylesheetManager:_e,recordCrossOriginIframes:F,wrappedEmit:z});for(const N of J||[])N.getMirror&&N.getMirror({nodeMirror:oe,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});const Bt=new xl,Ut=Al(le,{mirror:oe,win:window,mutationCb:N=>z({type:I.IncrementalSnapshot,data:{source:v.CanvasMutation,...N}}),recordCanvas:k,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:$,sampling:g.canvas,dataURLOptions:M,errorHandler:W}),tt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Tl:new Cl({mutationCb:Pe,scrollCb:Vn,bypassOptions:{onMutation:ue,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:Dt,dataURLOptions:M,maskAttributeFn:w,maskTextFn:A,maskInputFn:L,recordCanvas:k,inlineImages:X,sampling:g,slimDOMOptions:Lt,iframeManager:Se,stylesheetManager:_e,canvasManager:Ut,keepIframeSrcFn:T,processedNodeManager:Bt,ignoreCSSAttributes:te},mirror:oe}),$t=(N=!1)=>
11{if(!y)return;z({type:I.Meta,data:{href:window.location.href,width:oi(),height:ii()}},N),_e.reset(),tt.init(),xe.forEach(x=>x.lock());const ie=Qu(document,{mirror:oe,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:Dt,maskAttributeFn:w,maskInputFn:L,maskTextFn:A,slimDOM:Lt,dataURLOptions:M,recordCanvas:k,inlineImages:X,onSerialize:x=>{ui(x,oe)&&Se.addIframe(x),li(x,oe)&&_e.trackLinkElement(x),dn(x)&&tt.addShadowRoot(x.shadowRoot,document)},onIframeLoad:(x,Y)=>{Se.attachIframe(x,Y),x.contentWindow&&Ut.addWindow(x.contentWindow),tt.observeAttachShadow(x)},onStylesheetLoad:(x,Y)=>{_e.attachLinkElement(x,Y)},onBlockedImageLoad:(x,Y,{width:D,height:Be})=>{Pe({adds:[],removes:[],texts:[],attributes:[{id:Y.id,attributes:{style:{width:`${D}px`,height:`${Be}px`}}}]})},keepIframeSrcFn:T,ignoreCSSAttributes:te});if(!ie)return console.warn("Failed to snapshot the document");z({type:I.FullSnapshot,data:{node:ie,initialOffset:si(window)}}),xe.forEach(x=>x.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&_e.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document))};St=$t;try{const N=[],ie=Y=>O(wl)({onMutation:ue,mutationCb:Pe,mousemoveCb:(D,Be)=>z({type:I.IncrementalSnapshot,data:{source:Be,positions:D}}),mouseInteractionCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.MouseInteraction,...D}}),scrollCb:Vn,viewportResizeCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.ViewportResize,...D}}),inputCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.Input,...D}}),mediaInteractionCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.MediaInteraction,...D}}),styleSheetRuleCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.StyleSheetRule,...D}}),styleDeclarationCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.StyleDeclaration,...D}}),canvasMutationCb:Di,fontCb:D=>z({type:I.IncrementalSnapshot,data:{source:v.Font,...D}}),selectionCb:D=>{z({type:I.IncrementalSnapshot,data:{source:v.Selection,...D}})},customElementCb:D=>{z({type:I.IncrementalSnapshot,data:{source:v.CustomElement,...D}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:Dt,inlineStylesheet:p,sampling:g,recordDOM:y,recordCanvas:k,inlineImages:X,userTriggeredOnInput:G,collectFonts:re,doc:Y,maskAttributeFn:w,maskInputFn:L,maskTextFn:A,keepIframeSrcFn:T,blockSelector:i,unblockSelector:o,slimDOMOptions:Lt,dataURLOptions:M,mirror:oe,iframeManager:Se,stylesheetManager:_e,shadowDomManager:tt,processedNodeManager:Bt,canvasManager:Ut,ignoreCSSAttributes:te,plugins:J?.filter(D=>D.observer)?.map(D=>({observer:D.observer,options:D.options,callback:Be=>z({type:I.Plugin,data:{plugin:D.name,payload:Be}})}))||[]},{});Se.addLoadListener(Y=>{try{N.push(ie(Y.contentDocument))}catch(D){console.warn(D)}});const x=()=>{$t(),N.push(ie(document))};return document.readyState==="interactive"||document.readyState==="complete"?x():(N.push(Z("DOMContentLoaded",()=>{z({type:I.DomContentLoaded,data:{}}),j==="DOMContentLoaded"&&x()})),N.push(Z("load",()=>{z({type:I.Load,data:{}}),j==="load"&&x()},window))),()=>{N.forEach(Y=>Y()),Bt.destroy(),St=void 0,dl()}}catch(N){console.warn(N)}}function Ol(e){if(!St)throw new Error("please take full snapshot after start recording");St(e)}ce.mirror=oe;ce.takeFullSnapshot=Ol;function Al(e,t){try{return e?e(t):new qr}catch{return console.warn("Unable to initialize CanvasManager"),new qr}}var Gr;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Gr||(Gr={}));const Nl=3,Dl=5;function Bn(e){return e>9999999999?e:e*1e3}function Gt(e){return e>9999999999?e/1e3:e}function et(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:I.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:bs(t,10,1e3)}}),t.category==="console")))}const Ll="button,a";function yi(e){return e.closest(Ll)||e}function _i(e){const t=Si(e);return!t||!(t instanceof Element)?t:yi(t)}function Si(e){return Fl(e)?e.target:e}function Fl(e){return typeof e=="object"&&!!e&&"target"in e}let me;function Pl(e){return me||(me=[],Bl()),me.push(e),()=>{const t=me?me.indexOf(e):-1;t>-1&&me.splice(t,1)}}function Bl(){ae(U,"open",function(e){return function(...t){if(me)try{me.forEach(n=>n())}catch{}return e.apply(U,t)}})}const Ul=new Set([v.Mutation,v.StyleSheetRule,v.StyleDeclaration,v.AdoptedStyleSheet,v.CanvasMutation,v.Selection,v.MediaInteraction]);function $l(e,t,n){e.handleClick(t,n)}class Wl{constructor(t,n,r=et){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Pl(()=>{this._lastMutation=Vr()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(zl(n,this._ignoreSelector)||!jl(t))return;const r={timestamp:Gt(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Gt(t)}registerScroll(t=Date.now()){this._lastScroll=Gt(t)}registerClick(t){const n=yi(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>
11{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Vr();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:c}=t;if(i){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=a<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:U.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:U.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Qe(()=>this._checkClicks(),1e3)}}const Hl=["A","BUTTON","INPUT"];function zl(e,t){return!!(!Hl.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function jl(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Vr(){return Date.now()/1e3}function ql(e,t){try{if(!Gl(t))return;const{source:n}=t.data;if(Ul.has(n)&&e.registerMutation(t.timestamp),n===v.Scroll&&e.registerScroll(t.timestamp),Vl(t)){const{type:r,id:s}=t.data,i=ce.mirror.getNode(s);i instanceof HTMLElement&&r===Q.Click&&e.registerClick(i)}}catch{}}function Gl(e){return e.type===Nl}function Vl(e){return e.data.source===v.MouseInteraction}function de(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var xt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(xt||{});const Kl=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Yl(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Kl.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Xl=e=>t=>{if(!e.isEnabled())return;const n=Jl(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&$l(e.clickDetector,n,_i(t.event)),et(e,n)};function Ei(e,t){const n=ce.mirror.getId(e),r=n&&ce.mirror.getNode(n),s=r&&ce.mirror.getMeta(r),i=s&&Zl(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===xt.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Yl(i.attributes)}}:{}}}function Jl(e){const{target:t,message:n}=Ql(e);return de({category:`ui.${e.name}`,...Ei(t,n)})}function Ql(e){const t=e.name==="click";let n,r=null;try{r=t?_i(e.event):Si(e.event),n=vn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Zl(e){return e.type===xt.Element}function ed(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=td(t);n&&et(e,n)}function td(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||nd(o)||!i)return null;const c=t||r||s,a=i.length===1;if(!c&&a)return null;const u=vn(o,{maxStringLength:200})||"<unknown>",d=Ei(o,u);return de({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}
11function nd(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const rd={resource:cd,paint:od,navigation:ad};function Vt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function sd(e){return e.map(id).filter(Boolean)}function id(e){const t=rd[e.entryType];return t?t(e):null}function Le(e){return((Mo()||U.performance.timeOrigin)+e)/1e3}function od(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Le(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function ad(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:h,transferSize:p,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:Le(h),end:Le(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function cd(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Le(i),end:Le(s),name:r,data:{size:u,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function ud(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Un(e,"largest-contentful-paint",n)}function ld(e){return e.sources!==void 0}function dd(e){const t=[],n=[];for(const r of e.entries)if(ld(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=ce.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return Un(e,"cumulative-layout-shift",n,t)}function fd(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Un(e,"interaction-to-next-paint",n)}function Un(e,t,n,r){const s=e.value,i=e.rating,o=Le(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(c=>ce.mirror.getId(c)):void 0,attributions:r}}}function hd(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(vo(s,n))}),r.push(wo(Vt(ud,e)),ko(Vt(dd,e)),Io(Vt(fd,e))),()=>{r.forEach(s=>s())}}const E=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pd='
vendor: 10,329 bytes, line 11
11var 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});
11';function md(){const e=new Blob([pd]);return URL.createObjectURL(e)}const Kr=["log","warn","error"],lt="[Replay] ";function Kt(e,t="info"){ye({category:"console",data:{logger:"replay"},level:t,message:`${lt}${e}`},{level:t})}function gd(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return E?(Kr.forEach(r=>{n[r]=(...s)=>{R[r](lt,...s),t&&Kt(s.join(""),Us(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),R.error(lt,r),e?Ao(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Kt(r,"error")},n.infoTick=(...r)=>{R.log(lt,...r),t&&setTimeout(()=>Kt(r[0]),0)}):Kr.forEach(r=>{n[r]=()=>{}}),n}const b=gd();class $n extends Error{constructor(){super(`Event buffer exceeded maximum size of ${An}.`)}}class bi{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>An)throw new $n;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:Bn(t)}}class Wn{constructor(t){Wn.prototype.__init.call(this),this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(E&&b.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{E&&b.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(){E&&b.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{this._pending.set(r,{method:t,resolve:s,reject:i});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(o){this._pending.delete(r),i(o)}})}__init(){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){E&&b.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}}}_getAndIncrementId(){return this._id++}}class yd{constructor(t){this._worker=new Wn(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Bn(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>An?Promise.reject(new $n):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{E&&b.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class _d{constructor(t){this._fallback=new bi,this._compression=new yd(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
11ise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){E&&b.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){E&&b.exception(i,"Failed to add events when switching buffers.")}}}function Sd({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ed(t);if(n)return n}return E&&b.log("Using simple buffer"),new bi}function Ed(e){try{const t=e||bd();if(!t)return;E&&b.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new _d(n)}catch(t){E&&b.exception(t,"Failed to create compression worker")}}function bd(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?md():""}function Hn(){try{return"sessionStorage"in U&&!!U.sessionStorage}catch{return!1}}function vd(e){wd(),e.session=void 0}function wd(){if(Hn())try{U.sessionStorage.removeItem(xn)}catch{}}function vi(e){return e===void 0?!1:Math.random()<e}function Ot(e){if(Hn())try{U.sessionStorage.setItem(xn,JSON.stringify(e))}catch{}}function wi(e){const t=Date.now(),n=e.id||$e(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,c=e.previousSessionId,a=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:c,dirty:a}}function kd(e,t){return vi(e)?"session":t?"buffer":!1}function Yr({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=kd(e,t),i=wi({sampled:s,previousSessionId:r});return n&&Ot(i),i}function Id(){if(!Hn())return null;try{const e=U.sessionStorage.getItem(xn);if(!e)return null;const t=JSON.parse(e);return E&&b.infoTick("Loading existing session"),wi(t)}catch{return null}}function pn(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Td(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return pn(e.started,t,r)||pn(e.lastActivity,n,r)}function Et(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Td(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Yt({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&Id();return s?Et(s,{sessionIdleExpire:e,maxReplayDuration:t})?(E&&b.infoTick("Session in sessionStorage is expired, creating new one..."),Yr(r,{previousSessionId:s.id})):s:(E&&b.infoTick("Creating new session"),Yr(r,{previousSessionId:n}))}function Cd(e){return e.type===I.Custom}function zn(e,t,n){return Ii(e,t)?(ki(e,t,n),!0):!1}function Rd(e,t,n){return Ii(e,t)?ki(e,t,n):Promise.resolve(null)}async function ki(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=Md(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof $n,c=o?"eventBufferOverflow":"eventBufferError",a=q();if(a){const u=o?"buffer_overflow":"internal_sdk_error";a.recordDroppedEvent(u,"replay")}if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:c})}}
11function Ii(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Bn(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(E&&b.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Md(e,t){try{if(typeof t=="function"&&Cd(e))return t(e)}catch(n){return E&&b.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function jn(e){return!e.type}function mn(e){return e.type==="transaction"}function xd(e){return e.type==="replay_event"}function Xr(e){return e.type==="feedback"}function Od(e){return(t,n)=>{if(!e.isEnabled()||!jn(t)&&!mn(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(mn(t)){Ad(e,t);return}Nd(e,t)}}}function Ad(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Nd(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Qe(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Dd(e){return t=>{!e.isEnabled()||!jn(t)||Ld(e,t)}}function Ld(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=de({category:"replay.hydrate-error",data:{url:wn()}});et(e,r)}}function Fd(e){const t=q();t&&t.on("beforeAddBreadcrumb",n=>Pd(e,n))}function Pd(e,t){if(!e.isEnabled()||!Ti(t))return;const n=Bd(t);n&&et(e,n)}function Bd(e){return!Ti(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Ud(e):de(e)}function Ud(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return de(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>rt?(n=!0,`${s.slice(0,rt)}…`):s;if(typeof s=="object")try{const i=bs(s,7);return JSON.stringify(i).length>rt?(n=!0,`${JSON.stringify(i,null,2).slice(0,rt)}…`):i}catch{}return s});return de({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Ti(e){return!!e.category}function $d(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function bt(){const e=we().getPropagationContext().dsc;e&&delete e.replay_id;const t=kn();if(t){const n=Es(t);delete n.replay_id}}function Wd(e){const t=we().getPropagationContext().dsc;t&&(t.replay_id=e);const n=kn();if(n){const r=Es(n);r.replay_id=e}}function Hd(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:I.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function zd(e,t){return e.recordingMode!=="buffer"||t.message===On||!t.exception||t.type?!1:vi(e.getOptions().errorSampleRate)}function jd(e){return Object.assign((t,n)=>{if(e.session&&Et(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&bt(),!e.isEnabled()||e.isPaused())return t;if(xd(t))return delete t.breadcrumbs,t;if(!jn(t)&&!mn(t)&&!Xr(t))return t;if(!e.checkAndHandleExpiredSession())return bt(),t;if(Xr(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Hd(e,t),t;if($d(t,n)&&!e.getOptions()._experiments.captureExceptions)return E&&b.log("Ignoring error from rrweb internals",t),null;const s=zd(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const o=e.session;o.dirty=!0,e.getOptions().stickySession&&Ot(o)}return t},{id:"Replay"})}function At(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const c=e.throttledAddEvent({type:I.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 qd(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Gd(e){return t=>{if(!e.isEnabled())return;const n=qd(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(At(e,[n]),!1)))}}function Vd(e,t){return E&&e.getOptions()._experiments.traceInternals?!1:oa(t,q())}function Ci(e,t){e.isEnabled()&&t!==null&&(Vd(e,t.name)||e.addUpdate(()=>(At(e,[t]),!0)))}function Nt(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=xo(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Ri(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function vt(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Mi(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:c,response:a}}}function Ke(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ge(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=Kd(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function gn(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function Kd(e){if(!e||typeof e!="string")return{body:e};const t=e.length>xr,n=Yd(e);if(t){const r=e.slice(0,xr);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Yd(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function wt(e,t){const n=Xd(e);return Je(n,t)}function Xd(e,t=U.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(U.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}
11async function Jd(e,t,n){try{const r=await Zd(e,t,n),s=Mi("resource.fetch",r);Ci(n.replay,s)}catch(r){E&&b.exception(r,"Failed to capture fetch breadcrumb")}}function Qd(e,t){const{input:n,response:r}=t,s=n?vs(n):void 0,i=Nt(s),o=r?Ri(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function Zd(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:c,status_code:a=0,request_body_size:u,response_body_size:d}=e.data,l=wt(o,n.networkDetailAllowUrls)&&!wt(o,n.networkDetailDenyUrls),f=l?ef(n,t.input,u):Ke(u),h=await tf(l,n,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:f,response:h}}function ef({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?sf(n,t):{};if(!e)return ge(s,r,void 0);const i=vs(n),[o,c]=ws(i,b),a=ge(s,r,o);return c?vt(a,c):a}async function tf(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Ke(s);const i=r?xi(r.headers,n):{};if(!r||!t&&s!==void 0)return ge(i,s,void 0);const[o,c]=await rf(r),a=nf(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return c?vt(a,c):a}function nf(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e?.length&&n===void 0?Nt(e):n;return r?t?ge(s,i,e):ge(s,i,void 0):Ke(i)}catch(i){return E&&b.exception(i,"Failed to serialize response body"),ge(s,n,void 0)}}async function rf(e){const t=of(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await af(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(E&&b.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(E&&b.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function xi(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function sf(e,t){return e.length===1&&typeof e[0]!="string"?Jr(e[0],t):e.length===2?Jr(e[1],t):{}}function Jr(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?xi(n,t):Array.isArray(n)?{}:gn(n,t):{}}function of(e){try{return e.clone()}catch(t){E&&b.exception(t,"Failed to clone response body")}}function af(e){return new Promise((t,n)=>{const r=Qe(()=>n(new Error("Timeout while trying to read response body")),500);cf(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function cf(e){return await e.text()}async function uf(e,t,n){try{const r=df(e,t,n),s=Mi("resource.xhr",r);Ci(n.replay,s)}catch(r){E&&b.exception(r,"Failed to capture xhr breadcrumb")}}function lf(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Nt(r),i=n.getResponseHeader("content-length")?Ri(n.getResponseHeader("content-length")):pf(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function df(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:c}=t,{url:a,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!a)return null;if(!c||!wt(a,n.networkDetailAllowUrls)||wt(a,n.networkDetailDenyUrls)){const C=Ke(l),g=Ke(f);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:C,response:g}}const h=c[ys],p=h?gn(h.request_headers,n.networkRequestHeaders):{},m=gn(Oo(c),n.networkResponseHeaders),[S,_]=n.networkCaptureBodies?ws(o,b):[void 0],[w,L]=n.networkCaptureBodies?ff(c):[void 0],A=ge(p,l,S),$=ge(m,f,w);return{startTimestamp:s,endTimestamp:i,url:a,method:u,statusCode:d,request:_?vt(A,_):A,response:L?vt($,L):$}}function ff(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return hf(e.response,e.responseType)}catch(n){t.push(n)}return E&&b.warn("Failed to get xhr response body",...t),[void 0]}function hf(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return E&&b.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return E&&b.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function pf(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Nt(n)}catch{return}}function mf(e){const t=q();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(a,u)=>gf(c,a,u))}catch{}}function gf(e,t,n){if(t.data)try{yf(t)&&Sf(n)&&(lf(t,n),uf(t,n,e)),_f(t)&&Ef(n)&&(Qd(t,n),Jd(t,n,e))}catch(r){E&&b.exception(r,"Error when enriching network breadcrumb")}}function yf(e){return e.category==="xhr"}function _f(e){return e.category==="fetch"}function Sf(e){return e?.xhr}function Ef(e){return e?.response}function bf(e){const t=q();js(Xl(e)),bn(Gd(e)),Fd(e),mf(e);const n=jd(e);bo(n),t&&(t.on("beforeSendEvent",Dd(e)),t.on("afterSendEvent",Od(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function vf(e){try{return Promise.all(At(e,[wf(U.performance.memory)]))}catch{return[]}}function wf(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function kf(e,t,n){return da(e,t,{...n,setTimeoutImpl:Qe})}const at=be.navigator;function If(){return/iPhone|iPad|iPod/i.test(at?.userAgent??"")||/Macintosh/i.test(at?.userAgent??"")&&at?.maxTouchPoints&&at?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Tf(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){E&&b.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,Cf(n),e.clickDetector&&ql(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!zn(e,n,s))return!0;
11if(!s)return!1;const i=e.session;if(Mf(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const o=e.eventBuffer.getEarliestTimestamp();o&&(E&&b.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&Ot(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Cf(e){const t=e.data;if(!(e.type!==I.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==v.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=ce.mirror.getNode(n.id),s=r&&ce.mirror.getMeta(r);if(s?.type===xt.Element)for(const[i,o]of Object.entries(n.attributes))o===null?delete s.attributes[i]:s.attributes[i]=o}}function Rf(e){const t=e.getOptions();return{type:I.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Mf(e,t){!t||e.session?.segmentId!==0||zn(e,Rf(e),!1)}function xf(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Of(e,t,n,r){return Ye(Co(e,Ro(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Af({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
12`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function Nf({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await us(e.getOptions(),r,i,t,e,Xe());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:u,settings:d}=c?.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},o}async function Df({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=Af({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=q(),f=we(),h=l?.getTransport(),p=l?.getDsn();if(!l||!h||!p||!i.sampled)return Promise.resolve({});const m={type:au,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:t,segment_id:n,replay_type:i.sampled},S=await Nf({scope:f,client:l,replayId:t,event:m});if(!S)return l.recordDroppedEvent("event_processor","replay"),E&&b.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete S.sdkProcessingMetadata;const _=Of(S,o,p,l.getOptions().tunnel);let w;try{w=await h.send(_)}catch(A){const $=new Error(On);try{$.cause=A}catch{}throw $}const L=xs({},w);if(Ms(L,"replay"))throw new qn(L);if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new Oi(w.statusCode);return w}class Oi extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class qn extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Qr extends Error{constructor(){super("Session is too long, not sending replay")}}async function Ai(e,t={count:0,interval:hu}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Df(e),!0}catch(s){if(s instanceof Oi||s instanceof qn)throw s;if(To("Replays",{_retryCount:t.count}),r&&r(s),t.count>=pu){const i=new Error(`${On} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{Qe(async()=>{try{await Ai(e,t),i(!0)}catch(c){o(c)}},t.interval)})}}const Ni="__THROTTLED",Lf="__SKIPPED";function Ff(e,t,n){const r=new Map,s=c=>{const a=c-n;r.forEach((u,d)=>{d<a&&r.delete(d)})},i=()=>[...r.values()].reduce((c,a)=>c+a,0);let o=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),i()>=t){const d=o;return o=!0,d?Lf:Ni}o=!1;const u=r.get(a)||0;return r.set(a,u+1),e(...c)}}class Pf{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:cu,sessionIdleExpire:uu},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=kf(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Ff((o,c)=>Rd(this,o,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(mu,r),timeout:r,scrollTimeout:gu,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new Wl(this,i)),E){const o=t._experiments;b.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{U.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
12dTasks()},this._handleWindowBlur=()=>{const o=de({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=de({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{ed(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){E&&b.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){E&&b.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",E&&b.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){E&&b.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){E&&b.log("Buffering is in progress, call `flush()` to save the replay");return}E&&b.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Yt({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){E&&b.log("Buffering is in progress, call `flush()` to save the replay");return}E&&b.infoTick("Starting replay in buffer mode");const t=Yt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=ce({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:fu}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Tf(this),...If(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";q()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{E&&b.log(`Stopping Replay triggered by ${r}`),bt(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,vd(this)}catch(s){this.handleException(s)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),E&&b.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),E&&b.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();E&&b.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}
12checkAndHandleExpiredSession(){if(this._lastActivity&&pn(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${U.location.pathname}${U.location.hash}${U.location.search}`,n=`${U.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===Ni){const s=de({category:"replay.throttled"});this.addUpdate(()=>!zn(this,{type:Dl,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||kn(),n=t&&So(t),s=(n&&Zt(n).data||{})[Eo];if(!(!n||!s||!["route","custom"].includes(s)))return Zt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Sd({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&q()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&Wd(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Yt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Et(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{U.document.addEventListener("visibilitychange",this._handleVisibilityChange),U.addEventListener("blur",this._handleWindowBlur),U.addEventListener("focus",this._handleWindowFocus),U.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(bf(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=hd(this)}_removeListeners(){try{U.document.removeEventListener("visibilitychange",this._handleVisibilityChange),U.removeEventListener("blur",this._handleWindowBlur),U.removeEventListener("focus",this._handleWindowFocus),U.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Et(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){bt();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){E&&b.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:I.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=sd(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(At(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;
12const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){E&&b.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await vf(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Qr;const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Ai({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=q();if(r){let s;n instanceof qn?s="ratelimit_backoff":n instanceof Qr?s="invalid":s="send_error",r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){E&&b.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){E&&b.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&&E&&b.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&&Ot(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(c=>{const a=xf(c.target),u=n.join(",");return a?.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const c=de({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(c)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Ue(e,t){return[...e,...t].join(",")}function Bf({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=Ue(e,[".sentry-mask","[data-sentry-mask]"]),c=Ue(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:Ue(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Ue(r,[]),ignoreSelector:Ue(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Uf({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){if(s.unmaskTextSelector&&e.matches(s.unmaskTextSelector))return i;const o=n.includes(t),c=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return o||c?i.replace(/[\S]/g,"*"):i}const Zr='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',$f=["content-length","content-type","accept"],Wf=Symbol.for("sentry__originalRequestBody");let es=!1,ts=!1;function Hf(){if(typeof Request>"u"||ts)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return r?.body!=null&&(s[Wf]=r.body),s};t.prototype=e.prototype,be.Request=t,ts=!0}catch{}}const zf=(e=>new jf(e));class jf{constructor({flushMinDelay:t=lu,flushMaxDelay:n=du,minReplayDuration:r=yu,maxReplayDuration:s=Or,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:_=[],networkCaptureBodies:w=!0,networkRequestHeaders:L=[],networkResponseHeaders:A=[],mask:$=[],maskAttributes:C=["title","placeholder","aria-label"],unmask:g=[],block:M=[],unblock:K=[],ignore:y=[],maskFn:k,beforeAddRecordingEvent:F,beforeErrorSampling:j,onError:G,attachRawBodyFromRequest:re=!1}={}){this.name="Replay";const X=Bf({mask:$,unmask:g,block:M,unblock:K,ignore:y});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:k,maskInputFn:k,maskAttributeFn:(J,T,te)=>Uf({maskAttributes:C,maskAllText:u,privacyOptions:X,key:J,value:T,el:te}),...X,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:J=>{try{J.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,_u),maxReplayDuration:Math.min(s,Or),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:S,networkDetailDenyUrls:_,networkCaptureBodies:w,networkRequestHeaders:ns(L),networkResponseHeaders:ns(A),beforeAddRecordingEvent:F,beforeErrorSampling:j,onError:G,attachRawBodyFromRequest:re,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Zr}`:Zr,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&dt())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return es}set _isInitialized(t){es=t}afterAllSetup(t){!dt()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Hf(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
12startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=qf(this._initialOptions,t);this._replay=new Pf({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function qf(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=Xt(n.replaysSessionSampleRate),i=Xt(n.replaysOnErrorSampleRate);return s==null&&i==null&&It(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function ns(e){return[...$f,...e.map(t=>t.toLowerCase())]}var Gf={};function Vf(e){const t=cs,n={defaultIntegrations:[...Ks()],environment:e.environment??Gf.SENTRY_ENVIRONMENT??t,...e};return Ps(n,"nuxt",["nuxt","vue"]),ou(n)}var Kf={};Vf({dsn:"https://2b79be968ab3ea85e73f5ea73c9ea58d@o4505799288553472.ingest.us.sentry.io/4510322864029696",enabled:!0,environment:Kf.NUXT_PUBLIC_APP_ENV||"production",tracesSampleRate:.1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,attachStacktrace:!0,maxBreadcrumbs:50,integrations:[zf({maskAllText:!1,blockAllMedia:!1})],enableLogs:!0,sendDefaultPii:!1,beforeSend(e,t){const n=t?.originalException;if(n!=null&&!(n instanceof Error)&&typeof n=="object"&&"target"in n)return null;const r=e.exception?.values?.[0]?.value||"";return r.includes("NavigationDuplicated")||r.includes("Navigation cancelled")||r.includes("Avoided redundant navigation")||r.includes("ResizeObserver loop")||/^\[object HTML\w*Element\]$/.test(r)||r.includes("The operation is insecure")&&e.exception?.values?.[0]?.stacktrace?.frames?.some(o=>o.filename?.includes("/widgetapp/"))||((r.includes("Failed to fetch")||r.includes("NetworkError")||r.includes("Load failed"))&&(e.level="warning"),r.includes("Importing a module script failed")||r.includes("Failed to load module script")||r.includes("dynamically imported module")||r.includes("Unable to preload CSS"))?null:e},ignoreErrors:[/^chrome-extension:\/\//,/^moz-extension:\/\//,"Script error.","Non-Error exception captured"],debug:!1});

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.