@wellesley/sentry 1.0.200 → 1.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1 +1 @@
1
- import{logErrorToSentry as Ia}from"https://cdn.jsdelivr.net/npm/@wellesley/sentry@next";import{version as ka,useEffect as Ta}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as ds}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{createAction as Ci,createSlice as Ca}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";const B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Be="8.48.0",N=globalThis;function _n(e,t,n){const r=N,s=r.__SENTRY__=r.__SENTRY__||{},o=s[Be]=s[Be]||{};return o[e]||(o[e]=t())}const ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ra="Sentry Logger ",Zn=["debug","info","warn","error","log","assert","trace"],nn={};function Ne(e){if(!("console"in N))return e();const t=N.console,n={},r=Object.keys(nn);r.forEach((e=>{const r=nn[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function Ma(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ze?Zn.forEach((n=>{t[n]=(...t)=>{e&&Ne((()=>{N.console[n](`${Ra}[${n}]:`,...t)}))}})):Zn.forEach((e=>{t[e]=()=>{}})),t}const E=_n("logger",Ma),Ri=50,$e="?",fs=/\(error: (.*)\)/,ps=/captureMessage|captureException/;function Mi(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const i=fs.test(n)?n.replace(fs,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){s.push(t);break}}if(s.length>=50+r)break}}return Oa(s.slice(r))}}function xa(e){return Array.isArray(e)?Mi(...e):e}function Oa(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Bt(t).function||"")&&t.pop(),t.reverse(),ps.test(Bt(t).function||"")&&(t.pop(),ps.test(Bt(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||Bt(t).filename,function:e.function||$e})))}function Bt(e){return e[e.length-1]||{}}const Hn="<anonymous>";function ke(e){try{return e&&"function"==typeof e&&e.name||Hn}catch{return Hn}}function hs(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Qt={},ms={};function qe(e,t){Qt[e]=Qt[e]||[],Qt[e].push(t)}function Ge(e,t){if(!ms[e]){ms[e]=!0;try{t()}catch(t){ze&&E.error(`Error while instrumenting ${e}`,t)}}}function he(e,t){const n=e&&Qt[e];if(n)for(const r of n)try{r(t)}catch(t){ze&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}let jn=null;function Aa(e){const t="error";qe(t,e),Ge(t,Da)}function Da(){jn=N.onerror,N.onerror=function(e,t,n,r,s){return he("error",{column:r,error:s,line:n,msg:e,url:t}),!!jn&&jn.apply(this,arguments)},N.onerror.__SENTRY_INSTRUMENTED__=!0}let Wn=null;function Na(e){const t="unhandledrejection";qe(t,e),Ge(t,La)}function La(){Wn=N.onunhandledrejection,N.onunhandledrejection=function(e){return he("unhandledrejection",e),!Wn||Wn.apply(this,arguments)},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Tt(){return Mr(N),N}function Mr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Be,t[Be]=t[Be]||{}}const xi=Object.prototype.toString;function xr(e){switch(xi.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return He(e,Error)}}function dt(e,t){return xi.call(e)===`[object ${t}]`}function Oi(e){return dt(e,"ErrorEvent")}function gs(e){return dt(e,"DOMError")}function Pa(e){return dt(e,"DOMException")}function ve(e){return dt(e,"String")}function Or(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ar(e){return null===e||Or(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return dt(e,"Object")}function yn(e){return typeof Event<"u"&&He(e,Event)}function Fa(e){return typeof Element<"u"&&He(e,Element)}function Ua(e){return dt(e,"RegExp")}function Sn(e){return!(!e||!e.then||"function"!=typeof e.then)}function Ba(e){return nt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function He(e,t){try{return e instanceof t}catch{return!1}}function Ai(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Dr=N,$a=80;function En(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Ha(n,u),!("html"===l||o>1&&i+s.length*c+l.length>=d));)s.push(l),i+=l.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Ha(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Dr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(s&&s.length)s.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&ve(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function Di(){try{return Dr.document.location.href}catch{return""}}function ja(e){if(!Dr.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function tt(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function _s(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Ai(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Wa(e,t,n=!1){return!!ve(e)&&(Ua(t)?t.test(e):!!ve(t)&&(n?e===t:e.includes(t)))}function Ct(e,t=[],n=!1){return t.some((t=>Wa(e,t,n)))}function te(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"==typeof s&&Ni(s,r);try{e[t]=s}catch{ze&&E.log(`Failed to replace method "${t}" in object`,e)}}function je(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ze&&E.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ni(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,je(e,"__sentry_original__",t)}catch{}}function Nr(e){return e.__sentry_original__}function Li(e){if(xr(e))return{message:e.message,name:e.name,stack:e.stack,...Ss(e)};if(yn(e)){const t={type:e.type,target:ys(e.target),currentTarget:ys(e.currentTarget),...Ss(e)};return typeof CustomEvent<"u"&&He(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ys(e){try{return Fa(e)?En(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ss(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function za(e,t=40){const n=Object.keys(Li(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return tt(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:tt(r,t)}return""}function ne(e){return er(e,new Map)}function er(e,t){if(qa(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=er(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(er(e,t))})),r}return e}function qa(e){if(!nt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const Pi=1e3;function Rt(){return Date.now()/Pi}function Ga(){const{performance:e}=N;if(!e||!e.now)return Rt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Pi}const we=Ga(),Ya=(()=>{const{performance:e}=N;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?e.timeOrigin:i:r})();function ie(){const e=N,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function Fi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ce(e){const{message:t,event_id:n}=e;if(t)return t;const r=Fi(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function tr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function rt(e,t){const n=Fi(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function Es(e){if(Va(e))return!0;try{je(e,"__sentry_captured__",!0)}catch{}return!1}function Va(e){try{return e.__sentry_captured__}catch{}}var Ee;function Te(e){return new ce((t=>{t(e)}))}function rn(e){return new ce(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ee||(Ee={}));class ce{constructor(e){ce.prototype.__init.call(this),ce.prototype.__init2.call(this),ce.prototype.__init3.call(this),ce.prototype.__init4.call(this),this._state=Ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ce(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ce(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Ee.PENDING){if(Sn(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ee.RESOLVED&&e[1](this._value),this._state===Ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Ka(e){const t=we(),n={sid:ie(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ja(n)};return st(n,e),n}function st(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||we(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ie()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Xa(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),st(e,n)}function Ja(e){return ne({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function bs(){return ie()}function nr(){return ie().substring(16)}function bn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=bn(r[e],t[e],n-1));return r}const rr="_sentrySpan";function vs(e,t){t?je(e,rr,t):delete e[rr]}function sr(e){return e[rr]}const Qa=100;class Lr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:bs(),spanId:nr()}}clone(){const e=new Lr;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,vs(e,sr(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&st(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof We?[t.getScopeData(),t.getRequestSession()]:nt(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,vs(this,void 0),this._attachments=[],this.setPropagationContext({traceId:bs()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:Qa;if(n<=0)return this;const r={timestamp:Rt(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:sr(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=bn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:nr(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ie();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(E.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const We=Lr;function Za(){return _n("defaultCurrentScope",(()=>new We))}function ec(){return _n("defaultIsolationScope",(()=>new We))}class tc{constructor(e,t){let n,r;n=e||new We,r=t||new We,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return Sn(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function it(){const e=Mr(Tt());return e.stack=e.stack||new tc(Za(),ec())}function nc(e){return it().withScope(e)}function rc(e,t){const n=it();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function ws(e){return it().withScope((()=>e(it().getIsolationScope())))}function sc(){return{withIsolationScope:ws,withScope:nc,withSetScope:rc,withSetIsolationScope:(e,t)=>ws(t),getCurrentScope:()=>it().getScope(),getIsolationScope:()=>it().getIsolationScope()}}function vn(e){const t=Mr(e);return t.acs?t.acs:sc()}function oe(){return vn(Tt()).getCurrentScope()}function _e(){return vn(Tt()).getIsolationScope()}function ic(){return _n("globalScope",(()=>new We))}function oc(...e){const t=vn(Tt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function V(){return oe().getClient()}function ac(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:s}=t;return ne({trace_id:n,span_id:r,parent_span_id:s})}const cc="_sentryMetrics";function uc(e){const t=e[cc];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(ne(r));return n}const Ui="sentry.source",lc="sentry.sample_rate",dc="sentry.op",fc="sentry.origin",pc=0,hc=1,mc="sentry-",gc=/^sentry-/;function _c(e){const t=yc(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(gc)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function yc(e){if(e&&(ve(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=Is(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Is(e)}function Is(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Sc=1;let ks=!1;function Ec(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ne({parent_span_id:r?t:Et(e).parent_span_id,span_id:r?nr():t,trace_id:n})}function Ts(e){return"number"==typeof e?Cs(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Cs(e.getTime()):we()}function Cs(e){return e>9999999999?e/1e3:e}function Et(e){if(vc(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(bc(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return ne({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Ts(s),timestamp:Ts(i)||void 0,status:Ic(c),op:r[dc],origin:r[fc],_metrics_summary:uc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function bc(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function vc(e){return"function"==typeof e.getSpanJSON}function wc(e){const{traceFlags:t}=e.spanContext();return 1===t}function Ic(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const kc="_sentryRootSpan";function Pr(e){return e[kc]||e}function Bi(){const e=vn(Tt());return e.getActiveSpan?e.getActiveSpan():sr(oe())}function Tc(){ks||(Ne((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),ks=!0)}function Cc(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=V(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const Fr="production",Rc="_frozenDsc";function $i(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=ne({environment:n.environment||Fr,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function Mc(e,t){const n=t.getPropagationContext();return n.dsc||$i(n.traceId,e)}function Hi(e){const t=V();if(!t)return{};const n=Pr(e),r=n[Rc];if(r)return r;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),i=o&&_c(o);if(i)return i;const a=$i(e.spanContext().traceId,t),c=Et(n),l=c.data||{},u=l[lc];null!=u&&(a.sample_rate=`${u}`);const d=l[Ui],p=c.description;return"url"!==d&&p&&(a.transaction=p),Cc()&&(a.sampled=String(wc(n))),t.emit("createDsc",a,n),a}function ir(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;B&&E.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const xc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Oc(e){return"http"===e||"https"===e}function wn(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Ac(e){const t=xc.exec(e);if(!t)return void Ne((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return ji({host:o,pass:s,path:c,projectId:l,port:i,protocol:n,publicKey:r})}function ji(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Dc(e){if(!ze)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(E.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(n.match(/^\d+$/)?Oc(r)?!t||!isNaN(parseInt(t,10))||(E.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(E.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}function Nc(e){const t="string"==typeof e?Ac(e):ji(e);if(t&&Dc(t))return t}function Lc(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function fe(e,t=100,n=1/0){try{return or("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Wi(e,t=3,n=102400){const r=fe(e,t);return Bc(r)>n?Wi(e,t-1,n):r}function or(e,t,n=1/0,r=1/0,s=Lc()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Pc(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return or("",l.toJSON(),c-1,r,s)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=Li(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=or(e,t,c-1,r,s),d++}return i(t),u}function Pc(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ai(t))return"[VueViewModel]";if(Ba(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${ke(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=Fc(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function Fc(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Uc(e){return~-encodeURI(e).split(/%..|./).length}function Bc(e){return Uc(JSON.stringify(e))}function ft(e,t=[]){return[e,t]}function $c(e,t){const[n,r]=e;return[n,[...r,t]]}function Rs(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function ar(e){return N.__SENTRY__&&N.__SENTRY__.encodePolyfill?N.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Hc(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[ar(r),e]:r.push("string"==typeof e?ar(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(fe(n))}s(e)}}return"string"==typeof r?r:jc(r)}function jc(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}function Wc(e){const t="string"==typeof e.data?ar(e.data):e.data;return[ne({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const zc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ms(e){return zc[e]}function Ur(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function zi(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:wn(r)},...s&&{trace:ne({...s})}}}function qc(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Gc(e,t,n,r){const s=Ur(n);return ft({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:wn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function Yc(e,t,n,r){const s=Ur(n),o=e.type&&"replay_event"!==e.type?e.type:"event";qc(e,n&&n.sdk);const i=zi(e,s,r,t);return delete e.sdkProcessingMetadata,ft(i,[[{type:o},e]])}function cr(e,t,n,r=0){return new ce(((s,o)=>{const i=e[r];if(null===t||"function"!=typeof i)s(t);else{const a=i({...t},n);B&&i.id&&null===a&&E.log(`Event processor "${i.id}" dropped event`),Sn(a)?a.then((t=>cr(e,t,n,r+1).then(s))).then(null,o):cr(e,a,n,r+1).then(s).then(null,o)}}))}let $t,xs,Ht;function Vc(e){const t=N._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ht&&n.length===xs||(xs=n.length,Ht=n.reduce(((n,r)=>{$t||($t={});const s=$t[r];if(s)n[s[0]]=s[1];else{const s=e(r);for(let e=s.length-1;e>=0;e--){const o=s[e],i=o&&o.filename,a=t[r];if(i&&a){n[i]=a,$t[r]=[i,a];break}}}return n}),{})),Ht}function Kc(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Xc(e,t),r&&Zc(e,r),eu(e,n),Jc(e,s),Qc(e,o)}function Os(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:m}=t;jt(e,"extra",n),jt(e,"tags",r),jt(e,"user",s),jt(e,"contexts",o),e.sdkProcessingMetadata=bn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function jt(e,t,n){e[t]=bn(e[t],n,1)}function Xc(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=ne(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=ne(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=ne(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=ne(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function Jc(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Qc(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Zc(e,t){e.contexts={trace:Ec(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Hi(t),...e.sdkProcessingMetadata};const n=Et(Pr(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function eu(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function qi(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ie(),timestamp:t.timestamp||Rt()},l=n.integrations||e.integrations.map((e=>e.name));tu(c,e),su(c,l),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&nu(c,e.stackParser);const u=ou(r,n.captureContext);n.mechanism&&rt(c,n.mechanism);const d=s?s.getEventProcessors():[],p=ic().getScopeData();if(o){Os(p,o.getScopeData())}if(u){Os(p,u.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Kc(c,p);return cr([...d,...p.eventProcessors],c,n).then((e=>(e&&ru(e),"number"==typeof i&&i>0?iu(e,i,a):e)))}function tu(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||Fr,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=tt(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=tt(i.value,o));const a=e.request;a&&a.url&&(a.url=tt(a.url,o))}function nu(e,t){const n=Vc(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function ru(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function su(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function iu(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))},...e.user&&{user:fe(e.user,t,n)},...e.contexts&&{contexts:fe(e.contexts,t,n)},...e.extra&&{extra:fe(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=fe(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=fe(e.contexts.flags,3,n)),r}function ou(e,t){if(!t)return e;const n=e?e.clone():new We;return n.update(t),n}function Br(e,t){return oe().captureException(e,void 0)}function au(e,t){const n={captureContext:t};return oe().captureMessage(e,void 0,n)}function Gi(e,t){return oe().captureEvent(e,t)}function Yi(e,t){_e().setContext(e,t)}function cu(e,t){_e().setExtra(e,t)}function uu(e){_e().setUser(e)}function lu(e){_e().addEventProcessor(e)}function As(e){const t=V(),n=_e(),r=oe(),{release:s,environment:o=Fr}=t&&t.getOptions()||{},{userAgent:i}=N.navigator||{},a=Ka({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&st(c,{status:"exited"}),Vi(),n.setSession(a),r.setSession(a),a}function Vi(){const e=_e(),t=oe(),n=t.getSession()||e.getSession();n&&Xa(n),Ki(),e.setSession(),t.setSession()}function Ki(){const e=_e(),t=oe(),n=V(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ds(e=!1){e?Vi():Ki()}const du="7";function fu(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function pu(e){return`${fu(e)}${e.projectId}/envelope/`}function hu(e,t){const n={sentry_version:du};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function mu(e,t,n){return t||`${pu(e)}?${hu(e,n)}`}const Ns=[];function gu(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}function _u(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const s=gu(r),o=s.findIndex((e=>"Debug"===e.name));if(o>-1){const[e]=s.splice(o,1);s.push(e)}return s}function yu(e,t){const n={};return t.forEach((t=>{t&&Xi(e,t,n)})),n}function Ls(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Xi(e,t,n){if(n[t.name])B&&E.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Ns.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Ns.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}B&&E.log(`Integration installed: ${t.name}`)}}function Su(e,t,n){return ft(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Rt(),discarded_events:e}]])}class me extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Ps="Not capturing exception because it's already been captured.";class Eu{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Nc(e.dsn):B&&E.warn("No DSN provided, client will not send events."),this._dsn){const t=mu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&Ne((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ie();if(Es(e))return B&&E.log(Ps),r;const s={event_id:r,...t};return this._process(this.eventFromException(e,s).then((e=>this._captureEvent(e,s,n)))),s.event_id}captureMessage(e,t,n,r){const s={event_id:ie(),...n},o=Or(e)?e:String(e),i=Ar(e)?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(i.then((e=>this._captureEvent(e,s,r)))),s.event_id}captureEvent(e,t,n){const r=ie();if(t&&t.originalException&&Es(t.originalException))return B&&E.log(Ps),r;const s={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){"string"!=typeof e.release?B&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),st(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Te(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Xi(this,e,this._integrations),t||Ls(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Yc(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=$c(n,Wc(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=Gc(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,s=`${e}:${t}`;B&&E.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(B&&E.error("Error while sending envelope:",e),e))):(B&&E.error("Transport disabled"),Te({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=yu(this,e),Ls(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const s=t.exception&&t.exception.values;if(s){r=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(st(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ce((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=oe(),r=_e()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),qi(s,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:ac(n),...e.contexts};const t=Mc(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(B){const t=e;"log"===t.logLevel?E.log(t.message):E.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:s}=r,o=Qi(e),i=Ji(e),a=e.type||"error",c=`before send for type \`${a}\``,l=typeof s>"u"?void 0:ir(s);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),rn(new me(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new me("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return bu(vu(this,r,n,t),c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new me(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(o&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof me?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){B&&E.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(B&&E.log("No outcomes to send"));if(!this._dsn)return void(B&&E.log("No dsn provided, will not send outcomes"));B&&E.log("Sending outcomes:",e);const t=Su(e,this._options.tunnel&&wn(this._dsn));this.sendEnvelope(t)}}function bu(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Sn(e))return e.then((e=>{if(!nt(e)&&null!==e)throw new me(n);return e}),(e=>{throw new me(`${t} rejected with ${e}`)}));if(!nt(e)&&null!==e)throw new me(n);return e}function vu(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(Ji(n)&&s)return s(n,r);if(Qi(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Tc(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}function Ji(e){return void 0===e.type}function Qi(e){return"transaction"===e.type}function wu(e,t){!0===t.debug&&(B?E.enable():Ne((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),oe().update(t.initialScope);const n=new e(t);return Iu(n),n.init(),n}function Iu(e){oe().setClient(e)}function ku(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return rn(new me("Not adding Promise because buffer limit was reached."));const s=r();return-1===t.indexOf(s)&&t.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(e){return new ce(((n,r)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Te(e).then((()=>{--s||(clearTimeout(o),n(!0))}),r)}))}))}}}const Tu=6e4;function Cu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Tu:r-t}function Ru(e,t){return e[t]||e.all||0}function Zi(e,t,n=Date.now()){return Ru(e,t)>n}function eo(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(s[e]=r+a):s[e]=r+a;else s.all=r+a}else i?s.all=r+Cu(i,r):429===t&&(s.all=r+6e4);return s}const Mu=64;function xu(e,t,n=ku(e.bufferSize||64)){let r={};return{send:function(s){const o=[];if(Rs(s,((t,n)=>{const s=Ms(n);if(Zi(r,s)){const r=Fs(t,n);e.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(t)})),0===o.length)return Te({});const i=ft(s[0],o),a=t=>{Rs(i,((n,r)=>{const s=Fs(n,r);e.recordDroppedEvent(t,Ms(r),s)}))};return n.add((()=>t({body:Hc(i)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&B&&E.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=eo(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof me)return B&&E.error("Skipped sending event because buffer is full."),a("queue_overflow"),Te({});throw e}))},flush:e=>n.drain(e)}}function Fs(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Ou(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Du(e,n)||Au(e,r)}function Au(e,t){return!!t&&Us(e)===Us(t)}function Du(e,t){return!!t&&e.includes(t.host)}function Us(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function to(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:Be}))),version:Be}),e._metadata=s}const Nu=100;function De(e,t){const n=V(),r=_e();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Nu}=n.getOptions();if(o<=0)return;const i={timestamp:Rt(),...e},a=s?Ne((()=>s(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let Bs;const Lu="FunctionToString",$s=new WeakMap,Pu=()=>({name:Lu,setupOnce(){Bs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Nr(this),n=$s.has(V())&&void 0!==t?t:this;return Bs.apply(n,e)}}catch{}},setup(e){$s.set(e,!0)}}),Fu=Pu,Uu=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Bu="InboundFilters",$u=(e={})=>({name:Bu,processEvent(t,n,r){const s=r.getOptions();return Wu(t,ju(e,s))?null:t}}),Hu=$u;function ju(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Uu],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function Wu(e,t){return t.ignoreInternal&&Ku(e)?(B&&E.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ce(e)}`),!0):zu(e,t.ignoreErrors)?(B&&E.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ce(e)}`),!0):Ju(e)?(B&&E.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Ce(e)}`),!0):qu(e,t.ignoreTransactions)?(B&&E.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Ce(e)}`),!0):Gu(e,t.denyUrls)?(B&&E.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${sn(e)}`),!0):!Yu(e,t.allowUrls)&&(B&&E.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${sn(e)}`),!0)}function zu(e,t){return!(e.type||!t||!t.length)&&Vu(e).some((e=>Ct(e,t)))}function qu(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Ct(n,t)}function Gu(e,t){if(!t||!t.length)return!1;const n=sn(e);return!!n&&Ct(n,t)}function Yu(e,t){if(!t||!t.length)return!0;const n=sn(e);return!n||Ct(n,t)}function Vu(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function Ku(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}function Xu(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function sn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Xu(t):null}catch{return B&&E.error(`Cannot extract url for event ${Ce(e)}`),null}}function Ju(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)))}function Qu(e,t,n=250,r,s,o,i){if(!(o.exception&&o.exception.values&&i&&He(i.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Zu(ur(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function ur(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(He(r[s],Error)){Hs(i,a);const o=e(t,r[s]),l=c.length;js(o,s,l,a),c=ur(e,t,n,r[s],s,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(He(r,Error)){Hs(i,a);const l=e(t,r),u=c.length;js(l,`errors[${o}]`,u,a),c=ur(e,t,n,r,s,[l,...c],l,u)}})),c}function Hs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function js(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Zu(e,t){return e.map((e=>(e.value&&(e.value=tt(e.value,t)),e)))}function zn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function el(e){const t="console";qe(t,e),Ge(t,tl)}function tl(){"console"in N&&Zn.forEach((function(e){e in N.console&&te(N.console,e,(function(t){return nn[e]=t,function(...t){he("console",{args:t,level:e});const n=nn[e];n&&n.apply(N.console,t)}}))}))}function no(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const nl="Dedupe",rl=()=>{let e;return{name:nl,processEvent(t){if(t.type)return t;try{if(sl(t,e))return B&&E.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},ro=rl;function sl(e,t){return!!t&&!(!il(e,t)&&!ol(e,t))}function il(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!io(e,t)||!so(e,t))}function ol(e,t){const n=Ws(t),r=Ws(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&io(e,t)&&so(e,t))}function so(e,t){let n=hs(e),r=hs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function io(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Ws(e){return e.exception&&e.exception.values&&e.exception.values[0]}function oo(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}const lr=N;function ao(){if(!("fetch"in lr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function dr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function al(){if("string"==typeof EdgeRuntime)return!0;if(!ao())return!1;if(dr(lr.fetch))return!0;let e=!1;const t=lr.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=dr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ze&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function cl(e,t){const n="fetch";qe(n,e),Ge(n,(()=>ul(void 0,t)))}function ul(e,t=!1){t&&!al()||te(N,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:s}=ll(t),o={args:t,fetchData:{method:r,url:s},startTimestamp:1e3*we(),virtualError:n};return he("fetch",{...o}),e.apply(N,t).then((async e=>(he("fetch",{...o,endTimestamp:1e3*we(),response:e}),e)),(e=>{throw he("fetch",{...o,endTimestamp:1e3*we(),error:e}),xr(e)&&void 0===e.stack&&(e.stack=n.stack,je(e,"framesToPop",1)),e}))}}))}function fr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function zs(e){return"string"==typeof e?e:e?fr(e,"url")?e.url:e.toString?e.toString():"":""}function ll(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:zs(t),method:fr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:zs(t),method:fr(t,"method")?String(t.method).toUpperCase():"GET"}}function dl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function fl(){return"npm"}function pl(){return!dl()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function qs(){return typeof window<"u"&&(!pl()||hl())}function hl(){const e=N.process;return!!e&&"renderer"===e.type}const Wt=N;function ml(){const e=Wt.chrome,t=e&&e.app&&e.app.runtime,n="history"in Wt&&!!Wt.history.pushState&&!!Wt.history.replaceState;return!t&&n}function gl(e,t){return e??t()}function Zt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const $=N;let pr=0;function co(){return pr>0}function _l(){pr++,setTimeout((()=>{pr--}))}function ot(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(Nr(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>ot(e,t)));return e.apply(this,r)}catch(e){throw _l(),oc((r=>{r.addEventProcessor((e=>(t.mechanism&&(tr(e,void 0),rt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),Br(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ni(n,e),je(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function $r(e,t){const n=Hr(e,t),r={type:vl(t),value:wl(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function yl(e,t,n,r){const s=V(),o=s&&s.getOptions().normalizeDepth,i=Rl(t),a={__serialized__:Wi(t,o)};if(i)return{exception:{values:[$r(e,i)]},extra:a};const c={exception:{values:[{type:yn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Tl(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Hr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function qn(e,t){return{exception:{values:[$r(e,t)]}}}function Hr(e,t){const n=t.stacktrace||t.stack||"",r=El(t),s=bl(t);try{return e(n,r,s)}catch{}return[]}const Sl=/Minified React error #\d+;/i;function El(e){return e&&Sl.test(e.message)?1:0}function bl(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function uo(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"&&e instanceof WebAssembly.Exception}function vl(e){const t=e&&e.name;return!t&&uo(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function wl(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:uo(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Il(e,t,n,r){const s=jr(e,t,n&&n.syntheticException||void 0,r);return rt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Te(s)}function kl(e,t,n="info",r,s){const o=hr(e,t,r&&r.syntheticException||void 0,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Te(o)}function jr(e,t,n,r,s){let o;if(Oi(t)&&t.error)return qn(e,t.error);if(gs(t)||Pa(t)){const s=t;if("stack"in t)o=qn(e,t);else{const t=s.name||(gs(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=hr(e,i,n,r),tr(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return xr(t)?qn(e,t):nt(t)||yn(t)?(o=yl(e,t,n,s),rt(o,{synthetic:!0}),o):(o=hr(e,t,n,r),tr(o,`${t}`),rt(o,{synthetic:!0}),o)}function hr(e,t,n,r){const s={};if(r&&n){const r=Hr(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),rt(s,{synthetic:!0})}if(Or(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Tl(e,{isUnhandledRejection:t}){const n=za(e),r=t?"promise rejection":"exception";return Oi(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:yn(e)?`Event \`${Cl(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Cl(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Rl(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Ml(e,{metadata:t,tunnel:n,dsn:r}){return ft({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:wn(r)}},[xl(e)])}function xl(e){return[{type:"user_report"},e]}class Ol extends Eu{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};to(t,"browser",["browser"],$.SENTRY_SDK_SOURCE||fl()),super(t),t.sendClientReports&&$.document&&$.document.addEventListener("visibilitychange",(()=>{"hidden"===$.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return Il(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return kl(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Mt&&E.warn("SDK not enabled, will not capture user feedback."));const t=Ml(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const lo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Al=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",xt=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=Al(t.value,n),e(t)))}},M=N,Dl=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,fo=(e=!0)=>{const t=M.performance&&M.performance.getEntriesByType&&M.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Wr=()=>{const e=fo();return e&&e.activationStart||0},Ot=(e,t)=>{const n=fo();let r="navigate";return n&&(M.document&&M.document.prerendering||Wr()>0?r="prerender":M.document&&M.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Dl(),navigationType:r}},Ye=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},At=e=>{const t=t=>{("pagehide"===t.type||M.document&&"hidden"===M.document.visibilityState)&&e(t)};M.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},In=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let mt=-1;const Nl=()=>"hidden"!==M.document.visibilityState||M.document.prerendering?1/0:0,on=e=>{"hidden"===M.document.visibilityState&&mt>-1&&(mt="visibilitychange"===e.type?e.timeStamp:0,Pl())},Ll=()=>{addEventListener("visibilitychange",on,!0),addEventListener("prerenderingchange",on,!0)},Pl=()=>{removeEventListener("visibilitychange",on,!0),removeEventListener("prerenderingchange",on,!0)},zr=()=>(M.document&&mt<0&&(mt=Nl(),Ll()),{get firstHiddenTime(){return mt}}),kn=e=>{M.document&&M.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Fl=[1800,3e3],Ul=(e,t={})=>{kn((()=>{const n=zr(),r=Ot("FCP");let s;const o=Ye("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Wr(),0),r.entries.push(e),s(!0)))}))}));o&&(s=xt(e,r,Fl,t.reportAllChanges))}))},Bl=[.1,.25],$l=(e,t={})=>{Ul(In((()=>{const n=Ot("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}})),s>n.value&&(n.value=s,n.entries=o,r())},a=Ye("layout-shift",i);a&&(r=xt(e,n,Bl,t.reportAllChanges),At((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},Hl=[100,300],jl=(e,t={})=>{kn((()=>{const n=zr(),r=Ot("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),s(!0))},i=e=>{e.forEach(o)},a=Ye("first-input",i);s=xt(e,r,Hl,t.reportAllChanges),a&&At(In((()=>{i(a.takeRecords()),a.disconnect()})))}))};let po=0,Gn=1/0,zt=0;const Wl=e=>{e.forEach((e=>{e.interactionId&&(Gn=Math.min(Gn,e.interactionId),zt=Math.max(zt,e.interactionId),po=zt?(zt-Gn)/7+1:0)}))};let mr;const zl=()=>mr?po:performance.interactionCount||0,ql=()=>{"interactionCount"in performance||mr||(mr=Ye("event",Wl,{type:"event",buffered:!0,durationThreshold:0}))},be=[],Yn=new Map,Gl=40;let Yl=0;const Vl=()=>zl()-Yl,Kl=()=>{const e=Math.min(be.length-1,Math.floor(Vl()/50));return be[e]},Vn=10,Xl=[],Jl=e=>{if(Xl.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=be[be.length-1],n=Yn.get(e.interactionId);if(n||be.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Yn.set(t.id,t),be.push(t)}be.sort(((e,t)=>t.latency-e.latency)),be.length>10&&be.splice(10).forEach((e=>Yn.delete(e.id)))}},ho=e=>{const t=M.requestIdleCallback||M.setTimeout;let n=-1;return e=In(e),M.document&&"hidden"===M.document.visibilityState?e():(n=t(e),At(e)),n},Ql=[200,500],Zl=(e,t={})=>{"PerformanceEventTiming"in M&&"interactionId"in PerformanceEventTiming.prototype&&kn((()=>{ql();const n=Ot("INP");let r;const s=e=>{ho((()=>{e.forEach(Jl);const t=Kl();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Ye("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=xt(e,n,Ql,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),At((()=>{s(o.takeRecords()),r(!0)})))}))},ed=[2500,4e3],Gs={},td=(e,t={})=>{kn((()=>{const n=zr(),r=Ot("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Wr(),0),r.entries=[e],s())}))},i=Ye("largest-contentful-paint",o);if(i){s=xt(e,r,ed,t.reportAllChanges);const n=In((()=>{Gs[r.id]||(o(i.takeRecords()),i.disconnect(),Gs[r.id]=!0,s(!0))}));["keydown","click"].forEach((e=>{M.document&&addEventListener(e,(()=>ho(n)),{once:!0,capture:!0})})),At(n)}}))},gt={},an={};let mo,go,_o,yo;function nd(e,t=!1){return Tn("cls",e,ad,mo,t)}function rd(e,t=!1){return Tn("lcp",e,ud,_o,t)}function sd(e){return Tn("fid",e,cd,go)}function id(e){return Tn("inp",e,ld,yo)}function od(e,t){return So(e,t),an[e]||(dd(e),an[e]=!0),Eo(e,t)}function Dt(e,t){const n=gt[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){lo&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}function ad(){return $l((e=>{Dt("cls",{metric:e}),mo=e}),{reportAllChanges:!0})}function cd(){return jl((e=>{Dt("fid",{metric:e}),go=e}))}function ud(){return td((e=>{Dt("lcp",{metric:e}),_o=e}),{reportAllChanges:!0})}function ld(){return Zl((e=>{Dt("inp",{metric:e}),yo=e}))}function Tn(e,t,n,r,s=!1){let o;return So(e,t),an[e]||(o=n(),an[e]=!0),r&&t({metric:r}),Eo(e,t,s?o:void 0)}function dd(e){const t={};"event"===e&&(t.durationThreshold=0),Ye(e,(t=>{Dt(e,{entries:t})}),t)}function So(e,t){gt[e]=gt[e]||[],gt[e].push(t)}function Eo(e,t,n){return()=>{n&&n();const r=gt[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const fd=1e3;let Ys,gr,_r,qt;function bo(e){qe("dom",e),Ge("dom",pd)}function pd(){if(!M.document)return;const e=he.bind(null,"dom"),t=Vs(e,!0);M.document.addEventListener("click",t,!1),M.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=M[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(te(r,"addEventListener",(function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Vs(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}})),te(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function hd(e){if(e.type!==gr)return!1;try{if(!e.target||e.target._sentryId!==_r)return!1}catch{}return!0}function md(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function Vs(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=gd(n);if(md(n.type,r))return;je(n,"_sentryCaptured",!0),r&&!r._sentryId&&je(r,"_sentryId",ie());const s="keypress"===n.type?"input":n.type;hd(n)||(e({event:n,name:s,global:t}),gr=n.type,_r=r?r._sentryId:void 0),clearTimeout(Ys),Ys=M.setTimeout((()=>{_r=void 0,gr=void 0}),fd)}}function gd(e){try{return e.target}catch{return null}}function qr(e){const t="history";qe(t,e),Ge(t,_d)}function _d(){if(!ml())return;const e=M.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=qt,t=String(n);qt=t,he("history",{from:e,to:t})}return e.apply(this,t)}}M.onpopstate=function(...t){const n=M.location.href,r=qt;if(qt=n,he("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},te(M.history,"pushState",t),te(M.history,"replaceState",t)}const en={};function vo(e){const t=en[e];if(t)return t;let n=M[e];if(dr(n))return en[e]=n.bind(M);const r=M.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){lo&&E.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(en[e]=n.bind(M))}function Ks(e){en[e]=void 0}function at(...e){return vo("setTimeout")(...e)}const Xe="__sentry_xhr_v3__";function yd(e){qe("xhr",e),Ge("xhr",Sd)}function Sd(){if(!M.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*we(),o=ve(n[0])?n[0].toUpperCase():void 0,i=Ed(n[1]);if(!o||!i)return e.apply(t,n);t[Xe]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Xe];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}he("xhr",{endTimestamp:1e3*we(),startTimestamp:s,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[Xe];return o&&ve(r)&&ve(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Xe];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return he("xhr",{startTimestamp:1e3*we(),xhr:t}),e.apply(t,n)}})}function Ed(e){if(ve(e))return e;try{return e.toString()}catch{}}function bd(e,t=vo("fetch")){let n=0,r=0;return xu(e,(function(s){const o=s.body.length;n+=o,r++;const i={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Ks("fetch"),rn("No fetch implementation available");try{return t(e.url,i).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Ks("fetch"),n-=o,r--,rn(e)}}))}const vd=30,wd=50;function yr(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?$e:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Id=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,kd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Td=/\((\S*)(?::(\d+))(?::(\d+))\)/,Cd=e=>{const t=Id.exec(e);if(t){const[,e,n,r]=t;return yr(e,$e,+n,+r)}const n=kd.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Td.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=wo(n[1]||$e,n[2]);return yr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Rd=[30,Cd],Md=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Od=e=>{const t=Md.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=xd.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||$e;return[n,e]=wo(n,e),yr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Ad=[50,Od],Dd=[Rd,Ad],Nd=Mi(...Dd),wo=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:$e,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Gt=1024,Ld="Breadcrumbs",Pd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Ld,setup(e){t.console&&el($d(e)),t.dom&&bo(Bd(e,t.dom)),t.xhr&&yd(Hd(e)),t.fetch&&cl(jd(e)),t.history&&qr(Wd(e)),t.sentry&&e.on("beforeSendEvent",Ud(e))}}},Fd=Pd;function Ud(e){return function(t){V()===e&&De({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Ce(t)},{event:t})}}function Bd(e,t){return function(n){if(V()!==e)return;let r,s,o="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Gt&&(Mt&&E.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Gt),"string"==typeof o&&(o=[o]);try{const e=n.event,t=zd(e)?e.target:e;r=En(t,{keyAttrs:o,maxStringLength:i}),s=ja(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),De(a,{event:n.event,name:n.name,global:n.global})}}function $d(e){return function(t){if(V()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:no(t.level),message:_s(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${_s(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}De(n,{input:t.args,level:t.level})}}function Hd(e){return function(t){if(V()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[Xe];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,l={method:o,url:i,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};De({category:"xhr",data:l,type:"http",level:oo(a)},u)}}function jd(e){return function(t){if(V()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){De({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,s={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};De({category:"fetch",data:s,type:"http",level:oo(s.status_code)},o)}}}function Wd(e){return function(t){if(V()!==e)return;let n=t.from,r=t.to;const s=zn($.location.href);let o=n?zn(n):void 0;const i=zn(r);(!o||!o.path)&&(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),De({category:"navigation",data:{from:n,to:r}})}}function zd(e){return!!e&&!!e.target}const qd=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Gd="BrowserApiErrors",Yd=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Gd,setupOnce(){t.setTimeout&&te($,"setTimeout",Xs),t.setInterval&&te($,"setInterval",Xs),t.requestAnimationFrame&&te($,"requestAnimationFrame",Vd),t.XMLHttpRequest&&"XMLHttpRequest"in $&&te(XMLHttpRequest.prototype,"send",Kd);const e=t.eventTarget;e&&(Array.isArray(e)?e:qd).forEach(Xd)}}},Io=Yd;function Xs(e){return function(...t){const n=t[0];return t[0]=ot(n,{mechanism:{data:{function:ke(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Vd(e){return function(t){return e.apply(this,[ot(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ke(e)},handled:!1,type:"instrument"}})])}}function Kd(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&te(n,e,(function(t){const n={mechanism:{data:{function:e,handler:ke(t)},handled:!1,type:"instrument"}},r=Nr(t);return r&&(n.mechanism.data.handler=ke(r)),ot(t,n)}))})),e.apply(this,t)}}function Xd(e){const t=$[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(te(n,"addEventListener",(function(t){return function(n,r,s){try{Jd(r)&&(r.handleEvent=ot(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ke(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,ot(r,{mechanism:{data:{function:"addEventListener",handler:ke(r),target:e},handled:!1,type:"instrument"}}),s])}})),te(n,"removeEventListener",(function(e){return function(t,n,r){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch{}return e.call(this,t,n,r)}})))}function Jd(e){return"function"==typeof e.handleEvent}const Qd=()=>({name:"BrowserSession",setupOnce(){typeof $.document>"u"?Mt&&E.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(As({ignoreDuration:!0}),Ds(),qr((({from:e,to:t})=>{void 0!==e&&e!==t&&(As({ignoreDuration:!0}),Ds())})))}}),Zd="GlobalHandlers",ef=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Zd,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(nf(e),Js("onerror")),t.onunhandledrejection&&(rf(e),Js("onunhandledrejection"))}}},tf=ef;function nf(e){Aa((t=>{const{stackParser:n,attachStacktrace:r}=ko();if(V()!==e||co())return;const{msg:s,url:o,line:i,column:a,error:c}=t,l=af(jr(n,c||s,void 0,r,!1),o,i,a);l.level="error",Gi(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function rf(e){Na((t=>{const{stackParser:n,attachStacktrace:r}=ko();if(V()!==e||co())return;const s=sf(t),o=Ar(s)?of(s):jr(n,s,void 0,r,!0);o.level="error",Gi(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function sf(e){if(Ar(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function of(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function af(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=ve(t)&&t.length>0?t:Di();return 0===c.length&&c.push({colno:l,filename:d,function:$e,in_app:!0,lineno:u}),e}function Js(e){Mt&&E.log(`Global Handler attached: ${e}`)}function ko(){const e=V();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const cf=()=>({name:"HttpContext",preprocessEvent(e){if(!$.navigator&&!$.location&&!$.document)return;const t=e.request&&e.request.url||$.location&&$.location.href,{referrer:n}=$.document||{},{userAgent:r}=$.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),uf="cause",lf=5,df="LinkedErrors",ff=(e={})=>{const t=e.limit||5,n=e.key||uf;return{name:df,preprocessEvent(e,r,s){const o=s.getOptions();Qu($r,o.stackParser,o.maxValueLength,n,t,e,r)}}},pf=ff;function hf(e){const t=[Hu(),Fu(),Io(),Fd(),tf(),pf(),ro(),cf()];return!1!==e.autoSessionTracking&&t.push(Qd()),t}function mf(e={}){const t={defaultIntegrations:hf(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:$.SENTRY_RELEASE&&$.SENTRY_RELEASE.id?$.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function gf(){const e=typeof $.window<"u"&&$;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=$.location&&$.location.href||"",s=!!n&&$===$.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),o=typeof e.nw<"u";return!!n&&!s&&!o}function _f(e={}){const t=mf(e);if(!t.skipBrowserExtensionCheck&&gf())return void Ne((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Mt&&(ao()||E.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:xa(t.stackParser||Nd),integrations:_u(t),transport:t.transport||bd};return wu(Ol,n)}const j=N,Gr="sentryReplaySession",yf="replay_event",Yr="Unable to send Replay",Sf=3e5,Ef=9e5,bf=5e3,vf=5500,wf=6e4,If=5e3,kf=3,Qs=15e4,Yt=5e3,Tf=3e3,Cf=300,Vr=2e7,Rf=4999,Mf=15e3,Zs=36e5;function Sr(e,t){return e??t()}function bt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var Q;function xf(e){return e.nodeType===e.ELEMENT_NODE}function _t(e){const t=bt([e,"optionalAccess",e=>e.host]);return bt([t,"optionalAccess",e=>e.shadowRoot])===e}function yt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Of(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Af(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 cn(e){try{const t=e.rules||e.cssRules;return t?Of(Array.from(t,To).join("")):null}catch{return null}}function Df(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function To(e){let t;if(Lf(e))try{t=cn(e.styleSheet)||Af(e)}catch{}else if(Pf(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=Df(e)),n&&(t=Nf(t)),n||r)return t}return t||e.cssText}function Nf(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Lf(e){return"styleSheet"in e}function Pf(e){return"selectorText"in e}!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"}(Q||(Q={}));class Co{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return Sr(bt([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ff(){return new Co}function Cn({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function vt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function ct(e){return e.toLowerCase()}function Er(e){return e.toUpperCase()}const ei="__rrweb_original__";function Uf(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const s=t.getImageData,o=ei in s?s[ei]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Kr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ct(t):null}function un(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Ro(e,t){let n;try{n=new URL(e,Sr(t,(()=>window.location.href)))}catch{return null}return Sr(bt([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const ti={};function Mo(e){const t=ti[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return ti[e]=r.bind(window)}function br(...e){return Mo("setTimeout")(...e)}function xo(...e){return Mo("clearTimeout")(...e)}function Oo(e){try{return e.contentDocument}catch{}}let Bf=1;const $f=new RegExp("[^a-z0-9-_:]"),wt=-2;function Xr(){return Bf++}function Hf(e){if(e instanceof HTMLFormElement)return"form";const t=ct(e.tagName);return $f.test(t)?"div":t}function jf(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let Ve,ni;const Wf=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zf=/^(?:[a-z+]+:)?\/\//i,qf=/^www\..*/i,Gf=/^(data:)([^,]*),(.*)/i;function ln(e,t){return(e||"").replace(Wf,((e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if(zf.test(a)||qf.test(a))return`url(${c}${a}${c})`;if(Gf.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${jf(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const Yf=/^[^ \t\n\r\u000c]+/,Vf=/^[, \t\n\r\u000c]+/;function Kf(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Vf),!(n>=t.length);){let o=r(Yf);if(","===o.slice(-1))o=Je(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=Je(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}const ri=new WeakMap;function Je(e,t){return t&&""!==t.trim()?Rn(e,t):t}function Xf(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Rn(e,t){let n=ri.get(e);if(n||(n=e.createElement("a"),ri.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Ao(e,t,n,r,s,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?Je(e,r):"srcset"===n?Kf(e,r):"style"===n?ln(r,Rn(e)):"object"===t&&"data"===n?Je(e,r):"function"==typeof o?o(n,r,s):r)}function Do(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Jf(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Qf(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ue(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ue(e.parentNode,t,n,r+1)}function Qe(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(Qf(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ut(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=Ue(i,Qe(r,s)),c<0)return!0;a=Ue(i,Qe(t,n),c>=0?c:1/0)}else{if(a=Ue(i,Qe(t,n)),a<0)return!1;c=Ue(i,Qe(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch{}return!!o}function Zf(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch{return}if("complete"!==s){const r=br((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{xo(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return br(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ep(e,t,n){let r,s=!1;try{r=e.sheet}catch{return}if(r)return;const o=br((()=>{s||(t(),s=!0)}),n);e.addEventListener("load",(()=>{xo(o),s=!0,t()}))}function tp(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=np(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Q.Document,childNodes:[],compatMode:e.compatMode}:{type:Q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return sp(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return rp(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:Q.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Q.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function np(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function rp(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||bt([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=cn(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=ln(p,Rn(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const g=ut(e,r,o,s,i,n);if(!h&&!m&&!f&&p&&g&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=vt({isMasked:ut(e,r,o,s,i,Cn({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})}return{type:Q.Text,textContent:p||"",isStyle:h,rootId:u}}function sp(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskAllText:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:b}=t,S=Jf(e,r,s,o),k=Hf(e);let E={};const w=e.attributes.length;for(let t=0;t<w;t++){const r=e.attributes[t];r.name&&!Do(k,r.name,r.value)&&(E[r.name]=Ao(n,k,ct(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=cn(t)),r&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=ln(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=cn(e.sheet);t&&(E._cssText=ln(t,Rn(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=Kr(t),r=un(t,Er(k),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ut(t,y,v,_,b,Cn({type:n,tagName:Er(k),maskInputOptions:a}));E.value=vt({isMasked:e,element:t,value:r,maskInputFn:l})}s&&(E.checked=s)}if("option"===k&&(e.selected&&!a.select?E.selected=!0:delete E.selected),"canvas"===k&&p)if("2d"===e.__context)Uf(e)||(E.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(E.rr_dataURL=t)}if("img"===k&&d){Ve||(Ve=n.createElement("canvas"),ni=Ve.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ve.width=t.naturalWidth,Ve.height=t.naturalHeight,ni.drawImage(t,0,0),E.rr_dataURL=Ve.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?E.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();E={class:E.class,rr_width:`${t}px`,rr_height:`${n}px`}}let x;"iframe"===k&&!h(E.src)&&(!S&&!Oo(e)&&(E.rr_src=E.src),delete E.src);try{customElements.get(k)&&(x=!0)}catch{}return{type:Q.Element,tagName:k,attributes:E,childNodes:[],isSVG:Xf(e)||void 0,needBlock:S,rootId:f,isCustom:x}}function H(e){return null==e?"":e.toLowerCase()}function ip(e,t){if(t.comment&&e.type===Q.Comment)return!0;if(e.type===Q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Ro(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===H(e.attributes.name)||"icon"===H(e.attributes.rel)||"apple-touch-icon"===H(e.attributes.rel)||"shortcut icon"===H(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===H(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===H(e.attributes.name)||"googlebot"===H(e.attributes.name)||"bingbot"===H(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===H(e.attributes.name)||"generator"===H(e.attributes.name)||"framework"===H(e.attributes.name)||"publisher"===H(e.attributes.name)||"progid"===H(e.attributes.name)||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===H(e.attributes.name)||"yandex-verification"===H(e.attributes.name)||"csrf-token"===H(e.attributes.name)||"p:domain_verify"===H(e.attributes.name)||"verify-v1"===H(e.attributes.name)||"verification"===H(e.attributes.name)||"shopify-checkout-api-token"===H(e.attributes.name)))return!0}}return!1}function Ze(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=tp(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:I});if(!R)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):ip(R,_)||!M&&R.type===Q.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Xr();const O=Object.assign(R,{id:A});if(r.add(e,O),-2===A)return null;k&&k(e);let N=!p;if(O.type===Q.Element){N=N&&!O.needBlock,delete O.needBlock;const t=e.shadowRoot;t&&yt(t)&&(O.isShadowHost=!0)}if((O.type===Q.Document||O.type===Q.Element)&&N){_.headWhitespace&&O.type===Q.Element&&"head"===O.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=Ze(n,t);e&&O.childNodes.push(e)}if(xf(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Ze(n,t);r&&(yt(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return e.parentNode&&_t(e.parentNode)&&yt(e.parentNode)&&(O.isShadow=!0),O.type===Q.Element&&"iframe"===O.tagName&&Zf(e,(()=>{const t=Oo(e);if(t&&E){const n=Ze(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});n&&E(e,n)}}),w),O.type===Q.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Ro(O.attributes.href))&&ep(e,(()=>{if(x){const t=Ze(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});t&&x(e,t)}}),T),O}function op(e,t){const{mirror:n=new Co,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1}=t;return Ze(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{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}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1})}function Re(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ee(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ke="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let si={map:{},getId:()=>(console.error(Ke),-1),getNode:()=>(console.error(Ke),null),removeNodeFromMap(){console.error(Ke)},has:()=>(console.error(Ke),!1),reset(){console.error(Ke)}};function It(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&!1===n.leading&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(pp(r),r=null),s=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=Mn((()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),a))}}function No(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){Mn((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>No(e,t,o||{},!0)}function Jr(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(si=new Proxy(si,{get:(e,t,n)=>("map"===t&&console.error(Ke),Reflect.get(e,t,n))}));let dn=Date.now;function Lo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Po(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Uo(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function se(e,t,n,r,s){if(!e)return!1;const o=Uo(e);if(!o)return!1;const i=Qe(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Ue(o,i);let c=-1;return!(a<0)&&(r&&(c=Ue(o,Qe(null,r))),a>-1&&c<0||a<c)}function ap(e,t){return-1!==t.getId(e)}function Kn(e,t){return-2===t.getId(e)}function Bo(e,t){if(_t(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Bo(e.parentNode,t))}function vr(e){return!!e.changedTouches}function cp(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=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function $o(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function Ho(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function wr(e){return!!Re([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(dn=()=>(new Date).getTime());class up{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return gl(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jo(e){let t=null;return Re([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function lp(e){let t,n=e;for(;t=jo(n);)n=t;return n}function dp(e){const t=e.ownerDocument;if(!t)return!1;const n=lp(e);return t.contains(n)}function Wo(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||dp(e))}const ii={};function Qr(e){const t=ii[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return ii[e]=r.bind(window)}function fp(...e){return Qr("requestAnimationFrame")(...e)}function Mn(...e){return Qr("setTimeout")(...e)}function pp(...e){return Qr("clearTimeout")(...e)}var oi,ai,C=(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))(C||{}),w=(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))(w||{}),Z=(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))(Z||{}),Se=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Se||{});function Zr(e){try{return e.contentDocument}catch{}}function hp(e){try{return e.contentWindow}catch{}}function mp(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ci(e){return"__ln"in e}!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"}(oi||(oi={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(ai||(ai={}));class gp{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=mp([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ci(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&ci(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const ui=(e,t)=>`${e}@${t}`;class _p{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new gp,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!Wo(s))return;const o=_t(s.parentNode)?this.mirror.getId(jo(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=Ze(s,{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:e=>{$o(e,this.mirror)&&!se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),Ho(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),wr(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)li(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)!di(this.droppedSet,e)&&!li(this.removes,e,this.mirror)||di(this.movedSet,e)?s(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.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(i))},this.processMutation=e=>{if(!Kn(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Uo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Kr(t),s=t.tagName;r=un(t,s,n);const o=Cn({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=vt({isMasked:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(Zr(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Do(t.tagName,n)&&(s.attributes[n]=Ao(this.doc,ct(t.tagName),ct(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?r:[r,o]:s._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=_t(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Kn(t,this.mirror)||!ap(t,this.mirror)||(this.addedSet.has(t)?(Ir(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Bo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ui(n,r)]?Ir(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!_t(e.target)||!yt(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Kn(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[ui(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),wr(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}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 Ir(e,t){e.delete(t),t.childNodes.forEach((t=>Ir(e,t)))}function li(e,t,n){return 0!==e.length&&yp(e,t,n)}function yp(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function di(e,t){return 0!==e.size&&zo(e,t)}function zo(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||zo(e,n))}let St;function Sp(e){St=e}function Ep(){St=void 0}const A=e=>St?(...t)=>{try{return e(...t)}catch(e){if(St&&!0===St(e))return()=>{};throw e}}:e;function pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const et=[];function Nt(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 qo(e,t){const n=new _p;et.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=pe([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(A((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function bp({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=It(A((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),o),l=A(It(A((e=>{const t=Nt(e),{clientX:n,clientY:s}=vr(e)?e.changedTouches[0]:e;i||(i=dn()),a.push({x:n,y:s,id:r.getId(t),timeOffset:dn()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?w.Drag:e instanceof MouseEvent?w.MouseMove:w.TouchMove)})),s,{trailing:!1})),u=[ee("mousemove",l,n),ee("touchmove",l,n),ee("drag",l,n)];return A((()=>{u.forEach((e=>e()))}))}function vp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(Z).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=ct(i);const u=(t=>i=>{const a=Nt(i);if(se(a,r,s,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Se.Mouse;break;case"touch":c=Se.Touch;break;case"pen":c=Se.Pen}c===Se.Touch?Z[t]===Z.MouseDown?u="TouchStart":Z[t]===Z.MouseUp&&(u="TouchEnd"):Se.Pen}else vr(i)&&(c=Se.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===Se.Touch||u.startsWith("Mouse")&&c===Se.Mouse)&&(c=null)):Z[t]===Z.Click&&(c=l,l=null);const d=vr(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;A(e)({type:Z[u],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Z[i]){case Z.MouseDown:case Z.MouseUp:a=a.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}c.push(ee(a,u,t))})),A((()=>{c.forEach((e=>e()))}))}function Go({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return ee("scroll",A(It(A((i=>{const a=Nt(i);if(!a||se(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Lo(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function wp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ee("resize",A(It(A((()=>{const t=Po(),s=Fo();(n!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),n=t,r=s)})),200)),t)}const Ip=["INPUT","TEXTAREA","SELECT"],fi=new WeakMap;function kp({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=Nt(e);const u=e.isTrusted,g=n&&Er(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Ip.indexOf(g)<0||se(n,r,s,o,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Kr(n);let b=un(_,g,v),S=!1;const k=Cn({maskInputOptions:c,tagName:g,type:v}),E=ut(n,p,m,h,f,k);("radio"===v||"checkbox"===v)&&(S=n.checked),b=vt({isMasked:E,element:n,value:b,maskInputFn:l}),y(n,d?{text:b,isChecked:S,userTriggered:u}:{text:b,isChecked:S});const w=n.name;"radio"===v&&w&&S&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach((e=>{if(e!==n){const t=vt({isMasked:E,element:e,value:un(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function y(t,r){const s=fi.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){fi.set(t,r);const s=n.getId(t);A(e)({...r,id:s})}}const _=("last"===u.input?["change"]:["input","change"]).map((e=>ee(e,A(g),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map((e=>No(e[0],e[1],{set(){A(g)({target:this,isTrusted:!1})}},!1,v)))),A((()=>{_.forEach((e=>e()))}))}function fn(e){return function(e,t){if(Vt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Vt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Vt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Vt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Me(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Tp({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:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(s,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)}))}));const c={};Kt("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Kt("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Kt("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Kt("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,s])=>{l[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(l[r].insertRule,{apply:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...fn(s),a||0]}]}),r.apply(s,o)}))}),s.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...fn(s),i]}]}),r.apply(s,o)}))})})),A((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function Yo({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?pe([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):pe([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=pe([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(pe([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return pe([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=pe([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),A((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function Cp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:A(((s,i,a)=>{const[c,l,u]=a;if(n.has(c))return o.apply(i,[c,l,u]);const{id:d,styleId:p}=Me(pe([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:fn(i.parentRule)}),s.apply(i,a)}))});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:A(((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=Me(pe([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:fn(o.parentRule)}),s.apply(o,a)}))}),A((()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i}))}function Rp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=A((i=>It(A((o=>{const a=Nt(o);if(!a||se(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),o.media||500))),c=[ee("play",a(0),i),ee("pause",a(1),i),ee("seeked",a(2),i),ee("volumechange",a(3),i),ee("ratechange",a(4),i)];return A((()=>{c.forEach((e=>e()))}))}function Mp({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=Jr(t.fonts,"add",(function(t){return function(n){return Mn(A((()=>{const t=s.get(n);t&&(e(t),s.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),A((()=>{r.forEach((e=>e()))}))}function xp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=A((()=>{const e=t.getSelection();if(!e||a&&pe([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;se(a,r,s,o,!0)||se(u,r,s,o,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})}));return c(),ee("selectionchange",c)}function Op({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Jr(n.customElements,"define",(function(e){return function(n,r,s){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,s])}})):()=>{}}function Ap(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=qo(e,e.doc));const s=bp(e),o=vp(e),i=Go(e),a=wp(e,{win:n}),c=kp(e),l=Rp(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=Tp(e,{win:n}),d=Yo(e,e.doc),p=Cp(e,{win:n}),e.collectFonts&&(h=Mp(e)));const m=xp(e),f=Op(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return A((()=>{et.forEach((e=>e.reset())),pe([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),i(),a(),c(),l(),u(),d(),p(),h(),m(),f(),g.forEach((e=>e()))}))}function Vt(e){return typeof window[e]<"u"}function Kt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class kr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function pi(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class Dp{constructor(){this.crossOriginIframeMirror=new kr(Xr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Np{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new kr(Xr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),pi([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=Zr(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case C.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:C.IncrementalSnapshot,data:{source:w.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case C.Meta:case C.Load:case C.DomContentLoaded:return!1;case C.Plugin:return t;case C.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case C.IncrementalSnapshot:switch(t.data.source){case w.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case w.Drag:case w.TouchMove:case w.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case w.ViewportResize:return!1;case w.MediaInteraction:case w.MouseInteraction:case w.Scroll:case w.CanvasMutation:case w.Input:return this.replaceIds(t.data,e,["id"]),t;case w.StyleSheetRule:case w.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case w.Font:return t;case w.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case w.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),pi([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const s of r)!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==Q.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Lp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Pp{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!yt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=qo({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Go({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Mn((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Yo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=Zr(e),n=hp(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Jr(e.prototype,"attachShadow",(function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&Wo(this)&&n.addShadowRoot(this.shadowRoot,t),s}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class hi{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Fp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new up,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:To(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Up{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,fp((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let K,pn;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Zt([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=Ff();function Ie(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:E={},dataURLOptions:x={},mousemoveWait:T,recordDOM:I=!0,recordCanvas:M=!1,recordCrossOriginIframes:R=!1,recordAfter:O=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:N=!1,collectFonts:D=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:U=new Set([]),errorHandler:$,onMutation:F,getCanvasManager:B}=e;Sp($);const H=!R||window.parent===window;let z=!1;if(!H)try{window.parent.document&&(z=!1)}catch{z=!0}if(H&&!t)throw new Error("emit function is required");if(!H&&!z)return()=>{};void 0!==T&&void 0===E.mousemove&&(E.mousemove=T),de.reset();const W=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},q=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};cp();let V,Y=0;const G=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!z&&(e=k(e)),e};K=(e,s)=>{const o=e;if(o.timestamp=dn(),Zt([et,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==C.FullSnapshot&&!(o.type===C.IncrementalSnapshot&&o.data.source===w.Mutation)&&et.forEach((e=>e.unfreeze())),H)Zt([t,"optionalCall",e=>e(G(o),s)]);else if(z){const e={type:"rrweb",event:G(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===C.FullSnapshot)V=o,Y=0;else if(o.type===C.IncrementalSnapshot){if(o.data.source===w.Mutation&&o.data.isAttachIframe)return;Y++;const e=r&&Y>=r,t=n&&V&&o.timestamp-V.timestamp>n;(e||t)&&oe(!0)}};const J=e=>{K({type:C.IncrementalSnapshot,data:{source:w.Mutation,...e}})},Q=e=>K({type:C.IncrementalSnapshot,data:{source:w.Scroll,...e}}),X=e=>K({type:C.IncrementalSnapshot,data:{source:w.CanvasMutation,...e}}),Z=new Fp({mutationCb:J,adoptedStyleSheetCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.AdoptedStyleSheet,...e}})}),te="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Dp:new Np({mirror:de,mutationCb:J,stylesheetManager:Z,recordCrossOriginIframes:R,wrappedEmit:K});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:de,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const ne=new Up,re=$p(B,{mirror:de,win:window,mutationCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.CanvasMutation,...e}}),recordCanvas:M,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:S,sampling:E.canvas,dataURLOptions:x,errorHandler:$}),se="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lp:new Pp({mutationCb:J,scrollCb:Q,bypassOptions:{onMutation:F,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:W,dataURLOptions:x,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:M,inlineImages:L,sampling:E,slimDOMOptions:q,iframeManager:te,stylesheetManager:Z,canvasManager:re,keepIframeSrcFn:j,processedNodeManager:ne},mirror:de}),oe=(e=!1)=>{if(!I)return;K({type:C.Meta,data:{href:window.location.href,width:Fo(),height:Po()}},e),Z.reset(),se.init(),et.forEach((e=>e.lock()));const t=op(document,{mirror:de,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:W,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:q,dataURLOptions:x,recordCanvas:M,inlineImages:L,onSerialize:e=>{$o(e,de)&&te.addIframe(e),Ho(e,de)&&Z.trackLinkElement(e),wr(e)&&se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{te.attachIframe(e,t),e.contentWindow&&re.addWindow(e.contentWindow),se.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},keepIframeSrcFn:j});if(!t)return console.warn("Failed to snapshot the document");K({type:C.FullSnapshot,data:{node:t,initialOffset:Lo(window)}}),et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};pn=oe;try{const e=[],t=e=>A(Ap)({onMutation:F,mutationCb:J,mousemoveCb:(e,t)=>K({type:C.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.MouseInteraction,...e}}),scrollCb:Q,viewportResizeCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.ViewportResize,...e}}),inputCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.Input,...e}}),mediaInteractionCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.MediaInteraction,...e}}),styleSheetRuleCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.StyleSheetRule,...e}}),styleDeclarationCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.StyleDeclaration,...e}}),canvasMutationCb:X,fontCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.Font,...e}}),selectionCb:e=>{K({type:C.IncrementalSnapshot,data:{source:w.Selection,...e}})},customElementCb:e=>{K({type:C.IncrementalSnapshot,data:{source:w.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:W,inlineStylesheet:m,sampling:E,recordDOM:I,recordCanvas:M,inlineImages:L,userTriggeredOnInput:N,collectFonts:D,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:j,blockSelector:o,unblockSelector:i,slimDOMOptions:q,dataURLOptions:x,mirror:de,iframeManager:te,stylesheetManager:Z,shadowDomManager:se,processedNodeManager:ne,canvasManager:re,ignoreCSSAttributes:U,plugins:Zt([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>K({type:C.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});te.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{oe(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ee("DOMContentLoaded",(()=>{K({type:C.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()}))),e.push(ee("load",(()=>{K({type:C.Load,data:{}}),"load"===O&&n()}),window))),()=>{e.forEach((e=>e())),ne.destroy(),pn=void 0,Ep()}}catch(e){console.warn(e)}}function Bp(e){if(!pn)throw new Error("please take full snapshot after start recording");pn(e)}function $p(e,t){try{return e?e(t):new hi}catch{return console.warn("Unable to initialize CanvasManager"),new hi}}Ie.mirror=de,Ie.takeFullSnapshot=Bp;const Hp=3,jp=5;function es(e){return e>9999999999?e:1e3*e}function Xn(e){return e>9999999999?e/1e3:e}function Lt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:C.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:fe(t,10,1e3)}}),"console"===t.category))))}const Wp="button,a";function Vo(e){return e.closest(Wp)||e}function Ko(e){const t=Xo(e);return t&&t instanceof Element?Vo(t):t}function Xo(e){return zp(e)?e.target:e}function zp(e){return"object"==typeof e&&!!e&&"target"in e}let xe;function qp(e){return xe||(xe=[],Gp()),xe.push(e),()=>{const t=xe?xe.indexOf(e):-1;t>-1&&xe.splice(t,1)}}function Gp(){te(j,"open",(function(e){return function(...t){if(xe)try{xe.forEach((e=>e()))}catch{}return e.apply(j,t)}}))}const Yp=new Set([w.Mutation,w.StyleSheetRule,w.StyleDeclaration,w.AdoptedStyleSheet,w.CanvasMutation,w.Selection,w.MediaInteraction]);function Vp(e,t,n){e.handleClick(t,n)}class Kp{constructor(e,t,n=Lt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=qp((()=>{this._lastMutation=mi()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(Jp(t,this._ignoreSelector)||!Qp(e))return;const n={timestamp:Xn(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Xn(e)}registerScroll(e=Date.now()){this._lastScroll=Xn(e)}registerClick(e){const t=Vo(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=mi();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,s)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=at((()=>this._checkClicks()),1e3)}}const Xp=["A","BUTTON","INPUT"];function Jp(e,t){return!!(!Xp.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function Qp(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function mi(){return Date.now()/1e3}function Zp(e,t){try{if(!eh(t))return;const{source:n}=t.data;if(Yp.has(n)&&e.registerMutation(t.timestamp),n===w.Scroll&&e.registerScroll(t.timestamp),th(t)){const{type:n,id:r}=t.data,s=Ie.mirror.getNode(r);s instanceof HTMLElement&&n===Z.Click&&e.registerClick(s)}}catch{}}function eh(e){return 3===e.type}function th(e){return e.data.source===w.MouseInteraction}function ge(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var hn;!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"}(hn||(hn={}));const nh=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function rh(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(nh.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const sh=e=>t=>{if(!e.isEnabled())return;const n=ih(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Vp(e.clickDetector,n,Ko(t.event)),Lt(e,n)};function Jo(e,t){const n=Ie.mirror.getId(e),r=n&&Ie.mirror.getNode(n),s=r&&Ie.mirror.getMeta(r),o=s&&ah(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===hn.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:rh(o.attributes)}}:{}}}function ih(e){const{target:t,message:n}=oh(e);return ge({category:`ui.${e.name}`,...Jo(t,n)})}function oh(e){const t="click"===e.name;let n,r=null;try{r=t?Ko(e.event):Xo(e.event),n=En(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ah(e){return e.type===hn.Element}function ch(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=uh(t);n&&Lt(e,n)}function uh(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||lh(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const l=En(i,{maxStringLength:200})||"<unknown>";return ge({category:"ui.keyDown",message:l,data:{...Jo(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function lh(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const dh={resource:gh,paint:hh,navigation:mh};function Xt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function fh(e){return e.map(ph).filter(Boolean)}function ph(e){const t=dh[e.entryType];return t?t(e):null}function lt(e){return((Ya||j.performance.timeOrigin)+e)/1e3}function hh(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=lt(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function mh(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;return 0===s?null:{type:`${t}.${f}`,start:lt(h),end:lt(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:p}}}function gh(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:lt(o),end:lt(s),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function _h(e){const t=e.entries[e.entries.length-1];return xn(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function yh(e){return void 0!==e.sources}function Sh(e){const t=[],n=[];for(const r of e.entries)if(yh(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Ie.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return xn(e,"cumulative-layout-shift",n,t)}function Eh(e){const t=e.entries[e.entries.length-1];return xn(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function bh(e){const t=e.entries[e.entries.length-1];return xn(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function xn(e,t,n,r){const s=e.value,o=e.rating,i=lt(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map((e=>Ie.mirror.getId(e))):void 0,attributions:r}}}function vh(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(od(e,n))})),r.push(rd(Xt(_h,e)),nd(Xt(Sh,e)),sd(Xt(Eh,e)),id(Xt(bh,e))),()=>{r.forEach((e=>e()))}}const b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wh='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==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],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=A(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}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,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)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[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,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[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){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;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}}},L=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}}},O=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=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(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-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[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=U(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=x,c.p=_,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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 Ih(){const e=new Blob([wh]);return URL.createObjectURL(e)}const gi=["info","warn","error","log"],tn="[Replay] ";function Jn(e,t="info"){De({category:"console",data:{logger:"replay"},level:t,message:`${tn}${e}`},{level:t})}function kh(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return b?(gi.forEach((e=>{n[e]=(...n)=>{E[e](tn,...n),t&&Jn(n.join(""),no(e))}})),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),E.error(tn,r),e?Br(r):t&&Jn(r,"error")},n.infoTick=(...e)=>{E.info(tn,...e),t&&setTimeout((()=>Jn(e[0])),0)}):gi.forEach((e=>{n[e]=()=>{}})),n}const v=kh();class ts extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Vr}.`)}}class Qo{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Vr)throw new ts;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?es(e):null}}class Th{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){b&&v.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return b&&v.error("Error in compression worker: ",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Ch{constructor(e){this._worker=new Th(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=es(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Vr?Promise.reject(new ts):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{b&&v.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Rh{constructor(e){this._fallback=new Qo,this._compression=new Ch(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(b&&v.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){b&&v.exception(e,"Failed to add events when switching buffers.")}}}function Mh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=xh(t);if(e)return e}return b&&v.info("Using simple buffer"),new Qo}function xh(e){try{const t=e||Oh();if(!t)return;b&&v.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Rh(n)}catch(e){b&&v.exception(e,"Failed to create compression worker")}}function Oh(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Ih():""}function ns(){try{return"sessionStorage"in j&&!!j.sessionStorage}catch{return!1}}function Ah(e){Dh(),e.session=void 0}function Dh(){if(ns())try{j.sessionStorage.removeItem(Gr)}catch{}}function Zo(e){return void 0!==e&&Math.random()<e}function ea(e){const t=Date.now();return{id:e.id||ie(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function rs(e){if(ns())try{j.sessionStorage.setItem(Gr,JSON.stringify(e))}catch{}}function Nh(e,t){return Zo(e)?"session":!!t&&"buffer"}function _i({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=ea({sampled:Nh(e,t),previousSessionId:r});return n&&rs(s),s}function Lh(){if(!ns())return null;try{const e=j.sessionStorage.getItem(Gr);if(!e)return null;const t=JSON.parse(e);return b&&v.infoTick("Loading existing session"),ea(t)}catch{return null}}function Tr(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function ta(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Tr(e.started,t,r)||Tr(e.lastActivity,n,r)}function na(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ta(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function Qn({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&Lh();return s?na(s,{sessionIdleExpire:e,maxReplayDuration:t})?(b&&v.infoTick("Session in sessionStorage is expired, creating new one..."),_i(r,{previousSessionId:s.id})):s:(b&&v.infoTick("Creating new session"),_i(r,{previousSessionId:n}))}function Ph(e){return e.type===C.Custom}function ss(e,t,n){return!!sa(e,t)&&(ra(e,t,n),!0)}function Fh(e,t,n){return sa(e,t)?ra(e,t,n):Promise.resolve(null)}async function ra(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=Uh(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof ts,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=V();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function sa(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=es(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(b&&v.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Uh(e,t){try{if("function"==typeof t&&Ph(e))return t(e)}catch(e){return b&&v.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function is(e){return!e.type}function Cr(e){return"transaction"===e.type}function Bh(e){return"replay_event"===e.type}function yi(e){return"feedback"===e.type}function $h(e){return(t,n)=>{if(!e.isEnabled()||!is(t)&&!Cr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(Cr(t))return void Hh(e,t);jh(e,t)}}}function Hh(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 jh(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||at((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function Wh(e){return t=>{!e.isEnabled()||!is(t)||zh(e,t)}}function zh(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){Lt(e,ge({category:"replay.hydrate-error",data:{url:Di()}}))}}function qh(e){const t=V();t&&t.on("beforeAddBreadcrumb",(t=>Gh(e,t)))}function Gh(e,t){if(!e.isEnabled()||!ia(t))return;const n=Yh(t);n&&Lt(e,n)}function Yh(e){return!ia(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?Vh(e):ge(e)}function Vh(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ge(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Yt?(n=!0,`${e.slice(0,Yt)}…`):e;if("object"==typeof e)try{const t=fe(e,7);return JSON.stringify(t).length>Yt?(n=!0,`${JSON.stringify(t,null,2).slice(0,Yt)}…`):t}catch{}return e}));return ge({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ia(e){return!!e.category}function Kh(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function oa(){const e=oe().getPropagationContext().dsc;e&&delete e.replay_id;const t=Bi();if(t){delete Hi(t).replay_id}}function Xh(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:C.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function Jh(e,t){return!("buffer"!==e.recordingMode||t.message===Yr||!t.exception||t.type)&&Zo(e.getOptions().errorSampleRate)}function Qh(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:Bh(t)?(delete t.breadcrumbs,t):is(t)||Cr(t)||yi(t)?e.checkAndHandleExpiredSession()?yi(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Xh(e,t),t):Kh(t,n)&&!e.getOptions()._experiments.captureExceptions?(b&&v.log("Ignoring error from rrweb internals",t),null):((Jh(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(oa(),t):t),{id:"Replay"})}function On(e,t){return t.map((({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:C.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function Zh(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 em(e){return t=>{if(!e.isEnabled())return;const n=Zh(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(On(e,[n]),!1))))}}function tm(e,t){return(!b||!e.getOptions()._experiments.traceInternals)&&Ou(t,V())}function aa(e,t){e.isEnabled()&&null!==t&&(tm(e,t.name)||e.addUpdate((()=>(On(e,[t]),!0))))}function An(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=da(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function ca(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ua(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[da(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mn(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 la(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:ne({method:o,statusCode:i,request:a,response:c})}}function kt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ae(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=nm(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function Rr(e,t){return Object.entries(e).reduce(((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n}),{})}function da(e){return new URLSearchParams(e).toString()}function nm(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>Qs,n=rm(e);if(t){const t=e.slice(0,Qs);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function rm(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function gn(e,t){return Ct(sm(e),t)}function sm(e,t=j.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(j.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 im(e,t,n){try{const r=la("resource.fetch",await am(e,t,n));aa(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture fetch breadcrumb")}}function om(e,t){const{input:n,response:r}=t,s=An(n?fa(n):void 0),o=r?ca(r.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}async function am(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=gn(i,n.networkDetailAllowUrls)&&!gn(i,n.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:d?cm(n,t.input,l):kt(l),response:await um(d,n,t.response,u)}}function cm({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?fm(n,t):{};if(!e)return Ae(s,r,void 0);const o=fa(n),[i,a]=ua(o),c=Ae(s,r,i);return a?mn(c,a):c}async function um(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&void 0!==s)return kt(s);const o=r?pa(r.headers,n):{};if(!r||!t&&void 0!==s)return Ae(o,s,void 0);const[i,a]=await dm(r),c=lm(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?mn(c,a):c}function lm(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&void 0===n?An(e):n;return r?Ae(s,o,t?e:void 0):kt(o)}catch(e){return b&&v.exception(e,"Failed to serialize response body"),Ae(s,n,void 0)}}async function dm(e){const t=pm(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await hm(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(b&&v.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(b&&v.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function fa(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function pa(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function fm(e,t){return 1===e.length&&"string"!=typeof e[0]?Si(e[0],t):2===e.length?Si(e[1],t):{}}function Si(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?pa(n,t):Array.isArray(n)?{}:Rr(n,t):{}}function pm(e){try{return e.clone()}catch(e){b&&v.exception(e,"Failed to clone response body")}}function hm(e){return new Promise(((t,n)=>{const r=at((()=>n(new Error("Timeout while trying to read response body"))),500);mm(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function mm(e){return await e.text()}async function gm(e,t,n){try{const r=la("resource.xhr",ym(e,t,n));aa(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture xhr breadcrumb")}}function _m(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=An(r),o=n.getResponseHeader("content-length")?ca(n.getResponseHeader("content-length")):vm(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function ym(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!gn(c,n.networkDetailAllowUrls)||gn(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:kt(d),response:kt(p)}}const h=a[Xe],m=h?Rr(h.request_headers,n.networkRequestHeaders):{},f=Rr(Sm(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?ua(i):[void 0],[_,v]=n.networkCaptureBodies?Em(a):[void 0],b=Ae(m,d,g),S=Ae(f,p,_);return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:y?mn(b,y):b,response:v?mn(S,v):S}}function Sm(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Em(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return bm(e.response,e.responseType)}catch(e){t.push(e)}return b&&v.warn("Failed to get xhr response body",...t),[void 0]}function bm(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function vm(e,t){try{return An("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function wm(e){const t=V();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Im(a,e,t)))}catch{}}function Im(e,t,n){if(t.data)try{km(t)&&Cm(n)&&(_m(t,n),gm(t,n,e)),Tm(t)&&Rm(n)&&(om(t,n),im(t,n,e))}catch(e){b&&v.exception(e,"Error when enriching network breadcrumb")}}function km(e){return"xhr"===e.category}function Tm(e){return"fetch"===e.category}function Cm(e){return e&&e.xhr}function Rm(e){return e&&e.response}function Mm(e){const t=V();bo(sh(e)),qr(em(e)),qh(e),wm(e);lu(Qh(e)),t&&(t.on("beforeSendEvent",Wh(e)),t.on("afterSendEvent",$h(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function xm(e){try{return Promise.all(On(e,[Om(j.performance.memory)]))}catch{return[]}}function Om(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 Am(e,t,n){let r,s,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=at(a,t),i&&void 0===o&&(o=at(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==s||void 0!==o?a():r},l}function Dm(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(b&&v.warn("Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&Zp(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!ss(e,n,s))return!0;if(!s)return!1;const t=e.session;if(Lm(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(b&&v.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&rs(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function Nm(e){const t=e.getOptions();return{type:C.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Lm(e,t){!t||!e.session||0!==e.session.segmentId||ss(e,Nm(e),!1)}function Pm(e,t,n,r){return ft(zi(e,Ur(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function Fm({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function Um({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,s);const o=await qi(e.getOptions(),r,s,t,e,_e());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function Bm({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=Fm({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=V(),p=oe(),h=d&&d.getTransport(),m=d&&d.getDsn();if(!(d&&h&&m&&o.sampled))return Te({});const f={type:yf,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await Um({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay",f),b&&v.info("An event processor returned `null`, will not send event."),Te({});delete g.sdkProcessingMetadata;const y=Pm(g,i,m,d.getOptions().tunnel);let _;try{_=await h.send(y)}catch(e){const t=new Error(Yr);try{t.cause=e}catch{}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new ha(_.statusCode);const S=eo({},_);if(Zi(S,"replay"))throw new os(S);return _}class ha extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class os extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function ma(e,t={count:0,interval:If}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Bm(e),!0}catch(n){if(n instanceof ha||n instanceof os)throw n;if(Yi("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Yr} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{at((async()=>{try{await ma(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const ga="__THROTTLED",$m="__SKIPPED";function Hm(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=s;return s=!0,e?$m:ga}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Oe{constructor({options:e,recordingOptions:t}){Oe.prototype.__init.call(this),Oe.prototype.__init2.call(this),Oe.prototype.__init3.call(this),Oe.prototype.__init4.call(this),Oe.prototype.__init5.call(this),Oe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Sf,sessionIdleExpire:Ef},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=Am((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Hm(((e,t)=>Fh(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(Tf,n),timeout:n,scrollTimeout:Cf,ignoreSelector:r?r.join(","):""}:void 0;if(s&&(this.clickDetector=new Kp(this,s)),b){const t=e._experiments;v.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){b&&v.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(b&&v.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",b&&v.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(b&&v.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Qn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in buffer mode");const e=Qn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Ie({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:wf}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Dm(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{b&&v.info("Stopping Replay"+(t?` triggered by ${t}`:"")),oa(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Ah(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),b&&v.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),b&&v.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();b&&v.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?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&&Tr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${j.location.pathname}${j.location.hash}${j.location.search}`,t=`${j.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===ga){const e=ge({category:"replay.throttled"});this.addUpdate((()=>!ss(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Bi(),t=e&&Pr(e),n=(t&&Et(t).data||{})[Ui];if(t&&n&&["route","custom"].includes(n))return Et(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Mh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Qn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!na(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{j.document.addEventListener("visibilitychange",this._handleVisibilityChange),j.addEventListener("blur",this._handleWindowBlur),j.addEventListener("focus",this._handleWindowFocus),j.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Mm(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=vh(this)}_removeListeners(){try{j.document.removeEventListener("visibilitychange",this._handleVisibilityChange),j.removeEventListener("blur",this._handleWindowBlur),j.removeEventListener("focus",this._handleWindowFocus),j.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===j.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ge({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ge({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{ch(this,e)}}_doChangeToBackgroundTasks(e){!this.session||ta(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):b&&v.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:C.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=fh(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(On(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await xm(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await ma({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=V();if(t){const n=e instanceof os?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else b&&v.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(b&&v.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return b&&v.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&b&&v.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&rs(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=ge({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function ht(e,t){return[...e,...t].join(",")}function jm({mask:e,unmask:t,block:n,unblock:r,ignore:s}){return{maskTextSelector:ht(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ht(t,[]),blockSelector:ht(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:ht(r,[]),ignoreSelector:ht(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Wm({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const Ei='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',zm=["content-length","content-type","accept"];let bi=!1;const qm=e=>new Dn(e);class Dn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=bf,flushMaxDelay:t=vf,minReplayDuration:n=Rf,maxReplayDuration:r=Zs,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder"],unmask:k=[],block:E=[],unblock:w=[],ignore:x=[],maskFn:T,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M}={}){this.name=Dn.id;const R=jm({mask:b,unmask:k,block:E,unblock:w,ignore:x});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>Wm({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Mf),maxReplayDuration:Math.min(r,Zs),stickySession:s,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:vi(_),networkResponseHeaders:vi(v),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ei}`:Ei),this._isInitialized&&qs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return bi}set _isInitialized(e){bi=e}afterAllSetup(e){!qs()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=Gm(this._initialOptions,e);this._replay=new Oe({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Gm(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ne(e)},s=ir(n.replaysSessionSampleRate),o=ir(n.replaysOnErrorSampleRate);return null==s&&null==o&&Ne((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=s&&(r.sessionSampleRate=s),null!=o&&(r.errorSampleRate=o),r}function vi(e){return[...zm,...e.map((e=>e.toLowerCase()))]}function Ym(e){const t={...e};return to(t,"react"),Yi("react",{version:ka}),_f(t)}Dn.__initStatic();const _a=()=>"object"!=typeof window;var Vm={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.16.0/bin",TURBO_HASH:"3fc44dab912d151c",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.200",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3048",APP_NAME:"@wellesley/sentry"};const Km=()=>!!Vm.JEST_WORKER_ID,wi=["debug","info","warn","error"],Xm=(e,t)=>{const n=wi.indexOf(e);return wi.indexOf(t)>=n},Jt=(e,t,n,...r)=>{Xm(t,e)&&console.log(`[${e}] ${n}`,...r)},Jm=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),Qm=(e=!_a()&&Jm()||"warn")=>{let t=e;return{debug:(e,...n)=>Jt("debug",t,e,...n),info:(e,...n)=>Jt("info",t,e,...n),warn:(e,...n)=>Jt("warn",t,e,...n),error:(e,...n)=>(Ia(e,...n),Jt("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Zm=Qm();var Ii={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.16.0/bin",TURBO_HASH:"3fc44dab912d151c",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.200",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3048",APP_NAME:"@wellesley/sentry"};const eg=e=>`${e||"wlsy"}-${Ii.DOMAIN_ENV}#${Ii.BUILD_NUMBER}`;var ya={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.16.0/bin",TURBO_HASH:"3fc44dab912d151c",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.200",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3048",APP_NAME:"@wellesley/sentry"};const tg=ya.DOMAIN_ENV;_a()||(window.build=ya.BUILD_NUMBER);const as=()=>!Km(),ng=[qm(),Io(),ro()],rg=({dsn:e,release:t,integrations:n=ng,...r})=>{if(as()&&e)try{Ym({dsn:e,integrations:n,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,release:eg(t),environment:tg,maxValueLength:1024,...r})}catch(e){return void Zm.error("Sentry init error: ",e)}},Sa=e=>{if(as()&&e){const{email:t,username:n,userId:r}=e;uu({email:t,username:n,id:r})}},_g=Object.freeze(Object.defineProperty({__proto__:null,init:rg,isEnabled:as,setUser:Sa},Symbol.toStringTag,{value:"Module"})),sg=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},ig=e=>sg(e)&&"type"in e&&"string"==typeof e.type,R=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>ig(t)&&t.type===e,t};R("remoteReady"),R("reselectUser"),R("requestLogin"),R("requestLogout"),R("setConfirmLeavePage"),R("requestChangePath"),R("wsSubscribe"),R("wsUnSubscribe"),R("hostStoreConnect"),R("remoteLogin"),R("remoteLogout"),R("wsOnMessage"),R("setRouterPath"),R("setDeviceType");const og=R("setUserError"),ag=R("setUserIsError"),cg=R("setUserPending"),ug=R("setUserSuccess"),lg=R("setUserData"),dg=R("updateAccountData"),fg=R("updateUser");R("addNotification"),R("markNotification"),R("setNotificationsError"),R("setNotificationsList"),R("setNotificationsPending"),R("setNotificationsTotalCount"),R("setNotificationsUnreadCount"),R("resetNotificationsState"),R("undoNotification"),R("setInstanceInfo"),R("setInstanceInfoPending"),R("setInstanceInfoError"),R("setPlatformSettings"),R("setProfileSettings"),R("setGroupData"),R("setGroupLoading"),R("showGroupBasicInfo"),Ci("requestMicroFrontendFetch"),Ci("sendMicroFrontendFetchResponse");const ki={data:null,isError:!1,isPending:!1,isSuccess:!1},Ti=Ca({name:"user",initialState:ki,reducers:{reset:e=>{Object.assign(e,ki)}},extraReducers:e=>{e.addCase(lg,((e,{payload:t})=>{e.data=t})).addCase(dg,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(ug,((e,{payload:t})=>{e.isSuccess=t})).addCase(cg,((e,{payload:t})=>{e.isPending=t})).addCase(ag,((e,{payload:t})=>{e.isError=t})).addCase(og,((e,{payload:t})=>{e.error=t})).addCase(fg,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),yg=()=>{const e=ds(Ti.selectors.selectAccount),t=ds(Ti.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:s}=t||{};Ta((()=>{n&&r&&s&&Sa({email:n,username:r,userId:s})}),[n,r,s])},Sg=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return cu("exceptionMessage",t),void Br(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}au(t)};export{Sg as logErrorToSentry,_g as sentryClient,yg as useSentryUser};
1
+ import{logErrorToSentry as Ma}from"https://cdn.jsdelivr.net/npm/@wellesley/sentry@next";import{version as xa,useEffect as Oa}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{useSelector as hs}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{createAction as xi,createSlice as Aa}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";const B=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Be="8.48.0",N=globalThis;function yn(e,t,n){const r=N,s=r.__SENTRY__=r.__SENTRY__||{},o=s[Be]=s[Be]||{};return o[e]||(o[e]=t())}const ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Da="Sentry Logger ",nr=["debug","info","warn","error","log","assert","trace"],rn={};function Ne(e){if(!("console"in N))return e();const t=N.console,n={},r=Object.keys(rn);r.forEach((e=>{const r=rn[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function Na(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ze?nr.forEach((n=>{t[n]=(...t)=>{e&&Ne((()=>{N.console[n](`${Da}[${n}]:`,...t)}))}})):nr.forEach((e=>{t[e]=()=>{}})),t}const E=yn("logger",Na),Oi=50,$e="?",ms=/\(error: (.*)\)/,gs=/captureMessage|captureException/;function Ai(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const s=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const i=ms.test(n)?n.replace(ms,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){s.push(t);break}}if(s.length>=50+r)break}}return Pa(s.slice(r))}}function La(e){return Array.isArray(e)?Ai(...e):e}function Pa(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Bt(t).function||"")&&t.pop(),t.reverse(),gs.test(Bt(t).function||"")&&(t.pop(),gs.test(Bt(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||Bt(t).filename,function:e.function||$e})))}function Bt(e){return e[e.length-1]||{}}const zn="<anonymous>";function ke(e){try{return e&&"function"==typeof e&&e.name||zn}catch{return zn}}function _s(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Qt={},ys={};function qe(e,t){Qt[e]=Qt[e]||[],Qt[e].push(t)}function Ge(e,t){if(!ys[e]){ys[e]=!0;try{t()}catch(t){ze&&E.error(`Error while instrumenting ${e}`,t)}}}function he(e,t){const n=e&&Qt[e];if(n)for(const r of n)try{r(t)}catch(t){ze&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}let qn=null;function Fa(e){const t="error";qe(t,e),Ge(t,Ua)}function Ua(){qn=N.onerror,N.onerror=function(e,t,n,r,s){return he("error",{column:r,error:s,line:n,msg:e,url:t}),!!qn&&qn.apply(this,arguments)},N.onerror.__SENTRY_INSTRUMENTED__=!0}let Gn=null;function Ba(e){const t="unhandledrejection";qe(t,e),Ge(t,$a)}function $a(){Gn=N.onunhandledrejection,N.onunhandledrejection=function(e){return he("unhandledrejection",e),!Gn||Gn.apply(this,arguments)},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Tt(){return Ar(N),N}function Ar(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Be,t[Be]=t[Be]||{}}const Di=Object.prototype.toString;function Dr(e){switch(Di.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return He(e,Error)}}function dt(e,t){return Di.call(e)===`[object ${t}]`}function Ni(e){return dt(e,"ErrorEvent")}function Ss(e){return dt(e,"DOMError")}function Ha(e){return dt(e,"DOMException")}function ve(e){return dt(e,"String")}function Nr(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Lr(e){return null===e||Nr(e)||"object"!=typeof e&&"function"!=typeof e}function nt(e){return dt(e,"Object")}function Sn(e){return typeof Event<"u"&&He(e,Event)}function ja(e){return typeof Element<"u"&&He(e,Element)}function Wa(e){return dt(e,"RegExp")}function En(e){return!(!e||!e.then||"function"!=typeof e.then)}function za(e){return nt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function He(e,t){try{return e instanceof t}catch{return!1}}function Li(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Pr=N,qa=80;function bn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Ga(n,u),!("html"===l||o>1&&i+s.length*c+l.length>=d));)s.push(l),i+=l.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Ga(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Pr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(s&&s.length)s.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&ve(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function Pi(){try{return Pr.document.location.href}catch{return""}}function Ya(e){if(!Pr.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function tt(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Es(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Li(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Va(e,t,n=!1){return!!ve(e)&&(Wa(t)?t.test(e):!!ve(t)&&(n?e===t:e.includes(t)))}function Ct(e,t=[],n=!1){return t.some((t=>Va(e,t,n)))}function te(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);"function"==typeof s&&Fi(s,r);try{e[t]=s}catch{ze&&E.log(`Failed to replace method "${t}" in object`,e)}}function je(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ze&&E.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Fi(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,je(e,"__sentry_original__",t)}catch{}}function Fr(e){return e.__sentry_original__}function Ui(e){if(Dr(e))return{message:e.message,name:e.name,stack:e.stack,...vs(e)};if(Sn(e)){const t={type:e.type,target:bs(e.target),currentTarget:bs(e.currentTarget),...vs(e)};return typeof CustomEvent<"u"&&He(e,CustomEvent)&&(t.detail=e.detail),t}return e}function bs(e){try{return ja(e)?bn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function vs(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Ka(e,t=40){const n=Object.keys(Ui(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return tt(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:tt(r,t)}return""}function ne(e){return rr(e,new Map)}function rr(e,t){if(Xa(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=rr(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(rr(e,t))})),r}return e}function Xa(e){if(!nt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const Bi=1e3;function Rt(){return Date.now()/Bi}function Ja(){const{performance:e}=N;if(!e||!e.now)return Rt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/Bi}const we=Ja(),Qa=(()=>{const{performance:e}=N;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+n-r):t;return o||a<t?s<=a?e.timeOrigin:i:r})();function ie(){const e=N,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function $i(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ce(e){const{message:t,event_id:n}=e;if(t)return t;const r=$i(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function sr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function rt(e,t){const n=$i(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function ws(e){if(Za(e))return!0;try{je(e,"__sentry_captured__",!0)}catch{}return!1}function Za(e){try{return e.__sentry_captured__}catch{}}var Ee;function Te(e){return new ce((t=>{t(e)}))}function sn(e){return new ce(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Ee||(Ee={}));class ce{constructor(e){ce.prototype.__init.call(this),ce.prototype.__init2.call(this),ce.prototype.__init3.call(this),ce.prototype.__init4.call(this),this._state=Ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ce(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ce(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Ee.PENDING){if(En(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ee.RESOLVED&&e[1](this._value),this._state===Ee.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function ec(e){const t=we(),n={sid:ie(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>nc(n)};return st(n,e),n}function st(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||we(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ie()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function tc(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),st(e,n)}function nc(e){return ne({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Is(){return ie()}function ir(){return ie().substring(16)}function vn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=vn(r[e],t[e],n-1));return r}const or="_sentrySpan";function ks(e,t){t?je(e,or,t):delete e[or]}function ar(e){return e[or]}const rc=100;class Ur{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Is(),spanId:ir()}}clone(){const e=new Ur;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ks(e,ar(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&st(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof We?[t.getScopeData(),t.getRequestSession()]:nt(t)?[e,e.requestSession]:[],{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,ks(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Is()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:rc;if(n<=0)return this;const r={timestamp:Rt(),...e},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ar(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=vn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:ir(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ie();if(!this._client)return E.warn("No client configured on scope - will not capture message!"),r;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ie();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(E.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const We=Ur;function sc(){return yn("defaultCurrentScope",(()=>new We))}function ic(){return yn("defaultIsolationScope",(()=>new We))}class oc{constructor(e,t){let n,r;n=e||new We,r=t||new We,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return En(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function it(){const e=Ar(Tt());return e.stack=e.stack||new oc(sc(),ic())}function ac(e){return it().withScope(e)}function cc(e,t){const n=it();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Ts(e){return it().withScope((()=>e(it().getIsolationScope())))}function uc(){return{withIsolationScope:Ts,withScope:ac,withSetScope:cc,withSetIsolationScope:(e,t)=>Ts(t),getCurrentScope:()=>it().getScope(),getIsolationScope:()=>it().getIsolationScope()}}function wn(e){const t=Ar(e);return t.acs?t.acs:uc()}function oe(){return wn(Tt()).getCurrentScope()}function _e(){return wn(Tt()).getIsolationScope()}function lc(){return yn("globalScope",(()=>new We))}function dc(...e){const t=wn(Tt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function V(){return oe().getClient()}function fc(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:s}=t;return ne({trace_id:n,span_id:r,parent_span_id:s})}const pc="_sentryMetrics";function hc(e){const t=e[pc];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(ne(r));return n}const Hi="sentry.source",mc="sentry.sample_rate",gc="sentry.op",_c="sentry.origin",yc=0,Sc=1,Ec="sentry-",bc=/^sentry-/;function vc(e){const t=wc(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(bc)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function wc(e){if(e&&(ve(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=Cs(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Cs(e)}function Cs(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Ic=1;let Rs=!1;function kc(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ne({parent_span_id:r?t:Et(e).parent_span_id,span_id:r?ir():t,trace_id:n})}function Ms(e){return"number"==typeof e?xs(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xs(e.getTime()):we()}function xs(e){return e>9999999999?e/1e3:e}function Et(e){if(Cc(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Tc(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return ne({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Ms(s),timestamp:Ms(i)||void 0,status:Mc(c),op:r[gc],origin:r[_c],_metrics_summary:hc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Tc(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Cc(e){return"function"==typeof e.getSpanJSON}function Rc(e){const{traceFlags:t}=e.spanContext();return 1===t}function Mc(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const xc="_sentryRootSpan";function Br(e){return e[xc]||e}function ji(){const e=wn(Tt());return e.getActiveSpan?e.getActiveSpan():ar(oe())}function Oc(){Rs||(Ne((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),Rs=!0)}function Ac(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=V(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const $r="production",Dc="_frozenDsc";function Wi(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=ne({environment:n.environment||$r,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function Nc(e,t){const n=t.getPropagationContext();return n.dsc||Wi(n.traceId,e)}function zi(e){const t=V();if(!t)return{};const n=Br(e),r=n[Dc];if(r)return r;const s=n.spanContext().traceState,o=s&&s.get("sentry.dsc"),i=o&&vc(o);if(i)return i;const a=Wi(e.spanContext().traceId,t),c=Et(n),l=c.data||{},u=l[mc];null!=u&&(a.sample_rate=`${u}`);const d=l[Hi],p=c.description;return"url"!==d&&p&&(a.transaction=p),Ac()&&(a.sampled=String(Rc(n))),t.emit("createDsc",a,n),a}function cr(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;B&&E.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const Lc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Pc(e){return"http"===e||"https"===e}function In(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Fc(e){const t=Lc.exec(e);if(!t)return void Ne((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return qi({host:o,pass:s,path:c,projectId:l,port:i,protocol:n,publicKey:r})}function qi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Uc(e){if(!ze)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(E.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(n.match(/^\d+$/)?Pc(r)?!t||!isNaN(parseInt(t,10))||(E.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(E.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(E.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}function Bc(e){const t="string"==typeof e?Fc(e):qi(e);if(t&&Uc(t))return t}function $c(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function fe(e,t=100,n=1/0){try{return ur("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Gi(e,t=3,n=102400){const r=fe(e,t);return zc(r)>n?Gi(e,t-1,n):r}function ur(e,t,n=1/0,r=1/0,s=$c()){const[o,i]=s;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Hc(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return ur("",l.toJSON(),c-1,r,s)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=Ui(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=ur(e,t,c-1,r,s),d++}return i(t),u}function Hc(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Li(t))return"[VueViewModel]";if(za(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${ke(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=jc(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function jc(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Wc(e){return~-encodeURI(e).split(/%..|./).length}function zc(e){return Wc(JSON.stringify(e))}function ft(e,t=[]){return[e,t]}function qc(e,t){const[n,r]=e;return[n,[...r,t]]}function Os(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function lr(e){return N.__SENTRY__&&N.__SENTRY__.encodePolyfill?N.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Gc(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[lr(r),e]:r.push("string"==typeof e?lr(e):e)}for(const e of n){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(fe(n))}s(e)}}return"string"==typeof r?r:Yc(r)}function Yc(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}function Vc(e){const t="string"==typeof e.data?lr(e.data):e.data;return[ne({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Kc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function As(e){return Kc[e]}function Hr(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Yi(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:In(r)},...s&&{trace:ne({...s})}}}function Xc(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Jc(e,t,n,r){const s=Hr(n);return ft({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:In(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function Qc(e,t,n,r){const s=Hr(n),o=e.type&&"replay_event"!==e.type?e.type:"event";Xc(e,n&&n.sdk);const i=Yi(e,s,r,t);return delete e.sdkProcessingMetadata,ft(i,[[{type:o},e]])}function dr(e,t,n,r=0){return new ce(((s,o)=>{const i=e[r];if(null===t||"function"!=typeof i)s(t);else{const a=i({...t},n);B&&i.id&&null===a&&E.log(`Event processor "${i.id}" dropped event`),En(a)?a.then((t=>dr(e,t,n,r+1).then(s))).then(null,o):dr(e,a,n,r+1).then(s).then(null,o)}}))}let $t,Ds,Ht;function Zc(e){const t=N._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ht&&n.length===Ds||(Ds=n.length,Ht=n.reduce(((n,r)=>{$t||($t={});const s=$t[r];if(s)n[s[0]]=s[1];else{const s=e(r);for(let e=s.length-1;e>=0;e--){const o=s[e],i=o&&o.filename,a=t[r];if(i&&a){n[i]=a,$t[r]=[i,a];break}}}return n}),{})),Ht}function eu(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;tu(e,t),r&&su(e,r),iu(e,n),nu(e,s),ru(e,o)}function Ns(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:h,span:m}=t;jt(e,"extra",n),jt(e,"tags",r),jt(e,"user",s),jt(e,"contexts",o),e.sdkProcessingMetadata=vn(e.sdkProcessingMetadata,a,2),i&&(e.level=i),h&&(e.transactionName=h),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function jt(e,t,n){e[t]=vn(e[t],n,1)}function tu(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=ne(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=ne(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=ne(s);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=ne(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),i&&(e.level=i),a&&"transaction"!==e.type&&(e.transaction=a)}function nu(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ru(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function su(e,t){e.contexts={trace:kc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zi(t),...e.sdkProcessingMetadata};const n=Et(Br(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function iu(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Vi(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ie(),timestamp:t.timestamp||Rt()},l=n.integrations||e.integrations.map((e=>e.name));ou(c,e),uu(c,l),s&&s.emit("applyFrameMetadata",t),void 0===t.type&&au(c,e.stackParser);const u=du(r,n.captureContext);n.mechanism&&rt(c,n.mechanism);const d=s?s.getEventProcessors():[],p=lc().getScopeData();if(o){Ns(p,o.getScopeData())}if(u){Ns(p,u.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),eu(c,p);return dr([...d,...p.eventProcessors],c,n).then((e=>(e&&cu(e),"number"==typeof i&&i>0?lu(e,i,a):e)))}function ou(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||$r,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=tt(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=tt(i.value,o));const a=e.request;a&&a.url&&(a.url=tt(a.url,o))}function au(e,t){const n=Zc(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function cu(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function uu(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function lu(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))},...e.user&&{user:fe(e.user,t,n)},...e.contexts&&{contexts:fe(e.contexts,t,n)},...e.extra&&{extra:fe(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=fe(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:fe(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=fe(e.contexts.flags,3,n)),r}function du(e,t){if(!t)return e;const n=e?e.clone():new We;return n.update(t),n}function jr(e,t){return oe().captureException(e,void 0)}function fu(e,t){const n={captureContext:t};return oe().captureMessage(e,void 0,n)}function Ki(e,t){return oe().captureEvent(e,t)}function Xi(e,t){_e().setContext(e,t)}function pu(e,t){_e().setExtra(e,t)}function hu(e){_e().setUser(e)}function mu(e){_e().addEventProcessor(e)}function Ls(e){const t=V(),n=_e(),r=oe(),{release:s,environment:o=$r}=t&&t.getOptions()||{},{userAgent:i}=N.navigator||{},a=ec({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&"ok"===c.status&&st(c,{status:"exited"}),Ji(),n.setSession(a),r.setSession(a),a}function Ji(){const e=_e(),t=oe(),n=t.getSession()||e.getSession();n&&tc(n),Qi(),e.setSession(),t.setSession()}function Qi(){const e=_e(),t=oe(),n=V(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ps(e=!1){e?Ji():Qi()}const gu="7";function _u(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function yu(e){return`${_u(e)}${e.projectId}/envelope/`}function Su(e,t){const n={sentry_version:gu};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Eu(e,t,n){return t||`${yu(e)}?${Su(e,n)}`}const Fs=[];function bu(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}function vu(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const s=bu(r),o=s.findIndex((e=>"Debug"===e.name));if(o>-1){const[e]=s.splice(o,1);s.push(e)}return s}function wu(e,t){const n={};return t.forEach((t=>{t&&Zi(e,t,n)})),n}function Us(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Zi(e,t,n){if(n[t.name])B&&E.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Fs.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Fs.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}B&&E.log(`Integration installed: ${t.name}`)}}function Iu(e,t,n){return ft(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Rt(),discarded_events:e}]])}class me extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Bs="Not capturing exception because it's already been captured.";class ku{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Bc(e.dsn):B&&E.warn("No DSN provided, client will not send events."),this._dsn){const t=Eu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&Ne((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ie();if(ws(e))return B&&E.log(Bs),r;const s={event_id:r,...t};return this._process(this.eventFromException(e,s).then((e=>this._captureEvent(e,s,n)))),s.event_id}captureMessage(e,t,n,r){const s={event_id:ie(),...n},o=Nr(e)?e:String(e),i=Lr(e)?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(i.then((e=>this._captureEvent(e,s,r)))),s.event_id}captureEvent(e,t,n){const r=ie();if(t&&t.originalException&&ws(t.originalException))return B&&E.log(Bs),r;const s={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){"string"!=typeof e.release?B&&E.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),st(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Te(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Zi(this,e,this._integrations),t||Us(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Qc(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=qc(n,Vc(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=Jc(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,s=`${e}:${t}`;B&&E.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(B&&E.error("Error while sending envelope:",e),e))):(B&&E.error("Transport disabled"),Te({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=wu(this,e),Us(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const s=t.exception&&t.exception.values;if(s){r=!0;for(const e of s){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(st(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ce((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=oe(),r=_e()){const s=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Vi(s,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:fc(n),...e.contexts};const t=Nc(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(B){const t=e;"log"===t.logLevel?E.log(t.message):E.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:s}=r,o=to(e),i=eo(e),a=e.type||"error",c=`before send for type \`${a}\``,l=typeof s>"u"?void 0:cr(s);if(i&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),sn(new me(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const u="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new me("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return Tu(Cu(this,r,n,t),c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new me(`${c} returned \`null\`, will not send event.`,"log")}const s=n&&n.getSession();if(!o&&s&&this._updateSessionFromEvent(s,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const i=r.transaction_info;if(o&&i&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...i,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof me?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){B&&E.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(B&&E.log("No outcomes to send"));if(!this._dsn)return void(B&&E.log("No dsn provided, will not send outcomes"));B&&E.log("Sending outcomes:",e);const t=Iu(e,this._options.tunnel&&In(this._dsn));this.sendEnvelope(t)}}function Tu(e,t){const n=`${t} must return \`null\` or a valid event.`;if(En(e))return e.then((e=>{if(!nt(e)&&null!==e)throw new me(n);return e}),(e=>{throw new me(`${t} rejected with ${e}`)}));if(!nt(e)&&null!==e)throw new me(n);return e}function Cu(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(eo(n)&&s)return s(n,r);if(to(n)){if(n.spans&&i){const t=[];for(const r of n.spans){const n=i(r);n?t.push(n):(Oc(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}function eo(e){return void 0===e.type}function to(e){return"transaction"===e.type}function Ru(e,t){!0===t.debug&&(B?E.enable():Ne((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),oe().update(t.initialScope);const n=new e(t);return Mu(n),n.init(),n}function Mu(e){oe().setClient(e)}function xu(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return sn(new me("Not adding Promise because buffer limit was reached."));const s=r();return-1===t.indexOf(s)&&t.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(e){return new ce(((n,r)=>{let s=t.length;if(!s)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Te(e).then((()=>{--s||(clearTimeout(o),n(!0))}),r)}))}))}}}const Ou=6e4;function Au(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Ou:r-t}function Du(e,t){return e[t]||e.all||0}function no(e,t,n=Date.now()){return Du(e,t)>n}function ro(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(s[e]=r+a):s[e]=r+a;else s.all=r+a}else i?s.all=r+Au(i,r):429===t&&(s.all=r+6e4);return s}const Nu=64;function Lu(e,t,n=xu(e.bufferSize||64)){let r={};return{send:function(s){const o=[];if(Os(s,((t,n)=>{const s=As(n);if(no(r,s)){const r=$s(t,n);e.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(t)})),0===o.length)return Te({});const i=ft(s[0],o),a=t=>{Os(i,((n,r)=>{const s=$s(n,r);e.recordDroppedEvent(t,As(r),s)}))};return n.add((()=>t({body:Gc(i)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&B&&E.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ro(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof me)return B&&E.error("Skipped sending event because buffer is full."),a("queue_overflow"),Te({});throw e}))},flush:e=>n.drain(e)}}function $s(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Pu(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Uu(e,n)||Fu(e,r)}function Fu(e,t){return!!t&&Hs(e)===Hs(t)}function Uu(e,t){return!!t&&e.includes(t.host)}function Hs(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function so(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:Be}))),version:Be}),e._metadata=s}const Bu=100;function De(e,t){const n=V(),r=_e();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Bu}=n.getOptions();if(o<=0)return;const i={timestamp:Rt(),...e},a=s?Ne((()=>s(i,t))):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let js;const $u="FunctionToString",Ws=new WeakMap,Hu=()=>({name:$u,setupOnce(){js=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Fr(this),n=Ws.has(V())&&void 0!==t?t:this;return js.apply(n,e)}}catch{}},setup(e){Ws.set(e,!0)}}),ju=Hu,Wu=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],zu="InboundFilters",qu=(e={})=>({name:zu,processEvent(t,n,r){const s=r.getOptions();return Vu(t,Yu(e,s))?null:t}}),Gu=qu;function Yu(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Wu],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function Vu(e,t){return t.ignoreInternal&&el(e)?(B&&E.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Ce(e)}`),!0):Ku(e,t.ignoreErrors)?(B&&E.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Ce(e)}`),!0):nl(e)?(B&&E.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Ce(e)}`),!0):Xu(e,t.ignoreTransactions)?(B&&E.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Ce(e)}`),!0):Ju(e,t.denyUrls)?(B&&E.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${on(e)}`),!0):!Qu(e,t.allowUrls)&&(B&&E.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Ce(e)}.\nUrl: ${on(e)}`),!0)}function Ku(e,t){return!(e.type||!t||!t.length)&&Zu(e).some((e=>Ct(e,t)))}function Xu(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Ct(n,t)}function Ju(e,t){if(!t||!t.length)return!1;const n=on(e);return!!n&&Ct(n,t)}function Qu(e,t){if(!t||!t.length)return!0;const n=on(e);return!n||Ct(n,t)}function Zu(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function el(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}function tl(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}function on(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?tl(t):null}catch{return B&&E.error(`Cannot extract url for event ${Ce(e)}`),null}}function nl(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)))}function rl(e,t,n=250,r,s,o,i){if(!(o.exception&&o.exception.values&&i&&He(i.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=sl(fr(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function fr(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(He(r[s],Error)){zs(i,a);const o=e(t,r[s]),l=c.length;qs(o,s,l,a),c=fr(e,t,n,r[s],s,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(He(r,Error)){zs(i,a);const l=e(t,r),u=c.length;qs(l,`errors[${o}]`,u,a),c=fr(e,t,n,r,s,[l,...c],l,u)}})),c}function zs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function qs(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function sl(e,t){return e.map((e=>(e.value&&(e.value=tt(e.value,t)),e)))}function Yn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function il(e){const t="console";qe(t,e),Ge(t,ol)}function ol(){"console"in N&&nr.forEach((function(e){e in N.console&&te(N.console,e,(function(t){return rn[e]=t,function(...t){he("console",{args:t,level:e});const n=rn[e];n&&n.apply(N.console,t)}}))}))}function io(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const al="Dedupe",cl=()=>{let e;return{name:al,processEvent(t){if(t.type)return t;try{if(ul(t,e))return B&&E.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},oo=cl;function ul(e,t){return!!t&&!(!ll(e,t)&&!dl(e,t))}function ll(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!co(e,t)||!ao(e,t))}function dl(e,t){const n=Gs(t),r=Gs(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&co(e,t)&&ao(e,t))}function ao(e,t){let n=_s(e),r=_s(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function co(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Gs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function uo(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}const pr=N;function lo(){if(!("fetch"in pr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function hr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fl(){if("string"==typeof EdgeRuntime)return!0;if(!lo())return!1;if(hr(pr.fetch))return!0;let e=!1;const t=pr.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=hr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ze&&E.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function pl(e,t){const n="fetch";qe(n,e),Ge(n,(()=>hl(void 0,t)))}function hl(e,t=!1){t&&!fl()||te(N,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:s}=ml(t),o={args:t,fetchData:{method:r,url:s},startTimestamp:1e3*we(),virtualError:n};return he("fetch",{...o}),e.apply(N,t).then((async e=>(he("fetch",{...o,endTimestamp:1e3*we(),response:e}),e)),(e=>{throw he("fetch",{...o,endTimestamp:1e3*we(),error:e}),Dr(e)&&void 0===e.stack&&(e.stack=n.stack,je(e,"framesToPop",1)),e}))}}))}function mr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ys(e){return"string"==typeof e?e:e?mr(e,"url")?e.url:e.toString?e.toString():"":""}function ml(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ys(t),method:mr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ys(t),method:mr(t,"method")?String(t.method).toUpperCase():"GET"}}function gl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function _l(){return"npm"}function yl(){return!gl()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function Vs(){return typeof window<"u"&&(!yl()||Sl())}function Sl(){const e=N.process;return!!e&&"renderer"===e.type}const Wt=N;function El(){const e=Wt.chrome,t=e&&e.app&&e.app.runtime,n="history"in Wt&&!!Wt.history.pushState&&!!Wt.history.replaceState;return!t&&n}function bl(e,t){return e??t()}function Zt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const $=N;let gr=0;function fo(){return gr>0}function vl(){gr++,setTimeout((()=>{gr--}))}function ot(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(Fr(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>ot(e,t)));return e.apply(this,r)}catch(e){throw vl(),dc((r=>{r.addEventProcessor((e=>(t.mechanism&&(sr(e,void 0),rt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),jr(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Fi(n,e),je(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Wr(e,t){const n=zr(e,t),r={type:Cl(t),value:Rl(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function wl(e,t,n,r){const s=V(),o=s&&s.getOptions().normalizeDepth,i=Dl(t),a={__serialized__:Gi(t,o)};if(i)return{exception:{values:[Wr(e,i)]},extra:a};const c={exception:{values:[{type:Sn(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ol(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=zr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Vn(e,t){return{exception:{values:[Wr(e,t)]}}}function zr(e,t){const n=t.stacktrace||t.stack||"",r=kl(t),s=Tl(t);try{return e(n,r,s)}catch{}return[]}const Il=/Minified React error #\d+;/i;function kl(e){return e&&Il.test(e.message)?1:0}function Tl(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function po(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"&&e instanceof WebAssembly.Exception}function Cl(e){const t=e&&e.name;return!t&&po(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Rl(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:po(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Ml(e,t,n,r){const s=qr(e,t,n&&n.syntheticException||void 0,r);return rt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Te(s)}function xl(e,t,n="info",r,s){const o=_r(e,t,r&&r.syntheticException||void 0,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Te(o)}function qr(e,t,n,r,s){let o;if(Ni(t)&&t.error)return Vn(e,t.error);if(Ss(t)||Ha(t)){const s=t;if("stack"in t)o=Vn(e,t);else{const t=s.name||(Ss(s)?"DOMError":"DOMException"),i=s.message?`${t}: ${s.message}`:t;o=_r(e,i,n,r),sr(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Dr(t)?Vn(e,t):nt(t)||Sn(t)?(o=wl(e,t,n,s),rt(o,{synthetic:!0}),o):(o=_r(e,t,n,r),sr(o,`${t}`),rt(o,{synthetic:!0}),o)}function _r(e,t,n,r){const s={};if(r&&n){const r=zr(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),rt(s,{synthetic:!0})}if(Nr(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Ol(e,{isUnhandledRejection:t}){const n=Ka(e),r=t?"promise rejection":"exception";return Ni(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Sn(e)?`Event \`${Al(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Al(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Dl(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Nl(e,{metadata:t,tunnel:n,dsn:r}){return ft({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:In(r)}},[Ll(e)])}function Ll(e){return[{type:"user_report"},e]}class Pl extends ku{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};so(t,"browser",["browser"],$.SENTRY_SDK_SOURCE||_l()),super(t),t.sendClientReports&&$.document&&$.document.addEventListener("visibilitychange",(()=>{"hidden"===$.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return Ml(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return xl(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Mt&&E.warn("SDK not enabled, will not capture user feedback."));const t=Nl(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const ho=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fl=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",xt=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=Fl(t.value,n),e(t)))}},M=N,Ul=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,mo=(e=!0)=>{const t=M.performance&&M.performance.getEntriesByType&&M.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Gr=()=>{const e=mo();return e&&e.activationStart||0},Ot=(e,t)=>{const n=mo();let r="navigate";return n&&(M.document&&M.document.prerendering||Gr()>0?r="prerender":M.document&&M.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Ul(),navigationType:r}},Ye=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},At=e=>{const t=t=>{("pagehide"===t.type||M.document&&"hidden"===M.document.visibilityState)&&e(t)};M.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},kn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let mt=-1;const Bl=()=>"hidden"!==M.document.visibilityState||M.document.prerendering?1/0:0,an=e=>{"hidden"===M.document.visibilityState&&mt>-1&&(mt="visibilitychange"===e.type?e.timeStamp:0,Hl())},$l=()=>{addEventListener("visibilitychange",an,!0),addEventListener("prerenderingchange",an,!0)},Hl=()=>{removeEventListener("visibilitychange",an,!0),removeEventListener("prerenderingchange",an,!0)},Yr=()=>(M.document&&mt<0&&(mt=Bl(),$l()),{get firstHiddenTime(){return mt}}),Tn=e=>{M.document&&M.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},jl=[1800,3e3],Wl=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("FCP");let s;const o=Ye("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Gr(),0),r.entries.push(e),s(!0)))}))}));o&&(s=xt(e,r,jl,t.reportAllChanges))}))},zl=[.1,.25],ql=(e,t={})=>{Wl(kn((()=>{const n=Ot("CLS",0);let r,s=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];s&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,o.push(e)):(s=e.value,o=[e])}})),s>n.value&&(n.value=s,n.entries=o,r())},a=Ye("layout-shift",i);a&&(r=xt(e,n,zl,t.reportAllChanges),At((()=>{i(a.takeRecords()),r(!0)})),setTimeout(r,0))})))},Gl=[100,300],Yl=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("FID");let s;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),s(!0))},i=e=>{e.forEach(o)},a=Ye("first-input",i);s=xt(e,r,Gl,t.reportAllChanges),a&&At(kn((()=>{i(a.takeRecords()),a.disconnect()})))}))};let go=0,Kn=1/0,zt=0;const Vl=e=>{e.forEach((e=>{e.interactionId&&(Kn=Math.min(Kn,e.interactionId),zt=Math.max(zt,e.interactionId),go=zt?(zt-Kn)/7+1:0)}))};let yr;const Kl=()=>yr?go:performance.interactionCount||0,Xl=()=>{"interactionCount"in performance||yr||(yr=Ye("event",Vl,{type:"event",buffered:!0,durationThreshold:0}))},be=[],Xn=new Map,Jl=40;let Ql=0;const Zl=()=>Kl()-Ql,ed=()=>{const e=Math.min(be.length-1,Math.floor(Zl()/50));return be[e]},Jn=10,td=[],nd=e=>{if(td.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=be[be.length-1],n=Xn.get(e.interactionId);if(n||be.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Xn.set(t.id,t),be.push(t)}be.sort(((e,t)=>t.latency-e.latency)),be.length>10&&be.splice(10).forEach((e=>Xn.delete(e.id)))}},_o=e=>{const t=M.requestIdleCallback||M.setTimeout;let n=-1;return e=kn(e),M.document&&"hidden"===M.document.visibilityState?e():(n=t(e),At(e)),n},rd=[200,500],sd=(e,t={})=>{"PerformanceEventTiming"in M&&"interactionId"in PerformanceEventTiming.prototype&&Tn((()=>{Xl();const n=Ot("INP");let r;const s=e=>{_o((()=>{e.forEach(nd);const t=ed();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Ye("event",s,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=xt(e,n,rd,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),At((()=>{s(o.takeRecords()),r(!0)})))}))},id=[2500,4e3],Ks={},od=(e,t={})=>{Tn((()=>{const n=Yr(),r=Ot("LCP");let s;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Gr(),0),r.entries=[e],s())}))},i=Ye("largest-contentful-paint",o);if(i){s=xt(e,r,id,t.reportAllChanges);const n=kn((()=>{Ks[r.id]||(o(i.takeRecords()),i.disconnect(),Ks[r.id]=!0,s(!0))}));["keydown","click"].forEach((e=>{M.document&&addEventListener(e,(()=>_o(n)),{once:!0,capture:!0})})),At(n)}}))},gt={},cn={};let yo,So,Eo,bo;function ad(e,t=!1){return Cn("cls",e,fd,yo,t)}function cd(e,t=!1){return Cn("lcp",e,hd,Eo,t)}function ud(e){return Cn("fid",e,pd,So)}function ld(e){return Cn("inp",e,md,bo)}function dd(e,t){return vo(e,t),cn[e]||(gd(e),cn[e]=!0),wo(e,t)}function Dt(e,t){const n=gt[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){ho&&E.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,t)}}function fd(){return ql((e=>{Dt("cls",{metric:e}),yo=e}),{reportAllChanges:!0})}function pd(){return Yl((e=>{Dt("fid",{metric:e}),So=e}))}function hd(){return od((e=>{Dt("lcp",{metric:e}),Eo=e}),{reportAllChanges:!0})}function md(){return sd((e=>{Dt("inp",{metric:e}),bo=e}))}function Cn(e,t,n,r,s=!1){let o;return vo(e,t),cn[e]||(o=n(),cn[e]=!0),r&&t({metric:r}),wo(e,t,s?o:void 0)}function gd(e){const t={};"event"===e&&(t.durationThreshold=0),Ye(e,(t=>{Dt(e,{entries:t})}),t)}function vo(e,t){gt[e]=gt[e]||[],gt[e].push(t)}function wo(e,t,n){return()=>{n&&n();const r=gt[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const _d=1e3;let Xs,Sr,Er,qt;function Io(e){qe("dom",e),Ge("dom",yd)}function yd(){if(!M.document)return;const e=he.bind(null,"dom"),t=Js(e,!0);M.document.addEventListener("click",t,!1),M.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=M[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(te(r,"addEventListener",(function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Js(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}})),te(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Sd(e){if(e.type!==Sr)return!1;try{if(!e.target||e.target._sentryId!==Er)return!1}catch{}return!0}function Ed(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function Js(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=bd(n);if(Ed(n.type,r))return;je(n,"_sentryCaptured",!0),r&&!r._sentryId&&je(r,"_sentryId",ie());const s="keypress"===n.type?"input":n.type;Sd(n)||(e({event:n,name:s,global:t}),Sr=n.type,Er=r?r._sentryId:void 0),clearTimeout(Xs),Xs=M.setTimeout((()=>{Er=void 0,Sr=void 0}),_d)}}function bd(e){try{return e.target}catch{return null}}function Vr(e){const t="history";qe(t,e),Ge(t,vd)}function vd(){if(!El())return;const e=M.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=qt,t=String(n);qt=t,he("history",{from:e,to:t})}return e.apply(this,t)}}M.onpopstate=function(...t){const n=M.location.href,r=qt;if(qt=n,he("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},te(M.history,"pushState",t),te(M.history,"replaceState",t)}const en={};function ko(e){const t=en[e];if(t)return t;let n=M[e];if(hr(n))return en[e]=n.bind(M);const r=M.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){ho&&E.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(en[e]=n.bind(M))}function Qs(e){en[e]=void 0}function at(...e){return ko("setTimeout")(...e)}const Xe="__sentry_xhr_v3__";function wd(e){qe("xhr",e),Ge("xhr",Id)}function Id(){if(!M.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*we(),o=ve(n[0])?n[0].toUpperCase():void 0,i=kd(n[1]);if(!o||!i)return e.apply(t,n);t[Xe]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Xe];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}he("xhr",{endTimestamp:1e3*we(),startTimestamp:s,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[Xe];return o&&ve(r)&&ve(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Xe];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return he("xhr",{startTimestamp:1e3*we(),xhr:t}),e.apply(t,n)}})}function kd(e){if(ve(e))return e;try{return e.toString()}catch{}}function Td(e,t=ko("fetch")){let n=0,r=0;return Lu(e,(function(s){const o=s.body.length;n+=o,r++;const i={body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Qs("fetch"),sn("No fetch implementation available");try{return t(e.url,i).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Qs("fetch"),n-=o,r--,sn(e)}}))}const Cd=30,Rd=50;function br(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?$e:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Md=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xd=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Od=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ad=e=>{const t=Md.exec(e);if(t){const[,e,n,r]=t;return br(e,$e,+n,+r)}const n=xd.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Od.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=To(n[1]||$e,n[2]);return br(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Dd=[30,Ad],Nd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ld=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Pd=e=>{const t=Nd.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ld.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||$e;return[n,e]=To(n,e),br(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Fd=[50,Pd],Ud=[Dd,Fd],Bd=Ai(...Ud),To=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:$e,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Gt=1024,$d="Breadcrumbs",Hd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:$d,setup(e){t.console&&il(qd(e)),t.dom&&Io(zd(e,t.dom)),t.xhr&&wd(Gd(e)),t.fetch&&pl(Yd(e)),t.history&&Vr(Vd(e)),t.sentry&&e.on("beforeSendEvent",Wd(e))}}},jd=Hd;function Wd(e){return function(t){V()===e&&De({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:Ce(t)},{event:t})}}function zd(e,t){return function(n){if(V()!==e)return;let r,s,o="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Gt&&(Mt&&E.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Gt),"string"==typeof o&&(o=[o]);try{const e=n.event,t=Kd(e)?e.target:e;r=bn(t,{keyAttrs:o,maxStringLength:i}),s=Ya(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),De(a,{event:n.event,name:n.name,global:n.global})}}function qd(e){return function(t){if(V()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:io(t.level),message:Es(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Es(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}De(n,{input:t.args,level:t.level})}}function Gd(e){return function(t){if(V()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[Xe];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,l={method:o,url:i,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};De({category:"xhr",data:l,type:"http",level:uo(a)},u)}}function Yd(e){return function(t){if(V()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){De({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,s={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};De({category:"fetch",data:s,type:"http",level:uo(s.status_code)},o)}}}function Vd(e){return function(t){if(V()!==e)return;let n=t.from,r=t.to;const s=Yn($.location.href);let o=n?Yn(n):void 0;const i=Yn(r);(!o||!o.path)&&(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),De({category:"navigation",data:{from:n,to:r}})}}function Kd(e){return!!e&&!!e.target}const Xd=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Jd="BrowserApiErrors",Qd=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Jd,setupOnce(){t.setTimeout&&te($,"setTimeout",Zs),t.setInterval&&te($,"setInterval",Zs),t.requestAnimationFrame&&te($,"requestAnimationFrame",Zd),t.XMLHttpRequest&&"XMLHttpRequest"in $&&te(XMLHttpRequest.prototype,"send",ef);const e=t.eventTarget;e&&(Array.isArray(e)?e:Xd).forEach(tf)}}},Co=Qd;function Zs(e){return function(...t){const n=t[0];return t[0]=ot(n,{mechanism:{data:{function:ke(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Zd(e){return function(t){return e.apply(this,[ot(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ke(e)},handled:!1,type:"instrument"}})])}}function ef(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&te(n,e,(function(t){const n={mechanism:{data:{function:e,handler:ke(t)},handled:!1,type:"instrument"}},r=Fr(t);return r&&(n.mechanism.data.handler=ke(r)),ot(t,n)}))})),e.apply(this,t)}}function tf(e){const t=$[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(te(n,"addEventListener",(function(t){return function(n,r,s){try{nf(r)&&(r.handleEvent=ot(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ke(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,ot(r,{mechanism:{data:{function:"addEventListener",handler:ke(r),target:e},handled:!1,type:"instrument"}}),s])}})),te(n,"removeEventListener",(function(e){return function(t,n,r){try{const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}catch{}return e.call(this,t,n,r)}})))}function nf(e){return"function"==typeof e.handleEvent}const rf=()=>({name:"BrowserSession",setupOnce(){typeof $.document>"u"?Mt&&E.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Ls({ignoreDuration:!0}),Ps(),Vr((({from:e,to:t})=>{void 0!==e&&e!==t&&(Ls({ignoreDuration:!0}),Ps())})))}}),sf="GlobalHandlers",of=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:sf,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(cf(e),ei("onerror")),t.onunhandledrejection&&(uf(e),ei("onunhandledrejection"))}}},af=of;function cf(e){Fa((t=>{const{stackParser:n,attachStacktrace:r}=Ro();if(V()!==e||fo())return;const{msg:s,url:o,line:i,column:a,error:c}=t,l=ff(qr(n,c||s,void 0,r,!1),o,i,a);l.level="error",Ki(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}function uf(e){Ba((t=>{const{stackParser:n,attachStacktrace:r}=Ro();if(V()!==e||fo())return;const s=lf(t),o=Lr(s)?df(s):qr(n,s,void 0,r,!0);o.level="error",Ki(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function lf(e){if(Lr(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function df(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ff(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=ve(t)&&t.length>0?t:Pi();return 0===c.length&&c.push({colno:l,filename:d,function:$e,in_app:!0,lineno:u}),e}function ei(e){Mt&&E.log(`Global Handler attached: ${e}`)}function Ro(){const e=V();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const pf=()=>({name:"HttpContext",preprocessEvent(e){if(!$.navigator&&!$.location&&!$.document)return;const t=e.request&&e.request.url||$.location&&$.location.href,{referrer:n}=$.document||{},{userAgent:r}=$.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),hf="cause",mf=5,gf="LinkedErrors",_f=(e={})=>{const t=e.limit||5,n=e.key||hf;return{name:gf,preprocessEvent(e,r,s){const o=s.getOptions();rl(Wr,o.stackParser,o.maxValueLength,n,t,e,r)}}},yf=_f;function Sf(e){const t=[Gu(),ju(),Co(),jd(),af(),yf(),oo(),pf()];return!1!==e.autoSessionTracking&&t.push(rf()),t}function Ef(e={}){const t={defaultIntegrations:Sf(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:$.SENTRY_RELEASE&&$.SENTRY_RELEASE.id?$.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function bf(){const e=typeof $.window<"u"&&$;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=$.location&&$.location.href||"",s=!!n&&$===$.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),o=typeof e.nw<"u";return!!n&&!s&&!o}function vf(e={}){const t=Ef(e);if(!t.skipBrowserExtensionCheck&&bf())return void Ne((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Mt&&(lo()||E.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:La(t.stackParser||Bd),integrations:vu(t),transport:t.transport||Td};return Ru(Pl,n)}const j=N,Kr="sentryReplaySession",wf="replay_event",Xr="Unable to send Replay",If=3e5,kf=9e5,Tf=5e3,Cf=5500,Rf=6e4,Mf=5e3,xf=3,ti=15e4,Yt=5e3,Of=3e3,Af=300,Jr=2e7,Df=4999,Nf=15e3,ni=36e5;function vr(e,t){return e??t()}function bt(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var Q;function Lf(e){return e.nodeType===e.ELEMENT_NODE}function _t(e){const t=bt([e,"optionalAccess",e=>e.host]);return bt([t,"optionalAccess",e=>e.shadowRoot])===e}function yt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Pf(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Ff(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 un(e){try{const t=e.rules||e.cssRules;return t?Pf(Array.from(t,Mo).join("")):null}catch{return null}}function Uf(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Mo(e){let t;if($f(e))try{t=un(e.styleSheet)||Ff(e)}catch{}else if(Hf(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=Uf(e)),n&&(t=Bf(t)),n||r)return t}return t||e.cssText}function Bf(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function $f(e){return"styleSheet"in e}function Hf(e){return"selectorText"in e}!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"}(Q||(Q={}));class xo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return vr(bt([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function jf(){return new xo}function Rn({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function vt({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function ct(e){return e.toLowerCase()}function wr(e){return e.toUpperCase()}const ri="__rrweb_original__";function Wf(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const s=t.getImageData,o=ri in s?s[ri]:s;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function Qr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ct(t):null}function ln(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Oo(e,t){let n;try{n=new URL(e,vr(t,(()=>window.location.href)))}catch{return null}return vr(bt([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const si={};function Ao(e){const t=si[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return si[e]=r.bind(window)}function Ir(...e){return Ao("setTimeout")(...e)}function Do(...e){return Ao("clearTimeout")(...e)}function No(e){try{return e.contentDocument}catch{}}let zf=1;const qf=new RegExp("[^a-z0-9-_:]"),wt=-2;function Zr(){return zf++}function Gf(e){if(e instanceof HTMLFormElement)return"form";const t=ct(e.tagName);return qf.test(t)?"div":t}function Yf(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let Ve,ii;const Vf=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Kf=/^(?:[a-z+]+:)?\/\//i,Xf=/^www\..*/i,Jf=/^(data:)([^,]*),(.*)/i;function dn(e,t){return(e||"").replace(Vf,((e,n,r,s,o,i)=>{const a=r||o||i,c=n||s||"";if(!a)return e;if(Kf.test(a)||Xf.test(a))return`url(${c}${a}${c})`;if(Jf.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${Yf(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const Qf=/^[^ \t\n\r\u000c]+/,Zf=/^[, \t\n\r\u000c]+/;function ep(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const s=e.exec(t.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Zf),!(n>=t.length);){let o=r(Qf);if(","===o.slice(-1))o=Je(e,o.substring(0,o.length-1)),s.push(o);else{let r="";o=Je(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){s.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,s.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return s.join(", ")}const oi=new WeakMap;function Je(e,t){return t&&""!==t.trim()?Mn(e,t):t}function tp(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Mn(e,t){let n=oi.get(e);if(n||(n=e.createElement("a"),oi.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Lo(e,t,n,r,s,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?Je(e,r):"srcset"===n?ep(e,r):"style"===n?dn(r,Mn(e)):"object"===t&&"data"===n?Je(e,r):"function"==typeof o?o(n,r,s):r)}function Po(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function np(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function rp(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ue(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ue(e.parentNode,t,n,r+1)}function Qe(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(rp(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ut(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=Ue(i,Qe(r,s)),c<0)return!0;a=Ue(i,Qe(t,n),c>=0?c:1/0)}else{if(a=Ue(i,Qe(t,n)),a<0)return!1;c=Ue(i,Qe(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!o}catch{}return!!o}function sp(e,t,n){const r=e.contentWindow;if(!r)return;let s,o=!1;try{s=r.document.readyState}catch{return}if("complete"!==s){const r=Ir((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{Do(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return Ir(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ip(e,t,n){let r,s=!1;try{r=e.sheet}catch{return}if(r)return;const o=Ir((()=>{s||(t(),s=!0)}),n);e.addEventListener("load",(()=>{Do(o),s=!0,t()}))}function op(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S=!1}=t,k=ap(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Q.Document,childNodes:[],compatMode:e.compatMode}:{type:Q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return up(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:S,rootId:k,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return cp(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:Q.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Q.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function ap(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function cp(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||bt([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=un(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=dn(p,Mn(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const g=ut(e,r,o,s,i,n);if(!h&&!m&&!f&&p&&g&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p){p=vt({isMasked:ut(e,r,o,s,i,Rn({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})}return{type:Q.Text,textContent:p||"",isStyle:h,rootId:u}}function up(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskAllText:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:b}=t,S=np(e,r,s,o),k=Gf(e);let E={};const w=e.attributes.length;for(let t=0;t<w;t++){const r=e.attributes[t];r.name&&!Po(k,r.name,r.value)&&(E[r.name]=Lo(n,k,ct(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=un(t)),r&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=dn(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=un(e.sheet);t&&(E._cssText=dn(t,Mn(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=Qr(t),r=ln(t,wr(k),n),s=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ut(t,y,v,_,b,Rn({type:n,tagName:wr(k),maskInputOptions:a}));E.value=vt({isMasked:e,element:t,value:r,maskInputFn:l})}s&&(E.checked=s)}if("option"===k&&(e.selected&&!a.select?E.selected=!0:delete E.selected),"canvas"===k&&p)if("2d"===e.__context)Wf(e)||(E.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(E.rr_dataURL=t)}if("img"===k&&d){Ve||(Ve=n.createElement("canvas"),ii=Ve.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Ve.width=t.naturalWidth,Ve.height=t.naturalHeight,ii.drawImage(t,0,0),E.rr_dataURL=Ve.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?E.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();E={class:E.class,rr_width:`${t}px`,rr_height:`${n}px`}}let x;"iframe"===k&&!h(E.src)&&(!S&&!No(e)&&(E.rr_src=E.src),delete E.src);try{customElements.get(k)&&(x=!0)}catch{}return{type:Q.Element,tagName:k,attributes:E,childNodes:[],isSVG:tp(e)||void 0,needBlock:S,rootId:f,isCustom:x}}function H(e){return null==e?"":e.toLowerCase()}function lp(e,t){if(t.comment&&e.type===Q.Comment)return!0;if(e.type===Q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Oo(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===H(e.attributes.name)||"icon"===H(e.attributes.rel)||"apple-touch-icon"===H(e.attributes.rel)||"shortcut icon"===H(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===H(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===H(e.attributes.name)||"googlebot"===H(e.attributes.name)||"bingbot"===H(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===H(e.attributes.name)||"generator"===H(e.attributes.name)||"framework"===H(e.attributes.name)||"publisher"===H(e.attributes.name)||"progid"===H(e.attributes.name)||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===H(e.attributes.name)||"yandex-verification"===H(e.attributes.name)||"csrf-token"===H(e.attributes.name)||"p:domain_verify"===H(e.attributes.name)||"verify-v1"===H(e.attributes.name)||"verification"===H(e.attributes.name)||"shopify-checkout-api-token"===H(e.attributes.name)))return!0}}return!1}function Ze(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:I=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=op(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:I});if(!R)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):lp(R,_)||!M&&R.type===Q.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Zr();const O=Object.assign(R,{id:A});if(r.add(e,O),-2===A)return null;k&&k(e);let N=!p;if(O.type===Q.Element){N=N&&!O.needBlock,delete O.needBlock;const t=e.shadowRoot;t&&yt(t)&&(O.isShadowHost=!0)}if((O.type===Q.Document||O.type===Q.Element)&&N){_.headWhitespace&&O.type===Q.Element&&"head"===O.tagName&&(M=!1);const t={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C};for(const n of Array.from(e.childNodes)){const e=Ze(n,t);e&&O.childNodes.push(e)}if(Lf(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Ze(n,t);r&&(yt(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}return e.parentNode&&_t(e.parentNode)&&yt(e.parentNode)&&(O.isShadow=!0),O.type===Q.Element&&"iframe"===O.tagName&&sp(e,(()=>{const t=No(e);if(t&&E){const n=Ze(t,{doc:t,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});n&&E(e,n)}}),w),O.type===Q.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Oo(O.attributes.href))&&ip(e,(()=>{if(x){const t=Ze(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:C});t&&x(e,t)}}),T),O}function dp(e,t){const{mirror:n=new xo,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1}=t;return Ze(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{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}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1})}function Re(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ee(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ke="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ai={map:{},getId:()=>(console.error(Ke),-1),getNode:()=>(console.error(Ke),null),removeNodeFromMap(){console.error(Ke)},has:()=>(console.error(Ke),!1),reset(){console.error(Ke)}};function It(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&!1===n.leading&&(s=i);const a=t-(i-s),c=this;a<=0||a>t?(r&&(yp(r),r=null),s=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=xn((()=>{s=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),a))}}function Fo(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(e){xn((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>Fo(e,t,o||{},!0)}function es(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(ai=new Proxy(ai,{get:(e,t,n)=>("map"===t&&console.error(Ke),Reflect.get(e,t,n))}));let fn=Date.now;function Uo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Re([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Re([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Bo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function $o(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ho(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function se(e,t,n,r,s){if(!e)return!1;const o=Ho(e);if(!o)return!1;const i=Qe(t,n);if(!s){const e=r&&o.matches(r);return i(o)&&!e}const a=Ue(o,i);let c=-1;return!(a<0)&&(r&&(c=Ue(o,Qe(null,r))),a>-1&&c<0||a<c)}function fp(e,t){return-1!==t.getId(e)}function Qn(e,t){return-2===t.getId(e)}function jo(e,t){if(_t(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||jo(e.parentNode,t))}function kr(e){return!!e.changedTouches}function pp(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=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function Wo(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function zo(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function Tr(e){return!!Re([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(fn=()=>(new Date).getTime());class hp{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return bl(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qo(e){let t=null;return Re([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function mp(e){let t,n=e;for(;t=qo(n);)n=t;return n}function gp(e){const t=e.ownerDocument;if(!t)return!1;const n=mp(e);return t.contains(n)}function Go(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||gp(e))}const ci={};function ts(e){const t=ci[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const s=t.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(t)}catch{}return ci[e]=r.bind(window)}function _p(...e){return ts("requestAnimationFrame")(...e)}function xn(...e){return ts("setTimeout")(...e)}function yp(...e){return ts("clearTimeout")(...e)}var ui,li,C=(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))(C||{}),w=(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))(w||{}),Z=(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))(Z||{}),Se=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Se||{});function ns(e){try{return e.contentDocument}catch{}}function Sp(e){try{return e.contentWindow}catch{}}function Ep(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function di(e){return"__ln"in e}!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"}(ui||(ui={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(li||(li={}));class bp{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=Ep([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&di(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&di(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const fi=(e,t)=>`${e}@${t}`;class vp{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new bp,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},s=s=>{if(!s.parentNode||!Go(s))return;const o=_t(s.parentNode)?this.mirror.getId(qo(s)):this.mirror.getId(s.parentNode),i=r(s);if(-1===o||-1===i)return n.addNode(s);const a=Ze(s,{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:e=>{Wo(e,this.mirror)&&!se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),zo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Tr(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)pi(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||s(e);for(const e of this.addedSet)!hi(this.droppedSet,e)&&!pi(this.removes,e,this.mirror)||hi(this.movedSet,e)?s(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),s(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.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(i))},this.processMutation=e=>{if(!Qn(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Ho(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=Qr(t),s=t.tagName;r=ln(t,s,n);const o=Rn({maskInputOptions:this.maskInputOptions,tagName:s,type:n});r=vt({isMasked:ut(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(ns(t))return;n="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Po(t.tagName,n)&&(s.attributes[n]=Lo(this.doc,ct(t.tagName),ct(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?r:[r,o]:s._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=_t(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Qn(t,this.mirror)||!fp(t,this.mirror)||(this.addedSet.has(t)?(Cr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||jo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[fi(n,r)]?Cr(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!_t(e.target)||!yt(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Qn(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[fi(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Tr(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}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 Cr(e,t){e.delete(t),t.childNodes.forEach((t=>Cr(e,t)))}function pi(e,t,n){return 0!==e.length&&wp(e,t,n)}function wp(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function hi(e,t){return 0!==e.size&&Yo(e,t)}function Yo(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Yo(e,n))}let St;function Ip(e){St=e}function kp(){St=void 0}const A=e=>St?(...t)=>{try{return e(...t)}catch(e){if(St&&!0===St(e))return()=>{};throw e}}:e;function pe(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const et=[];function Nt(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 Vo(e,t){const n=new vp;et.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=pe([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(A((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Tp({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=It(A((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null})),o),l=A(It(A((e=>{const t=Nt(e),{clientX:n,clientY:s}=kr(e)?e.changedTouches[0]:e;i||(i=fn()),a.push({x:n,y:s,id:r.getId(t),timeOffset:fn()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?w.Drag:e instanceof MouseEvent?w.MouseMove:w.TouchMove)})),s,{trailing:!1})),u=[ee("mousemove",l,n),ee("touchmove",l,n),ee("drag",l,n)];return A((()=>{u.forEach((e=>e()))}))}function Cp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(Z).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=ct(i);const u=(t=>i=>{const a=Nt(i);if(se(a,r,s,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Se.Mouse;break;case"touch":c=Se.Touch;break;case"pen":c=Se.Pen}c===Se.Touch?Z[t]===Z.MouseDown?u="TouchStart":Z[t]===Z.MouseUp&&(u="TouchEnd"):Se.Pen}else kr(i)&&(c=Se.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===Se.Touch||u.startsWith("Mouse")&&c===Se.Mouse)&&(c=null)):Z[t]===Z.Click&&(c=l,l=null);const d=kr(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;A(e)({type:Z[u],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Z[i]){case Z.MouseDown:case Z.MouseUp:a=a.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}c.push(ee(a,u,t))})),A((()=>{c.forEach((e=>e()))}))}function Ko({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){return ee("scroll",A(It(A((i=>{const a=Nt(i);if(!a||se(a,r,s,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=Uo(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}function Rp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ee("resize",A(It(A((()=>{const t=Bo(),s=$o();(n!==t||r!==s)&&(e({width:Number(s),height:Number(t)}),n=t,r=s)})),200)),t)}const Mp=["INPUT","TEXTAREA","SELECT"],mi=new WeakMap;function xp({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=Nt(e);const u=e.isTrusted,g=n&&wr(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Mp.indexOf(g)<0||se(n,r,s,o,!0))return;const _=n;if(_.classList.contains(i)||a&&_.matches(a))return;const v=Qr(n);let b=ln(_,g,v),S=!1;const k=Rn({maskInputOptions:c,tagName:g,type:v}),E=ut(n,p,m,h,f,k);("radio"===v||"checkbox"===v)&&(S=n.checked),b=vt({isMasked:E,element:n,value:b,maskInputFn:l}),y(n,d?{text:b,isChecked:S,userTriggered:u}:{text:b,isChecked:S});const w=n.name;"radio"===v&&w&&S&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach((e=>{if(e!==n){const t=vt({isMasked:E,element:e,value:ln(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}}))}function y(t,r){const s=mi.get(t);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){mi.set(t,r);const s=n.getId(t);A(e)({...r,id:s})}}const _=("last"===u.input?["change"]:["input","change"]).map((e=>ee(e,A(g),t))),v=t.defaultView;if(!v)return()=>{_.forEach((e=>e()))};const b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map((e=>Fo(e[0],e[1],{set(){A(g)({target:this,isTrusted:!1})}},!1,v)))),A((()=>{_.forEach((e=>e()))}))}function pn(e){return function(e,t){if(Vt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Vt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Vt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Vt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Me(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Op({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:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(s,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(s,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(s,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(s,o)}))}));const c={};Kt("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Kt("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Kt("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Kt("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,s])=>{l[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(l[r].insertRule,{apply:A(((r,s,o)=>{const[i,a]=o,{id:c,styleId:l}=Me(s.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...pn(s),a||0]}]}),r.apply(s,o)}))}),s.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:A(((r,s,o)=>{const[i]=o,{id:a,styleId:c}=Me(s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...pn(s),i]}]}),r.apply(s,o)}))})})),A((()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function Xo({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const s="#document"===n.nodeName?pe([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):pe([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=pe([s,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(pe([s,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return pe([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=pe([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),A((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function Ap({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:A(((s,i,a)=>{const[c,l,u]=a;if(n.has(c))return o.apply(i,[c,l,u]);const{id:d,styleId:p}=Me(pe([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:pn(i.parentRule)}),s.apply(i,a)}))});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:A(((s,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=Me(pe([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:pn(o.parentRule)}),s.apply(o,a)}))}),A((()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i}))}function Dp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const a=A((i=>It(A((o=>{const a=Nt(o);if(!a||se(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:s.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),o.media||500))),c=[ee("play",a(0),i),ee("pause",a(1),i),ee("seeked",a(2),i),ee("volumechange",a(3),i),ee("ratechange",a(4),i)];return A((()=>{c.forEach((e=>e()))}))}function Np({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return s.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=es(t.fonts,"add",(function(t){return function(n){return xn(A((()=>{const t=s.get(n);t&&(e(t),s.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),A((()=>{r.forEach((e=>e()))}))}function Lp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=A((()=>{const e=t.getSelection();if(!e||a&&pe([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;se(a,r,s,o,!0)||se(u,r,s,o,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})}));return c(),ee("selectionchange",c)}function Pp({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?es(n.customElements,"define",(function(e){return function(n,r,s){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,s])}})):()=>{}}function Fp(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Vo(e,e.doc));const s=Tp(e),o=Cp(e),i=Ko(e),a=Rp(e,{win:n}),c=xp(e),l=Dp(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=Op(e,{win:n}),d=Xo(e,e.doc),p=Ap(e,{win:n}),e.collectFonts&&(h=Np(e)));const m=Lp(e),f=Pp(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return A((()=>{et.forEach((e=>e.reset())),pe([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s(),o(),i(),a(),c(),l(),u(),d(),p(),h(),m(),f(),g.forEach((e=>e()))}))}function Vt(e){return typeof window[e]<"u"}function Kt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Rr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const s=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function gi(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(t=n,n=o(n)):("call"===s||"optionalCall"===s)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class Up{constructor(){this.crossOriginIframeMirror=new Rr(Zr),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Bp{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Rr(Zr),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Rr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),gi([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=ns(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case C.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:C.IncrementalSnapshot,data:{source:w.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case C.Meta:case C.Load:case C.DomContentLoaded:return!1;case C.Plugin:return t;case C.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case C.IncrementalSnapshot:switch(t.data.source){case w.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case w.Drag:case w.TouchMove:case w.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case w.ViewportResize:return!1;case w.MediaInteraction:case w.MouseInteraction:case w.Scroll:case w.CanvasMutation:case w.Input:return this.replaceIds(t.data,e,["id"]),t;case w.StyleSheetRule:case w.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case w.Font:return t;case w.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case w.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),gi([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const s of r)!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==Q.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class $p{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Hp{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!yt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Vo({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Ko({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),xn((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Xo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=ns(e),n=Sp(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(es(e.prototype,"attachShadow",(function(e){return function(r){const s=e.call(this,r);return this.shadowRoot&&Go(this)&&n.addShadowRoot(this.shadowRoot,t),s}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class _i{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class jp{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new hp,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:Mo(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Wp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,_p((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let K,hn;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Zt([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=jf();function Ie(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:k,sampling:E={},dataURLOptions:x={},mousemoveWait:T,recordDOM:I=!0,recordCanvas:M=!1,recordCrossOriginIframes:R=!1,recordAfter:O=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:N=!1,collectFonts:D=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:U=()=>!1,ignoreCSSAttributes:j=new Set([]),errorHandler:$,onMutation:F,getCanvasManager:B}=e;Ip($);const H=!R||window.parent===window;let z=!1;if(!H)try{window.parent.document&&(z=!1)}catch{z=!0}if(H&&!t)throw new Error("emit function is required");if(!H&&!z)return()=>{};void 0!==T&&void 0===E.mousemove&&(E.mousemove=T),de.reset();const W=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},q=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};pp();let V,Y=0;const G=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!z&&(e=k(e)),e};K=(e,s)=>{const o=e;if(o.timestamp=fn(),Zt([et,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==C.FullSnapshot&&!(o.type===C.IncrementalSnapshot&&o.data.source===w.Mutation)&&et.forEach((e=>e.unfreeze())),H)Zt([t,"optionalCall",e=>e(G(o),s)]);else if(z){const e={type:"rrweb",event:G(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===C.FullSnapshot)V=o,Y=0;else if(o.type===C.IncrementalSnapshot){if(o.data.source===w.Mutation&&o.data.isAttachIframe)return;Y++;const e=r&&Y>=r,t=n&&V&&o.timestamp-V.timestamp>n;(e||t)&&oe(!0)}};const J=e=>{K({type:C.IncrementalSnapshot,data:{source:w.Mutation,...e}})},Q=e=>K({type:C.IncrementalSnapshot,data:{source:w.Scroll,...e}}),X=e=>K({type:C.IncrementalSnapshot,data:{source:w.CanvasMutation,...e}}),Z=new jp({mutationCb:J,adoptedStyleSheetCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.AdoptedStyleSheet,...e}})}),te="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Up:new Bp({mirror:de,mutationCb:J,stylesheetManager:Z,recordCrossOriginIframes:R,wrappedEmit:K});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:de,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const ne=new Wp,re=qp(B,{mirror:de,win:window,mutationCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.CanvasMutation,...e}}),recordCanvas:M,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:S,sampling:E.canvas,dataURLOptions:x,errorHandler:$}),se="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new $p:new Hp({mutationCb:J,scrollCb:Q,bypassOptions:{onMutation:F,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:W,dataURLOptions:x,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:M,inlineImages:L,sampling:E,slimDOMOptions:q,iframeManager:te,stylesheetManager:Z,canvasManager:re,keepIframeSrcFn:U,processedNodeManager:ne},mirror:de}),oe=(e=!1)=>{if(!I)return;K({type:C.Meta,data:{href:window.location.href,width:$o(),height:Bo()}},e),Z.reset(),se.init(),et.forEach((e=>e.lock()));const t=dp(document,{mirror:de,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:W,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:q,dataURLOptions:x,recordCanvas:M,inlineImages:L,onSerialize:e=>{Wo(e,de)&&te.addIframe(e),zo(e,de)&&Z.trackLinkElement(e),Tr(e)&&se.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{te.attachIframe(e,t),e.contentWindow&&re.addWindow(e.contentWindow),se.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},keepIframeSrcFn:U});if(!t)return console.warn("Failed to snapshot the document");K({type:C.FullSnapshot,data:{node:t,initialOffset:Uo(window)}}),et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};hn=oe;try{const e=[],t=e=>A(Fp)({onMutation:F,mutationCb:J,mousemoveCb:(e,t)=>K({type:C.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.MouseInteraction,...e}}),scrollCb:Q,viewportResizeCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.ViewportResize,...e}}),inputCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.Input,...e}}),mediaInteractionCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.MediaInteraction,...e}}),styleSheetRuleCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.StyleSheetRule,...e}}),styleDeclarationCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.StyleDeclaration,...e}}),canvasMutationCb:X,fontCb:e=>K({type:C.IncrementalSnapshot,data:{source:w.Font,...e}}),selectionCb:e=>{K({type:C.IncrementalSnapshot,data:{source:w.Selection,...e}})},customElementCb:e=>{K({type:C.IncrementalSnapshot,data:{source:w.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:W,inlineStylesheet:m,sampling:E,recordDOM:I,recordCanvas:M,inlineImages:L,userTriggeredOnInput:N,collectFonts:D,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:U,blockSelector:o,unblockSelector:i,slimDOMOptions:q,dataURLOptions:x,mirror:de,iframeManager:te,stylesheetManager:Z,shadowDomManager:se,processedNodeManager:ne,canvasManager:re,ignoreCSSAttributes:j,plugins:Zt([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>K({type:C.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});te.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{oe(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ee("DOMContentLoaded",(()=>{K({type:C.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()}))),e.push(ee("load",(()=>{K({type:C.Load,data:{}}),"load"===O&&n()}),window))),()=>{e.forEach((e=>e())),ne.destroy(),hn=void 0,kp()}}catch(e){console.warn(e)}}function zp(e){if(!hn)throw new Error("please take full snapshot after start recording");hn(e)}function qp(e,t){try{return e?e(t):new _i}catch{return console.warn("Unable to initialize CanvasManager"),new _i}}Ie.mirror=de,Ie.takeFullSnapshot=zp;const Gp=3,Yp=5;function rs(e){return e>9999999999?e:1e3*e}function Zn(e){return e>9999999999?e/1e3:e}function Lt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:C.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:fe(t,10,1e3)}}),"console"===t.category))))}const Vp="button,a";function Jo(e){return e.closest(Vp)||e}function Qo(e){const t=Zo(e);return t&&t instanceof Element?Jo(t):t}function Zo(e){return Kp(e)?e.target:e}function Kp(e){return"object"==typeof e&&!!e&&"target"in e}let xe;function Xp(e){return xe||(xe=[],Jp()),xe.push(e),()=>{const t=xe?xe.indexOf(e):-1;t>-1&&xe.splice(t,1)}}function Jp(){te(j,"open",(function(e){return function(...t){if(xe)try{xe.forEach((e=>e()))}catch{}return e.apply(j,t)}}))}const Qp=new Set([w.Mutation,w.StyleSheetRule,w.StyleDeclaration,w.AdoptedStyleSheet,w.CanvasMutation,w.Selection,w.MediaInteraction]);function Zp(e,t,n){e.handleClick(t,n)}class eh{constructor(e,t,n=Lt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=Xp((()=>{this._lastMutation=yi()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(nh(t,this._ignoreSelector)||!rh(e))return;const n={timestamp:Zn(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Zn(e)}registerScroll(e=Date.now()){this._lastScroll=Zn(e)}registerClick(e){const t=Jo(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=yi();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(s){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,s)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:j.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=at((()=>this._checkClicks()),1e3)}}const th=["A","BUTTON","INPUT"];function nh(e,t){return!!(!th.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function rh(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function yi(){return Date.now()/1e3}function sh(e,t){try{if(!ih(t))return;const{source:n}=t.data;if(Qp.has(n)&&e.registerMutation(t.timestamp),n===w.Scroll&&e.registerScroll(t.timestamp),oh(t)){const{type:n,id:r}=t.data,s=Ie.mirror.getNode(r);s instanceof HTMLElement&&n===Z.Click&&e.registerClick(s)}}catch{}}function ih(e){return 3===e.type}function oh(e){return e.data.source===w.MouseInteraction}function ge(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var mn;!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"}(mn||(mn={}));const ah=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function ch(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(ah.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const uh=e=>t=>{if(!e.isEnabled())return;const n=lh(t);if(!n)return;const r="click"===t.name,s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Zp(e.clickDetector,n,Qo(t.event)),Lt(e,n)};function ea(e,t){const n=Ie.mirror.getId(e),r=n&&Ie.mirror.getNode(n),s=r&&Ie.mirror.getMeta(r),o=s&&fh(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===mn.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:ch(o.attributes)}}:{}}}function lh(e){const{target:t,message:n}=dh(e);return ge({category:`ui.${e.name}`,...ea(t,n)})}function dh(e){const t="click"===e.name;let n,r=null;try{r=t?Qo(e.event):Zo(e.event),n=bn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function fh(e){return e.type===mn.Element}function ph(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=hh(t);n&&Lt(e,n)}function hh(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||mh(i)||!o)return null;const a=t||r||s,c=1===o.length;if(!a&&c)return null;const l=bn(i,{maxStringLength:200})||"<unknown>";return ge({category:"ui.keyDown",message:l,data:{...ea(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function mh(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const gh={resource:bh,paint:Sh,navigation:Eh};function Xt(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function _h(e){return e.map(yh).filter(Boolean)}function yh(e){const t=gh[e.entryType];return t?t(e):null}function lt(e){return((Qa||j.performance.timeOrigin)+e)/1e3}function Sh(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=lt(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function Eh(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;return 0===s?null:{type:`${t}.${f}`,start:lt(h),end:lt(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:p}}}function bh(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:lt(o),end:lt(s),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function vh(e){const t=e.entries[e.entries.length-1];return On(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function wh(e){return void 0!==e.sources}function Ih(e){const t=[],n=[];for(const r of e.entries)if(wh(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=Ie.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return On(e,"cumulative-layout-shift",n,t)}function kh(e){const t=e.entries[e.entries.length-1];return On(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Th(e){const t=e.entries[e.entries.length-1];return On(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function On(e,t,n,r){const s=e.value,o=e.rating,i=lt(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map((e=>Ie.mirror.getId(e))):void 0,attributions:r}}}function Ch(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(dd(e,n))})),r.push(cd(Xt(vh,e)),ad(Xt(Ih,e)),ud(Xt(kh,e)),ld(Xt(Th,e))),()=>{r.forEach((e=>e()))}}const b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Rh='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==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],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=A(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}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,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)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[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,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[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){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;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}}},L=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}}},O=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=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(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-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[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=U(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=x,c.p=_,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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 Mh(){const e=new Blob([Rh]);return URL.createObjectURL(e)}const Si=["info","warn","error","log"],tn="[Replay] ";function er(e,t="info"){De({category:"console",data:{logger:"replay"},level:t,message:`${tn}${e}`},{level:t})}function xh(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return b?(Si.forEach((e=>{n[e]=(...n)=>{E[e](tn,...n),t&&er(n.join(""),io(e))}})),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),E.error(tn,r),e?jr(r):t&&er(r,"error")},n.infoTick=(...e)=>{E.info(tn,...e),t&&setTimeout((()=>er(e[0])),0)}):Si.forEach((e=>{n[e]=()=>{}})),n}const v=xh();class ss extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Jr}.`)}}class ta{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Jr)throw new ss;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?rs(e):null}}class Oh{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){b&&v.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return b&&v.error("Error in compression worker: ",i.response),void s(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Ah{constructor(e){this._worker=new Oh(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=rs(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Jr?Promise.reject(new ss):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{b&&v.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Dh{constructor(e){this._fallback=new ta,this._compression=new Ah(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(b&&v.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){b&&v.exception(e,"Failed to add events when switching buffers.")}}}function Nh({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=Lh(t);if(e)return e}return b&&v.info("Using simple buffer"),new ta}function Lh(e){try{const t=e||Ph();if(!t)return;b&&v.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Dh(n)}catch(e){b&&v.exception(e,"Failed to create compression worker")}}function Ph(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Mh():""}function is(){try{return"sessionStorage"in j&&!!j.sessionStorage}catch{return!1}}function Fh(e){Uh(),e.session=void 0}function Uh(){if(is())try{j.sessionStorage.removeItem(Kr)}catch{}}function na(e){return void 0!==e&&Math.random()<e}function ra(e){const t=Date.now();return{id:e.id||ie(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function os(e){if(is())try{j.sessionStorage.setItem(Kr,JSON.stringify(e))}catch{}}function Bh(e,t){return na(e)?"session":!!t&&"buffer"}function Ei({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=ra({sampled:Bh(e,t),previousSessionId:r});return n&&os(s),s}function $h(){if(!is())return null;try{const e=j.sessionStorage.getItem(Kr);if(!e)return null;const t=JSON.parse(e);return b&&v.infoTick("Loading existing session"),ra(t)}catch{return null}}function Mr(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function sa(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Mr(e.started,t,r)||Mr(e.lastActivity,n,r)}function ia(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!sa(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function tr({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&$h();return s?ia(s,{sessionIdleExpire:e,maxReplayDuration:t})?(b&&v.infoTick("Session in sessionStorage is expired, creating new one..."),Ei(r,{previousSessionId:s.id})):s:(b&&v.infoTick("Creating new session"),Ei(r,{previousSessionId:n}))}function Hh(e){return e.type===C.Custom}function as(e,t,n){return!!aa(e,t)&&(oa(e,t,n),!0)}function jh(e,t,n){return aa(e,t)?oa(e,t,n):Promise.resolve(null)}async function oa(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s="buffer"===e.recordingMode;try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=Wh(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof ss,o=n?"addEventSizeExceeded":"addEvent";if(n&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=V();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function aa(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=rs(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(b&&v.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function Wh(e,t){try{if("function"==typeof t&&Hh(e))return t(e)}catch(e){return b&&v.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function cs(e){return!e.type}function xr(e){return"transaction"===e.type}function zh(e){return"replay_event"===e.type}function bi(e){return"feedback"===e.type}function qh(e){return(t,n)=>{if(!e.isEnabled()||!cs(t)&&!xr(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(xr(t))return void Gh(e,t);Yh(e,t)}}}function Gh(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 Yh(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||at((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function Vh(e){return t=>{!e.isEnabled()||!cs(t)||Kh(e,t)}}function Kh(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){Lt(e,ge({category:"replay.hydrate-error",data:{url:Pi()}}))}}function Xh(e){const t=V();t&&t.on("beforeAddBreadcrumb",(t=>Jh(e,t)))}function Jh(e,t){if(!e.isEnabled()||!ca(t))return;const n=Qh(t);n&&Lt(e,n)}function Qh(e){return!ca(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?Zh(e):ge(e)}function Zh(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return ge(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Yt?(n=!0,`${e.slice(0,Yt)}…`):e;if("object"==typeof e)try{const t=fe(e,7);return JSON.stringify(t).length>Yt?(n=!0,`${JSON.stringify(t,null,2).slice(0,Yt)}…`):t}catch{}return e}));return ge({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ca(e){return!!e.category}function em(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function ua(){const e=oe().getPropagationContext().dsc;e&&delete e.replay_id;const t=ji();if(t){delete zi(t).replay_id}}function tm(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:C.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function nm(e,t){return!("buffer"!==e.recordingMode||t.message===Xr||!t.exception||t.type)&&na(e.getOptions().errorSampleRate)}function rm(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:zh(t)?(delete t.breadcrumbs,t):cs(t)||xr(t)||bi(t)?e.checkAndHandleExpiredSession()?bi(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),tm(e,t),t):em(t,n)&&!e.getOptions()._experiments.captureExceptions?(b&&v.log("Ignoring error from rrweb internals",t),null):((nm(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(ua(),t):t),{id:"Replay"})}function An(e,t){return t.map((({type:t,start:n,end:r,name:s,data:o})=>{const i=e.throttledAddEvent({type:C.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:s,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function sm(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 im(e){return t=>{if(!e.isEnabled())return;const n=sm(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(An(e,[n]),!1))))}}function om(e,t){return(!b||!e.getOptions()._experiments.traceInternals)&&Pu(t,V())}function la(e,t){e.isEnabled()&&null!==t&&(om(e,t.name)||e.addUpdate((()=>(An(e,[t]),!0))))}function Dn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ha(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function da(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function fa(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ha(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function gn(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 pa(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:ne({method:o,statusCode:i,request:a,response:c})}}function kt(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ae(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=am(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function Or(e,t){return Object.entries(e).reduce(((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n}),{})}function ha(e){return new URLSearchParams(e).toString()}function am(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>ti,n=cm(e);if(t){const t=e.slice(0,ti);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function cm(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function _n(e,t){return Ct(um(e),t)}function um(e,t=j.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(j.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 lm(e,t,n){try{const r=pa("resource.fetch",await fm(e,t,n));la(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture fetch breadcrumb")}}function dm(e,t){const{input:n,response:r}=t,s=Dn(n?ma(n):void 0),o=r?da(r.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}async function fm(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=_n(i,n.networkDetailAllowUrls)&&!_n(i,n.networkDetailDenyUrls);return{startTimestamp:s,endTimestamp:o,url:i,method:a,statusCode:c,request:d?pm(n,t.input,l):kt(l),response:await hm(d,n,t.response,u)}}function pm({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?_m(n,t):{};if(!e)return Ae(s,r,void 0);const o=ma(n),[i,a]=fa(o),c=Ae(s,r,i);return a?gn(c,a):c}async function hm(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&void 0!==s)return kt(s);const o=r?ga(r.headers,n):{};if(!r||!t&&void 0!==s)return Ae(o,s,void 0);const[i,a]=await gm(r),c=mm(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return a?gn(c,a):c}function mm(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&void 0===n?Dn(e):n;return r?Ae(s,o,t?e:void 0):kt(o)}catch(e){return b&&v.exception(e,"Failed to serialize response body"),Ae(s,n,void 0)}}async function gm(e){const t=ym(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Sm(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(b&&v.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(b&&v.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function ma(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function ga(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function _m(e,t){return 1===e.length&&"string"!=typeof e[0]?vi(e[0],t):2===e.length?vi(e[1],t):{}}function vi(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ga(n,t):Array.isArray(n)?{}:Or(n,t):{}}function ym(e){try{return e.clone()}catch(e){b&&v.exception(e,"Failed to clone response body")}}function Sm(e){return new Promise(((t,n)=>{const r=at((()=>n(new Error("Timeout while trying to read response body"))),500);Em(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function Em(e){return await e.text()}async function bm(e,t,n){try{const r=pa("resource.xhr",wm(e,t,n));la(n.replay,r)}catch(e){b&&v.exception(e,"Failed to capture xhr breadcrumb")}}function vm(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Dn(r),o=n.getResponseHeader("content-length")?da(n.getResponseHeader("content-length")):Cm(n.response,n.responseType);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}function wm(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!_n(c,n.networkDetailAllowUrls)||_n(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:kt(d),response:kt(p)}}const h=a[Xe],m=h?Or(h.request_headers,n.networkRequestHeaders):{},f=Or(Im(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?fa(i):[void 0],[_,v]=n.networkCaptureBodies?km(a):[void 0],b=Ae(m,d,g),S=Ae(f,p,_);return{startTimestamp:s,endTimestamp:o,url:c,method:l,statusCode:u,request:y?gn(b,y):b,response:v?gn(S,v):S}}function Im(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function km(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Tm(e.response,e.responseType)}catch(e){t.push(e)}return b&&v.warn("Failed to get xhr response body",...t),[void 0]}function Tm(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return b&&v.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return b&&v.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Cm(e,t){try{return Dn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function Rm(e){const t=V();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Mm(a,e,t)))}catch{}}function Mm(e,t,n){if(t.data)try{xm(t)&&Am(n)&&(vm(t,n),bm(t,n,e)),Om(t)&&Dm(n)&&(dm(t,n),lm(t,n,e))}catch(e){b&&v.exception(e,"Error when enriching network breadcrumb")}}function xm(e){return"xhr"===e.category}function Om(e){return"fetch"===e.category}function Am(e){return e&&e.xhr}function Dm(e){return e&&e.response}function Nm(e){const t=V();Io(uh(e)),Vr(im(e)),Xh(e),Rm(e);mu(rm(e)),t&&(t.on("beforeSendEvent",Vh(e)),t.on("afterSendEvent",qh(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function Lm(e){try{return Promise.all(An(e,[Pm(j.performance.memory)]))}catch{return[]}}function Pm(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 Fm(e,t,n){let r,s,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=at(a,t),i&&void 0===o&&(o=at(a,i)),r}return l.cancel=c,l.flush=function(){return void 0!==s||void 0!==o?a():r},l}function Um(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(b&&v.warn("Received replay event after session expired."));const s=r||!t;t=!0,e.clickDetector&&sh(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!as(e,n,s))return!0;if(!s)return!1;const t=e.session;if($m(e,s),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(b&&v.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&os(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function Bm(e){const t=e.getOptions();return{type:C.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function $m(e,t){!t||!e.session||0!==e.session.segmentId||as(e,Bm(e),!1)}function Hm(e,t,n,r){return ft(Yi(e,Hr(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function jm({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function Wm({client:e,scope:t,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,s);const o=await Vi(e.getOptions(),r,s,t,e,_e());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function zm({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=jm({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=V(),p=oe(),h=d&&d.getTransport(),m=d&&d.getDsn();if(!(d&&h&&m&&o.sampled))return Te({});const f={type:wf,replay_start_timestamp:u/1e3,timestamp:s/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await Wm({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay",f),b&&v.info("An event processor returned `null`, will not send event."),Te({});delete g.sdkProcessingMetadata;const y=Hm(g,i,m,d.getOptions().tunnel);let _;try{_=await h.send(y)}catch(e){const t=new Error(Xr);try{t.cause=e}catch{}throw t}if("number"==typeof _.statusCode&&(_.statusCode<200||_.statusCode>=300))throw new _a(_.statusCode);const S=ro({},_);if(no(S,"replay"))throw new us(S);return _}class _a extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class us extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function ya(e,t={count:0,interval:Mf}){const{recordingData:n,onError:r}=e;if(n.length)try{return await zm(e),!0}catch(n){if(n instanceof _a||n instanceof us)throw n;if(Xi("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${Xr} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{at((async()=>{try{await ya(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const Sa="__THROTTLED",qm="__SKIPPED";function Gm(e,t,n){const r=new Map;let s=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=s;return s=!0,e?qm:Sa}s=!1;const a=r.get(i)||0;return r.set(i,a+1),e(...o)}}class Oe{constructor({options:e,recordingOptions:t}){Oe.prototype.__init.call(this),Oe.prototype.__init2.call(this),Oe.prototype.__init3.call(this),Oe.prototype.__init4.call(this),Oe.prototype.__init5.call(this),Oe.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:If,sessionIdleExpire:kf},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=Fm((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Gm(((e,t)=>jh(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(Of,n),timeout:n,scrollTimeout:Af,ignoreSelector:r?r.join(","):""}:void 0;if(s&&(this.clickDetector=new eh(this,s)),b){const t=e._experiments;v.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){b&&v.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(b&&v.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",b&&v.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(b&&v.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=tr({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(b&&v.info("Buffering is in progress, call `flush()` to save the replay"));b&&v.infoTick("Starting replay in buffer mode");const e=tr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Ie({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:Rf}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Um(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{b&&v.info("Stopping Replay"+(t?` triggered by ${t}`:"")),ua(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Fh(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),b&&v.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),b&&v.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();b&&v.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?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&&Mr(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${j.location.pathname}${j.location.hash}${j.location.search}`,t=`${j.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Sa){const e=ge({category:"replay.throttled"});this.addUpdate((()=>!as(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||ji(),t=e&&Br(e),n=(t&&Et(t).data||{})[Hi];if(t&&n&&["route","custom"].includes(n))return Et(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Nh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=tr({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!ia(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{j.document.addEventListener("visibilitychange",this._handleVisibilityChange),j.addEventListener("blur",this._handleWindowBlur),j.addEventListener("focus",this._handleWindowFocus),j.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Nm(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Ch(this)}_removeListeners(){try{j.document.removeEventListener("visibilitychange",this._handleVisibilityChange),j.removeEventListener("blur",this._handleWindowBlur),j.removeEventListener("focus",this._handleWindowFocus),j.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===j.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=ge({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=ge({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{ph(this,e)}}_doChangeToBackgroundTasks(e){!this.session||sa(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):b&&v.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:C.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=_h(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(An(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await Lm(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await ya({replayId:e,recordingData:s,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=V();if(t){const n=e instanceof us?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else b&&v.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(b&&v.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return b&&v.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&b&&v.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&os(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=ge({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function ht(e,t){return[...e,...t].join(",")}function Ym({mask:e,unmask:t,block:n,unblock:r,ignore:s}){return{maskTextSelector:ht(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:ht(t,[]),blockSelector:ht(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:ht(r,[]),ignoreSelector:ht(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Vm({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const wi='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Km=["content-length","content-type","accept"];let Ii=!1;const Xm=e=>new Nn(e);class Nn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Tf,flushMaxDelay:t=Cf,minReplayDuration:n=Df,maxReplayDuration:r=ni,stickySession:s=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder"],unmask:k=[],block:E=[],unblock:w=[],ignore:x=[],maskFn:T,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M}={}){this.name=Nn.id;const R=Ym({mask:b,unmask:k,block:E,unblock:w,ignore:x});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>Vm({maskAttributes:S,maskAllText:c,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,Nf),maxReplayDuration:Math.min(r,ni),stickySession:s,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:ki(_),networkResponseHeaders:ki(v),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${wi}`:wi),this._isInitialized&&Vs())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ii}set _isInitialized(e){Ii=e}afterAllSetup(e){!Vs()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=Jm(this._initialOptions,e);this._replay=new Oe({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Jm(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ne(e)},s=cr(n.replaysSessionSampleRate),o=cr(n.replaysOnErrorSampleRate);return null==s&&null==o&&Ne((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=s&&(r.sessionSampleRate=s),null!=o&&(r.errorSampleRate=o),r}function ki(e){return[...Km,...e.map((e=>e.toLowerCase()))]}function Qm(e){const t={...e};return so(t,"react"),Xi("react",{version:xa}),vf(t)}Nn.__initStatic();const Ea=()=>"object"!=typeof window;var Zm={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"13b502cc77ed780a",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.202",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3050",APP_NAME:"@wellesley/sentry"};const eg=()=>!!Zm.JEST_WORKER_ID,Ti=["debug","info","warn","error"],tg=(e,t)=>{const n=Ti.indexOf(e);return Ti.indexOf(t)>=n},Jt=(e,t,n,...r)=>{tg(t,e)&&console.log(`[${e}] ${n}`,...r)},ng=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),rg=(e=!Ea()&&ng()||"warn")=>{let t=e;return{debug:(e,...n)=>Jt("debug",t,e,...n),info:(e,...n)=>Jt("info",t,e,...n),warn:(e,...n)=>Jt("warn",t,e,...n),error:(e,...n)=>(Ma(e,...n),Jt("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},Ln=rg();var Ci={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"13b502cc77ed780a",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.202",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3050",APP_NAME:"@wellesley/sentry"};const sg=e=>`${e||"wlsy"}-${Ci.DOMAIN_ENV}#${Ci.BUILD_NUMBER}`,Pn="staticState",nn={path:"",baseUrl:"",search:""},ig=e=>{if(!e)return nn;try{return JSON.parse(decodeURIComponent(e))||nn}catch(e){return Ln.error("Error parsing static state",e),nn}},ba=()=>new URLSearchParams(window.location.search).get(Pn),og=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:s,search:o}=window.location;return`${Pn}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||s,search:n||o}))}`},ag=()=>{const e=ba();return e&&localStorage.setItem(Pn,e),va()},va=()=>{try{const e=localStorage.getItem(Pn)||ba();return ig(e)}catch(e){return Ln.error("Error parsing static state",e),nn}},cg={create:og,init:ag,get:va},ug=()=>{try{const{baseUrl:e}=cg.get();return e&&new URL(e).hostname||window.location.hostname}catch(e){return Ln.warn("getServerName: Error getting server name",e),""}};var wa={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/sentry/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/sentry/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"13b502cc77ed780a",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/sentry",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.202",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/sentry",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3050",APP_NAME:"@wellesley/sentry"};const lg=wa.DOMAIN_ENV;Ea()||(window.build=wa.BUILD_NUMBER);const dg=["lunar.allroads.social"],ls=()=>!eg()&&null==dg.find((e=>ug().includes(e))),fg=[Xm(),Co(),oo()],pg=({dsn:e,release:t,integrations:n=fg,...r})=>{if(ls()&&e)try{Qm({dsn:e,integrations:n,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,release:sg(t),environment:lg,maxValueLength:1024,...r})}catch(e){return void Ln.error("Sentry init error: ",e)}},Ia=e=>{if(ls()&&e){const{email:t,username:n,userId:r}=e;hu({email:t,username:n,id:r})}},Cg=Object.freeze(Object.defineProperty({__proto__:null,init:pg,isEnabled:ls,setUser:Ia},Symbol.toStringTag,{value:"Module"})),hg=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},mg=e=>hg(e)&&"type"in e&&"string"==typeof e.type,R=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>mg(t)&&t.type===e,t};R("remoteReady"),R("reselectUser"),R("requestLogin"),R("requestLogout"),R("setConfirmLeavePage"),R("requestChangePath"),R("wsSubscribe"),R("wsUnSubscribe"),R("hostStoreConnect"),R("remoteLogin"),R("remoteLogout"),R("wsOnMessage"),R("setRouterPath"),R("setDeviceType");const gg=R("setUserError"),_g=R("setUserIsError"),yg=R("setUserPending"),Sg=R("setUserSuccess"),Eg=R("setUserData"),bg=R("updateAccountData"),vg=R("updateUser");R("addNotification"),R("markNotification"),R("setNotificationsError"),R("setNotificationsList"),R("setNotificationsPending"),R("setNotificationsTotalCount"),R("setNotificationsUnreadCount"),R("resetNotificationsState"),R("undoNotification"),R("setInstanceInfo"),R("setInstanceInfoPending"),R("setInstanceInfoError"),R("setPlatformSettings"),R("setProfileSettings"),R("setGroupData"),R("setGroupLoading"),R("showGroupBasicInfo"),xi("requestMicroFrontendFetch"),xi("sendMicroFrontendFetchResponse");const Ri={data:null,isError:!1,isPending:!1,isSuccess:!1},Mi=Aa({name:"user",initialState:Ri,reducers:{reset:e=>{Object.assign(e,Ri)}},extraReducers:e=>{e.addCase(Eg,((e,{payload:t})=>{e.data=t})).addCase(bg,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(Sg,((e,{payload:t})=>{e.isSuccess=t})).addCase(yg,((e,{payload:t})=>{e.isPending=t})).addCase(_g,((e,{payload:t})=>{e.isError=t})).addCase(gg,((e,{payload:t})=>{e.error=t})).addCase(vg,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),Rg=()=>{const e=hs(Mi.selectors.selectAccount),t=hs(Mi.selectors.selectCurrentUser),{email:n}=e||{},{username:r,id:s}=t||{};Oa((()=>{n&&r&&s&&Ia({email:n,username:r,userId:s})}),[n,r,s])},Mg=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return pu("exceptionMessage",t),void jr(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}fu(t)};export{Mg as logErrorToSentry,Cg as sentryClient,Rg as useSentryUser};
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "!*.map"
9
9
  ],
10
10
  "module": "index.ts",
11
- "version": "1.0.200",
11
+ "version": "1.0.202",
12
12
  "devDependencies": {
13
13
  "eslint-config": "^1.0.0",
14
14
  "prettier-config": "^1.0.0",