import{i as Bi,G as oe,s as Hi,p as Ui,D as nn,l as _,e as $i,c as qr,d as zi,g as Wi,f as bn,a as ee,b as te,h as ji,F as Gi,I as qi,j as Vi,k as Ki,m as Yi,n as Xi,u as Ji,t as Vr,o as G,q as Me,r as Te,W as ie,v as de,w as et,x as Kr,T as Zi,y as Qi,z as eo,A as to,B as no,C as ro,E as so,H as io,J as oo,K as ao,L as Gn,M as co,N as rn,O as lo,P as qn,S as vt,Q as uo,R as fo,U as ho,V as po,X as mo,Y as go,Z as Yr,_ as Et,$ as Sn,a0 as Xr,a1 as yo,a2 as _o,a3 as bo,a4 as So,a5 as wo,a6 as wn,a7 as vo,a8 as Jr,a9 as Zr,aa as Eo,ab as Io,ac as vn,ad as En,ae as ko,af as Co,ag as Qr,ah as es,ai as To,aj as Ro,ak as In,al as xo,am as Mo,an as Ao,ao as Oo,ap as ts,aq as Vn,ar as sn,as as yt,at as Lo,au as Do,av as No,aw as Po,ax as ns,ay as Fo,az as Bo,aA as Ho,aB as Uo,aC as Y,aD as j,aE as $o}from"./entry.Cl0lw-TW.js";import{bq as Ch,aM as Th,aN as Rh,aO as xh,aP as Mh,aQ as Ah,aR as Oh,aK as Lh,aS as Dh,aT as Nh,aI as Ph,bL as Fh,bP as Bh,aH as Hh,aU as Uh,bE as $h,bt as zh,aV as Wh,aW as jh,aX as Gh,aJ as qh,aY as Vh,bD as Kh,bF as Yh,bu as Xh,bv as Jh,aZ as Zh,bA as Qh,bB as ep,bC as tp,a_ as np,a$ as rp,bG as sp,b0 as ip,bw as op,b1 as ap,b2 as cp,bH as lp,b3 as up,b4 as dp,bM as fp,bN as hp,b5 as pp,aF as mp,b6 as gp,b7 as yp,bO as _p,br as bp,b8 as Sp,bs as wp,bI as vp,bx as Ep,by as Ip,b9 as kp,ba as Cp,bb as Tp,bc as Rp,bd as xp,be as Mp,bf as Ap,bg as Op,bJ as Lp,bh as Dp,bQ as Np,bR as Pp,bi as Fp,bj as Bp,bk as Hp,bl as Up,bm as $p,bn as zp,aL as Wp,aG as jp,bz as Gp,bo as qp,bp as Vp,bK as Kp}from"./entry.Cl0lw-TW.js";import"./swiper-vue.BZ1sAyau.js";function zo(){return!Bi()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function on(){return typeof window<"u"&&(!zo()||Wo())}function Wo(){return oe.process!==void 0&&oe.process.type==="renderer"}function jo(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const s=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Go=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function qo(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Go.exec(t);return n?n.slice(1):[]}function Kn(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:"/";s&&(t=`${s}/${t}`,n=s.charAt(0)==="/")}return t=jo(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Yn(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Vo(e,t){e=Kn(e).slice(1),t=Kn(t).slice(1);const n=Yn(e.split("/")),r=Yn(t.split("/")),s=Math.min(n.length,r.length);let i=s;for(let a=0;a<s;a++)if(n[a]!==r[a]){i=a;break}let o=[];for(let a=i;a<n.length;a++)o.push("..");return o=o.concat(r.slice(i)),o.join("/")}function Ko(e,t){return qo(e)[2]}function Yo(e,t){return e(t.stack||"",1)}function Xo(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=Yo(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Jo(e,t){return e??t()}function _t(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const rs="c",ss="g",kn="s",is="d",Zo=5e3;class Qo{constructor(t){this._value=t}get weight(){return 1}add(t){this._value+=t}toString(){return`${this._value}`}}class ea{constructor(t){this._last=t,this._min=t,this._max=t,this._sum=t,this._count=1}get weight(){return 5}add(t){this._last=t,t<this._min&&(this._min=t),t>this._max&&(this._max=t),this._sum+=t,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class ta{constructor(t){this._value=[t]}get weight(){return this._value.length}add(t){this._value.push(t)}toString(){return this._value.join(":")}}class na{constructor(t){this.first=t,this._value=new Set([t])}get weight(){return this._value.size}add(t){this._value.add(t)}toString(){return Array.from(this._value).map(t=>typeof t=="string"?Hi(t):t).join(":")}}const ra={[rs]:Qo,[ss]:ea,[is]:ta,[kn]:na},sa=100,Xn=5e3,ia=36e5;function Kt(e,t){nn&&_.info(`[Offline]: ${e}`,t)}function oa(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let s=Xn,i;function o(u,d,f){return $i(u,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(u,d,f):!0}function a(u){r&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;const d=await r.pop();d&&(Kt("Attempting to send previously queued event"),l(d).catch(f=>{Kt("Failed to retry sending",f)}))},u),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(a(s),s=Math.min(s*2,ia))}async function l(u){try{const d=await n.send(u);let f=sa;if(d){if(d.headers&&d.headers["retry-after"])f=Ui(d.headers["retry-after"]);else if((d.statusCode||0)>=400)return d}return a(f),s=Xn,d}catch(d){if(r&&await o(u,d,s))return await r.insert(u),c(),Kt("Error sending. Event queued",d),{};throw d}}return t.flushAtStartup&&c(),{send:l,flush:u=>n.flush(u)}}}function os(e,t){let n;return bn(e,(r,s)=>(t.includes(s)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function aa(e,t){return n=>{const r=e(n);return{...r,send:async s=>{const i=os(s,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(s)}}}}function ca(e,t){return qr(t?{...e[0],dsn:t}:e[0],e[1])}function dh(e,t){return n=>{const r=e(n),s=new Map;function i(c,l){const u=l?`${c}:${l}`:c;let d=s.get(u);if(!d){const f=zi(c);if(!f)return;const h=Wi(f,n.tunnel);d=l?aa(e,l)({...n,url:h}):e({...n,url:h}),s.set(u,d)}return[c,d]}async function o(c){function l(f){const h=f&&f.length?f:["event"];return os(c,h)}const u=t({envelope:c,getEvent:l}).map(f=>typeof f=="string"?i(f,void 0):i(f.dsn,f.release)).filter(f=>!!f);return u.length===0&&u.push(["",r]),(await Promise.all(u.map(([f,h])=>h.send(ca(c,f)))))[0]}async function a(c){const l=[await r.flush(c)];for(const[,u]of s)l.push(await u.flush(c));return l.every(u=>u)}return{send:o,flush:a}}}function as(e,t){const n=t&&da(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return ua(e,r)||la(e,s)}function la(e,t){return t?Jn(e)===Jn(t):!1}function ua(e,t){return t?e.includes(t.host):!1}function Jn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function da(e){return e.getClient!==void 0}function fh(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const cs=new Map,Zn=new Set;function fa(e){if(oe._sentryModuleMetadata)for(const t of Object.keys(oe._sentryModuleMetadata)){const n=oe._sentryModuleMetadata[t];if(Zn.has(t))continue;Zn.add(t);const r=e(t);for(const s of r.reverse())if(s.filename){cs.set(s.filename,n);break}}}function ha(e,t){return fa(e),cs.get(t)}function pa(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename)continue;const s=ha(e,r.filename);s&&(r.module_metadata=s)}})}catch{}}function ma(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const ls="ModuleMetadata",ga=()=>({name:ls,setupOnce(){},setup(e){typeof e.on=="function"&&e.on("beforeEnvelope",t=>{bn(t,(n,r)=>{if(r==="event"){const s=Array.isArray(n)?n[1]:void 0;s&&(ma(s),n[1]=s)}})})},processEvent(e,t,n){const r=n.getOptions().stackParser;return pa(r,e),e}}),ya=ee(ga),hh=te(ls,ya),_a="cause",ba=5,us="LinkedErrors",Sa=(e={})=>{const t=e.limit||ba,n=e.key||_a;return{name:us,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();ji(Xo,o.stackParser,o.maxValueLength,n,t,r,s)}}},wa=ee(Sa),va=te(us,wa),Ea=Object.freeze(Object.defineProperty({__proto__:null,FunctionToString:Gi,InboundFilters:qi,LinkedErrors:va},Symbol.toStringTag,{value:"Module"}));class Ia{constructor(t){this._client=t,this._buckets=new Map,this._interval=setInterval(()=>this.flush(),Zo)}add(t,n,r,s="none",i={},o=Vr()){const a=Math.floor(o),c=Vi(n),l=Ki(i),u=Yi(s),d=Xi(t,c,u,l);let f=this._buckets.get(d);const h=f&&t===kn?f.metric.weight:0;f?(f.metric.add(r),f.timestamp<a&&(f.timestamp=a)):(f={metric:new ra[t](r),timestamp:a,metricType:t,name:c,unit:u,tags:l},this._buckets.set(d,f));const p=typeof r=="string"?f.metric.weight-h:r;Ji(t,c,p,u,i,d)}flush(){if(this._buckets.size!==0){if(this._client.captureAggregateMetrics){const t=Array.from(this._buckets).map(([,n])=>n);this._client.captureAggregateMetrics(t)}this._buckets.clear()}}close(){clearInterval(this._interval),this.flush()}}const ds="MetricsAggregator",ka=()=>({name:ds,setupOnce(){},setup(e){e.metricsAggregator=new Ia(e)}}),fs=ee(ka),Ca=te(ds,fs);function Dt(e,t,n,r={}){const s=G(),i=Me();if(s){if(!s.metricsAggregator){nn&&_.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs");return}const{unit:o,tags:a,timestamp:c}=r,{release:l,environment:u}=s.getOptions(),d=i.getTransaction(),f={};l&&(f.release=l),u&&(f.environment=u),d&&(f.transaction=Te(d).description||""),nn&&_.log(`Adding value of ${n} to ${e} metric ${t}`),s.metricsAggregator.add(e,t,n,o,{...f,...a},c)}}function Ta(e,t=1,n){Dt(rs,e,t,n)}function Ra(e,t,n){Dt(is,e,t,n)}function xa(e,t,n){Dt(kn,e,t,n)}function Ma(e,t,n){Dt(ss,e,t,n)}const ph={increment:Ta,distribution:Ra,set:xa,gauge:Ma,MetricsAggregator:Ca,metricsAggregatorIntegration:fs},Aa=Ea;function Oa(e,t=!0,n=!0){if(!ie||!ie.location){de&&_.warn("Could not initialize routing instrumentation due to invalid location");return}let r=ie.location.href,s;t&&(s=e({name:ie.location.pathname,startTimestamp:et?et/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&Kr(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&(de&&_.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=e({name:ie.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const La="BrowserTracing",Da={...Zi,markBackgroundTransactions:!0,routingInstrumentation:Oa,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Qi},Qn=10;class mh{constructor(t){this.name=La,this._hasSetTracePropagationTargets=!1,eo(),de&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...Da,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=to(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&no(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&ro(),this.options._experiments.enableInteractions&&so(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:c,markBackgroundTransactions:l,traceFetch:u,traceXHR:d,shouldCreateSpanForRequest:f,enableHTTPTimings:h,_experiments:p}=this.options,g=i&&i.tracePropagationTargets,b=g||this.options.tracePropagationTargets;de&&this._hasSetTracePropagationTargets&&g&&_.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),o(m=>{const y=this._createRouteTransaction(m);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(y,m,n),y},c,a),l&&io(),p.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),oo({traceFetch:u,traceXHR:d,tracePropagationTargets:b,shouldCreateSpanForRequest:f,enableHTTPTimings:h})}_createRouteTransaction(t){if(!this._getCurrentHub){de&&_.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload";let c;if(a){const h=a?er("sentry-trace"):"",p=a?er("baggage"):void 0,{traceId:g,dsc:b,parentSpanId:m,sampled:y}=ao(h,p);c={traceId:g,parentSpanId:m,parentSampled:y,...t,metadata:{...t.metadata,dynamicSamplingContext:b},trimEnd:!0}}else c={trimEnd:!0,...t};const l=typeof r=="function"?r(c):c,u=l===void 0?{...c,sampled:!1}:l;u.metadata=u.name!==c.name?{...u.metadata,source:"custom"}:u.metadata,this._latestRoute.name=u.name,this._latestRoute.context=u,u.sampled===!1&&de&&_.log(`[Tracing] Will not send ${u.op} transaction because of beforeNavigate.`),de&&_.log(`[Tracing] Starting ${u.op} transaction on scope`);const{location:d}=ie,f=Gn(n,u,s,i,!0,{location:d},o,a);return a&&ie.document&&(ie.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(ie.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(ie.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(h=>{this._collectWebVitals(),co(h)}),f}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=qn();if(a&&a.op&&["navigation","pageload"].includes(a.op)){de&&_.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){de&&_.warn(`[Tracing] Did not create ${o} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){de&&_.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:l}=ie,u={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[vt]:this._latestRoute.context?Na(this._latestRoute.context):"url"}};t=Gn(c,u,r,s,!0,{location:l},i)};["click"].forEach(r=>{ie.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:n})=>{const r=G(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=qn(),a=Me(),c=a!==void 0?a.getUser():void 0;n.forEach(l=>{if(Pa(l)){const u=l.interactionId;if(u===void 0)return;const d=this._interactionIdToRouteNameMapping[u],f=l.duration,h=l.startTime,p=Object.keys(this._interactionIdToRouteNameMapping),g=p.length>0?p.reduce((b,m)=>this._interactionIdToRouteNameMapping[b].duration<this._interactionIdToRouteNameMapping[m].duration?b:m):void 0;if(l.entryType==="first-input"&&p.map(m=>this._interactionIdToRouteNameMapping[m]).some(m=>m.duration===f&&m.startTime===h)||!u)return;if(d)d.duration=Math.max(d.duration,f);else if(p.length<Qn||g===void 0||f>this._interactionIdToRouteNameMapping[g].duration){const b=this._latestRoute.name,m=this._latestRoute.context;b&&m&&(g&&Object.keys(this._interactionIdToRouteNameMapping).length>=Qn&&delete this._interactionIdToRouteNameMapping[g],this._interactionIdToRouteNameMapping[u]={routeName:b,duration:f,parentContext:m,user:c,activeTransaction:o,replayId:i,startTime:h})}}})};rn("event",t),rn("first-input",t)}}function er(e){const t=lo(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function Na(e){const t=e.attributes&&e.attributes[vt],n=e.data&&e.data[vt],r=e.metadata&&e.metadata.source;return t||n||r}function Pa(e){return"duration"in e}const Fa=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumbs:uo,Dedupe:fo,GlobalHandlers:ho,HttpContext:po,LinkedErrors:mo,TryCatch:go},Symbol.toStringTag,{value:"Module"})),B=oe,Cn="sentryReplaySession",Ba="replay_event",Tn="Unable to send Replay",Ha=3e5,Ua=9e5,$a=5e3,za=5500,Wa=6e4,ja=5e3,Ga=3,tr=15e4,ut=5e3,qa=3e3,Va=300,Rn=2e7,Ka=4999,Ya=15e3,nr=36e5;function Xa(e,t){return e??t()}function It(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var K;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(K||(K={}));function Ja(e){return e.nodeType===e.ELEMENT_NODE}function Je(e){const t=It([e,"optionalAccess",n=>n.host]);return It([t,"optionalAccess",n=>n.shadowRoot])===e}function Ze(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Za(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Qa(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 kt(e){try{const t=e.rules||e.cssRules;return t?Za(Array.from(t,hs).join("")):null}catch{return null}}function hs(e){let t;if(tc(e))try{t=kt(e.styleSheet)||Qa(e)}catch{}else if(nc(e)&&e.selectorText.includes(":"))return ec(e.cssText);return t||e.cssText}function ec(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function tc(e){return"styleSheet"in e}function nc(e){return"selectorText"in e}class ps{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=It([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Xa(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rc(){return new ps}function Nt({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function tt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function je(e){return e.toLowerCase()}function an(e){return e.toUpperCase()}const rr="__rrweb_original__";function sc(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=rr in i?i[rr]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function xn(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?je(t):null}function Ct(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}let ic=1;const oc=new RegExp("[^a-z0-9-_:]"),nt=-2;function Mn(){return ic++}function ac(e){if(e instanceof HTMLFormElement)return"form";const t=je(e.tagName);return oc.test(t)?"div":t}function cc(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let De,sr;const lc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,uc=/^(?:[a-z+]+:)?\/\//i,dc=/^www\..*/i,fc=/^(data:)([^,]*),(.*)/i;function Tt(e,t){return(e||"").replace(lc,(n,r,s,i,o,a)=>{const c=s||o||a,l=r||i||"";if(!c)return n;if(uc.test(c)||dc.test(c))return`url(${l}${c}${l})`;if(fc.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${cc(t)+c}${l})`;const u=t.split("/"),d=c.split("/");u.pop();for(const f of d)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${l}${u.join("/")}${l})`})}const hc=/^[^ \t\n\r\u000c]+/,pc=/^[, \t\n\r\u000c]+/;function mc(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(pc),!(n>=t.length);){let i=r(hc);if(i.slice(-1)===",")i=Be(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Be(e,i);let a=!1;for(;;){const c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function Be(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function gc(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function An(){const e=document.createElement("a");return e.href="",e.href}function ms(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Be(e,r):n==="srcset"?mc(e,r):n==="style"?Tt(r,An()):t==="object"&&n==="data"?Be(e,r):typeof i=="function"?i(n,r,s):r)}function gs(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function yc(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 _c(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Re(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Re(e.parentNode,t,n,r+1)}function He(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(_c(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ge(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 l=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let a=-1,c=-1;if(i){if(c=Re(o,He(r,s)),c<0)return!0;a=Re(o,He(t,n),c>=0?c:1/0)}else{if(a=Re(o,He(t,n)),a<0)return!1;c=Re(o,He(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function bc(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Sc(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function wc(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:g,maskInputFn:b,dataURLOptions:m={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:I,newlyAddedElement:x=!1}=t,E=vc(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:e.compatMode}:{type:K.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return Ic(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:p,maskInputFn:b,dataURLOptions:m,inlineImages:y,recordCanvas:v,keepIframeSrcFn:I,newlyAddedElement:x,rootId:E,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return Ec(e,{maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:p,maskInputFn:b,rootId:E});case e.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:K.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function vc(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Ec(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,p=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||It([e,"access",m=>m.parentNode,"access",m=>m.sheet,"optionalAccess",m=>m.cssRules])&&(f=kt(e.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,e)}f=Tt(f,An())}p&&(f="SCRIPT_PLACEHOLDER");const b=Ge(e,r,i,s,o,n);if(!h&&!p&&!g&&f&&b&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(c.textarea||b)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const m=Nt({type:null,tagName:d,maskInputOptions:c});f=tt({isMasked:Ge(e,r,i,s,o,m),element:e,value:f,maskInputFn:l})}return{type:K.Text,textContent:f||"",isStyle:h,rootId:u}}function Ic(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:g,maskAllText:b,maskTextClass:m,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:I}=t,x=yc(e,r,s,i),E=ac(e);let S={};const C=e.attributes.length;for(let w=0;w<C;w++){const k=e.attributes[w];k.name&&!gs(E,k.name,k.value)&&(S[k.name]=ms(n,E,je(k.name),k.value,e,c))}if(E==="link"&&o){const w=Array.from(n.styleSheets).find(D=>D.href===e.href);let k=null;w&&(k=kt(w)),k&&(delete S.rel,delete S.href,S._cssText=Tt(k,w.href))}if(E==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const w=kt(e.sheet);w&&(S._cssText=Tt(w,An()))}if(E==="input"||E==="textarea"||E==="select"||E==="option"){const w=e,k=xn(w),D=Ct(w,an(E),k),z=w.checked;if(k!=="submit"&&k!=="button"&&D){const V=Ge(w,m,v,y,I,Nt({type:k,tagName:an(E),maskInputOptions:a}));S.value=tt({isMasked:V,element:w,value:D,maskInputFn:l})}z&&(S.checked=z)}if(E==="option"&&(e.selected&&!a.select?S.selected=!0:delete S.selected),E==="canvas"&&f){if(e.__context==="2d")sc(e)||(S.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const w=e.toDataURL(u.type,u.quality),k=document.createElement("canvas");k.width=e.width,k.height=e.height;const D=k.toDataURL(u.type,u.quality);w!==D&&(S.rr_dataURL=w)}}if(E==="img"&&d){De||(De=n.createElement("canvas"),sr=De.getContext("2d"));const w=e,k=w.crossOrigin;w.crossOrigin="anonymous";const D=()=>{w.removeEventListener("load",D);try{De.width=w.naturalWidth,De.height=w.naturalHeight,sr.drawImage(w,0,0),S.rr_dataURL=De.toDataURL(u.type,u.quality)}catch(z){console.warn(`Cannot inline img src=${w.currentSrc}! Error: ${z}`)}k?S.crossOrigin=k:w.removeAttribute("crossorigin")};w.complete&&w.naturalWidth!==0?D():w.addEventListener("load",D)}if((E==="audio"||E==="video")&&(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),x){const{width:w,height:k}=e.getBoundingClientRect();S={class:S.class,rr_width:`${w}px`,rr_height:`${k}px`}}E==="iframe"&&!h(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let H;try{customElements.get(E)&&(H=!0)}catch{}return{type:K.Element,tagName:E,attributes:S,childNodes:[],isSVG:gc(e)||void 0,needBlock:x,rootId:g,isCustom:H}}function F(e){return e==null?"":e.toLowerCase()}function kc(e,t){if(t.comment&&e.type===K.Comment)return!0;if(e.type===K.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(F(e.attributes.name).match(/^msapplication-tile(image|color)$/)||F(e.attributes.name)==="application-name"||F(e.attributes.rel)==="icon"||F(e.attributes.rel)==="apple-touch-icon"||F(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&F(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(F(e.attributes.property).match(/^(og|twitter|fb):/)||F(e.attributes.name).match(/^(og|twitter):/)||F(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(F(e.attributes.name)==="robots"||F(e.attributes.name)==="googlebot"||F(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(F(e.attributes.name)==="author"||F(e.attributes.name)==="generator"||F(e.attributes.name)==="framework"||F(e.attributes.name)==="publisher"||F(e.attributes.name)==="progid"||F(e.attributes.property).match(/^article:/)||F(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(F(e.attributes.name)==="google-site-verification"||F(e.attributes.name)==="yandex-verification"||F(e.attributes.name)==="csrf-token"||F(e.attributes.name)==="p:domain_verify"||F(e.attributes.name)==="verify-v1"||F(e.attributes.name)==="verification"||F(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ue(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v={},inlineImages:I=!1,recordCanvas:x=!1,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:C=5e3,onStylesheetLoad:H,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:D=!1}=t;let{preserveWhiteSpace:z=!0}=t;const V=wc(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,dataURLOptions:v,inlineImages:I,recordCanvas:x,keepIframeSrcFn:k,newlyAddedElement:D});if(!V)return console.warn(e,"not serialized"),null;let ne;r.hasNode(e)?ne=r.getId(e):kc(V,y)||!z&&V.type===K.Text&&!V.isStyle&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?ne=nt:ne=Mn();const N=Object.assign(V,{id:ne});if(r.add(e,N),ne===nt)return null;E&&E(e);let se=!f;if(N.type===K.Element){se=se&&!N.needBlock,delete N.needBlock;const q=e.shadowRoot;q&&Ze(q)&&(N.isShadowHost=!0)}if((N.type===K.Document||N.type===K.Element)&&se){y.headWhitespace&&N.type===K.Element&&N.tagName==="head"&&(z=!1);const q={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:I,recordCanvas:x,preserveWhiteSpace:z,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:H,stylesheetLoadTimeout:w,keepIframeSrcFn:k};for(const Q of Array.from(e.childNodes)){const ae=Ue(Q,q);ae&&N.childNodes.push(ae)}if(Ja(e)&&e.shadowRoot)for(const Q of Array.from(e.shadowRoot.childNodes)){const ae=Ue(Q,q);ae&&(Ze(e.shadowRoot)&&(ae.isShadow=!0),N.childNodes.push(ae))}}return e.parentNode&&Je(e.parentNode)&&Ze(e.parentNode)&&(N.isShadow=!0),N.type===K.Element&&N.tagName==="iframe"&&bc(e,()=>{const q=e.contentDocument;if(q&&S){const Q=Ue(q,{doc:q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:I,recordCanvas:x,preserveWhiteSpace:z,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:H,stylesheetLoadTimeout:w,keepIframeSrcFn:k});Q&&S(e,Q)}},C),N.type===K.Element&&N.tagName==="link"&&N.attributes.rel==="stylesheet"&&Sc(e,()=>{if(H){const q=Ue(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:I,recordCanvas:x,preserveWhiteSpace:z,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:H,stylesheetLoadTimeout:w,keepIframeSrcFn:k});q&&H(e,q)}},w),N}function Cc(e,t){const{mirror:n=new ps,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:g,maskTextFn:b,maskInputFn:m,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:I,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:H,keepIframeSrcFn:w=()=>!1}=t||{};return Ue(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,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:g,maskTextFn:b,maskInputFn:m,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:v,inlineImages:f,recordCanvas:h,preserveWhiteSpace:I,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:H,keepIframeSrcFn:w,newlyAddedElement:!1})}function ge(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Z(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Pe=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let ir={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ir=new Proxy(ir,{get(e,t,n){return t==="map"&&console.error(Pe),Reflect.get(e,t,n)}}));function rt(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),c=this;a<=0||a>t?(r&&(Lc(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Pt(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function ys(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Pt(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>ys(e,t,i||{},!0)}function On(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 Rt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Rt=()=>new Date().getTime());function _s(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:ge([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||ge([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||ge([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:ge([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||ge([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||ge([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function bs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ss(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ws(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ue(e,t,n,r,s){if(!e)return!1;const i=ws(e);if(!i)return!1;const o=He(t,n);if(!s){const l=r&&i.matches(r);return o(i)&&!l}const a=Re(i,o);let c=-1;return a<0?!1:(r&&(c=Re(i,He(null,r))),a>-1&&c<0?!0:a<c)}function Tc(e,t){return t.getId(e)!==-1}function Yt(e,t){return t.getId(e)===nt}function vs(e,t){if(Je(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?vs(e.parentNode,t):!0:!0}function cn(e){return!!e.changedTouches}function Rc(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 Es(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Is(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ln(e){return!!ge([e,"optionalAccess",t=>t.shadowRoot])}class xc{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Jo(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 ks(e){let t=null;return ge([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Mc(e){let t=e,n;for(;n=ks(t);)t=n;return t}function Ac(e){const t=e.ownerDocument;if(!t)return!1;const n=Mc(e);return t.contains(n)}function Cs(e){const t=e.ownerDocument;return t?t.contains(e)||Ac(e):!1}const or={};function Ln(e){const t=or[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 or[e]=r.bind(window)}function Oc(...e){return Ln("requestAnimationFrame")(...e)}function Pt(...e){return Ln("setTimeout")(...e)}function Lc(...e){return Ln("clearTimeout")(...e)}var T=(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))(T||{}),R=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(R||{}),X=(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))(X||{}),pe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(pe||{});function Dc(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function ar(e){return"__ln"in e}class Nc{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=Dc([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&ar(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&&ar(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 cr=(e,t)=>`${e}@${t}`;class Pc{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 Nc,s=c=>{let l=c,u=nt;for(;u===nt;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},i=c=>{if(!c.parentNode||!Cs(c))return;const l=Je(c.parentNode)?this.mirror.getId(ks(c)):this.mirror.getId(c.parentNode),u=s(c);if(l===-1||u===-1)return r.addNode(c);const d=Ue(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Es(f,this.mirror)&&this.iframeManager.addIframe(f),Is(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ln(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{this.iframeManager.attachIframe(f,h),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});d&&(t.push({parentId:l,nextId:u,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)lr(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!ur(this.droppedSet,c)&&!lr(this.removes,c,this.mirror)||ur(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){const l=this.mirror.getId(o.value.parentNode),u=s(o.value);l!==-1&&u!==-1&&(c=o)}if(!c){let l=r.tail;for(;l;){const u=l;if(l=l.previous,u){const d=this.mirror.getId(u.value.parentNode);if(s(u.value)===-1)continue;if(d!==-1){c=u;break}else{const h=u.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:l}=c;if(typeof l.style=="string"){const u=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);u.length<l.style.length&&(u+d).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Yt(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ge(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,ws(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=xn(n),a=n.tagName;s=Ct(n,a,o);const c=Nt({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),l=Ge(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);s=tt({isMasked:l,element:n,value:s,maskInputFn:this.maskInputFn})}if(ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!gs(n.tagName,r)&&(i.attributes[r]=ms(this.doc,je(n.tagName),je(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==o.style.getPropertyValue(a)||l!==o.style.getPropertyPriority(a)?l===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,l]:i._unchangedStyles[a]=[c,l]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(ue(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=Je(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Yt(n,this.mirror)||!Tc(n,this.mirror)||(this.addedSet.has(n)?(un(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||vs(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[cr(r,s)]?un(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Je(t.target)&&Ze(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(Yt(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[cr(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ue(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),ln(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function un(e,t){e.delete(t),t.childNodes.forEach(n=>un(e,n))}function lr(e,t,n){return e.length===0?!1:Ts(e,t,n)}function Ts(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(i=>i.id===s)?!0:Ts(e,r,n)}function ur(e,t){return e.size===0?!1:Rs(e,t)}function Rs(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Rs(e,n):!1}let Qe;function Fc(e){Qe=e}function Bc(){Qe=void 0}const M=e=>Qe?(...n)=>{try{return e(...n)}catch(r){if(Qe&&Qe(r)===!0)return()=>{};throw r}}:e;function fe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const $e=[];function ot(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 xs(e,t){const n=new Pc;$e.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=fe([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(M(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 Hc({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const c=rt(M(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),i),l=M(rt(M(d=>{const f=ot(d),{clientX:h,clientY:p}=cn(d)?d.changedTouches[0]:d;a||(a=Rt()),o.push({x:h,y:p,id:r.getId(f),timeOffset:Rt()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?R.Drag:d instanceof MouseEvent?R.MouseMove:R.TouchMove)}),s,{trailing:!1})),u=[Z("mousemove",l,n),Z("touchmove",l,n),Z("drag",l,n)];return M(()=>{u.forEach(d=>d())})}function Uc({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[];let l=null;const u=d=>f=>{const h=ot(f);if(ue(h,r,s,i,!0))return;let p=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":p=pe.Mouse;break;case"touch":p=pe.Touch;break;case"pen":p=pe.Pen;break}p===pe.Touch?X[d]===X.MouseDown?g="TouchStart":X[d]===X.MouseUp&&(g="TouchEnd"):pe.Pen}else cn(f)&&(p=pe.Touch);p!==null?(l=p,(g.startsWith("Touch")&&p===pe.Touch||g.startsWith("Mouse")&&p===pe.Mouse)&&(p=null)):X[d]===X.Click&&(p=l,l=null);const b=cn(f)?f.changedTouches[0]:f;if(!b)return;const m=n.getId(h),{clientX:y,clientY:v}=b;M(e)({type:X[g],id:m,x:y,y:v,...p!==null&&{pointerType:p}})};return Object.keys(X).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=je(d);const h=u(d);if(window.PointerEvent)switch(X[d]){case X.MouseDown:case X.MouseUp:f=f.replace("mouse","pointer");break;case X.TouchStart:case X.TouchEnd:return}c.push(Z(f,h,t))}),M(()=>{c.forEach(d=>d())})}function Ms({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=M(rt(M(c=>{const l=ot(c);if(!l||ue(l,r,s,i,!0))return;const u=n.getId(l);if(l===t&&t.defaultView){const d=_s(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return Z("scroll",a,t)}function $c({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=M(rt(M(()=>{const i=bs(),o=Ss();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return Z("resize",s,t)}const zc=["INPUT","TEXTAREA","SELECT"],dr=new WeakMap;function Wc({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:g}){function b(S){let C=ot(S);const H=S.isTrusted,w=C&&an(C.tagName);if(w==="OPTION"&&(C=C.parentElement),!C||!w||zc.indexOf(w)<0||ue(C,r,s,i,!0))return;const k=C;if(k.classList.contains(o)||a&&k.matches(a))return;const D=xn(C);let z=Ct(k,w,D),V=!1;const ne=Nt({maskInputOptions:c,tagName:w,type:D}),N=Ge(C,f,p,h,g,ne);(D==="radio"||D==="checkbox")&&(V=C.checked),z=tt({isMasked:N,element:C,value:z,maskInputFn:l}),m(C,d?{text:z,isChecked:V,userTriggered:H}:{text:z,isChecked:V});const se=C.name;D==="radio"&&se&&V&&t.querySelectorAll(`input[type="radio"][name="${se}"]`).forEach(q=>{if(q!==C){const Q=tt({isMasked:N,element:q,value:Ct(q,w,D),maskInputFn:l});m(q,d?{text:Q,isChecked:!V,userTriggered:!1}:{text:Q,isChecked:!V})}})}function m(S,C){const H=dr.get(S);if(!H||H.text!==C.text||H.isChecked!==C.isChecked){dr.set(S,C);const w=n.getId(S);M(e)({...C,id:w})}}const v=(u.input==="last"?["change"]:["input","change"]).map(S=>Z(S,M(b),t)),I=t.defaultView;if(!I)return()=>{v.forEach(S=>S())};const x=I.Object.getOwnPropertyDescriptor(I.HTMLInputElement.prototype,"value"),E=[[I.HTMLInputElement.prototype,"value"],[I.HTMLInputElement.prototype,"checked"],[I.HTMLSelectElement.prototype,"value"],[I.HTMLTextAreaElement.prototype,"value"],[I.HTMLSelectElement.prototype,"selectedIndex"],[I.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&v.push(...E.map(S=>ys(S[0],S[1],{set(){M(b)({target:this,isTrusted:!1})}},!1,I))),M(()=>{v.forEach(S=>S())})}function xt(e){const t=[];function n(r,s){if(dt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||dt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||dt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||dt("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 ye(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function jc({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:M((u,d,f)=>{const[h,p]=f,{id:g,styleId:b}=ye(d,t,n.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,adds:[{rule:h,index:p}]}),u.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:M((u,d,f)=>{const[h]=f,{id:p,styleId:g}=ye(d,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,removes:[{index:h}]}),u.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:M((u,d,f)=>{const[h]=f,{id:p,styleId:g}=ye(d,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,replace:h}),u.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:M((u,d,f)=>{const[h]=f,{id:p,styleId:g}=ye(d,t,n.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,replaceSync:h}),u.apply(d,f)})}));const c={};ft("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ft("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ft("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ft("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([u,d])=>{l[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(l[u].insertRule,{apply:M((f,h,p)=>{const[g,b]=p,{id:m,styleId:y}=ye(h.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:g,index:[...xt(h),b||0]}]}),f.apply(h,p)})}),d.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:M((f,h,p)=>{const[g]=p,{id:b,styleId:m}=ye(h.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||m&&m!==-1)&&e({id:b,styleId:m,removes:[{index:[...xt(h),g]}]}),f.apply(h,p)})})}),M(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,d])=>{d.prototype.insertRule=l[u].insertRule,d.prototype.deleteRule=l[u].deleteRule})})}function As({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"?fe([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):fe([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=fe([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(fe([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return fe([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=fe([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),M(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Gc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:M((a,c,l)=>{const[u,d,f]=l;if(n.has(u))return i.apply(c,[u,d,f]);const{id:h,styleId:p}=ye(fe([c,"access",g=>g.parentRule,"optionalAccess",g=>g.parentStyleSheet]),t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:u,value:d,priority:f},index:xt(c.parentRule)}),a.apply(c,l)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:M((a,c,l)=>{const[u]=l;if(n.has(u))return o.apply(c,[u]);const{id:d,styleId:f}=ye(fe([c,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:u},index:xt(c.parentRule)}),a.apply(c,l)})}),M(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function qc({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=M(l=>rt(M(u=>{const d=ot(u);if(!d||ue(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:g}=d;e({type:l,id:s.getId(d),currentTime:f,volume:h,muted:p,playbackRate:g})}),i.media||500)),c=[Z("play",a(0),o),Z("pause",a(1),o),Z("seeked",a(2),o),Z("volumechange",a(3),o),Z("ratechange",a(4),o)];return M(()=>{c.forEach(l=>l())})}function Vc({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,l,u){const d=new i(c,l,u);return s.set(d,{family:c,buffer:typeof l!="string",descriptors:u,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d};const o=On(t.fonts,"add",function(a){return function(c){return Pt(M(()=>{const l=s.get(c);l&&(e(l),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),M(()=>{r.forEach(a=>a())})}function Kc(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const c=M(()=>{const l=t.getSelection();if(!l||a&&fe([l,"optionalAccess",f=>f.isCollapsed]))return;a=l.isCollapsed||!1;const u=[],d=l.rangeCount||0;for(let f=0;f<d;f++){const h=l.getRangeAt(f),{startContainer:p,startOffset:g,endContainer:b,endOffset:m}=h;ue(p,r,s,i,!0)||ue(b,r,s,i,!0)||u.push({start:n.getId(p),startOffset:g,end:n.getId(b),endOffset:m})}o({ranges:u})});return c(),Z("selectionchange",c)}function Yc({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:On(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function Xc(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=xs(e,e.doc),s=Hc(e),i=Uc(e),o=Ms(e),a=$c(e,{win:n}),c=Wc(e),l=qc(e),u=jc(e,{win:n}),d=As(e,e.doc),f=Gc(e,{win:n}),h=e.collectFonts?Vc(e):()=>{},p=Kc(e),g=Yc(e),b=[];for(const m of e.plugins)b.push(m.observer(m.callback,n,m.options));return M(()=>{$e.forEach(m=>m.reset()),r.disconnect(),s(),i(),o(),a(),c(),l(),u(),d(),f(),h(),p(),g(),b.forEach(m=>m())})}function dt(e){return typeof window[e]<"u"}function ft(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class dn{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function fr(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class Jc{constructor(){this.crossOriginIframeMirror=new dn(Mn),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Zc{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new dn(Mn),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dn(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}),fr([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case T.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:T.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case T.Meta:case T.Load:case T.DomContentLoaded:return!1;case T.Plugin:return n;case T.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case T.IncrementalSnapshot:switch(n.data.source){case R.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case R.Drag:case R.TouchMove:case R.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(n.data,t,["id"]),n;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case R.Font:return n;case R.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case R.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),fr([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==K.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Qc{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class el{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(!Ze(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=xs({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ms({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Pt(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(As({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(On(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Cs(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class hr{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class tl{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new xc,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:hs(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class nl{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Oc(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let W,Mt;const le=rc();function Se(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:b,slimDOMOptions:m,maskAttributeFn:y,maskInputFn:v,maskTextFn:I,maxCanvasSize:x=null,packFn:E,sampling:S={},dataURLOptions:C={},mousemoveWait:H,recordCanvas:w=!1,recordCrossOriginIframes:k=!1,recordAfter:D=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:z=!1,collectFonts:V=!1,inlineImages:ne=!1,plugins:N,keepIframeSrcFn:se=()=>!1,ignoreCSSAttributes:q=new Set([]),errorHandler:Q,onMutation:ae,getCanvasManager:Wt}=e;Fc(Q);const Oe=k?window.parent===window:!0;let me=!1;if(!Oe)try{window.parent.document&&(me=!1)}catch{me=!0}if(Oe&&!t)throw new Error("emit function is required");H!==void 0&&S.mousemove===void 0&&(S.mousemove=H),le.reset();const Le=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:b!==void 0?b:{},Ye=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};Rc();let jt,Gt=0;const zn=O=>{for(const ce of N||[])ce.eventProcessor&&(O=ce.eventProcessor(O));return E&&!me&&(O=E(O)),O};W=(O,ce)=>{const A=O;if(A.timestamp=Rt(),_t([$e,"access",$=>$[0],"optionalAccess",$=>$.isFrozen,"call",$=>$()])&&A.type!==T.FullSnapshot&&!(A.type===T.IncrementalSnapshot&&A.data.source===R.Mutation)&&$e.forEach($=>$.unfreeze()),Oe)_t([t,"optionalCall",$=>$(zn(A),ce)]);else if(me){const $={type:"rrweb",event:zn(A),origin:window.location.origin,isCheckout:ce};window.parent.postMessage($,"*")}if(A.type===T.FullSnapshot)jt=A,Gt=0;else if(A.type===T.IncrementalSnapshot){if(A.data.source===R.Mutation&&A.data.isAttachIframe)return;Gt++;const $=r&&Gt>=r,L=n&&jt&&A.timestamp-jt.timestamp>n;($||L)&&Vt(!0)}};const ct=O=>{W({type:T.IncrementalSnapshot,data:{source:R.Mutation,...O}})},Wn=O=>W({type:T.IncrementalSnapshot,data:{source:R.Scroll,...O}}),Ni=O=>W({type:T.IncrementalSnapshot,data:{source:R.CanvasMutation,...O}}),Pi=O=>W({type:T.IncrementalSnapshot,data:{source:R.AdoptedStyleSheet,...O}}),ve=new tl({mutationCb:ct,adoptedStyleSheetCb:Pi}),Ee=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Jc:new Zc({mirror:le,mutationCb:ct,stylesheetManager:ve,recordCrossOriginIframes:k,wrappedEmit:W});for(const O of N||[])O.getMirror&&O.getMirror({nodeMirror:le,crossOriginIframeMirror:Ee.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ee.crossOriginIframeStyleMirror});const qt=new nl,jn=sl(Wt,{mirror:le,win:window,mutationCb:O=>W({type:T.IncrementalSnapshot,data:{source:R.CanvasMutation,...O}}),recordCanvas:w,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:x,sampling:S.canvas,dataURLOptions:C,errorHandler:Q}),lt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Qc:new el({mutationCb:ct,scrollCb:Wn,bypassOptions:{onMutation:ae,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:Le,dataURLOptions:C,maskAttributeFn:y,maskTextFn:I,maskInputFn:v,recordCanvas:w,inlineImages:ne,sampling:S,slimDOMOptions:Ye,iframeManager:Ee,stylesheetManager:ve,canvasManager:jn,keepIframeSrcFn:se,processedNodeManager:qt},mirror:le}),Vt=(O=!1)=>{W({type:T.Meta,data:{href:window.location.href,width:Ss(),height:bs()}},O),ve.reset(),lt.init(),$e.forEach(A=>A.lock());const ce=Cc(document,{mirror:le,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:Le,maskAttributeFn:y,maskInputFn:v,maskTextFn:I,slimDOM:Ye,dataURLOptions:C,recordCanvas:w,inlineImages:ne,onSerialize:A=>{Es(A,le)&&Ee.addIframe(A),Is(A,le)&&ve.trackLinkElement(A),ln(A)&&lt.addShadowRoot(A.shadowRoot,document)},onIframeLoad:(A,$)=>{Ee.attachIframe(A,$),lt.observeAttachShadow(A)},onStylesheetLoad:(A,$)=>{ve.attachLinkElement(A,$)},keepIframeSrcFn:se});if(!ce)return console.warn("Failed to snapshot the document");W({type:T.FullSnapshot,data:{node:ce,initialOffset:_s(window)}}),$e.forEach(A=>A.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};Mt=Vt;try{const O=[],ce=$=>M(Xc)({onMutation:ae,mutationCb:ct,mousemoveCb:(L,Ie)=>W({type:T.IncrementalSnapshot,data:{source:Ie,positions:L}}),mouseInteractionCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.MouseInteraction,...L}}),scrollCb:Wn,viewportResizeCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.ViewportResize,...L}}),inputCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.Input,...L}}),mediaInteractionCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.MediaInteraction,...L}}),styleSheetRuleCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.StyleSheetRule,...L}}),styleDeclarationCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.StyleDeclaration,...L}}),canvasMutationCb:Ni,fontCb:L=>W({type:T.IncrementalSnapshot,data:{source:R.Font,...L}}),selectionCb:L=>{W({type:T.IncrementalSnapshot,data:{source:R.Selection,...L}})},customElementCb:L=>{W({type:T.IncrementalSnapshot,data:{source:R.CustomElement,...L}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:Le,inlineStylesheet:p,sampling:S,recordCanvas:w,inlineImages:ne,userTriggeredOnInput:z,collectFonts:V,doc:$,maskAttributeFn:y,maskInputFn:v,maskTextFn:I,keepIframeSrcFn:se,blockSelector:i,unblockSelector:o,slimDOMOptions:Ye,dataURLOptions:C,mirror:le,iframeManager:Ee,stylesheetManager:ve,shadowDomManager:lt,processedNodeManager:qt,canvasManager:jn,ignoreCSSAttributes:q,plugins:_t([N,"optionalAccess",L=>L.filter,"call",L=>L(Ie=>Ie.observer),"optionalAccess",L=>L.map,"call",L=>L(Ie=>({observer:Ie.observer,options:Ie.options,callback:Fi=>W({type:T.Plugin,data:{plugin:Ie.name,payload:Fi}})}))])||[]},{});Ee.addLoadListener($=>{try{O.push(ce($.contentDocument))}catch(L){console.warn(L)}});const A=()=>{Vt(),O.push(ce(document))};return document.readyState==="interactive"||document.readyState==="complete"?A():(O.push(Z("DOMContentLoaded",()=>{W({type:T.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&A()})),O.push(Z("load",()=>{W({type:T.Load,data:{}}),D==="load"&&A()},window))),()=>{O.forEach($=>$()),qt.destroy(),Mt=void 0,Bc()}}catch(O){console.warn(O)}}function rl(e){if(!Mt)throw new Error("please take full snapshot after start recording");Mt(e)}Se.mirror=le;Se.takeFullSnapshot=rl;function sl(e,t){try{return e?e(t):new hr}catch{return console.warn("Unable to initialize CanvasManager"),new hr}}const il=3,ol=5;function Dn(e){return e>9999999999?e:e*1e3}function Xt(e){return e>9999999999?e/1e3:e}function at(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:T.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:wn(t,10,1e3)}}),t.category==="console")))}const al="button,a";function Os(e){return e.closest(al)||e}function Ls(e){const t=Ds(e);return!t||!(t instanceof Element)?t:Os(t)}function Ds(e){return cl(e)?e.target:e}function cl(e){return typeof e=="object"&&!!e&&"target"in e}let _e;function ll(e){return _e||(_e=[],ul()),_e.push(e),()=>{const t=_e?_e.indexOf(e):-1;t>-1&&_e.splice(t,1)}}function ul(){vo(B,"open",function(e){return function(...t){if(_e)try{_e.forEach(n=>n())}catch{}return e.apply(B,t)}})}function dl(e,t,n){e.handleClick(t,n)}class fl{constructor(t,n,r=at){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=ll(()=>{this._lastMutation=pr()});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(pl(n,this._ignoreSelector)||!ml(t))return;const r={timestamp:Xt(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=Xt(t)}registerScroll(t=Date.now()){this._lastScroll=Xt(t)}registerClick(t){const n=Os(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=pr();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=c<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:B.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:l,clickCount:o||1}};this._addBreadcrumbEvent(n,u);return}if(o>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:B.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}}const hl=["A","BUTTON","INPUT"];function pl(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 ml(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function pr(){return Date.now()/1e3}function gl(e,t){try{if(!yl(t))return;const{source:n}=t.data;if(n===R.Mutation&&e.registerMutation(t.timestamp),n===R.Scroll&&e.registerScroll(t.timestamp),_l(t)){const{type:r,id:s}=t.data,i=Se.mirror.getNode(s);i instanceof HTMLElement&&r===X.Click&&e.registerClick(i)}}catch{}}function yl(e){return e.type===il}function _l(e){return e.data.source===R.MouseInteraction}function he(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var At;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(At||(At={}));const bl=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Sl(e){const t={};for(const n in e)if(bl.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const wl=e=>t=>{if(!e.isEnabled())return;const n=vl(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&dl(e.clickDetector,n,Ls(t.event)),at(e,n)};function Ns(e,t){const n=Se.mirror.getId(e),r=n&&Se.mirror.getNode(n),s=r&&Se.mirror.getMeta(r),i=s&&Il(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===At.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Sl(i.attributes)}}:{}}}function vl(e){const{target:t,message:n}=El(e);return he({category:`ui.${e.name}`,...Ns(t,n)})}function El(e){const t=e.name==="click";let n,r=null;try{r=t?Ls(e.event):Ds(e.event),n=Xr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Il(e){return e.type===At.Element}function kl(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Cl(t);n&&at(e,n)}function Cl(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Tl(o)||!i)return null;const a=t||r||s,c=i.length===1;if(!a&&c)return null;const l=Xr(o,{maxStringLength:200})||"<unknown>",u=Ns(o,l);return he({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Tl(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const mr={resource:Ol,paint:Ml,navigation:Al};function Rl(e){return e.map(xl).filter(Boolean)}function xl(e){return mr[e.entryType]?mr[e.entryType](e):null}function qe(e){return((et||B.performance.timeOrigin)+e)/1e3}function Ml(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=qe(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Al(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:qe(h),end:qe(i),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Ol(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:qe(i),end:qe(s),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Ll(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=qe(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Se.mirror.getId(r):void 0}}}function Dl(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(rn(s,n))}),r.push(yo(({metric:s})=>{e.replayPerformanceEntries.push(Ll(s))})),()=>{r.forEach(s=>s())}}const P=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nl='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();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,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.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)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}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}(),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(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}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(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Pl(){const e=new Blob([Nl]);return URL.createObjectURL(e)}function J(e,t){P&&(_.info(e),t&&Ps(e))}function We(e,t){P&&(_.info(e),t&&setTimeout(()=>{Ps(e)},0))}function Ps(e){_o({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class Nn extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Rn}.`)}}class Fs{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Rn)throw new Nn;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Dn(t):null}}class Fl{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){J("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){P&&_.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Bl{constructor(t){this._worker=new Fl(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Dn(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Rn?Promise.reject(new Nn):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{P&&_.warn('[Replay] 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 Hl{constructor(t){this._fallback=new Fs,this._compression=new Bl(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{J("[Replay] Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){P&&_.warn("[Replay] Failed to add events when switching buffers.",s)}}}function Ul({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=$l(t);if(n)return n}return J("[Replay] Using simple buffer"),new Fs}function $l(e){try{const t=e||zl();if(!t)return;J(`[Replay] Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Hl(n)}catch{J("[Replay] Failed to create compression worker")}}function zl(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Pl():""}function Pn(){try{return"sessionStorage"in B&&!!B.sessionStorage}catch{return!1}}function Wl(e){jl(),e.session=void 0}function jl(){if(Pn())try{B.sessionStorage.removeItem(Cn)}catch{}}function Bs(e){return e===void 0?!1:Math.random()<e}function Hs(e){const t=Date.now(),n=e.id||vn(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function Fn(e){if(Pn())try{B.sessionStorage.setItem(Cn,JSON.stringify(e))}catch{}}function Gl(e,t){return Bs(e)?"session":t?"buffer":!1}function gr({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Gl(e,t),i=Hs({sampled:s,previousSessionId:r});return n&&Fn(i),i}function ql(e){if(!Pn())return null;try{const t=B.sessionStorage.getItem(Cn);if(!t)return null;const n=JSON.parse(t);return We("[Replay] Loading existing session",e),Hs(n)}catch{return null}}function fn(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Us(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return fn(e.started,t,r)||fn(e.lastActivity,n,r)}function $s(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Us(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Jt({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&ql(e);return i?$s(i,{sessionIdleExpire:t,maxReplayDuration:n})?(We("[Replay] Session in sessionStorage is expired, creating new one..."),gr(s,{previousSessionId:i.id})):i:(We("[Replay] Creating new session",e),gr(s,{previousSessionId:r}))}function Vl(e){return e.type===T.Custom}function Bn(e,t,n){return Ws(e,t)?(zs(e,t,n),!0):!1}function Kl(e,t,n){return Ws(e,t)?zs(e,t,n):Promise.resolve(null)}async function zs(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=Yl(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof Nn?"addEventSizeExceeded":"addEvent";P&&_.error(r),await e.stop({reason:s});const i=G();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function Ws(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Dn(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(J(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function Yl(e,t){try{if(typeof t=="function"&&Vl(e))return t(e)}catch(n){return P&&_.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function Hn(e){return!e.type}function hn(e){return e.type==="transaction"}function Xl(e){return e.type==="replay_event"}function yr(e){return e.type==="feedback"}function js(e){const t=Ql();return(n,r)=>{if(!e.isEnabled()||!Hn(n)&&!hn(n))return;const s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if(hn(n)){Jl(e,n);return}Zl(e,n)}}}function Jl(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Zl(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function Ql(){const e=G();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function eu(e){return t=>{!e.isEnabled()||!Hn(t)||tu(e,t)}}function tu(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=he({category:"replay.hydrate-error"});at(e,r)}}function nu(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function ru(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:T.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 su(e,t){return e.recordingMode!=="buffer"||t.message===Tn||!t.exception||t.type?!1:Bs(e.getOptions().errorSampleRate)}function iu(e,t=!1){const n=t?js(e):void 0;return Object.assign((r,s)=>e.isEnabled()?Xl(r)?(delete r.breadcrumbs,r):!Hn(r)&&!hn(r)&&!yr(r)||!e.checkAndHandleExpiredSession()?r:yr(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),ru(e,r),r):nu(r,s)&&!e.getOptions()._experiments.captureExceptions?(P&&_.log("[Replay] Ignoring error from rrweb internals",r),null):((su(e,r)||e.recordingMode==="session")&&(r.tags={...r.tags,replayId:e.getSessionId()}),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Ft(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:T.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function ou(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 au(e){return t=>{if(!e.isEnabled())return;const n=ou(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Ft(e,[n]),!1)))}}function cu(e,t){return P&&e.getOptions()._experiments.traceInternals?!1:as(t,G())}function Bt(e,t){e.isEnabled()&&t!==null&&(cu(e,t.name)||e.addUpdate(()=>(Ft(e,[t]),!0)))}function lu(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function uu(e){return t=>{if(!e.isEnabled())return;const n=lu(t);Bt(e,n)}}function du(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[En];if(!t||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function fu(e){return t=>{if(!e.isEnabled())return;const n=du(t);Bt(e,n)}}function Ht(e,t){if(e)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=Ks(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Gs(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function qs(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ks(e)];if(!e)return[void 0]}catch{return P&&_.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return P&&_.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ot(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 Vs(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:Yr({method:i,statusCode:o,request:a,response:c})}}function st(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function we(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}=hu(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function pn(e,t){return Object.keys(e).reduce((n,r)=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function Ks(e){return new URLSearchParams(e).toString()}function hu(e){if(!e||typeof e!="string")return{body:e};const t=e.length>tr,n=pu(e);if(t){const r=e.slice(0,tr);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 pu(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Lt(e,t){const n=mu(e);return To(n,t)}function mu(e,t=B.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(B.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function gu(e,t,n){try{const r=await _u(e,t,n),s=Vs("resource.fetch",r);Bt(n.replay,s)}catch(r){P&&_.error("[Replay] Failed to capture fetch breadcrumb",r)}}function yu(e,t,n){const{input:r,response:s}=t,i=r?Ys(r):void 0,o=Ht(i,n.textEncoder),a=s?Gs(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}async function _u(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Lt(o,n.networkDetailAllowUrls)&&!Lt(o,n.networkDetailDenyUrls),f=d?bu(n,t.input,l):st(l),h=await Su(d,n,t.response,u);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:f,response:h}}function bu({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Eu(n,t):{};if(!e)return we(s,r,void 0);const i=Ys(n),[o,a]=qs(i),c=we(s,r,o);return a?Ot(c,a):c}async function Su(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return st(i);const o=s?Xs(s.headers,r):{};if(!s||!t&&i!==void 0)return we(o,i,void 0);const[a,c]=await vu(s),l=wu(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:o});return c?Ot(l,c):l}function wu(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=e&&e.length&&r===void 0?Ht(e,n):r;return s?t?we(i,o,e):we(i,o,void 0):st(o)}catch(o){return P&&_.warn("[Replay] Failed to serialize response body",o),we(i,r,void 0)}}async function vu(e){const t=Iu(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await ku(t)]}catch(n){return P&&_.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}function Ys(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function Xs(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Eu(e,t){return e.length===1&&typeof e[0]!="string"?_r(e[0],t):e.length===2?_r(e[1],t):{}}function _r(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Xs(n,t):Array.isArray(n)?{}:pn(n,t):{}}function Iu(e){try{return e.clone()}catch(t){P&&_.warn("[Replay] Failed to clone response body",t)}}function ku(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Cu(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Cu(e){return await e.text()}async function Tu(e,t,n){try{const r=xu(e,t,n),s=Vs("resource.xhr",r);Bt(n.replay,s)}catch(r){P&&_.error("[Replay] Failed to capture xhr breadcrumb",r)}}function Ru(e,t,n){const{xhr:r,input:s}=t;if(!r)return;const i=Ht(s,n.textEncoder),o=r.getResponseHeader("content-length")?Gs(r.getResponseHeader("content-length")):Lu(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function xu(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!a||!Lt(c,n.networkDetailAllowUrls)||Lt(c,n.networkDetailDenyUrls)){const E=st(d),S=st(f);return{startTimestamp:s,endTimestamp:i,url:c,method:l,statusCode:u,request:E,response:S}}const h=a[En],p=h?pn(h.request_headers,n.networkRequestHeaders):{},g=pn(Mu(a),n.networkResponseHeaders),[b,m]=n.networkCaptureBodies?qs(o):[void 0],[y,v]=n.networkCaptureBodies?Au(a):[void 0],I=we(p,d,b),x=we(g,f,y);return{startTimestamp:s,endTimestamp:i,url:c,method:l,statusCode:u,request:m?Ot(I,m):I,response:v?Ot(x,v):x}}function Mu(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function Au(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Ou(e.response,e.responseType)}catch(n){t.push(n)}return P&&_.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function Ou(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{return P&&_.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return P&&_.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lu(e,t,n){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Ht(r,n)}catch{return}}function Du(e){const t=G();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(l,u)=>Nu(c,l,u)):(Jr(uu(e)),Zr(fu(e)))}catch{}}function Nu(e,t,n){if(t.data)try{Pu(t)&&Bu(n)&&(Ru(t,n,e),Tu(t,n,e)),Fu(t)&&Hu(n)&&(yu(t,n,e),gu(t,n,e))}catch{P&&_.warn("Error when enriching network breadcrumb")}}function Pu(e){return e.category==="xhr"}function Fu(e){return e.category==="fetch"}function Bu(e){return e&&e.xhr}function Hu(e){return e&&e.response}let br=null;function Uu(e){return!!e.category}const $u=e=>t=>{if(!e.isEnabled())return;const n=zu(t);n&&at(e,n)};function zu(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return br===t||!t||(br=t,!Uu(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?Wu(t):he(t)}function Wu(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return he(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>ut?(n=!0,`${s.slice(0,ut)}…`):s;if(typeof s=="object")try{const i=wn(s,7);return JSON.stringify(i).length>ut?(n=!0,`${JSON.stringify(i,null,2).slice(0,ut)}…`):i}catch{}return s});return he({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ju(e){const t=Me(),n=G();t.addScopeListener($u(e)),bo(wl(e)),Kr(au(e)),Du(e);const r=iu(e,!Sr(n));n&&n.addEventProcessor?n.addEventProcessor(r):So(r),Sr(n)&&(n.on("beforeSendEvent",eu(e)),n.on("afterSendEvent",js(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{const o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function Sr(e){return!!(e&&e.on)}async function Gu(e){try{return Promise.all(Ft(e,[qu(B.performance.memory)]))}catch{return[]}}function qu(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 Vu(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function l(){return s!==void 0||i!==void 0?a():r}function u(){return s&&clearTimeout(s),s=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return u.cancel=c,u.flush=l,u}function Ku(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){P&&_.warn("[Replay] Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&gl(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Bn(e,n,s))return!0;if(!s)return!1;if(Xu(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const i=e.eventBuffer.getEarliestTimestamp();i&&(J(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&Fn(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function Yu(e){const t=e.getOptions();return{type:T.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 Xu(e,t){!t||!e.session||e.session.segmentId!==0||Bn(e,Yu(e),!1)}function Ju(e,t,n,r){return qr(ko(e,Co(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Zu({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function Qu({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&&e.emit("preprocessEvent",r,i);const o=await Qr(e.getOptions(),r,i,t,e,es());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata&&e.getSdkMetadata(),{name:c,version:l}=a&&a.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:l||"0.0.0"},o}async function ed({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=Zu({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=G(),f=Me(),h=d&&d.getTransport(),p=d&&d.getDsn();if(!d||!h||!p||!i.sampled)return;const g={type:Ba,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},b=await Qu({scope:f,client:d,replayId:t,event:g});if(!b){d.recordDroppedEvent("event_processor","replay",g),J("An event processor returned `null`, will not send event.");return}delete b.sdkProcessingMetadata;const m=Ju(b,o,p,d.getOptions().tunnel);let y;try{y=await h.send(m)}catch(I){const x=new Error(Tn);try{x.cause=I}catch{}throw x}if(!y)return y;if(typeof y.statusCode=="number"&&(y.statusCode<200||y.statusCode>=300))throw new Js(y.statusCode);const v=Eo({},y);if(Io(v,"replay"))throw new Zs(v);return y}class Js extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Zs extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Qs(e,t={count:0,interval:ja}){const{recordingData:n,options:r}=e;if(n.length)try{return await ed(e),!0}catch(s){if(s instanceof Js||s instanceof Zs)throw s;if(wo("Replays",{_retryCount:t.count}),P&&r._experiments&&r._experiments.captureExceptions&&Sn(s),t.count>=Ga){const i=new Error(`${Tn} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{setTimeout(async()=>{try{await Qs(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const ei="__THROTTLED",td="__SKIPPED";function nd(e,t,n){const r=new Map,s=a=>{const c=a-n;r.forEach((l,u)=>{u<c&&r.delete(u)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0);let o=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){const u=o;return o=!0,u?td:ei}o=!1;const l=r.get(c)||0;return r.set(c,l+1),e(...a)}}class be{constructor({options:t,recordingOptions:n}){be.prototype.__init.call(this),be.prototype.__init2.call(this),be.prototype.__init3.call(this),be.prototype.__init4.call(this),be.prototype.__init5.call(this),be.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Ha,sessionIdleExpire:Ua},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!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=Vu(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=nd((o,a)=>Kl(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(qa,r),timeout:r,scrollTimeout:Va,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new fl(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(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",We(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");We("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=Jt({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");We("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Jt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Se({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Wa},emit:Ku(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{J(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Wl(this)}catch(r){this._handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),J("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),J("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();J("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&fn(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${B.location.pathname}${B.location.hash}${B.location.search}`,n=`${B.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===ei){const s=he({category:"replay.throttled"});this.addUpdate(()=>!Bn(this,{type:ol,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastTransaction||Me().getTransaction(),r=(t&&Te(t).data||{})[vt];if(!(!t||!r||!["route","custom"].includes(r)))return Te(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Ul({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){P&&_.error("[Replay]",t),P&&this._options._experiments&&this._options._experiments.captureExceptions&&Sn(t)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Jt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,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 $s(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{B.document.addEventListener("visibilitychange",this._handleVisibilityChange),B.addEventListener("blur",this._handleWindowBlur),B.addEventListener("focus",this._handleWindowFocus),B.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(ju(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Dl(this)}_removeListeners(){try{B.document.removeEventListener("visibilitychange",this._handleVisibilityChange),B.removeEventListener("blur",this._handleWindowBlur),B.removeEventListener("focus",this._handleWindowFocus),B.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{B.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=he({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=he({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{kl(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Us(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){J("[Replay] 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:T.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=Rl(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Ft(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){P&&_.error("[Replay] No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await Gu(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await Qs({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});const r=G();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){P&&_.error("[Replay] 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){J(`[Replay] Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),i&&this._debouncedFlush();return}const a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&J("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(c){P&&_.error(c)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Fn(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=he({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Xe(e,t,n,r){const s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Et(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function rd({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:l}){const u=['base[href="/"]'],d=Xe(e,[".sentry-mask","[data-sentry-mask]"],a,c),f=Xe(t,[".sentry-unmask","[data-sentry-unmask]"]),h={maskTextSelector:d,unmaskTextSelector:f,blockSelector:Xe(n,[".sentry-block","[data-sentry-block]",...u],i,o),unblockSelector:Xe(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Xe(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return i instanceof RegExp&&(h.blockClass=i),a instanceof RegExp&&(h.maskTextClass=a),h}function sd({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const wr='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',id=["content-length","content-type","accept"];let vr=!1;const gh=e=>new Ut(e);class Ut{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=$a,flushMaxDelay:n=za,minReplayDuration:r=Ka,maxReplayDuration:s=nr,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:l,errorSampleRate:u,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:p=750,mutationLimit:g=1e4,slowClickTimeout:b=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:v=[],networkCaptureBodies:I=!0,networkRequestHeaders:x=[],networkResponseHeaders:E=[],mask:S=[],maskAttributes:C=["title","placeholder"],unmask:H=[],block:w=[],unblock:k=[],ignore:D=[],maskFn:z,beforeAddRecordingEvent:V,beforeErrorSampling:ne,blockClass:N,blockSelector:se,maskInputOptions:q,maskTextClass:Q,maskTextSelector:ae,ignoreClass:Wt}={}){this.name=Ut.id;const Oe=rd({mask:S,unmask:H,block:w,unblock:k,ignore:D,blockClass:N,blockSelector:se,maskTextClass:Q,maskTextSelector:ae,ignoreClass:Wt});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...q||{},password:!0},maskTextFn:z,maskInputFn:z,maskAttributeFn:(me,Le,Ye)=>sd({maskAttributes:C,maskAllText:d,privacyOptions:Oe,key:me,value:Le,el:Ye}),...Oe,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:me=>{try{me.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Ya),maxReplayDuration:Math.min(s,nr),stickySession:i,sessionSampleRate:l,errorSampleRate:u,useCompression:o,workerUrl:a,blockAllMedia:h,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:g,slowClickTimeout:b,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:v,networkCaptureBodies:I,networkRequestHeaders:Er(x),networkResponseHeaders:Er(E),beforeAddRecordingEvent:V,beforeErrorSampling:ne,_experiments:c},typeof l=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),typeof u=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${wr}`:wr),this._isInitialized&&on())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return vr}set _isInitialized(t){vr=t}setupOnce(){on()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=od(this._initialOptions);this._replay=new be({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const n=G().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Ut.__initStatic();function od(e){const t=G(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Yr(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Et(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Et(()=>{console.warn("SDK client is not available.")}),r)}function Er(e){return[...id,...e.map(t=>t.toLowerCase())]}function yh(){const e=G();return e&&e.getIntegrationByName&&e.getIntegrationByName("Replay")}var Ir;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Ir||(Ir={}));function ad(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function mn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:mn(e.parentNode,t,n,r+1)}function kr(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(ad(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Fe=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let Cr={map:{},getId(){return console.error(Fe),-1},getNode(){return console.error(Fe),null},removeNodeFromMap(){console.error(Fe)},has(){return console.error(Fe),!1},reset(){console.error(Fe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Cr=new Proxy(Cr,{get(e,t,n){return t==="map"&&console.error(Fe),Reflect.get(e,t,n)}}));function Un(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){ni(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Un(e,t,i||{},!0)}function $n(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()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString());function cd(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function $t(e,t,n,r,s){if(!e)return!1;const i=cd(e);if(!i)return!1;const o=kr(t,n),a=mn(i,o);let c=-1;return a<0?!1:(r&&(c=mn(i,kr(null,r))),a>-1&&c<0?!0:a<c)}const Tr={};function ti(e){const t=Tr[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 Tr[e]=r.bind(window)}function ke(...e){return ti("requestAnimationFrame")(...e)}function ni(...e){return ti("setTimeout")(...e)}var Ve=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ve||{});let bt;function ld(e){bt=e}const Rr=e=>bt?(...n)=>{try{return e(...n)}catch(r){if(bt&&bt(r)===!0)return()=>{};throw r}}:e;var ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ud=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ht=0;ht<ze.length;ht++)ud[ze.charCodeAt(ht)]=ht;var dd=function(e){var t=new Uint8Array(e),n,r=t.length,s="";for(n=0;n<r;n+=3)s+=ze[t[n]>>2],s+=ze[(t[n]&3)<<4|t[n+1]>>4],s+=ze[(t[n+1]&15)<<2|t[n+2]>>6],s+=ze[t[n+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const xr=new Map;function fd(e,t){let n=xr.get(e);return n||(n=new Map,xr.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const ri=(e,t,n)=>{if(!e||!(ii(e,t)||typeof e=="object"))return;const r=e.constructor.name,s=fd(n,r);let i=s.indexOf(e);return i===-1&&(i=s.length,s.push(e)),i};function St(e,t,n){if(e instanceof Array)return e.map(r=>St(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,s=dd(e);return{rr_type:r,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[St(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:s}=e;return{rr_type:r,src:s}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",s=e.toDataURL();return{rr_type:r,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[St(e.data,t,n),e.width,e.height]};if(ii(e,t)||typeof e=="object"){const r=e.constructor.name,s=ri(e,t,n);return{rr_type:r,index:s}}}}return e}const si=(e,t,n)=>e.map(r=>St(r,t,n)),ii=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function hd(e,t,n,r,s){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=$n(t.CanvasRenderingContext2D.prototype,a,function(l){return function(...u){return $t(this.canvas,n,r,s,!0)||ni(()=>{const d=si(u,t,this);e(this.canvas,{type:Ve["2D"],property:a,args:d})},0),l.apply(this,u)}});i.push(c)}catch{const l=Un(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Ve["2D"],property:a,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(a=>a())}}function pd(e){return e==="experimental-webgl"?"webgl":e}function Mr(e,t,n,r,s){const i=[];try{const o=$n(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...l){if(!$t(this,t,n,r,!0)){const u=pd(c);if("__context"in this||(this.__context=u),s&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const d=l[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...l])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Ar(e,t,n,r,s,i,o,a){const c=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const d=$n(e,u,function(f){return function(...h){const p=f.apply(this,h);if(ri(p,a,this),"tagName"in this.canvas&&!$t(this.canvas,r,s,i,!0)){const g=si(h,a,this),b={type:t,property:u,args:g};n(this.canvas,b)}return p}});c.push(d)}catch{const f=Un(e,u,{set(h){n(this.canvas,{type:t,property:u,args:[h],setter:!0})}});c.push(f)}return c}function md(e,t,n,r,s,i){const o=[];return o.push(...Ar(t.WebGLRenderingContext.prototype,Ve.WebGL,e,n,r,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Ar(t.WebGL2RenderingContext.prototype,Ve.WebGL2,e,n,r,s,i,t)),()=>{o.forEach(a=>a())}}var gd='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function yd(){const e=new Blob([gd]);return URL.createObjectURL(e)}class _d{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)};const{sampling:n="all",win:r,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:a,recordCanvas:c,dataURLOptions:l,errorHandler:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,u&&ld(u),!t.enableManualSnapshot&&Rr(()=>{c&&n==="all"&&this.initCanvasMutationObserver(r,s,i,o),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,s,i,o,a,{dataURLOptions:l})})()}initCanvasFPSObserver(t,n,r,s,i,o,a){const c=Mr(n,r,s,i,!0),l=this.takeSnapshot(!1,t,n,r,s,i,o,a.dataURLOptions);this.resetObservers=()=>{c(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,n,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Mr(t,n,r,s,!1),o=hd(this.processMutation.bind(this),t,n,r,s),a=md(this.processMutation.bind(this),t,n,r,s,this.mirror);this.resetObservers=()=>{i(),o(),a()}}snapshot(t){const{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.win,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.resetObservers=()=>{cancelAnimationFrame(r)}}takeSnapshot(t,n,r,s,i,o,a,c,l){const u=new Map,d=new Worker(yd());d.onmessage=m=>{const y=m.data,{id:v}=y;if(u.set(v,!1),!("base64"in y))return;const{base64:I,type:x,width:E,height:S}=y;this.mutationCb({id:v,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,E,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:I}],type:x}]},0,0,E,S]}]})};const f=1e3/n;let h=0,p;const g=m=>{if(m)return[m];const y=[];return r.document.querySelectorAll("canvas").forEach(v=>{$t(v,s,i,o)||y.push(v)}),y},b=m=>{if(h&&m-h<f){p=ke(b);return}h=m,g(l).forEach(y=>{const v=this.mirror.getId(y);if(!u.get(v)&&!(!y.width||!y.height)){if(u.set(v,!0),!t&&["webgl","webgl2"].includes(y.__context)){const I=y.getContext(y.__context);_t([I,"optionalAccess",x=>x.getContextAttributes,"call",x=>x(),"optionalAccess",x=>x.preserveDrawingBuffer])===!1&&I.clear(I.COLOR_BUFFER_BIT)}createImageBitmap(y).then(I=>{d.postMessage({id:v,bitmap:I,width:y.width,height:y.height,dataURLOptions:c,maxCanvasSize:a},[I])}).catch(I=>{Rr(()=>{throw I})()})}}),p=ke(b)};return p=ke(b),p}startPendingCanvasMutationFlusher(){ke(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,ke(t)};ke(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),ke(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const s=r.map(o=>{const{type:a,...c}=o;return c}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:s}),this.pendingCanvasMutations.delete(t)}}const Or={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},oi="ReplayCanvas",pt=1280,bd=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,pt):pt,n?Math.min(n,pt):pt]};let s;const i=new Promise(o=>s=o);return{name:oi,setupOnce(){},getOptions(){const{quality:o,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:l=>{const u=new _d({...l,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return s(u),u},...Or[o||"medium"]||Or.medium}},async snapshot(o){(await i).snapshot(o)}}},Sd=ee(bd),_h=te(oi,Sd),Ae=oe,Zt="#ffffff",Lr="inherit",Qt="rgba(108, 95, 199, 1)",Dr={fontFamily:"system-ui, 'Helvetica Neue', Arial, sans-serif",fontSize:"14px",background:Zt,backgroundHover:"#f6f6f7",foreground:"#2b2233",border:"1.5px solid rgba(41, 35, 47, 0.13)",borderRadius:"25px",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",success:"#268d75",error:"#df3338",submitBackground:"rgba(88, 74, 192, 1)",submitBackgroundHover:Qt,submitBorder:Qt,submitOutlineFocus:"#29232f",submitForeground:Zt,submitForegroundHover:Zt,cancelBackground:"transparent",cancelBackgroundHover:"var(--background-hover)",cancelBorder:"var(--border)",cancelOutlineFocus:"var(--input-outline-focus)",cancelForeground:"var(--foreground)",cancelForegroundHover:"var(--foreground)",inputBackground:Lr,inputForeground:Lr,inputBorder:"var(--border)",inputOutlineFocus:Qt,formBorderRadius:"20px",formContentBorderRadius:"6px"},Nr={light:Dr,dark:{...Dr,background:"#29232f",backgroundHover:"#352f3b",foreground:"#ebe6ef",border:"1.5px solid rgba(235, 230, 239, 0.15)",success:"#2da98c",error:"#f55459"}},wd="Report a Bug",vd="Cancel",Ed="Send Bug Report",Id="Report a Bug",kd="your.email@example.org",Cd="Email",Td="What's the bug? What did you expect?",Rd="Description",xd="Your Name",Md="Name",Ad="(required)",Od="Thank you for your report!",ai="widget",ci="api";async function Ld({client:e,scope:t,event:n}){const r={};e.emit&&e.emit("preprocessEvent",n,r);const s=await Qr(e.getOptions(),n,r,t,e,es());return s===null?(e.recordDroppedEvent("event_processor","feedback",n),null):(s.platform=s.platform||"javascript",s)}async function Dd({feedback:{message:e,email:t,name:n,source:r,url:s}},{includeReplay:i=!0}={}){const o=G(),a=o&&o.getTransport(),c=o&&o.getDsn();if(!o||!a||!c)return;const l={contexts:{feedback:{contact_email:t,name:n,message:e,url:s,source:r}},type:"feedback"};return In(async u=>{u.clearBreadcrumbs(),[ci,ai].includes(String(r))&&u.setLevel("info");const d=await Ld({scope:u,client:o,event:l});if(!d)return;o.emit&&o.emit("beforeSendFeedback",d,{includeReplay:!!i});const f=xo(d,c,o.getOptions()._metadata,o.getOptions().tunnel);let h;try{h=await a.send(f)}catch(p){const g=new Error("Unable to send Feedback");try{g.cause=p}catch{}throw g}if(h){if(typeof h.statusCode=="number"&&(h.statusCode<200||h.statusCode>=300))throw new Error("Unable to send Feedback");return h}})}function Nd({name:e,email:t,message:n,source:r=ci,url:s=Ro()},i={}){if(!n)throw new Error("Unable to submit feedback with empty message");return Dd({feedback:{name:e,email:t,message:n,url:s,source:r}},i)}const Ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pr(e,t){return{...e,...t,themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Pd(e){const t=e.createElement("style");return t.textContent=`
.widget__actor {
  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);
  z-index: var(--z-index);

  line-height: 16px;

  display: flex;
  align-items: center;
  gap: 8px;

  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 600;
  padding: 16px;
  text-decoration: none;
  z-index: 9000;

  color: var(--foreground);
  background-color: var(--background);
  border: var(--border);
  box-shadow: var(--box-shadow);
  opacity: 1;
  transition: opacity 0.1s ease-in-out;
}

.widget__actor:hover {
  background-color: var(--background-hover);
}

.widget__actor svg {
  width: 16px;
  height: 16px;
}

.widget__actor--hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.widget__actor__text {
}

@media (max-width: 600px) {
  .widget__actor__text {
    display: none;
  }
}

.feedback-icon path {
  fill: var(--foreground);
}
`,t}function Fd(e){const t=e.createElement("style");return t.textContent=`
.dialog {
  line-height: 25px;
  background-color: rgba(0, 0, 0, 0.05);
  border: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.dialog:not([open]) {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.dialog:not([open]) .dialog__content {
  transform: translate(0, -16px) scale(0.98);
}

.dialog__content {
  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);

  border: var(--border);
  border-radius: var(--form-border-radius);
  background-color: var(--background);
  color: var(--foreground);

  width: 320px;
  max-width: 100%;
  max-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: var(--box-shadow);
  transition: transform 0.2s ease-in-out;
  transform: translate(0, 0) scale(1);
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  padding: 24px 24px 0 24px;
  margin: 0;
  margin-bottom: 16px;
}

.brand-link {
  display: inline-flex;
}

.error {
  color: var(--error);
  margin-bottom: 16px;
}

.form {
  display: grid;
  overflow: auto;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px 24px;
}

.form__error-container {
  color: var(--error);
}

.form__error-container--hidden {
  display: none;
}

.form__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0px;
}

.form__label__text {
  display: grid;
  gap: 4px;
  align-items: center;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}

.form__label__text--required {
  font-size: 0.85em;
}

.form__input {
  line-height: inherit;
  background-color: var(--input-background);
  box-sizing: border-box;
  border: var(--input-border);
  border-radius: var(--form-content-border-radius);
  color: var(--input-foreground);
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 500;
  padding: 6px 12px;
}

.form__input::placeholder {
  color: var(--input-foreground);
  opacity: 0.65;
}

.form__input:focus-visible {
  outline: 1px auto var(--input-outline-focus);
}

.form__input--textarea {
  font-family: inherit;
  resize: vertical;
}

.btn-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.btn {
  line-height: inherit;
  border: var(--cancel-border);
  border-radius: var(--form-content-border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size);
  font-weight: 600;
  padding: 6px 16px;
}
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn--primary {
  background-color: var(--submit-background);
  border-color: var(--submit-border);
  color: var(--submit-foreground);
}
.btn--primary:hover {
  background-color: var(--submit-background-hover);
  color: var(--submit-foreground-hover);
}
.btn--primary:focus-visible {
  outline: 1px auto var(--submit-outline-focus);
}

.btn--default {
  background-color: var(--cancel-background);
  color: var(--cancel-foreground);
  font-weight: 500;
}
.btn--default:hover {
  background-color: var(--cancel-background-hover);
  color: var(--cancel-foreground-hover);
}
.btn--default:focus-visible {
  outline: 1px auto var(--cancel-outline-focus);
}

.success-message {
  background-color: var(--background);
  border: var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-weight: 600;
  color: var(--success);
  padding: 12px 24px;
  line-height: 25px;
  display: grid;
  align-items: center;
  grid-auto-flow: column;
  gap: 6px;
  cursor: default;
}

.success-icon path {
  fill: var(--success);
}
`,t}function Fr(e){return`
  --background: ${e.background};
  --background-hover: ${e.backgroundHover};
  --foreground: ${e.foreground};
  --error: ${e.error};
  --success: ${e.success};
  --border: ${e.border};
  --border-radius: ${e.borderRadius};
  --box-shadow: ${e.boxShadow};

  --submit-background: ${e.submitBackground};
  --submit-background-hover: ${e.submitBackgroundHover};
  --submit-border: ${e.submitBorder};
  --submit-outline-focus: ${e.submitOutlineFocus};
  --submit-foreground: ${e.submitForeground};
  --submit-foreground-hover: ${e.submitForegroundHover};

  --cancel-background: ${e.cancelBackground};
  --cancel-background-hover: ${e.cancelBackgroundHover};
  --cancel-border: ${e.cancelBorder};
  --cancel-outline-focus: ${e.cancelOutlineFocus};
  --cancel-foreground: ${e.cancelForeground};
  --cancel-foreground-hover: ${e.cancelForegroundHover};

  --input-background: ${e.inputBackground};
  --input-foreground: ${e.inputForeground};
  --input-border: ${e.inputBorder};
  --input-outline-focus: ${e.inputOutlineFocus};

  --form-border-radius: ${e.formBorderRadius};
  --form-content-border-radius: ${e.formContentBorderRadius};
  `}function Bd(e,t,n){const r=e.createElement("style");return r.textContent=`
:host {
  --bottom: 1rem;
  --right: 1rem;
  --top: auto;
  --left: auto;
  --z-index: 100000;
  --font-family: ${n.light.fontFamily};
  --font-size: ${n.light.fontSize};

  position: fixed;
  left: var(--left);
  right: var(--right);
  bottom: var(--bottom);
  top: var(--top);
  z-index: var(--z-index);

  font-family: var(--font-family);
  font-size: var(--font-size);

  ${Fr(t==="dark"?n.dark:n.light)}
}

${t==="system"?`
@media (prefers-color-scheme: dark) {
  :host {
    ${Fr(n.dark)}
  }
}`:""}
}`,r}function Hd({id:e,colorScheme:t,themeDark:n,themeLight:r}){try{const s=Ae.document,i=s.createElement("div");i.id=e;const o=i.attachShadow({mode:"open"});return o.appendChild(Bd(s,t,{dark:n,light:r})),o.appendChild(Fd(s)),{shadow:o,host:i}}catch{throw _.warn("[Feedback] Browser does not support shadow DOM API"),new Error("Browser does not support shadow DOM API.")}}async function Ud(e,t,n){if(!e)return;const r=()=>{e&&e.showError("There was a problem submitting feedback, please wait and try again.")};e.hideError();try{return await Nd({...t,source:ai},n)}catch(s){Ce&&_.error(s),r()}}function re(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Ne=20,$d="http://www.w3.org/2000/svg";function zd(){const e=a=>Ae.document.createElementNS($d,a),t=re(e("svg"),{class:"feedback-icon",width:`${Ne}`,height:`${Ne}`,viewBox:`0 0 ${Ne} ${Ne}`,fill:"none"}),n=re(e("g"),{clipPath:"url(#clip0_57_80)"}),r=re(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const s=e("defs"),i=re(e("clipPath"),{id:"clip0_57_80"}),o=re(e("rect"),{width:`${Ne}`,height:`${Ne}`,fill:"white"});return i.appendChild(o),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(o),{get el(){return t}}}function U(e,t,...n){const s=Ae.document.createElement(e);t&&Object.entries(t).forEach(([i,o])=>{i==="className"&&typeof o=="string"?s.setAttribute("class",o):typeof o=="boolean"&&o?s.setAttribute(i,""):typeof o=="string"?s.setAttribute(i,o):i.startsWith("on")&&typeof o=="function"&&s.addEventListener(i.substring(2).toLowerCase(),o)});for(const i of n)li(s,i);return s}function li(e,t){const n=Ae.document;if(!(typeof t>"u"||t===null))if(Array.isArray(t))for(const r of t)li(e,r);else t===!1||(typeof t=="string"?e.appendChild(n.createTextNode(t)):t instanceof Node?e.appendChild(t):e.appendChild(n.createTextNode(String(t))))}function Wd({buttonLabel:e,onClick:t}){function n(s){t&&t(s)}const r=U("button",{type:"button",className:"widget__actor","aria-label":e,"aria-hidden":"false"},zd().el,e?U("span",{className:"widget__actor__text"},e):null);return r.addEventListener("click",n),{get el(){return r},show:()=>{r.classList.remove("widget__actor--hidden"),r.setAttribute("aria-hidden","false")},hide:()=>{r.classList.add("widget__actor--hidden"),r.setAttribute("aria-hidden","true")}}}function jd({label:e}){return{el:U("button",{type:"submit",className:"btn btn--primary","aria-label":e},e)}}function en(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Gd({nameLabel:e,namePlaceholder:t,emailLabel:n,emailPlaceholder:r,messageLabel:s,messagePlaceholder:i,isRequiredLabel:o,cancelButtonLabel:a,submitButtonLabel:c,showName:l,showEmail:u,isNameRequired:d,isEmailRequired:f,defaultName:h,defaultEmail:p,onCancel:g,onSubmit:b}){const{el:m}=jd({label:c});function y(k){if(k.preventDefault(),k.target instanceof HTMLFormElement)try{if(b){const D=new FormData(k.target),z={name:en(D,"name"),email:en(D,"email"),message:en(D,"message")};b(z)}}catch{}}const v=U("div",{className:"form__error-container form__error-container--hidden","aria-hidden":"true"});function I(k){v.textContent=k,v.classList.remove("form__error-container--hidden"),v.setAttribute("aria-hidden","false")}function x(){v.textContent="",v.classList.add("form__error-container--hidden"),v.setAttribute("aria-hidden","true")}const E=U("input",{id:"name",type:l?"text":"hidden","aria-hidden":l?"false":"true",name:"name",required:d,className:"form__input",placeholder:t,value:h}),S=U("input",{id:"email",type:u?"text":"hidden","aria-hidden":u?"false":"true",name:"email",required:f,className:"form__input",placeholder:r,value:p}),C=U("textarea",{id:"message",autoFocus:"true",rows:"5",name:"message",required:!0,className:"form__input form__input--textarea",placeholder:i}),H=U("button",{type:"button",className:"btn btn--default","aria-label":a,onClick:k=>{g&&g(k)}},a),w=U("form",{className:"form",onSubmit:y},[v,l&&U("label",{htmlFor:"name",className:"form__label"},[U("span",{className:"form__label__text"},e,d&&U("span",{className:"form__label__text--required"},` ${o}`)),E]),!l&&E,u&&U("label",{htmlFor:"email",className:"form__label"},[U("span",{className:"form__label__text"},n,f&&U("span",{className:"form__label__text--required"},` ${o}`)),S]),!u&&S,U("label",{htmlFor:"message",className:"form__label"},[U("span",{className:"form__label__text"},s,U("span",{className:"form__label__text--required"},` ${o}`)),C]),U("div",{className:"btn-group"},[m,H])]);return{get el(){return w},showError:I,hideError:x}}const qd="http://www.w3.org/2000/svg";function Vd({colorScheme:e}){const t=o=>Ae.document.createElementNS(qd,o),n=re(t("svg"),{class:"sentry-logo",width:"32",height:"30",viewBox:"0 0 72 66",fill:"none"}),r=re(t("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});n.append(r);const s=t("defs"),i=t("style");return i.textContent=`
    path {
      fill: ${e==="dark"?"#fff":"#362d59"};
    }`,e==="system"&&(i.textContent+=`
    @media (prefers-color-scheme: dark) {
      path: {
        fill: '#fff';
      }
    }
    `),s.append(i),n.append(s),{get el(){return n}}}function Kd({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:s,isEmailRequired:i,colorScheme:o,defaultName:a,defaultEmail:c,onClosed:l,onCancel:u,onSubmit:d,...f}){let h=null;function p(){g(),l&&l()}function g(){h&&(h.open=!1)}function b(){h&&(h.open=!0)}function m(){return h&&h.open===!0||!1}const{el:y,showError:v,hideError:I}=Gd({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:s,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:u,...f});return h=U("dialog",{className:"dialog",open:!0,onClick:p},U("div",{className:"dialog__content",onClick:x=>{x.stopPropagation()}},U("h2",{className:"dialog__header"},e,t&&U("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},Vd({colorScheme:o}).el)),y)),{get el(){return h},showError:v,hideError:I,open:b,close:g,checkIsOpen:m}}const mt=16,Br=17,Yd="http://www.w3.org/2000/svg";function Xd(){const e=c=>Ae.document.createElementNS(Yd,c),t=re(e("svg"),{class:"success-icon",width:`${mt}`,height:`${Br}`,viewBox:`0 0 ${mt} ${Br}`,fill:"none"}),n=re(e("g"),{clipPath:"url(#clip0_57_156)"}),r=re(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),s=re(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(s,r);const i=e("defs"),o=re(e("clipPath"),{id:"clip0_57_156"}),a=re(e("rect"),{width:`${mt}`,height:`${mt}`,fill:"white",transform:"translate(0 0.5)"});return o.appendChild(a),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(a),{get el(){return t}}}function Jd({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}const r=U("div",{className:"success-message",onClick:n},Xd().el,e);return{el:r,remove:n}}function Hr({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let s,i,o=!1;function a(){if(e)try{const m=Jd({message:n.successMessageText,onRemove:()=>{y&&clearTimeout(y),u()}});if(!m.el)throw new Error("Unable to show success message");e.appendChild(m.el);const y=setTimeout(()=>{m&&m.remove()},5e3)}catch(m){_.error(m)}}async function c(m){if(!i)return;const y=[];if(n.isNameRequired&&!m.name&&y.push(n.nameLabel),n.isEmailRequired&&!m.email&&y.push(n.emailLabel),m.message||y.push(n.messageLabel),y.length>0){i.showError(`Please enter in the following required fields: ${y.join(", ")}`);return}if(!await Ud(i,m)){n.onSubmitError&&n.onSubmitError();return}g(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function l(){const m=G(),y=m&&m.getIntegrationByName&&m.getIntegrationByName("Replay");y&&y.flush().catch(v=>{Ce&&_.error(v)})}function u(){s&&s.show()}function d(){s&&s.hide()}function f(){s&&s.el&&s.el.remove()}function h(){try{if(i){i.open(),o=!0,n.onFormOpen&&n.onFormOpen(),l();return}const m=n.useSentryUser,y=Me(),v=y&&y.getUser();if(i=Kd({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:m&&v&&v[m.name]||"",defaultEmail:m&&v&&v[m.email]||"",onClosed:()=>{u(),o=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{p(),u()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),l()}catch(m){_.error(m)}}function p(){i&&(i.close(),o=!1,n.onFormClose&&n.onFormClose())}function g(){if(i){p();const m=i.el;m&&m.remove(),i=void 0}}function b(){o||h(),d()}return r?r.addEventListener("click",b):t&&(s=Wd({buttonLabel:n.buttonLabel,onClick:b}),s.el&&e.appendChild(s.el)),{get actor(){return s},get dialog(){return i},showActor:u,hideActor:d,removeActor:f,openDialog:h,closeDialog:p,removeDialog:g}}const gt=Ae.document,bh=e=>new zt(e);class zt{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:s=!1,showBranding:i=!0,showEmail:o=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:l,themeLight:u,colorScheme:d="system",buttonLabel:f=wd,cancelButtonLabel:h=vd,submitButtonLabel:p=Ed,formTitle:g=Id,emailPlaceholder:b=kd,emailLabel:m=Cd,messagePlaceholder:y=Td,messageLabel:v=Rd,namePlaceholder:I=xd,nameLabel:x=Md,isRequiredLabel:E=Ad,successMessageText:S=Od,onFormClose:C,onFormOpen:H,onSubmitError:w,onSubmitSuccess:k}={}){this.name=zt.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:s,showEmail:o,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...Nr.dark,...l},themeLight:{...Nr.light,...u},buttonLabel:f,cancelButtonLabel:h,submitButtonLabel:p,formTitle:g,emailLabel:m,emailPlaceholder:b,messageLabel:v,messagePlaceholder:y,nameLabel:x,namePlaceholder:I,isRequiredLabel:E,successMessageText:S,onFormClose:C,onFormOpen:H,onSubmitError:w,onSubmitSuccess:k}}setupOnce(){if(on())try{this._cleanupWidgetIfExists();const{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){Ce&&_.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{const r=Pr(this.options,n||{});return this._ensureShadowHost(r,({shadow:s})=>{const i=typeof t=="string"?gt.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return Ce&&_.error("[Feedback] Unable to attach to target element"),null;const o=Hr({shadow:s,options:r,attachTo:i});return this._widgets.add(o),this._widget||(this._widget=o),o})}catch(r){return Ce&&_.error(r),null}}createWidget(t){try{return this._createWidget(Pr(this.options,t||{}))}catch(n){return Ce&&_.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){Ce&&_.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();const t=gt.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{const r=Hr({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(Pd(gt)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){const{id:i,colorScheme:o,themeLight:a,themeDark:c}=t,{shadow:l,host:u}=Hd({id:i,colorScheme:o,themeLight:a,themeDark:c});this._shadow=l,this._host=u,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;const s=n({shadow:this._shadow,host:this._host});return r&&gt.body.appendChild(this._host),s}}zt.__initStatic();const ui="CaptureConsole",Zd=(e={})=>{const t=e.levels||Mo;return{name:ui,setupOnce(){},setup(n){"console"in oe&&Ao(({args:r,level:s})=>{G()!==n||!t.includes(s)||ef(r,s)})}}},Qd=ee(Zd);te(ui,Qd);function ef(e,t){const n={level:Oo(t),extra:{arguments:e}};In(r=>{if(r.addEventProcessor(o=>(o.logger="console",ts(o,{handled:!1,type:"console"}),o)),t==="assert"&&e[0]===!1){const o=`Assertion failed: ${Vn(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),sn(o,n);return}const s=e.find(o=>o instanceof Error);if(t==="error"&&s){Sn(s,n);return}const i=Vn(e," ");sn(i,n)})}const di="Debug",tf=(e={})=>{const t={debugger:!1,stringify:!1,...e};return{name:di,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,s)=>{if(t.debugger)debugger;Et(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),s&&Object.keys(s).length&&console.log(JSON.stringify(s,null,2))):(console.log(r),s&&Object.keys(s).length&&console.log(s))})})}}},nf=ee(tf);te(di,nf);const Ke=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,fi="Dedupe",rf=()=>{let e;return{name:fi,setupOnce(){},processEvent(t){if(t.type)return t;try{if(of(t,e))return Ke&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},sf=ee(rf);te(fi,sf);function of(e,t){return t?!!(af(e,t)||cf(e,t)):!1}function af(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!pi(e,t)||!hi(e,t))}function cf(e,t){const n=Ur(t),r=Ur(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!pi(e,t)||!hi(e,t))}function hi(e,t){let n=$r(e),r=$r(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 pi(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 Ur(e){return e.exception&&e.exception.values&&e.exception.values[0]}function $r(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const mi="ExtraErrorData",lf=(e={})=>{const t=e.depth||3,n=e.captureErrorCause||!1;return{name:mi,setupOnce(){},processEvent(r,s){return df(r,s,t,n)}}},uf=ee(lf);te(mi,uf);function df(e,t={},n,r){if(!t.originalException||!yt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=ff(t.originalException,r);if(i){const o={...e.contexts},a=wn(i,n);return Lo(a)&&(Do(a,"__sentry_skip_normalization__",!0),o[s]=a),{...e,contexts:o}}return e}function ff(e,t){try{const n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const s of Object.keys(e)){if(n.indexOf(s)!==-1)continue;const i=e[s];r[s]=yt(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=yt(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const o=s[i];r[i]=yt(o)?o.toString():o}}return r}catch(n){Ke&&_.error("Unable to extract extra data from the Error object:",n)}return null}const hf=oe,gi="ReportingObserver",zr=new WeakMap,pf=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(zr.has(G()))for(const s of r)In(i=>{i.setExtra("url",s.url);const o=`ReportingObserver [${s.type}]`;let a="No details available";if(s.body){const c={};for(const l in s.body)c[l]=s.body[l];if(i.setExtra("body",c),s.type==="crash"){const l=s.body;a=[l.crashId||"",l.reason||""].join(" ").trim()||a}else a=s.body.message||a}sn(`${o}: ${a}`)})}return{name:gi,setupOnce(){if(!No())return;new hf.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){zr.set(r,!0)}}},mf=ee(pf);te(gi,mf);const yi="RewriteFrames",gf=(e={})=>{const t=e.root,n=e.prefix||"app:///",r=e.iteratee||(o=>{if(!o.filename)return o;const a=/^[a-zA-Z]:\\/.test(o.filename)||o.filename.includes("\\")&&!o.filename.includes("/"),c=/^\//.test(o.filename);if(a||c){const l=a?o.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):o.filename,u=t?Vo(t,l):Ko(l);o.filename=`${n}${u}`}return o});function s(o){try{return{...o,exception:{...o.exception,values:o.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return o}}function i(o){return{...o,frames:o&&o.frames&&o.frames.map(a=>r(a))}}return{name:yi,setupOnce(){},processEvent(o){let a=o;return o.exception&&Array.isArray(o.exception.values)&&(a=s(a)),a}}},yf=ee(gf);te(yi,yf);const _i="SessionTiming",_f=()=>{const e=Date.now();return{name:_i,setupOnce(){},processEvent(t){const n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},bf=ee(_f);te(_i,bf);const bi="HttpClient",Sf=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:bi,setupOnce(){},setup(n){xf(n,t),Mf(n,t)}}},wf=ee(Sf);te(bi,wf);function vf(e,t,n,r){if(wi(e,n.status,n.url)){const s=Af(t,r);let i,o,a,c;Ei()&&([{headers:i,cookies:a},{headers:o,cookies:c}]=[{cookieHeader:"Cookie",obj:s},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:u,obj:d})=>{const f=kf(d.headers);let h;try{const p=f[u]||f[u.toLowerCase()]||void 0;p&&(h=Si(p))}catch{Ke&&_.log(`Could not extract cookies from header ${u}`)}return{headers:f,cookies:h}}));const l=vi({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:o,requestCookies:a,responseCookies:c});ns(l)}}function Ef(e,t,n,r){if(wi(e,t.status,t.responseURL)){let s,i,o;if(Ei()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=Si(c))}catch{Ke&&_.log("Could not extract cookies from response headers")}try{o=Cf(t)}catch{Ke&&_.log("Could not extract headers from response")}s=r}const a=vi({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:o,responseCookies:i});ns(a)}}function If(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Si(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return t[r]=s,t},{})}function kf(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Cf(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{const[s,i]=r.split(": ");return n[s]=i,n},{}):{}}function Tf(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function Rf(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function xf(e,t){Po()&&Jr(n=>{if(G()!==e)return;const{response:r,args:s}=n,[i,o]=s;r&&vf(t,i,r,o)})}function Mf(e,t){"XMLHttpRequest"in oe&&Zr(n=>{if(G()!==e)return;const r=n.xhr,s=r[En];if(!s)return;const{method:i,request_headers:o}=s;try{Ef(t,r,i,o)}catch(a){Ke&&_.warn("Error while extracting response event form XHR response",a)}})}function wi(e,t,n){return Rf(e.failedRequestStatusCodes,t)&&Tf(e.failedRequestTargets,n)&&!as(n,G())}function vi(e){const t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:If(e.responseHeaders)}}};return ts(n,{type:"http.client",handled:!1}),n}function Af(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Ei(){const e=G();return e?!!e.getOptions().sendDefaultPii:!1}const tn=oe,Of=7,Ii="ContextLines",Lf=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:Of;return{name:Ii,setupOnce(){},processEvent(n){return Nf(n,t)}}},Df=ee(Lf);te(Ii,Df);function Nf(e,t){const n=tn.document,r=tn.location&&Fo(tn.location.href);if(!n||!r)return e;const s=e.exception&&e.exception.values;if(!s||!s.length)return e;const i=n.documentElement.innerHTML;if(!i)return e;const o=["<!DOCTYPE html>","<html>",...i.split(`
`),"</html>"];return s.forEach(a=>{const c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(l=>Pf(l,o,r,t)))}),e}function Pf(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Bo(t,e,r),e}function it(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ff(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=it(n);return s=>r.then(i=>s(i.transaction(t,"readwrite").objectStore(t)))}function ki(e){return it(e.getAllKeys())}function Bf(e,t,n){return e(r=>ki(r).then(s=>{if(!(s.length>=n))return r.put(t,Math.max(...s,0)+1),it(r.transaction)}))}function Hf(e){return e(t=>ki(t).then(n=>{if(n.length!==0)return it(t.get(n[0])).then(r=>(t.delete(n[0]),it(t.transaction).then(()=>r)))}))}function Uf(e){let t;function n(){return t==null&&(t=Ff(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{const s=await Ho(r,e.textEncoder);await Bf(n(),s,e.maxQueueSize||30)}catch{}},pop:async()=>{try{const r=await Hf(n());if(r)return Uo(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function $f(e){return t=>e({...t,createStore:Uf})}function Sh(e){return $f(oa(e))}const Wr=1e6,wt=String(0),zf="main";let Ci="",Ti="",Ri="",gn=Y.navigator&&Y.navigator.userAgent||"",xi="";const Wf=Y.navigator&&Y.navigator.language||Y.navigator&&Y.navigator.languages&&Y.navigator.languages[0]||"";function jf(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const jr=Y.navigator&&Y.navigator.userAgentData;jf(jr)&&jr.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Ci=e.platform||"",Ri=e.architecture||"",xi=e.model||"",Ti=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];gn=`${t.brand} ${t.version}`}}).catch(e=>{});function Gf(e){return!("thread_metadata"in e)}function qf(e){return Gf(e)?Yf(e):e}function Vf(e){const t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&j&&_.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function Kf(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const s=Vf(r),i=qf(n),o=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(o).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||$o,runtime:{name:"javascript",version:Y.navigator.userAgent},os:{name:Ci,version:Ti,build_number:gn},device:{locale:Wf,model:xi,manufacturer:gn,architecture:Ri,is_emulator:!1},debug_meta:{images:Zf(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||vn(),trace_id:s,active_thread_id:wt,relative_start_ns:"0",relative_end_ns:((a-o)*1e6).toFixed(0)}]}}function Mi(e){return e.op==="pageload"}function Yf(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[wt]:{name:zf}}};if(!e.samples.length)return r;const s=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:et||0,o=i-(et||i);for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+o-s)*Wr).toFixed(0),stack_id:t,thread_id:wt};continue}let l=e.stacks[c.stackId];const u=[];for(;l;){u.push(l.frameId);const f=e.frames[l.frameId];r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const d={elapsed_since_start_ns:((c.timestamp+o-s)*Wr).toFixed(0),stack_id:n,thread_id:wt};r.stacks[n]=u,r.samples[a]=d,n++}return r}function Xf(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function Jf(e){const t=[];return bn(e,(n,r)=>{if(r==="transaction")for(let s=1;s<n.length;s++){const i=n[s];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[s])}}),t}const Gr=new WeakMap;function Zf(e){const t=oe._sentryDebugIds;if(!t)return[];const n=G(),r=n&&n.getOptions(),s=r&&r.stackParser;if(!s)return[];let i;const o=Gr.get(s);o?i=o:(i=new Map,Gr.set(s,i));const a=Object.keys(t).reduce((l,u)=>{let d;const f=i.get(u);f?d=f:(d=s(u),i.set(u,d));for(let h=d.length-1;h>=0;h--){const p=d[h],g=p&&p.filename;if(p&&g){l[g]=t[u];break}}return l},{}),c=[];for(const l of e)l&&a[l]&&c.push({type:"sourcemap",code_file:l,debug_id:a[l]});return c}function Qf(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(j&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(j&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function eh(e){return e.samples.length<2?(j&&_.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(j&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Ai=!1;const Oi=3e4;function th(e){return typeof e=="function"}function nh(){const e=Y.Profiler;if(!th(e)){j&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Oi/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{j&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),Ai=!0}}function yn(e){if(Ai)return j&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return j&&_.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=G(),n=t&&t.getOptions();if(!n)return j&&_.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Qf(r)?r?(r===!0?!0:Math.random()<r)?!0:(j&&_.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(j&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(j&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function rh(e,t,n,r){return eh(n)?Kf(e,t,n,r):null}const xe=new Map;function sh(){return xe.size}function ih(e){const t=xe.get(e);return t&&xe.delete(e),t}function oh(e,t){if(xe.set(e,t),xe.size>30){const n=xe.keys().next().value;xe.delete(n)}}function wh(e){return e?yn(e)?_n(e):e:(j&&_.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function _n(e){let t;Mi(e)&&(t=Vr()*1e3);const n=nh();if(!n)return e;j&&_.log(`[Profiling] started profiling transaction: ${Te(e).description}`);const r=vn();async function s(){return!e||!n?null:n.stop().then(c=>(i&&(Y.clearTimeout(i),i=void 0),j&&_.log(`[Profiling] stopped profiling of transaction: ${Te(e).description}`),c?(oh(r,c),null):(j&&_.log(`[Profiling] profiler returned null profile for: ${Te(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(j&&_.log("[Profiling] error while stopping profiler:",c),null))}let i=Y.setTimeout(()=>{j&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",Te(e).description),s()},Oi);const o=e.end.bind(e);function a(){return e?(s().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),o()},()=>{o()}),e):o()}return e.end=a,e}const Li="BrowserProfiling",ah=()=>({name:Li,setupOnce(){},setup(e){const n=Me().getTransaction();if(n&&Mi(n)&&yn(n)&&_n(n),typeof e.on!="function"){_.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{yn(r)&&_n(r)}),e.on("beforeEnvelope",r=>{if(!sh())return;const s=Jf(r);if(!s.length)return;const i=[];for(const o of s){const a=o&&o.contexts,c=a&&a.profile&&a.profile.profile_id,l=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){j&&_.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){j&&_.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;const u=ih(c);if(!u){j&&_.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}const d=rh(c,l,u,o);d&&i.push(d)}Xf(r,i)})}}),ch=ee(ah),vh=te(Li,ch);let Di={};Y.Sentry&&Y.Sentry.Integrations&&(Di=Y.Sentry.Integrations);const Eh={...Di,...Aa,...Fa};export{uo as Breadcrumbs,Ch as BrowserClient,vh as BrowserProfilingIntegration,mh as BrowserTracing,fo as Dedupe,zt as Feedback,Gi as FunctionToString,ho as GlobalHandlers,po as HttpContext,Th as Hub,qi as InboundFilters,Eh as Integrations,mo as LinkedErrors,hh as ModuleMetadata,Ut as Replay,_h as ReplayCanvas,Rh as SDK_VERSION,xh as SEMANTIC_ATTRIBUTE_SENTRY_OP,Mh as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Ah as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,vt as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Oh as Scope,go as TryCatch,Lh as VueIntegration,Y as WINDOW,_o as addBreadcrumb,So as addEventProcessor,Dh as addGlobalEventProcessor,Nh as addIntegration,eo as addTracingExtensions,Ph as attachErrorHandler,Fh as breadcrumbsIntegration,Bh as browserApiErrorsIntegration,ch as browserProfilingIntegration,Hh as browserTracingIntegration,Qd as captureConsoleIntegration,ns as captureEvent,Sn as captureException,sn as captureMessage,Uh as captureSession,$h as captureUserFeedback,zh as chromeStackLineParser,Wh as close,jh as configureScope,Df as contextLinesIntegration,Gh as continueTrace,qh as createTracingMixins,Vh as createTransport,Kh as createUserFeedbackEnvelope,nf as debugIntegration,sf as dedupeIntegration,Yh as defaultIntegrations,Qi as defaultRequestInstrumentationOptions,Xh as defaultStackLineParsers,Jh as defaultStackParser,Zh as endSession,Qh as eventFromException,ep as eventFromMessage,tp as exceptionFromError,uf as extraErrorDataIntegration,np as extractTraceparentData,bh as feedbackIntegration,rp as flush,sp as forceLoad,ip as functionToStringIntegration,op as geckoStackLineParser,ap as getActiveSpan,qn as getActiveTransaction,G as getClient,cp as getCurrentHub,Me as getCurrentScope,lp as getDefaultIntegrations,up as getHubFromCarrier,yh as getReplay,dp as getSpanStatusFromHttpCode,fp as globalHandlersIntegration,wf as httpClientIntegration,hp as httpContextIntegration,pp as inboundFiltersIntegration,mp as init,oo as instrumentOutgoingRequests,gp as isInitialized,yp as lastEventId,_p as linkedErrorsIntegration,Sh as makeBrowserOfflineTransport,bp as makeFetchTransport,Sp as makeMain,dh as makeMultiplexedTransport,wp as makeXHRTransport,ph as metrics,ya as moduleMetadataIntegration,vp as onLoad,wh as onProfilingStartRouteTransaction,Ep as opera10StackLineParser,Ip as opera11StackLineParser,fh as parameterize,Sd as replayCanvasIntegration,gh as replayIntegration,mf as reportingObserverIntegration,yf as rewriteFramesIntegration,Nd as sendFeedback,bf as sessionTimingIntegration,wo as setContext,kp as setCurrentClient,Cp as setExtra,Tp as setExtras,Rp as setHttpStatus,xp as setMeasurement,Mp as setTag,Ap as setTags,Op as setUser,Lp as showReportDialog,Dp as spanStatusfromHttpCode,Np as startBrowserTracingNavigationSpan,Pp as startBrowserTracingPageLoadSpan,Fp as startInactiveSpan,Bp as startSession,Hp as startSpan,Up as startSpanManual,$p as startTransaction,zp as trace,Wp as vueIntegration,jp as vueRouterInstrumentation,Gp as winjsStackLineParser,qp as withActiveSpan,Vp as withIsolationScope,In as withScope,Kp as wrap};
