
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8cdccc81-e8d6-5bc4-91db-419459fa0f62")}catch(e){}}();
import{Bb as va,Lb as xa,Mb as Ra,Nb as wa,Ob as ka,P as jr,Pc as yd,Qb as Ca,S as Un,Tb as Aa,V as ii,a as d,b as E,c as Ta,d as Ia,e as Sd,f as Z,g as ba,l as pt,mc as oi,nc as Oa,oc as sn,pb as Wr,x as Gr}from"./chunk-ELRR4QVV.js";var Ma=Object.prototype.toString;function $n(e){switch(Ma.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ae(e,Error)}}function on(e,t){return Ma.call(e)===`[object ${t}]`}function an(e){return on(e,"ErrorEvent")}function zr(e){return on(e,"DOMError")}function ai(e){return on(e,"DOMException")}function oe(e){return on(e,"String")}function cn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $t(e){return e===null||cn(e)||typeof e!="object"&&typeof e!="function"}function ze(e){return on(e,"Object")}function Gt(e){return typeof Event<"u"&&Ae(e,Event)}function ci(e){return typeof Element<"u"&&Ae(e,Element)}function ui(e){return on(e,"RegExp")}function et(e){return!!(e&&e.then&&typeof e.then=="function")}function li(e){return ze(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Gn(e){return typeof e=="number"&&e!==e}function Ae(e,t){try{return e instanceof t}catch{return!1}}function jn(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function tt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function qr(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let s=e[r];try{jn(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Na(e,t,n=!1){return oe(e)?ui(t)?t.test(e):oe(t)?n?e===t:e.includes(t):!1:!1}function nt(e,t=[],n=!1){return t.some(r=>Na(e,r,n))}function Wn(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Ae(o.originalException,Error))return;let a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Ed(di(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function di(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(Ae(r[s],Error)){Da(o,a);let u=e(t,r[s]),l=c.length;La(u,s,l,a),c=di(e,t,n,r[s],s,[u,...c],u,l)}return Array.isArray(r.errors)&&r.errors.forEach((u,l)=>{if(Ae(u,Error)){Da(o,a);let f=e(t,u),p=c.length;La(f,`errors[${l}]`,p,a),c=di(e,t,n,u,s,[f,...c],f,p)}}),c}function Da(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=E(d(d({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function La(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=E(d({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function Ed(e,t){return e.map(n=>(n.value&&(n.value=tt(n.value,t)),n))}function Yr(e){return e&&e.Math==Math?e:void 0}var R=typeof globalThis=="object"&&Yr(globalThis)||typeof window=="object"&&Yr(window)||typeof self=="object"&&Yr(self)||typeof global=="object"&&Yr(global)||function(){return this}()||{};function jt(){return R}function zn(e,t,n){let r=n||R,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}var un=jt(),Td=80;function Oe(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,s=[],i=0,o=0,a=" > ",c=a.length,u,l=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Td;for(;n&&i++<r&&(u=Id(n,l),!(u==="html"||i>1&&o+s.length*c+u.length>=f));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function Id(e,t){let n=e,r=[],s,i,o,a,c;if(!n||!n.tagName)return"";if(un.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());let u=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(u&&u.length)u.forEach(f=>{r.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&oe(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);let l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)o=l[c],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}function fi(){try{return un.document.location.href}catch{return""}}function pi(e){return un.document&&un.document.querySelector?un.document.querySelector(e):null}function qn(e){if(!un.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}var De=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var bd="Sentry Logger ",Yn=["debug","info","warn","error","log","assert","trace"],ln={};function Le(e){if(!("console"in R))return e();let t=R.console,n={},r=Object.keys(ln);r.forEach(s=>{let i=ln[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function vd(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return De?Yn.forEach(n=>{t[n]=(...r)=>{e&&Le(()=>{R.console[n](`${bd}[${n}]:`,...r)})}}):Yn.forEach(n=>{t[n]=()=>{}}),t}var h=vd();var xd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Rd(e){return e==="http"||e==="https"}function _e(e,t=!1){let{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Pa(e){let t=xd.exec(e);if(!t){Le(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,s="",i,o="",a]=t.slice(1),c="",u=a,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let f=u.match(/^\d+/);f&&(u=f[0])}return Fa({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Fa(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function wd(e){if(!De)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(h.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Rd(r)?t&&isNaN(parseInt(t,10))?(h.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Kn(e){let t=typeof e=="string"?Pa(e):Fa(e);if(!(!t||!wd(t)))return t}var he=class extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function K(e,t,n){if(!(t in e))return;let r=e[t],s=n(r);typeof s=="function"&&Kr(s,r),e[t]=s}function Pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{De&&h.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Kr(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Pe(e,"__sentry_original__",t)}catch{}}function Wt(e){return e.__sentry_original__}function hi(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Vr(e){if($n(e))return d({message:e.message,name:e.name,stack:e.stack},Ha(e));if(Gt(e)){let t=d({type:e.type,target:Ba(e.target),currentTarget:Ba(e.currentTarget)},Ha(e));return typeof CustomEvent<"u"&&Ae(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Ba(e){try{return ci(e)?Oe(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ha(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function gi(e,t=40){let n=Object.keys(Vr(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return tt(n[0],t);for(let r=n.length;r>0;r--){let s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:tt(s,t)}return""}function q(e){return mi(e,new Map)}function mi(e,t){if(kd(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let s of Object.keys(e))typeof e[s]<"u"&&(r[s]=mi(e[s],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(s=>{r.push(mi(s,t))}),r}return e}function kd(e){if(!ze(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var Ga=50,Ua=/\(error: (.*)\)/,$a=/captureMessage|captureException/;function Jr(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let s=[],i=n.split(`
`);for(let o=r;o<i.length;o++){let a=i[o];if(a.length>1024)continue;let c=Ua.test(a)?a.replace(Ua,"$1"):a;if(!c.match(/\S*Error: /)){for(let u of t){let l=u(c);if(l){s.push(l);break}}if(s.length>=Ga)break}}return ja(s)}}function Si(e){return Array.isArray(e)?Jr(...e):e}function ja(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),$a.test(t[t.length-1].function||"")&&(t.pop(),$a.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Ga).map(n=>E(d({},n),{filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var _i="<anonymous>";function ve(e){try{return!e||typeof e!="function"?_i:e.name||_i}catch{return _i}}var Xr={},Wa={};function xe(e,t){Xr[e]=Xr[e]||[],Xr[e].push(t)}function Re(e,t){Wa[e]||(t(),Wa[e]=!0)}function de(e,t){let n=e&&Xr[e];if(n)for(let r of n)try{r(t)}catch(s){De&&h.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${ve(r)}
Error:`,s)}}function yi(e){let t="console";xe(t,e),Re(t,Cd)}function Cd(){"console"in R&&Yn.forEach(function(e){e in R.console&&K(R.console,e,function(t){return ln[e]=t,function(...n){de("console",{args:n,level:e});let s=ln[e];s&&s.apply(R.console,n)}})})}function U(){let e=R,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function za(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qe(e){let{message:t,event_id:n}=e;if(t)return t;let r=za(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function dn(e,t,n){let r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function mt(e,t){let n=za(e);if(!n)return;let r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism=d(d(d({},r),s),t),t&&"data"in t){let i=d(d({},s&&s.data),t.data);n.mechanism.data=i}}function Zr(e){if(e&&e.__sentry_captured__)return!0;try{Pe(e,"__sentry_captured__",!0)}catch{}return!1}function Vn(e){return Array.isArray(e)?e:[e]}var fn=R,Ad=1e3,qa,Ei,Ti;function Jn(e){let t="dom";xe(t,e),Re(t,Od)}function Od(){if(!fn.document)return;let e=de.bind(null,"dom"),t=Ya(e,!0);fn.document.addEventListener("click",t,!1),fn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=fn[n]&&fn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(K(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){let f=Ya(e);l.handler=f,s.call(this,i,f,a)}l.refCount++}catch{}return s.call(this,i,o,a)}}),K(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(s.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function Md(e){if(e.type!==Ei)return!1;try{if(!e.target||e.target._sentryId!==Ti)return!1}catch{}return!0}function Nd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Ya(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Dd(n);if(Nd(n.type,r))return;Pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Pe(r,"_sentryId",U());let s=n.type==="keypress"?"input":n.type;Md(n)||(e({event:n,name:s,global:t}),Ei=n.type,Ti=r?r._sentryId:void 0),clearTimeout(qa),qa=fn.setTimeout(()=>{Ti=void 0,Ei=void 0},Ad)}}function Dd(e){try{return e.target}catch{return null}}var Ii=jt();function Qr(){if(!("fetch"in Ii))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xn(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function bi(){if(typeof EdgeRuntime=="string")return!0;if(!Qr())return!1;if(Xn(Ii.fetch))return!0;let e=!1,t=Ii.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){De&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function zt(e){let t="fetch";xe(t,e),Re(t,Ld)}function Ld(){bi()&&K(R,"fetch",function(e){return function(...t){let{method:n,url:r}=Pd(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return de("fetch",d({},s)),e.apply(R,t).then(i=>{let o=E(d({},s),{endTimestamp:Date.now(),response:i});return de("fetch",o),i},i=>{let o=E(d({},s),{endTimestamp:Date.now(),error:i});throw de("fetch",o),i})}})}function vi(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ka(e){return typeof e=="string"?e:e?vi(e,"url")?e.url:e.toString?e.toString():"":""}function Pd(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:Ka(n),method:vi(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Ka(t),method:vi(t,"method")?String(t.method).toUpperCase():"GET"}}var es=null;function Zn(e){let t="error";xe(t,e),Re(t,Fd)}function Fd(){es=R.onerror,R.onerror=function(e,t,n,r,s){return de("error",{column:r,error:s,line:n,msg:e,url:t}),es&&!es.__SENTRY_LOADER__?es.apply(this,arguments):!1},R.onerror.__SENTRY_INSTRUMENTED__=!0}var ts=null;function Qn(e){let t="unhandledrejection";xe(t,e),Re(t,Bd)}function Bd(){ts=R.onunhandledrejection,R.onunhandledrejection=function(e){return de("unhandledrejection",e),ts&&!ts.__SENTRY_LOADER__?ts.apply(this,arguments):!0},R.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ns=jt();function Va(){let e=ns.chrome,t=e&&e.app&&e.app.runtime,n="history"in ns&&!!ns.history.pushState&&!!ns.history.replaceState;return!t&&n}var er=R,rs;function ht(e){let t="history";xe(t,e),Re(t,Hd)}function Hd(){if(!Va())return;let e=er.onpopstate;er.onpopstate=function(...n){let r=er.location.href,s=rs;if(rs=r,de("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let s=r.length>2?r[2]:void 0;if(s){let i=rs,o=String(s);rs=o,de("history",{from:i,to:o})}return n.apply(this,r)}}K(er.history,"pushState",t),K(er.history,"replaceState",t)}var Ud=R,Fe="__sentry_xhr_v3__";function qt(e){let t="xhr";xe(t,e),Re(t,$d)}function $d(){if(!Ud.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;K(e,"open",function(t){return function(...n){let r=Date.now(),s=oe(n[0])?n[0].toUpperCase():void 0,i=Gd(n[1]);if(!s||!i)return t.apply(this,n);this[Fe]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[Fe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};de("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?K(this,"onreadystatechange",function(a){return function(...c){return o(),a.apply(this,c)}}):this.addEventListener("readystatechange",o),K(this,"setRequestHeader",function(a){return function(...c){let[u,l]=c,f=this[Fe];return f&&oe(u)&&oe(l)&&(f.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),K(e,"send",function(t){return function(...n){let r=this[Fe];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return de("xhr",s),t.apply(this,n)}})}function Gd(e){if(oe(e))return e;try{return e.toString()}catch{}}function xi(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Ri(){return"npm"}function Ja(){return!xi()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ss(){return typeof window<"u"&&(!Ja()||jd())}function jd(){return R.process!==void 0&&R.process.type==="renderer"}function Xa(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function we(e,t=100,n=1/0){try{return is("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function os(e,t=3,n=100*1024){let r=we(e,t);return Yd(r)>n?os(e,t-1,n):r}function is(e,t,n=1/0,r=1/0,s=Xa()){let[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!Gn(t))return t;let a=Wd(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return is("",m,c-1,r,s)}catch{}let l=Array.isArray(t)?[]:{},f=0,p=Vr(t);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(f>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=is(m,g,c-1,r,s),f++}return o(t),l}function Wd(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")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(jn(t))return"[VueViewModel]";if(li(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${ve(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=zd(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function zd(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function qd(e){return~-encodeURI(e).split(/%..|./).length}function Yd(e){return qd(JSON.stringify(e))}var gt;(function(e){e[e.PENDING=0]="PENDING";let n=1;e[e.RESOLVED=n]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(gt||(gt={}));function Ye(e){return new Me(t=>{t(e)})}function Yt(e){return new Me((t,n)=>{n(e)})}var Me=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=gt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(gt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(gt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===gt.PENDING){if(et(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===gt.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===gt.RESOLVED&&n[1](this._value),this._state===gt.REJECTED&&n[2](this._value),n[0]=!0)})}}};function wi(e){let t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Yt(new he("Not adding Promise because buffer limit was reached."));let a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Me((a,c)=>{let u=t.length;if(!u)return a(!0);let l=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(f=>{Ye(f).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:s,drain:i}}function Kt(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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 ki(e){return e.split(/[\?#]/,1)[0]}var Za=["fatal","error","warning","log","info","debug"];function Ci(e){return e==="warn"?"warning":Za.includes(e)?e:"log"}var Qa=1e3;function rt(){return Date.now()/Qa}function Kd(){let{performance:e}=R;if(!e||!e.now)return rt;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Qa}var Be=Kd();var tr,fe=(()=>{let{performance:e}=R;if(!e||!e.now){tr="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):t,u=c<t;return i||u?s<=c?(tr="timeOrigin",e.timeOrigin):(tr="navigationStart",o):(tr="dateNow",r)})();var pn="baggage",Ai="sentry-",tc=/^sentry-/,nc=8192;function Oi(e){if(!oe(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,s)=>{let i=ec(s);for(let o of Object.keys(i))r[o]=i[o];return r},{});else{if(!e)return;t=ec(e)}let n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(tc)){let o=s.slice(Ai.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function nr(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Ai}${r}`]=s),n),{});return Vd(t)}function ec(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function Vd(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>nc?(De&&h.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}var rc=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function sc(e){if(!e)return;let t=e.match(rc);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Mi(e,t){let n=sc(e),r=Oi(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||U(),parentSpanId:i||U().substring(16),spanId:U().substring(16),sampled:o,dsc:r||{}}:{traceId:s||U(),spanId:U().substring(16)}}function Vt(e=U(),t=U().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ge(e,t=[]){return[e,t]}function Di(e,t){let[n,r]=e;return[n,[...r,t]]}function as(e,t){let n=e[1];for(let r of n){let s=r[0].type;if(t(r,s))return!0}return!1}function Ni(e,t){return(t||new TextEncoder).encode(e)}function Li(e,t){let[n,r]=e,s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[Ni(s,t),o]:s.push(typeof o=="string"?Ni(o,t):o)}for(let o of r){let[a,c]=o;if(i(`
${JSON.stringify(a)}
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(we(c))}i(u)}}return typeof s=="string"?s:Jd(s)}function Jd(e){let t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t),r=0;for(let s of e)n.set(s,r),r+=s.length;return n}function Pi(e,t){let n=typeof e.data=="string"?Ni(e.data,t):e.data;return[q({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var Xd={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function cs(e){return Xd[e]}function mn(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function rr(e,t,n,r){let s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return d(d(d({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:_e(r)}),s&&{trace:q(d({},s))})}function Fi(e,t,n){let r=[{type:"client_report"},{timestamp:n||rt(),discarded_events:e}];return ge(t?{dsn:t}:{},[r])}function ic(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function oc(e,t){return e[t]||e.all||0}function sr(e,t,n=Date.now()){return oc(e,t)>n}function ir(e,{statusCode:t,headers:n},r=Date.now()){let s=d({},e),i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,l]=a.split(":",5),f=parseInt(c,10),p=(isNaN(f)?60:f)*1e3;if(!u)s.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[m]=r+p):s[m]=r+p}else o?s.all=r+ic(o,r):t===429&&(s.all=r+60*1e3);return s}function ac(e,t){return e(t.stack||"",1)}function Bi(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=ac(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Hi(e,t){return e??t()}function or(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var bt="production";function ar(){return zn("globalEventProcessors",()=>[])}function Ui(e){ar().push(e)}function hn(e,t,n,r=0){return new Me((s,i)=>{let o=e[r];if(t===null||typeof o!="function")s(t);else{let a=o(d({},t),n);T&&o.id&&a===null&&h.log(`Event processor "${o.id}" dropped event`),et(a)?a.then(c=>hn(e,c,n,r+1).then(s)).then(null,i):hn(e,a,n,r+1).then(s).then(null,i)}})}function us(e){let t=Be(),n={sid:U(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Qd(n)};return e&&Ke(n,e),n}function Ke(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||Be(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:U()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ls(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Ke(e,n)}function Qd(e){return q({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${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}})}var uc=0,$i=1;function Jt(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=P(e);return q({data:r,op:s,parent_span_id:i,span_id:t,status:o,tags:a,trace_id:n,origin:c})}function _t(e){let{traceId:t,spanId:n}=e.spanContext(),r=gn(e);return Vt(t,n,r)}function vt(e){return typeof e=="number"?cc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?cc(e.getTime()):Be()}function cc(e){return e>9999999999?e/1e3:e}function P(e){return ef(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function ef(e){return typeof e.getSpanJSON=="function"}function gn(e){let{traceFlags:t}=e.spanContext();return!!(t&$i)}function cr(e,t,n,r,s,i){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c=E(d({},t),{event_id:t.event_id||n.event_id||U(),timestamp:t.timestamp||rt()}),u=n.integrations||e.integrations.map(y=>y.name);tf(c,e),sf(c,u),t.type===void 0&&nf(c,e.stackParser);let l=af(r,n.captureContext);n.mechanism&&mt(c,n.mechanism);let f=s&&s.getEventProcessors?s.getEventProcessors():[],p=fc().getScopeData();if(i){let y=i.getScopeData();Gi(p,y)}if(l){let y=l.getScopeData();Gi(p,y)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),ds(c,p);let g=[...f,...ar(),...p.eventProcessors];return hn(g,c,n).then(y=>(y&&rf(y),typeof o=="number"&&o>0?of(y,o,a):y))}function tf(e,t){let{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:bt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=tt(e.message,i));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=tt(o.value,i));let a=e.request;a&&a.url&&(a.url=tt(a.url,i))}var lc=new WeakMap;function nf(e,t){let n=R._sentryDebugIds;if(!n)return;let r,s=lc.get(t);s?r=s:(r=new Map,lc.set(t,r));let i=Object.keys(n).reduce((o,a)=>{let c,u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){let f=c[l];if(f.filename){o[f.filename]=n[a];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function rf(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function sf(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function of(e,t,n){if(!e)return null;let r=d(d(d(d(d({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>d(d({},s),s.data&&{data:we(s.data,t,n)}))}),e.user&&{user:we(e.user,t,n)}),e.contexts&&{contexts:we(e.contexts,t,n)}),e.extra&&{extra:we(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=we(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{let i=P(s).data;return i&&(s.data=we(i,t,n)),s})),r}function af(e,t){if(!t)return e;let n=e?e.clone():new st;return n.update(t),n}function dc(e){if(e)return cf(e)?{captureContext:e}:lf(e)?{captureContext:e}:e}function cf(e){return e instanceof st||typeof e=="function"}var uf=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function lf(e){return Object.keys(e).some(t=>uf.includes(t))}function St(e,t){return j().captureException(e,dc(t))}function pc(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return j().captureMessage(e,n,r)}function ur(e,t){return j().captureEvent(e,t)}function He(e,t){j().addBreadcrumb(e,t)}function _n(e,t){j().setContext(e,t)}function mc(e){j().setUser(e)}function lr(...e){let t=j();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function k(){return j().getClient()}function Q(){return j().getScope()}function dr(e){let t=k(),n=Se(),r=Q(),{release:s,environment:i=bt}=t&&t.getOptions()||{},{userAgent:o}=R.navigator||{},a=us(d(d({release:s,environment:i,user:r.getUser()||n.getUser()},o&&{userAgent:o}),e)),c=n.getSession();return c&&c.status==="ok"&&Ke(c,{status:"exited"}),fs(),n.setSession(a),r.setSession(a),a}function fs(){let e=Se(),t=Q(),n=t.getSession()||e.getSession();n&&ls(n),hc(),e.setSession(),t.setSession()}function hc(){let e=Se(),t=Q(),n=k(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function fr(e=!1){if(e){fs();return}hc()}function Xt(e){return e.transaction}function xt(e,t,n){let r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=q({environment:r.environment||bt,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function Ue(e){let t=k();if(!t)return{};let n=xt(P(e).trace_id||"",t,Q()),r=Xt(e);if(!r)return n;let s=r&&r._frozenDynamicSamplingContext;if(s)return s;let{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);let a=P(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(gn(r)),t.emit&&t.emit("createDsc",n),n}function ds(e,t){let{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;df(e,t),r&&mf(e,r),hf(e,n),ff(e,s),pf(e,i)}function Gi(e,t){let{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:f,propagationContext:p,transactionName:m,span:g}=t;pr(e,"extra",n),pr(e,"tags",r),pr(e,"user",s),pr(e,"contexts",i),pr(e,"sdkProcessingMetadata",a),o&&(e.level=o),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext=d(d({},e.propagationContext),p)}function pr(e,t,n){if(n&&Object.keys(n).length){e[t]=d({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function df(e,t){let{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,c=q(n);c&&Object.keys(c).length&&(e.extra=d(d({},c),e.extra));let u=q(r);u&&Object.keys(u).length&&(e.tags=d(d({},u),e.tags));let l=q(s);l&&Object.keys(l).length&&(e.user=d(d({},l),e.user));let f=q(i);f&&Object.keys(f).length&&(e.contexts=d(d({},f),e.contexts)),o&&(e.level=o),a&&(e.transaction=a)}function ff(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function pf(e,t){e.sdkProcessingMetadata=d(d({},e.sdkProcessingMetadata),t)}function mf(e,t){e.contexts=d({trace:Jt(t)},e.contexts);let n=Xt(t);if(n){e.sdkProcessingMetadata=d({dynamicSamplingContext:Ue(t)},e.sdkProcessingMetadata);let r=P(n).description;r&&(e.tags=d({transaction:r},e.tags))}}function hf(e,t){e.fingerprint=e.fingerprint?Vn(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var gf=100,ji,st=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=_c()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags=d({},this._tags),t._extra=d({},this._extra),t._contexts=d({},this._contexts),t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=d({},this._sdkProcessingMetadata),t._propagationContext=d({},this._propagationContext),t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Ke(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=d(d({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=E(d({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=d(d({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=E(d({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t;if(n instanceof e){let r=n.getScopeData();this._tags=d(d({},this._tags),r.tags),this._extra=d(d({},this._extra),r.extra),this._contexts=d(d({},this._contexts),r.contexts),r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(ze(n)){let r=t;this._tags=d(d({},this._tags),r.tags),this._extra=d(d({},this._extra),r.extra),this._contexts=d(d({},this._contexts),r.contexts),r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return 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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=_c(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:gf;if(r<=0)return this;let s=d({timestamp:rt()},t),i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:f,_transactionName:p,_span:m}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:f,transactionName:p,span:m}}applyToEvent(t,n={},r=[]){ds(t,this.getScopeData());let s=[...r,...ar(),...this._eventProcessors];return hn(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=d(d({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:U();if(!this._client)return h.warn("No client configured on scope - will not capture exception!"),r;let s=new Error("Sentry syntheticException");return this._client.captureException(t,E(d({originalException:t,syntheticException:s},n),{event_id:r}),this),r}captureMessage(t,n,r){let s=r&&r.event_id?r.event_id:U();if(!this._client)return h.warn("No client configured on scope - will not capture message!"),s;let i=new Error(t);return this._client.captureMessage(t,n,E(d({originalException:t,syntheticException:i},r),{event_id:s}),this),s}captureEvent(t,n){let r=n&&n.event_id?n.event_id:U();return this._client?(this._client.captureEvent(t,E(d({},n),{event_id:r}),this),r):(h.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function fc(){return ji||(ji=new st),ji}function _c(){return{traceId:U(),spanId:U().substring(16)}}var Sn="7.110.0";var Sc=parseFloat(Sn),_f=100,yn=class{constructor(t,n,r,s=Sc){this._version=s;let i;n?i=n:(i=new st,i.setClient(t));let o;r?o=r:(o=new st,o.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){let n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){let n=this.pushScope(),r;try{r=t(n)}catch(s){throw this.popScope(),s}return et(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:U(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,E(d({originalException:t,syntheticException:s},n),{event_id:r})),r}captureMessage(t,n,r){let s=this._lastEventId=r&&r.event_id?r.event_id:U(),i=new Error(t);return this.getScope().captureMessage(t,n,E(d({originalException:t,syntheticException:i},r),{event_id:s})),s}captureEvent(t,n){let r=n&&n.event_id?n.event_id:U();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,E(d({},n),{event_id:r})),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:s}=this.getStackTop();if(!s)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=_f}=s.getOptions&&s.getOptions()||{};if(o<=0)return;let a=rt(),c=d({timestamp:a},t),u=i?Le(()=>i(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){let n=ps(this);try{t(this)}finally{ps(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return T&&h.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){let r=this._callExtensionMethod("startTransaction",t,n);return T&&!r&&(this.getClient()?h.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`):h.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let n=this.getStackTop().scope,r=n.getSession();r&&ls(r),this._sendSessionUpdate(),n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=bt}=r&&r.getOptions()||{},{userAgent:o}=R.navigator||{},a=us(d(d({release:s,environment:i,user:n.getUser()},o&&{userAgent:o}),t)),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&Ke(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){let s=Zt().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);T&&h.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Zt(){return R.__SENTRY__=R.__SENTRY__||{extensions:{},hub:void 0},R}function ps(e){let t=Zt(),n=mr(t);return Wi(t,e),n}function j(){let e=Zt();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Sf(e)}function Se(){return j().getIsolationScope()}function Sf(e=Zt()){return(!yf(e)||mr(e).isOlderThan(Sc))&&Wi(e,new yn),mr(e)}function yf(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function mr(e){return zn("hub",()=>new yn,e)}function Wi(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function ke(e){return(e||j()).getScope().getTransaction()}var yc=!1;function Ec(){yc||(yc=!0,Zn(zi),Qn(zi))}function zi(){let e=ke();if(e){let t="internal_error";T&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}zi.tag="sentry_tracingErrorCallback";var qi;(function(e){let t="ok";e.Ok=t;let n="deadline_exceeded";e.DeadlineExceeded=n;let r="unauthenticated";e.Unauthenticated=r;let s="permission_denied";e.PermissionDenied=s;let i="not_found";e.NotFound=i;let o="resource_exhausted";e.ResourceExhausted=o;let a="invalid_argument";e.InvalidArgument=a;let c="unimplemented";e.Unimplemented=c;let u="unavailable";e.Unavailable=u;let l="internal_error";e.InternalError=l;let f="unknown_error";e.UnknownError=f;let p="cancelled";e.Cancelled=p;let m="already_exists";e.AlreadyExists=m;let g="failed_precondition";e.FailedPrecondition=g;let _="aborted";e.Aborted=_;let y="out_of_range";e.OutOfRange=y;let S="data_loss";e.DataLoss=S})(qi||(qi={}));function Yi(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function Rt(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let n=Yi(t);n!=="unknown_error"&&e.setStatus(n)}function $e(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=k(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function wt(e){if(!$e())return;let t=Tf(e),n=j(),r=e.scope?e.scope.getSpan():kt();if(e.onlyIfParent&&!r)return;let o=(e.scope||Q()).clone();return Ef(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function kt(){return Q().getSpan()}function Ef(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!$e())return;let i=Se(),o;if(t&&!r)o=t.startChild(n);else if(t){let a=Ue(t),{traceId:c,spanId:u}=t.spanContext(),l=gn(t);o=e.startTransaction(E(d({traceId:c,parentSpanId:u,parentSampled:l},n),{metadata:d({dynamicSamplingContext:a},n.metadata)}))}else{let{traceId:a,dsc:c,parentSpanId:u,sampled:l}=d(d({},i.getPropagationContext()),s.getPropagationContext());o=e.startTransaction(E(d({traceId:a,parentSpanId:u,parentSampled:l},n),{metadata:d({dynamicSamplingContext:c},n.metadata)}))}return s.setSpan(o),If(o,s,i),o}function Tf(e){if(e.startTime){let t=d({},e);return t.startTimestamp=vt(e.startTime),delete t.startTime,t}return e}var Tc="_sentryScope",Ic="_sentryIsolationScope";function If(e,t,n){e&&(Pe(e,Ic,n),Pe(e,Tc,t))}function bc(e){return{scope:e[Tc],isolationScope:e[Ic]}}var vc;function bf(e){return vc?vc.get(e):void 0}function ms(e){let t=bf(e);if(!t)return;let n={};for(let[,[r,s]]of t)n[r]||(n[r]=[]),n[r].push(q(s));return n}var ce="sentry.source",it="sentry.sample_rate",Qt="sentry.op",Ne="sentry.origin",Ki="profile_id";var En=class{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}},en=class e{constructor(t={}){this._traceId=t.traceId||U(),this._spanId=t.spanId||U().substring(16),this._startTime=t.startTimestamp||Be(),this.tags=t.tags?d({},t.tags):{},this.data=t.data?d({},t.data):{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes(d({[Ne]:t.origin||"manual",[Qt]:t.op},t.attributes)),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?d({},t.measurements):{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Qt]}set op(t){this.setAttribute(Qt,t)}get origin(){return this._attributes[Ne]}set origin(t){this.setAttribute(Ne,t)}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?$i:uc}}startChild(t){let n=new e(E(d({},t),{parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId}));n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=Xt(this);if(n.transaction=r,T&&r){let s=t&&t.op||"< unknown op >",i=P(n).description||"< unknown name >",o=r.spanContext().spanId,a=`[Tracing] Starting '${s}' span on transaction '${i}' (${o}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags=E(d({},this.tags),{[t]:n}),this}setData(t,n){return this.data=E(d({},this.data),{[t]:n}),this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Rt(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;let n=Xt(this);if(T&&n&&n.spanContext().spanId!==this._spanId){let r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=vt(t)}toTraceparent(){return _t(this)}toContext(){return q({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return Jt(this)}getSpanJSON(){return q({data:this._getData(),description:this._name,op:this._attributes[Qt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ne],_metrics_summary:ms(this),profile_id:this._attributes[Ki],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?d(d({},t),n):r?t:n}};var Tn=class extends en{constructor(t,n){super(t),this._contexts={},this._hub=n||j(),this._name=t.name||"",this._metadata=d({},t.metadata),this._trimEnd=t.trimEnd,this.transaction=this;let r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext=d({},r))}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return d(d(d({source:"custom",spanMetadata:{}},this._metadata),this._attributes[ce]&&{source:this._attributes[ce]}),this._attributes[it]&&{sampleRate:this._attributes[it]})}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(ce,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new En(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata=d(d({},this._metadata),t)}end(t){let n=vt(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){let t=super.toContext();return q(E(d({},t),{name:this._name,trimEnd:this._trimEnd}))}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Ue(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(T&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);let n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){T&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&P(l).timestamp):[];if(this._trimEnd&&r.length>0){let l=r.map(f=>P(f).timestamp).filter(Boolean);this._endTime=l.reduce((f,p)=>f>p?f:p)}let{scope:s,isolationScope:i}=bc(this),{metadata:o}=this,{source:a}=o,c=d({contexts:E(d({},this._contexts),{trace:Jt(this)}),spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:d(E(d({},o),{capturedSpanScope:s,capturedSpanIsolationScope:i}),q({dynamicSamplingContext:Ue(this)})),_metrics_summary:ms(this)},a&&{transaction_info:{source:a}});return Object.keys(this._measurements).length>0&&(T&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),T&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}};var bn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},vf="finishReason",In=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Vi=class extends En{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){let n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),P(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}},hr=class extends Tn{constructor(t,n,r=bn.idleTimeout,s=bn.finalTimeout,i=bn.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=In[4],this._autoFinishAllowed=!a,o&&(T&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=In[3],this.end())},this._finalTimeout)}end(t){let n=vt(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(vf,this._finishReason),this.spanRecorder){T&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;P(r).timestamp||(r.setStatus("cancelled"),r.end(n),T&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let{start_timestamp:s,timestamp:i}=P(r),o=s&&s<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<a;if(T){let u=JSON.stringify(r,void 0,2);o?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return o&&c}),T&&h.log("[Tracing] flushing IdleTransaction")}else T&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){let n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Vi(n,r,this.spanContext().spanId,t),T&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=In[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(T&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=In[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),T&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,T&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(T&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],T&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let n=Be();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=In[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(T&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=In[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){T&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function Ji(e,t,n){if(!$e(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(it,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(it,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(it,Number(r))):(r=1,e.setAttribute(it,r)),hs(r)?r?(e.sampled=Math.random()<r,e.sampled?(T&&h.log(`[Tracing] starting ${e.op} transaction - ${P(e).description}`),e):(T&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(T&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(T&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function hs(e){return Gn(e)||!(typeof e=="number"||typeof e=="boolean")?(T&&h.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)}.`),!1):e<0||e>1?(T&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function xf(){let t=this.getScope().getSpan();return t?{"sentry-trace":_t(t)}:{}}function Rf(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(T&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),e.sampled=!1);let o=new Tn(e,this);return o=Ji(o,r,d({name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:d(d({},e.data),e.attributes)},t)),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function gs(e,t,n,r,s,i,o,a=!1){let c=e.getClient(),u=c&&c.getOptions()||{},l=new hr(t,e,n,r,o,s,a);return l=Ji(l,u,d({name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:d(d({},t.data),t.attributes)},i)),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function _s(){let e=Zt();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=Rf),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=xf),Ec())}function Ss(e,t,n){let r=ke();r&&r.setMeasurement(e,t,n)}function wf(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 xc(e,t,n,r){let s=mn(n),i=d(d({sent_at:new Date().toISOString()},s&&{sdk:s}),!!r&&t&&{dsn:_e(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ge(i,[o])}function Rc(e,t,n,r){let s=mn(n),i=e.type&&e.type!=="replay_event"?e.type:"event";wf(e,n&&n.sdk);let o=rr(e,s,r,t);return delete e.sdkProcessingMetadata,ge(o,[[{type:i},e]])}var kf="7";function wc(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Cf(e){return`${wc(e)}${e.projectId}/envelope/`}function Af(e,t){return hi(d({sentry_key:e.publicKey,sentry_version:kf},t&&{sentry_client:`${t.name}/${t.version}`}))}function Xi(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Cf(e)}?${Af(e,r)}`}function Zi(e,t){let n=Kn(e);if(!n)return"";let r=`${wc(n)}embed/error-page/`,s=`dsn=${_e(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let o=t.user;if(!o)continue;o.name&&(s+=`&name=${encodeURIComponent(o.name)}`),o.email&&(s+=`&email=${encodeURIComponent(o.email)}`)}else s+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${s}`}var kc=[];function Of(e){let t={};return e.forEach(n=>{let{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function Qi(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Vn(n(t)):r=t;let s=Of(r),i=Mf(s,o=>o.name==="Debug");if(i!==-1){let[o]=s.splice(i,1);s.push(o)}return s}function Cc(e,t){let n={};return t.forEach(r=>{r&&to(e,r,n)}),n}function eo(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function to(e,t,n){if(n[t.name]){T&&h.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,kc.indexOf(t.name)===-1&&(t.setupOnce(Ui,j),kc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}T&&h.log(`Integration installed: ${t.name}`)}function Mf(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function ue(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}function Ac(e){let t="";for(let n of e){let r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
`}return t}function Oc(e,t,n,r){let s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=_e(t));let i=Nf(e);return ge(s,[i])}function Nf(e){let t=Ac(e);return[{type:"statsd",length:t.length},t]}var Mc="Not capturing exception because it's already been captured.",gr=class{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Kn(t.dsn):T&&h.warn("No DSN provided, client will not send events."),this._dsn){let n=Xi(this._dsn,t);this._transport=t.transport(E(d({recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:n}))}}captureException(t,n,r){if(Zr(t)){T&&h.log(Mc);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id,o=cn(t)?t:String(t),a=$t(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(t,n,r){if(n&&n.originalException&&Zr(n.originalException)){T&&h.log(Mc);return}let s=n&&n.event_id,o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?T&&h.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ke(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Ye(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return T&&h.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){let n=this._integrations[t.name];to(this,t,this._integrations),n||eo(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Rc(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of n.attachments||[])r=Di(r,Pi(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let n=xc(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){let s=`${t}:${n}`;T&&h.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(t){T&&h.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);let n=Oc(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Cc(this,t),eo(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1,i=n.exception&&n.exception.values;if(i){s=!0;for(let c of i){let u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Ke(t,E(d({},r&&{status:"crashed"}),{errors:t.errors||Number(s||r)})),this.captureSession(t))}_isClientDoneProcessing(t){return new Me(n=>{let r=0,s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Se()){let i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),cr(i,t,n,r,this,s).then(a=>{if(a===null)return a;let c=d(d({},s.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&c){let{traceId:l,spanId:f,parentSpanId:p,dsc:m}=c;a.contexts=d({trace:{trace_id:l,span_id:f,parent_span_id:p}},a.contexts);let g=m||xt(l,this,r);a.sdkProcessingMetadata=d({dynamicSamplingContext:g},a.sdkProcessingMetadata)}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(T){let i=s;i.logLevel==="log"?h.log(i.message):h.warn(i)}})}_processEvent(t,n,r){let s=this.getOptions(),{sampleRate:i}=s,o=Dc(t),a=Nc(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Yt(new he(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let l=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l,t),new he("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return m;let _=Lf(s,m,n);return Df(_,u)}).then(m=>{if(m===null)throw this.recordDroppedEvent("before_send",l,t),new he(`${u} returned \`null\`, will not send event.`,"log");let g=r&&r.getSession();!o&&g&&this._updateSessionFromEvent(g,m);let _=m.transaction_info;if(o&&_&&m.transaction!==t.transaction){let y="custom";m.transaction_info=E(d({},_),{source:y})}return this.sendEvent(m,n),m}).then(null,m=>{throw m instanceof he?m:(this.captureException(m,{data:{__sentry__:!0},originalException:m}),new he(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${m}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{T&&h.error("Error while sending event:",n)});T&&h.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}};function Df(e,t){let n=`${t} must return \`null\` or a valid event.`;if(et(e))return e.then(r=>{if(!ze(r)&&r!==null)throw new he(n);return r},r=>{throw new he(`${t} rejected with ${r}`)});if(!ze(e)&&e!==null)throw new he(n);return e}function Lf(e,t,n){let{beforeSend:r,beforeSendTransaction:s}=e;return Nc(t)&&r?r(t,n):Dc(t)&&s?s(t,n):t}function Nc(e){return e.type===void 0}function Dc(e){return e.type==="transaction"}function ys(e){let t=k();!t||!t.addEventProcessor||t.addEventProcessor(e)}function no(e,t){t.debug===!0&&(T?h.enable():Le(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Q().update(t.initialScope);let r=new e(t);ro(r),Pf(r)}function ro(e){let n=j().getStackTop();n.client=e,n.scope.setClient(e)}function Pf(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}var Ff=30;function vn(e,t,n=wi(e.bufferSize||Ff)){let r={},s=o=>n.drain(o);function i(o){let a=[];if(as(o,(f,p)=>{let m=cs(p);if(sr(r,m)){let g=Lc(f,p);e.recordDroppedEvent("ratelimit_backoff",m,g)}else a.push(f)}),a.length===0)return Ye();let c=ge(o[0],a),u=f=>{as(c,(p,m)=>{let g=Lc(p,m);e.recordDroppedEvent(f,cs(m),g)})},l=()=>t({body:Li(c,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&T&&h.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=ir(r,f),f),f=>{throw u("network_error"),f});return n.add(l).then(f=>f,f=>{if(f instanceof he)return T&&h.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ye();throw f})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function Lc(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function so(e,t){let n={sent_at:new Date().toISOString()};t&&(n.dsn=_e(t));let r=e.map(Bf);return ge(n,r)}function Bf(e){return[{type:"span"},e]}function io(e,t){let n=t&&$f(t)?t.getClient():t,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return Uf(e,r)||Hf(e,s)}function Hf(e,t){return t?Pc(e)===Pc(t):!1}function Uf(e,t){return t?e.includes(t.host):!1}function Pc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function $f(e){return e.getClient!==void 0}function _r(e,t,n=[t],r="npm"){let s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Sn})),version:Sn}),e._metadata=s}var Gf=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],jf=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Fc="InboundFilters",Wf=(e={})=>({name:Fc,setupOnce(){},processEvent(t,n,r){let s=r.getOptions(),i=zf(e,s);return qf(t,i)?null:t}}),Sr=Wf,Ts=ue(Fc,Sr);function zf(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Gf],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:jf],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function qf(e,t){return t.ignoreInternal&&Zf(e)?(T&&h.warn(`Event dropped due to being internal Sentry Error.
Event: ${qe(e)}`),!0):Yf(e,t.ignoreErrors)?(T&&h.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${qe(e)}`),!0):Kf(e,t.ignoreTransactions)?(T&&h.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${qe(e)}`),!0):Vf(e,t.denyUrls)?(T&&h.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${qe(e)}.
Url: ${Es(e)}`),!0):Jf(e,t.allowUrls)?!1:(T&&h.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${qe(e)}.
Url: ${Es(e)}`),!0)}function Yf(e,t){return e.type||!t||!t.length?!1:Xf(e).some(n=>nt(n,t))}function Kf(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?nt(n,t):!1}function Vf(e,t){if(!t||!t.length)return!1;let n=Es(e);return n?nt(n,t):!1}function Jf(e,t){if(!t||!t.length)return!0;let n=Es(e);return n?nt(n,t):!0}function Xf(e){let t=[];e.message&&t.push(e.message);let n;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&&t.length===0&&h.error(`Could not extract message for event ${qe(e)}`),t}function Zf(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Qf(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Es(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Qf(t):null}catch{return T&&h.error(`Cannot extract url for event ${qe(e)}`),null}}var Bc,Uc="FunctionToString",Hc=new WeakMap,ep=()=>({name:Uc,setupOnce(){Bc=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Wt(this),n=Hc.has(k())&&t!==void 0?t:this;return Bc.apply(n,e)}}catch{}},setup(e){Hc.set(e,!0)}}),yr=ep,Is=ue(Uc,yr);var tp="cause",np=5,$c="LinkedErrors",rp=(e={})=>{let t=e.limit||np,n=e.key||tp;return{name:$c,setupOnce(){},preprocessEvent(r,s,i){let o=i.getOptions();Wn(Bi,o.stackParser,o.maxValueLength,n,t,r,s)}}},sp=rp,Gc=ue($c,sp);var oo={};Ia(oo,{FunctionToString:()=>Is,InboundFilters:()=>Ts,LinkedErrors:()=>Gc});var jc=oo;var W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var C=R;function Wc(){C&&C.document?C.document.addEventListener("visibilitychange",()=>{let e=ke();if(C.document.hidden&&e){let t="cancelled",{op:n,status:r}=P(e);W&&h.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):W&&h.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var ot=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}};var zc=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var vp=()=>{let e=C.performance.timing,t=C.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Ct=()=>C.__WEB_VITALS_POLYFILL__?C.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||vp()):C.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var xn=()=>{let e=Ct();return e&&e.activationStart||0};var at=(e,t)=>{let n=Ct(),r="navigate";return n&&(C.document.prerendering||xn()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:zc(),navigationType:r}};var Ge=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}};var ct=(e,t)=>{let n=r=>{(r.type==="pagehide"||C.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};var qc=e=>{let t=at("CLS",0),n,r=0,s=[],i=a=>{a.forEach(c=>{if(!c.hadRecentInput){let u=s[0],l=s[s.length-1];r&&s.length!==0&&c.startTime-l.startTime<1e3&&c.startTime-u.startTime<5e3?(r+=c.value,s.push(c)):(r=c.value,s=[c]),r>t.value&&(t.value=r,t.entries=s,n&&n())}})},o=Ge("layout-shift",i);if(o){n=ot(e,t);let a=()=>{i(o.takeRecords()),n(!0)};return ct(a),a}};var bs=-1,xp=()=>C.document.visibilityState==="hidden"&&!C.document.prerendering?0:1/0,Rp=()=>{ct(({timeStamp:e})=>{bs=e},!0)},Rn=()=>(bs<0&&(bs=xp(),Rp()),{get firstHiddenTime(){return bs}});var Yc=e=>{let t=Rn(),n=at("FID"),r,s=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(s)},o=Ge("first-input",i);r=ot(e,n),o&&ct(()=>{i(o.takeRecords()),o.disconnect()},!0)};var Kc=0,ao=1/0,vs=0,wp=e=>{e.forEach(t=>{t.interactionId&&(ao=Math.min(ao,t.interactionId),vs=Math.max(vs,t.interactionId),Kc=vs?(vs-ao)/7+1:0)})},co,Vc=()=>co?Kc:performance.interactionCount||0,Jc=()=>{"interactionCount"in performance||co||(co=Ge("event",wp,{type:"event",buffered:!0,durationThreshold:0}))};var Qc=()=>Vc(),Xc=10,Et=[],uo={},Zc=e=>{let t=Et[Et.length-1],n=uo[e.interactionId];if(n||Et.length<Xc||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let r={id:e.interactionId,latency:e.duration,entries:[e]};uo[r.id]=r,Et.push(r)}Et.sort((r,s)=>s.latency-r.latency),Et.splice(Xc).forEach(r=>{delete uo[r.id]})}},kp=()=>{let e=Math.min(Et.length-1,Math.floor(Qc()/50));return Et[e]},eu=(e,t)=>{t=t||{},Jc();let n=at("INP"),r,s=o=>{o.forEach(c=>{c.interactionId&&Zc(c),c.entryType==="first-input"&&!Et.some(l=>l.entries.some(f=>c.duration===f.duration&&c.startTime===f.startTime))&&Zc(c)});let a=kp();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Ge("event",s,{durationThreshold:t.durationThreshold||40});r=ot(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),ct(()=>{s(i.takeRecords()),n.value<0&&Qc()>0&&(n.value=0,n.entries=[]),r(!0)}))};var tu={},nu=e=>{let t=Rn(),n=at("LCP"),r,s=o=>{let a=o[o.length-1];if(a){let c=Math.max(a.startTime-xn(),0);c<t.firstHiddenTime&&(n.value=c,n.entries=[a],r())}},i=Ge("largest-contentful-paint",s);if(i){r=ot(e,n);let o=()=>{tu[n.id]||(s(i.takeRecords()),i.disconnect(),tu[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,o,{once:!0,capture:!0})}),ct(o,!0),o}};var lo=e=>{C.document&&(C.document.prerendering?addEventListener("prerenderingchange",()=>lo(e),!0):C.document.readyState!=="complete"?addEventListener("load",()=>lo(e),!0):setTimeout(e,0))},ru=(e,t)=>{t=t||{};let n=at("TTFB"),r=ot(e,n,t.reportAllChanges);lo(()=>{let s=Ct();if(s){if(n.value=Math.max(s.responseStart-xn(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})};var Er={},xs={},su,iu,ou,au,cu;function fo(e,t=!1){return Ir("cls",e,Cp,su,t)}function Tr(e,t=!1){return Ir("lcp",e,Op,ou,t)}function uu(e){return Ir("ttfb",e,Mp,au)}function po(e){return Ir("fid",e,Ap,iu)}function lu(e){return Ir("inp",e,Np,cu)}function Ve(e,t){return du(e,t),xs[e]||(Dp(e),xs[e]=!0),fu(e,t)}function wn(e,t){let n=Er[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(s){W&&h.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${ve(r)}
Error:`,s)}}function Cp(){return qc(e=>{wn("cls",{metric:e}),su=e})}function Ap(){return Yc(e=>{wn("fid",{metric:e}),iu=e})}function Op(){return nu(e=>{wn("lcp",{metric:e}),ou=e})}function Mp(){return ru(e=>{wn("ttfb",{metric:e}),au=e})}function Np(){return eu(e=>{wn("inp",{metric:e}),cu=e})}function Ir(e,t,n,r,s=!1){du(e,t);let i;return xs[e]||(i=n(),xs[e]=!0),r&&t({metric:r}),fu(e,t,s?i:void 0)}function Dp(e){let t={};e==="event"&&(t.durationThreshold=0),Ge(e,n=>{wn(e,{entries:n})},t)}function du(e,t){Er[e]=Er[e]||[],Er[e].push(t)}function fu(e,t,n){return()=>{n&&n();let r=Er[e];if(!r)return;let s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Rs(e){return typeof e=="number"&&isFinite(e)}function tn(e,r){var s=r,{startTimestamp:t}=s,n=Ta(s,["startTimestamp"]);return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild(d({startTimestamp:t},n))}var Lp=2147483647;function le(e){return e/1e3}function ho(){return C&&C.addEventListener&&C.performance}var pu=0,ne={},ut,br;function hu(){let e=ho();if(e&&fe){e.mark&&C.performance.mark("sentry-tracing-init");let t=Bp(),n=Pp(),r=Fp(),s=Hp();return()=>{t(),n(),r(),s()}}return()=>{}}function gu(){Ve("longtask",({entries:e})=>{for(let t of e){let n=ke();if(!n)return;let r=le(fe+t.startTime),s=le(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function _u(){Ve("event",({entries:e})=>{for(let t of e){let n=ke();if(!n)return;if(t.name==="click"){let r=le(fe+t.startTime),s=le(t.duration),i={description:Oe(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=qn(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function Su(e,t){if(ho()&&fe){let r=Up(e,t);return()=>{r()}}return()=>{}}function Pp(){return fo(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(W&&h.log("[Measurements] Adding CLS"),ne.cls={value:e.value,unit:""},br=t)},!0)}function Fp(){return Tr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(W&&h.log("[Measurements] Adding LCP"),ne.lcp={value:e.value,unit:"millisecond"},ut=t)},!0)}function Bp(){return po(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=le(fe),r=le(t.startTime);W&&h.log("[Measurements] Adding FID"),ne.fid={value:e.value,unit:"millisecond"},ne["mark.fid"]={value:n+r,unit:"second"}})}function Hp(){return uu(({metric:e})=>{e.entries[e.entries.length-1]&&(W&&h.log("[Measurements] Adding TTFB"),ne.ttfb={value:e.value,unit:"millisecond"})})}var mu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Up(e,t){return lu(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(x=>x.duration===n.value&&mu[x.name]!==void 0),s=k();if(!r||!s)return;let i=mu[r.name],o=s.getOptions(),a=le(fe+r.startTime),c=le(n.value),u=r.interactionId!==void 0?e[r.interactionId]:void 0;if(u===void 0)return;let{routeName:l,parentContext:f,activeTransaction:p,user:m,replayId:g}=u,_=m!==void 0?m.email||m.id||m.ip_address:void 0,y=p!==void 0?p.getProfileId():void 0,S=new en({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:Oe(r.target),attributes:d(d(d({release:o.release,environment:o.environment,transaction:l},_!==void 0&&_!==""?{user:_}:{}),y!==void 0?{profile_id:y}:{}),g!==void 0?{replay_id:g}:{}),exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),b=Kp(f,o,t);if(b&&Math.random()<b){let x=S?so([S],s.getDsn()):void 0,O=s&&s.getTransport();O&&x&&O.send(x).then(null,$=>{W&&h.error("Error while sending interaction:",$)});return}})}function yu(e){let t=ho();if(!t||!C.performance.getEntries||!fe)return;W&&h.log("[Tracing] Adding & adjusting spans using Performance API");let n=le(fe),r=t.getEntries(),{op:s,start_timestamp:i}=P(e);if(r.slice(pu).forEach(o=>{let a=le(o.startTime),c=le(o.duration);if(!(e.op==="navigation"&&i&&n+a<i))switch(o.entryType){case"navigation":{Gp(e,o,n);break}case"mark":case"paint":case"measure":{$p(e,o,a,c,n);let u=Rn(),l=o.startTime<u.firstHiddenTime;o.name==="first-paint"&&l&&(W&&h.log("[Measurements] Adding FP"),ne.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&l&&(W&&h.log("[Measurements] Adding FCP"),ne.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{Wp(e,o,o.name,a,c,n);break}}}),pu=Math.max(r.length-1,0),zp(e),s==="pageload"){Yp(ne),["fcp","fp","lcp"].forEach(a=>{if(!ne[a]||!i||n>=i)return;let c=ne[a].value,u=n+le(c),l=Math.abs((u-i)*1e3),f=l-c;W&&h.log(`[Measurements] Normalized ${a} from ${c} to ${l} (${f})`),ne[a].value=l});let o=ne["mark.fid"];o&&ne.fid&&(tn(e,{description:"first input delay",endTimestamp:o.value+le(ne.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete ne["mark.fid"]),"fcp"in ne||delete ne.cls,Object.keys(ne).forEach(a=>{Ss(a,ne[a].value,ne[a].unit)}),qp(e)}ut=void 0,br=void 0,ne={}}function $p(e,t,n,r,s){let i=s+n,o=i+r;return tn(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function Gp(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ws(e,t,r,n)}),ws(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),ws(e,t,"fetch",n,"cache","domainLookupStart"),ws(e,t,"domainLookup",n,"DNS"),jp(e,t,n)}function ws(e,t,n,r,s,i){let o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||tn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+le(a),endTimestamp:r+le(o)})}function jp(e,t,n){t.responseEnd&&(tn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+le(t.requestStart),endTimestamp:n+le(t.responseEnd)}),tn(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+le(t.responseStart),endTimestamp:n+le(t.responseEnd)}))}function Wp(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let o=Kt(n),a={};mo(a,t,"transferSize","http.response_transfer_size"),mo(a,t,"encodedBodySize","http.response_content_length"),mo(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(C.location.origin);let c=i+r,u=c+s;tn(e,{description:n.replace(C.location.origin,""),endTimestamp:u,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}function zp(e){let t=C.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Rs(n.rtt)&&(ne["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Rs(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Rs(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function qp(e){ut&&(W&&h.log("[Measurements] Adding LCP Data"),ut.element&&e.setTag("lcp.element",Oe(ut.element)),ut.id&&e.setTag("lcp.id",ut.id),ut.url&&e.setTag("lcp.url",ut.url.trim().slice(0,200)),e.setTag("lcp.size",ut.size)),br&&br.sources&&(W&&h.log("[Measurements] Adding CLS Data"),br.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Oe(t.node))))}function mo(e,t,n,r){let s=t[n];s!=null&&s<Lp&&(e[r]=s)}function Yp(e){let t=Ct();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(W&&h.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Kp(e,t,n){if(!$e(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:d(d({},e.data),e.attributes),location:C.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,hs(r)?r===!0?n:r===!1?0:r*n:(W&&h.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function Eu(e,t,n,r,s="auto.http.browser"){if(!$e()||!e.fetchData)return;let i=t(e.fetchData.url);if(e.endTimestamp&&i){let f=e.fetchData.__span;if(!f)return;let p=r[f];if(p){if(e.response){Rt(p,e.response.status);let m=e.response&&e.response.headers&&e.response.headers.get("content-length");if(m){let g=parseInt(m);g>0&&p.setAttribute("http.response_content_length",g)}}else e.error&&p.setStatus("internal_error");p.end(),delete r[f]}return}let o=Q(),a=k(),{method:c,url:u}=e.fetchData,l=i?wt({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,[Ne]:s},op:"http.client"}):void 0;if(l&&(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l),n(e.fetchData.url)&&a){let f=e.args[0];e.args[1]=e.args[1]||{};let p=e.args[1];p.headers=Vp(f,a,o,p,l)}return l}function Vp(e,t,n,r,s){let i=s||n.getSpan(),o=Se(),{traceId:a,spanId:c,sampled:u,dsc:l}=d(d({},o.getPropagationContext()),n.getPropagationContext()),f=i?_t(i):Vt(a,c,u),p=nr(l||(i?Ue(i):xt(a,t,n))),m=r.headers||(typeof Request<"u"&&Ae(e,Request)?e.headers:void 0);if(m)if(typeof Headers<"u"&&Ae(m,Headers)){let g=new Headers(m);return g.append("sentry-trace",f),p&&g.append(pn,p),g}else if(Array.isArray(m)){let g=[...m,["sentry-trace",f]];return p&&g.push([pn,p]),g}else{let g="baggage"in m?m.baggage:void 0,_=[];return Array.isArray(g)?_.push(...g):g&&_.push(g),p&&_.push(p),E(d({},m),{"sentry-trace":f,baggage:_.length>0?_.join(","):void 0})}else return{"sentry-trace":f,baggage:p}}var go=["localhost",/^\/(?!\/)/],vr={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:go,tracePropagationTargets:go};function _o(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}=d({traceFetch:vr.traceFetch,traceXHR:vr.traceXHR},e),a=typeof i=="function"?i:l=>!0,c=l=>Qp(l,r||s),u={};t&&zt(l=>{let f=Eu(l,a,c,u);o&&f&&Tu(f)}),n&&qt(l=>{let f=em(l,a,c,u);o&&f&&Tu(f)})}function Jp(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Tu(e){let{url:t}=P(e).data||{};if(!t||typeof t!="string")return;let n=Ve("resource",({entries:r})=>{r.forEach(s=>{Jp(s)&&s.name.endsWith(t)&&(Zp(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Xp(e){let t="unknown",n="unknown",r="";for(let s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function lt(e=0){return((fe||performance.timeOrigin)+e)/1e3}function Zp(e){let{name:t,version:n}=Xp(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),fe?[...r,["http.request.redirect_start",lt(e.redirectStart)],["http.request.fetch_start",lt(e.fetchStart)],["http.request.domain_lookup_start",lt(e.domainLookupStart)],["http.request.domain_lookup_end",lt(e.domainLookupEnd)],["http.request.connect_start",lt(e.connectStart)],["http.request.secure_connection_start",lt(e.secureConnectionStart)],["http.request.connection_end",lt(e.connectEnd)],["http.request.request_start",lt(e.requestStart)],["http.request.response_start",lt(e.responseStart)],["http.request.response_end",lt(e.responseEnd)]]:r}function Qp(e,t){return nt(e,t||go)}function em(e,t,n,r){let s=e.xhr,i=s&&s[Fe];if(!$e()||!s||s.__sentry_own_request__||!i)return;let o=t(i.url);if(e.endTimestamp&&o){let f=s.__sentry_xhr_span_id__;if(!f)return;let p=r[f];p&&i.status_code!==void 0&&(Rt(p,i.status_code),p.end(),delete r[f]);return}let a=Q(),c=Se(),u=o?wt({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,url:i.url,[Ne]:"auto.http.browser"},op:"http.client"}):void 0;u&&(s.__sentry_xhr_span_id__=u.spanContext().spanId,r[s.__sentry_xhr_span_id__]=u);let l=k();if(s.setRequestHeader&&n(i.url)&&l){let{traceId:f,spanId:p,sampled:m,dsc:g}=d(d({},c.getPropagationContext()),a.getPropagationContext()),_=u?_t(u):Vt(f,p,m),y=nr(g||(u?Ue(u):xt(f,l,a)));tm(s,_,y)}return u}function tm(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(pn,n)}catch{}}var nm="BrowserTracing",rm=d(E(d({},bn),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{}}),vr),ks=(e={})=>{let t=W?!!(e.tracePropagationTargets||e.tracingOrigins):!1;_s(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let n=d(d({},rm),e),r=hu(),s={};n.enableInp&&Su(s,n.interactionsSampleRate),n.enableLongTask&&gu(),n._experiments.enableInteractions&&_u();let i={name:void 0,context:void 0};function o(a){let c=j(),{beforeStartSpan:u,idleTimeout:l,finalTimeout:f,heartbeatInterval:p}=n,m=a.op==="pageload",g;if(m){let b=m?Iu("sentry-trace"):"",x=m?Iu("baggage"):void 0,{traceId:O,dsc:$,parentSpanId:w,sampled:I}=Mi(b,x);g=E(d({traceId:O,parentSpanId:w,parentSampled:I},a),{metadata:E(d({},a.metadata),{dynamicSamplingContext:$}),trimEnd:!0})}else g=d({trimEnd:!0},a);let _=u?u(g):g;_.metadata=_.name!==g.name?E(d({},_.metadata),{source:"custom"}):_.metadata,i.name=_.name,i.context=_,_.sampled===!1&&W&&h.log(`[Tracing] Will not send ${_.op} transaction because of beforeNavigate.`),W&&h.log(`[Tracing] Starting ${_.op} transaction on scope`);let{location:y}=C,S=gs(c,_,l,f,!0,{location:y},p,m);return m&&C.document&&(C.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(C.document.readyState)&&S.sendAutoFinishSignal()}),["interactive","complete"].includes(C.document.readyState)&&S.sendAutoFinishSignal()),S.registerBeforeFinishCallback(b=>{r(),yu(b)}),S}return{name:nm,setupOnce:()=>{},afterAllSetup(a){let c=a.getOptions(),{markBackgroundSpan:u,traceFetch:l,traceXHR:f,shouldCreateSpanForRequest:p,enableHTTPTimings:m,_experiments:g}=n,_=c&&c.tracePropagationTargets,y=_||n.tracePropagationTargets;W&&t&&_&&h.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let S,b=C.location&&C.location.href;if(a.on&&(a.on("startNavigationSpan",x=>{S&&(W&&h.log(`[Tracing] Finishing current transaction with op: ${P(S).op}`),S.end()),S=o(d({op:"navigation"},x))}),a.on("startPageLoadSpan",x=>{S&&(W&&h.log(`[Tracing] Finishing current transaction with op: ${P(S).op}`),S.end()),S=o(d({op:"pageload"},x))})),n.instrumentPageLoad&&a.emit&&C.location){let x={name:C.location.pathname,startTimestamp:fe?fe/1e3:void 0,origin:"auto.pageload.browser",attributes:{[ce]:"url"}};So(a,x)}n.instrumentNavigation&&a.emit&&C.location&&ht(({to:x,from:O})=>{if(O===void 0&&b&&b.indexOf(x)!==-1){b=void 0;return}if(O!==x){b=void 0;let $={name:C.location.pathname,origin:"auto.navigation.browser",attributes:{[ce]:"url"}};xr(a,$)}}),u&&Wc(),g.enableInteractions&&sm(n,i),n.enableInp&&om(s,i),_o({traceFetch:l,traceXHR:f,tracePropagationTargets:y,shouldCreateSpanForRequest:p,enableHTTPTimings:m})},options:n}};function So(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);let n=kt();return(n&&P(n).op)==="pageload"?n:void 0}function xr(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);let n=kt();return(n&&P(n).op)==="navigation"?n:void 0}function Iu(e){let t=pi(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function sm(e,t){let n,r=()=>{let{idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=e,a="ui.action.click",c=ke();if(c&&c.op&&["navigation","pageload"].includes(c.op)){W&&h.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name){W&&h.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let{location:u}=C,l={name:t.name,op:a,trimEnd:!0,data:{[ce]:t.context?am(t.context):"url"}};n=gs(j(),l,s,i,!0,{location:u},o)};["click"].forEach(s=>{addEventListener(s,r,{once:!1,capture:!0})})}function im(e){return"duration"in e}var bu=10;function om(e,t){let n=({entries:r})=>{let s=k(),i=s!==void 0&&s.getIntegrationByName!==void 0?s.getIntegrationByName("Replay"):void 0,o=i!==void 0?i.getReplayId():void 0,a=ke(),c=Q(),u=c!==void 0?c.getUser():void 0;r.forEach(l=>{if(im(l)){let f=l.interactionId;if(f===void 0)return;let p=e[f],m=l.duration,g=l.startTime,_=Object.keys(e),y=_.length>0?_.reduce((S,b)=>e[S].duration<e[b].duration?S:b):void 0;if(l.entryType==="first-input"&&_.map(b=>e[b]).some(b=>b.duration===m&&b.startTime===g)||!f)return;if(p)p.duration=Math.max(p.duration,m);else if(_.length<bu||y===void 0||m>e[y].duration){let S=t.name,b=t.context;S&&b&&(y&&Object.keys(e).length>=bu&&delete e[y],e[f]={routeName:S,duration:m,parentContext:b,user:u,activeTransaction:a,replayId:o,startTime:g})}}})};Ve("event",n),Ve("first-input",n)}function am(e){let t=e.attributes&&e.attributes[ce],n=e.data&&e.data[ce],r=e.metadata&&e.metadata.source;return t||n||r}var J=R,Wo="sentryReplaySession",cm="replay_event",zo="Unable to send Replay",um=3e5,lm=9e5,dm=5e3,fm=5500,pm=6e4,mm=5e3,hm=3,vu=15e4,Cs=5e3,gm=3e3,_m=300,qo=2e7,Sm=4999,ym=15e3,xu=36e5;function Em(e,t){return e??t()}function Ms(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var pe=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(pe||{});function Tm(e){return e.nodeType===e.ELEMENT_NODE}function wr(e){let t=Ms([e,"optionalAccess",n=>n.host]);return Ms([t,"optionalAccess",n=>n.shadowRoot])===e}function kr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Im(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function bm(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 Ns(e){try{let t=e.rules||e.cssRules;return t?Im(Array.from(t,zu).join("")):null}catch{return null}}function zu(e){let t;if(xm(e))try{t=Ns(e.styleSheet)||bm(e)}catch{}else if(Rm(e)&&e.selectorText.includes(":"))return vm(e.cssText);return t||e.cssText}function vm(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function xm(e){return"styleSheet"in e}function Rm(e){return"selectorText"in e}var Ds=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;let n=Ms([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return Em(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wm(){return new Ds}function qs({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ar({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Ln(e){return e.toLowerCase()}function bo(e){return e.toUpperCase()}var Ru="__rrweb_original__";function km(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){let i=t.getImageData,o=Ru in i?i[Ru]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function Yo(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ln(t):null}function Ls(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}var Cm=1,Am=new RegExp("[^a-z0-9-_:]"),Or=-2;function Ko(){return Cm++}function Om(e){if(e instanceof HTMLFormElement)return"form";let t=Ln(e.tagName);return Am.test(t)?"div":t}function Mm(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var kn,wu,Nm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Dm=/^(?:[a-z+]+:)?\/\//i,Lm=/^www\..*/i,Pm=/^(data:)([^,]*),(.*)/i;function Ps(e,t){return(e||"").replace(Nm,(n,r,s,i,o,a)=>{let c=s||o||a,u=r||i||"";if(!c)return n;if(Dm.test(c)||Lm.test(c))return`url(${u}${c}${u})`;if(Pm.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Mm(t)+c}${u})`;let l=t.split("/"),f=c.split("/");l.pop();for(let p of f)p!=="."&&(p===".."?l.pop():l.push(p));return`url(${u}${l.join("/")}${u})`})}var Fm=/^[^ \t\n\r\u000c]+/,Bm=/^[, \t\n\r\u000c]+/;function Hm(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o,a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}let s=[];for(;r(Bm),!(n>=t.length);){let i=r(Fm);if(i.slice(-1)===",")i=An(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=An(e,i);let a=!1;for(;;){let c=t.charAt(n);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,n+=1}}}return s.join(", ")}function An(e,t){if(!t||t.trim()==="")return t;let n=e.createElement("a");return n.href=t,n.href}function Um(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Vo(){let e=document.createElement("a");return e.href="",e.href}function qu(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?An(e,r):n==="srcset"?Hm(e,r):n==="style"?Ps(r,Vo()):t==="object"&&n==="data"?An(e,r):typeof i=="function"?i(n,r,s):r)}function Yu(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function $m(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){let i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function Gm(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function nn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:nn(e.parentNode,t,n,r+1)}function On(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Gm(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Pn(e,t,n,r,s,i){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){let u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=nn(o,On(r,s)),c<0)return!0;a=nn(o,On(t,n),c>=0?c:1/0)}else{if(a=nn(o,On(t,n)),a<0)return!1;c=nn(o,On(r,s),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function jm(e,t,n){let r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){let a=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()});return}let o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Wm(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;let i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function zm(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:g={},maskTextFn:_,maskInputFn:y,dataURLOptions:S={},inlineImages:b,recordCanvas:x,keepIframeSrcFn:O,newlyAddedElement:$=!1}=t,w=qm(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:pe.Document,childNodes:[],compatMode:e.compatMode}:{type:pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return Km(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:g,maskInputFn:y,dataURLOptions:S,inlineImages:b,recordCanvas:x,keepIframeSrcFn:O,newlyAddedElement:$,rootId:w,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p});case e.TEXT_NODE:return Ym(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskTextFn:_,maskInputOptions:g,maskInputFn:y,rootId:w});case e.CDATA_SECTION_NODE:return{type:pe.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:pe.Comment,textContent:e.textContent||"",rootId:w};default:return!1}}function qm(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Ym(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,f=e.parentNode&&e.parentNode.tagName,p=e.textContent,m=f==="STYLE"?!0:void 0,g=f==="SCRIPT"?!0:void 0,_=f==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||Ms([e,"access",S=>S.parentNode,"access",S=>S.sheet,"optionalAccess",S=>S.cssRules])&&(p=Ns(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}p=Ps(p,Vo())}g&&(p="SCRIPT_PLACEHOLDER");let y=Pn(e,r,i,s,o,n);if(!m&&!g&&!_&&p&&y&&(p=a?a(p):p.replace(/[\S]/g,"*")),_&&p&&(c.textarea||y)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),f==="OPTION"&&p){let S=qs({type:null,tagName:f,maskInputOptions:c});p=Ar({isMasked:Pn(e,r,i,s,o,S),element:e,value:p,maskInputFn:u})}return{type:pe.Text,textContent:p||"",isStyle:m,rootId:l}}function Km(e,t){let{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:_,maskAllText:y,maskTextClass:S,unmaskTextClass:b,maskTextSelector:x,unmaskTextSelector:O}=t,$=$m(e,r,s,i),w=Om(e),I={},B=e.attributes.length;for(let v=0;v<B;v++){let N=e.attributes[v];N.name&&!Yu(w,N.name,N.value)&&(I[N.name]=qu(n,w,Ln(N.name),N.value,e,c))}if(w==="link"&&o){let v=Array.from(n.styleSheets).find(X=>X.href===e.href),N=null;v&&(N=Ns(v)),N&&(delete I.rel,delete I.href,I._cssText=Ps(N,v.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let v=Ns(e.sheet);v&&(I._cssText=Ps(v,Vo()))}if(w==="input"||w==="textarea"||w==="select"||w==="option"){let v=e,N=Yo(v),X=Ls(v,bo(w),N),ie=v.checked;if(N!=="submit"&&N!=="button"&&X){let re=Pn(v,S,x,b,O,qs({type:N,tagName:bo(w),maskInputOptions:a}));I.value=Ar({isMasked:re,element:v,value:X,maskInputFn:u})}ie&&(I.checked=ie)}if(w==="option"&&(e.selected&&!a.select?I.selected=!0:delete I.selected),w==="canvas"&&p){if(e.__context==="2d")km(e)||(I.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let v=e.toDataURL(l.type,l.quality),N=document.createElement("canvas");N.width=e.width,N.height=e.height;let X=N.toDataURL(l.type,l.quality);v!==X&&(I.rr_dataURL=v)}}if(w==="img"&&f){kn||(kn=n.createElement("canvas"),wu=kn.getContext("2d"));let v=e,N=v.crossOrigin;v.crossOrigin="anonymous";let X=()=>{v.removeEventListener("load",X);try{kn.width=v.naturalWidth,kn.height=v.naturalHeight,wu.drawImage(v,0,0),I.rr_dataURL=kn.toDataURL(l.type,l.quality)}catch(ie){console.warn(`Cannot inline img src=${v.currentSrc}! Error: ${ie}`)}N?I.crossOrigin=N:v.removeAttribute("crossorigin")};v.complete&&v.naturalWidth!==0?X():v.addEventListener("load",X)}if((w==="audio"||w==="video")&&(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop)),$){let{width:v,height:N}=e.getBoundingClientRect();I={class:I.class,rr_width:`${v}px`,rr_height:`${N}px`}}w==="iframe"&&!m(I.src)&&(e.contentDocument||(I.rr_src=I.src),delete I.src);let ee;try{customElements.get(w)&&(ee=!0)}catch{}return{type:pe.Element,tagName:w,attributes:I,childNodes:[],isSVG:Um(e)||void 0,needBlock:$,rootId:_,isCustom:ee}}function V(e){return e==null?"":e.toLowerCase()}function Vm(e,t){if(t.comment&&e.type===pe.Comment)return!0;if(e.type===pe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(V(e.attributes.name).match(/^msapplication-tile(image|color)$/)||V(e.attributes.name)==="application-name"||V(e.attributes.rel)==="icon"||V(e.attributes.rel)==="apple-touch-icon"||V(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&V(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(V(e.attributes.property).match(/^(og|twitter|fb):/)||V(e.attributes.name).match(/^(og|twitter):/)||V(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(V(e.attributes.name)==="robots"||V(e.attributes.name)==="googlebot"||V(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(V(e.attributes.name)==="author"||V(e.attributes.name)==="generator"||V(e.attributes.name)==="framework"||V(e.attributes.name)==="publisher"||V(e.attributes.name)==="progid"||V(e.attributes.property).match(/^article:/)||V(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(V(e.attributes.name)==="google-site-verification"||V(e.attributes.name)==="yandex-verification"||V(e.attributes.name)==="csrf-token"||V(e.attributes.name)==="p:domain_verify"||V(e.attributes.name)==="verify-v1"||V(e.attributes.name)==="verification"||V(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Mn(e,t){let{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:g={},maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:x={},inlineImages:O=!1,recordCanvas:$=!1,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:B=5e3,onStylesheetLoad:ee,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:X=!1}=t,{preserveWhiteSpace:ie=!0}=t,re=zm(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,dataURLOptions:x,inlineImages:O,recordCanvas:$,keepIframeSrcFn:N,newlyAddedElement:X});if(!re)return console.warn(e,"not serialized"),null;let Ce;r.hasNode(e)?Ce=r.getId(e):Vm(re,b)||!ie&&re.type===pe.Text&&!re.isStyle&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?Ce=Or:Ce=Ko();let z=Object.assign(re,{id:Ce});if(r.add(e,z),Ce===Or)return null;w&&w(e);let Ze=!p;if(z.type===pe.Element){Ze=Ze&&!z.needBlock,delete z.needBlock;let te=e.shadowRoot;te&&kr(te)&&(z.isShadowHost=!0)}if((z.type===pe.Document||z.type===pe.Element)&&Ze){b.headWhitespace&&z.type===pe.Element&&z.tagName==="head"&&(ie=!1);let te={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:p,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:x,inlineImages:O,recordCanvas:$,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:B,onStylesheetLoad:ee,stylesheetLoadTimeout:v,keepIframeSrcFn:N};for(let be of Array.from(e.childNodes)){let Qe=Mn(be,te);Qe&&z.childNodes.push(Qe)}if(Tm(e)&&e.shadowRoot)for(let be of Array.from(e.shadowRoot.childNodes)){let Qe=Mn(be,te);Qe&&(kr(e.shadowRoot)&&(Qe.isShadow=!0),z.childNodes.push(Qe))}}return e.parentNode&&wr(e.parentNode)&&kr(e.parentNode)&&(z.isShadow=!0),z.type===pe.Element&&z.tagName==="iframe"&&jm(e,()=>{let te=e.contentDocument;if(te&&I){let be=Mn(te,{doc:te,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:x,inlineImages:O,recordCanvas:$,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:B,onStylesheetLoad:ee,stylesheetLoadTimeout:v,keepIframeSrcFn:N});be&&I(e,be)}},B),z.type===pe.Element&&z.tagName==="link"&&z.attributes.rel==="stylesheet"&&Wm(e,()=>{if(ee){let te=Mn(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:g,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:x,inlineImages:O,recordCanvas:$,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:B,onStylesheetLoad:ee,stylesheetLoadTimeout:v,keepIframeSrcFn:N});te&&ee(e,te)}},v),z}function Jm(e,t){let{mirror:n=new Ds,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:f=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:g=!1,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOM:b=!1,dataURLOptions:x,preserveWhiteSpace:O,onSerialize:$,onIframeLoad:w,iframeLoadTimeout:I,onStylesheetLoad:B,stylesheetLoadTimeout:ee,keepIframeSrcFn:v=()=>!1}=t||{};return Mn(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:_,maskTextFn:y,maskInputFn:S,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:x,inlineImages:p,recordCanvas:m,preserveWhiteSpace:O,onSerialize:$,onIframeLoad:w,iframeLoadTimeout:I,onStylesheetLoad:B,stylesheetLoadTimeout:ee,keepIframeSrcFn:v,newlyAddedElement:!1})}function At(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Te(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Cn=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`,ku={map:{},getId(){return console.error(Cn),-1},getNode(){return console.error(Cn),null},removeNodeFromMap(){console.error(Cn)},has(){return console.error(Cn),!1},reset(){console.error(Cn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ku=new Proxy(ku,{get(e,t,n){return t==="map"&&console.error(Cn),Reflect.get(e,t,n)}}));function Mr(e,t,n={}){let r=null,s=0;return function(...i){let o=Date.now();!s&&n.leading===!1&&(s=o);let a=t-(o-s),c=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),s=o,e.apply(c,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Ku(e,t,n,r,s=window){let i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Ku(e,t,i||{},!0)}function Jo(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var Fs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Fs=()=>new Date().getTime());function Vu(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:At([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||At([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||At([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:At([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||At([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||At([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Ju(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Xu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Xe(e,t,n,r,s){if(!e)return!1;let i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;let o=On(t,n);if(!s){let u=r&&i.matches(r);return o(i)&&!u}let a=nn(i,o),c=-1;return a<0?!1:(r&&(c=nn(i,On(null,r))),a>-1&&c<0?!0:a<c)}function Xm(e,t){return t.getId(e)!==-1}function yo(e,t){return t.getId(e)===Or}function Zu(e,t){if(wr(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Zu(e.parentNode,t):!0:!0}function vo(e){return!!e.changedTouches}function Zm(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Qu(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function el(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xo(e){return!!At([e,"optionalAccess",t=>t.shadowRoot])}var Ro=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Hi(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function tl(e){let t=null;return At([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Qm(e){let t=e,n;for(;n=tl(t);)t=n;return t}function eh(e){let t=e.ownerDocument;if(!t)return!1;let n=Qm(e);return t.contains(n)}function nl(e){let t=e.ownerDocument;return t?t.contains(e)||eh(e):!1}var Eo;function th(){if(Eo)return Eo;let e=window.document,t=window.requestAnimationFrame;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch{}return Eo=t.bind(window)}function nh(...e){return th()(...e)}var D=(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))(D||{}),L=(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))(L||{}),ye=(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))(ye||{}),Tt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Tt||{});function rh(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function Cu(e){return"__ln"in e}var wo=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=rh([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Cu(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Cu(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Au=(e,t)=>`${e}@${t}`,ko=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Set,r=new wo,s=c=>{let u=c,l=Or;for(;l===Or;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},i=c=>{if(!c.parentNode||!nl(c))return;let u=wr(c.parentNode)?this.mirror.getId(tl(c)):this.mirror.getId(c.parentNode),l=s(c);if(u===-1||l===-1)return r.addNode(c);let f=Mn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Qu(p,this.mirror)&&this.iframeManager.addIframe(p),el(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),xo(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)}});f&&(t.push({parentId:u,nextId:l,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)Ou(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(let c of this.addedSet)!Mu(this.droppedSet,c)&&!Ou(this.removes,c,this.mirror)||Mu(this.movedSet,c)?i(c):this.droppedSet.add(c);let o=null;for(;r.length;){let c=null;if(o){let u=this.mirror.getId(o.value.parentNode),l=s(o.value);u!==-1&&l!==-1&&(c=o)}if(!c){let u=r.tail;for(;u;){let l=u;if(u=u.previous,l){let f=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(f!==-1){c=l;break}else{let m=l.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let g=m.parentNode.host;if(this.mirror.getId(g)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}o=c.previous,r.removeNode(c.value),i(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let l=JSON.stringify(c.styleDiff),f=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+f).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(yo(t.target,this.mirror))return;let n;try{n=document.implementation.createHTMLDocument()}catch{n=this.doc}switch(t.type){case"characterData":{let r=t.target.textContent;!Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Pn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){let a=Yo(r),c=r.tagName;i=Ls(r,c,a);let u=qs({maskInputOptions:this.maskInputOptions,tagName:c,type:a}),l=Pn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=Ar({isMasked:l,element:r,value:i,maskInputFn:this.maskInputFn})}if(Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributes.find(a=>a.node===t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Yu(r.tagName,s)&&(o.attributes[s]=qu(this.doc,Ln(r.tagName),Ln(s),i,r,this.maskAttributeFn),s==="style")){let a=n.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(let c of Array.from(r.style)){let u=r.style.getPropertyValue(c),l=r.style.getPropertyPriority(c);u!==a.style.getPropertyValue(c)||l!==a.style.getPropertyPriority(c)?l===""?o.styleDiff[c]=u:o.styleDiff[c]=[u,l]:o._unchangedStyles[c]=[u,l]}for(let c of Array.from(a.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}break}case"childList":{if(Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let s=this.mirror.getId(r),i=wr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||yo(r,this.mirror)||!Xm(r,this.mirror)||(this.addedSet.has(r)?(Co(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Zu(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Au(s,i)]?Co(this.movedSet,r):this.removes.push({parentId:i,id:s,isShadow:wr(t.target)&&kr(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(yo(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Au(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Xe(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),xo(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Co(e,t){e.delete(t),t.childNodes.forEach(n=>Co(e,n))}function Ou(e,t,n){return e.length===0?!1:rl(e,t,n)}function rl(e,t,n){let{parentNode:r}=t;if(!r)return!1;let s=n.getId(r);return e.some(i=>i.id===s)?!0:rl(e,r,n)}function Mu(e,t){return e.size===0?!1:sl(e,t)}function sl(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:sl(e,n):!1}var Cr;function sh(e){Cr=e}function ih(){Cr=void 0}var F=e=>Cr?(...n)=>{try{return e(...n)}catch(r){if(Cr&&Cr(r)===!0)return()=>{};throw r}}:e;function dt(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var Nn=[];function Fr(e){try{if("composedPath"in e){let 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 il(e,t){let n=new ko;Nn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,s=dt([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);let i=new r(F(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function oh({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,o=[],a,c=Mr(F(f=>{let p=Date.now()-a;e(o.map(m=>(m.timeOffset-=p,m)),f),o=[],a=null}),i),u=F(Mr(F(f=>{let p=Fr(f),{clientX:m,clientY:g}=vo(f)?f.changedTouches[0]:f;a||(a=Fs()),o.push({x:m,y:g,id:r.getId(p),timeOffset:Fs()-a}),c(typeof DragEvent<"u"&&f instanceof DragEvent?L.Drag:f instanceof MouseEvent?L.MouseMove:L.TouchMove)}),s,{trailing:!1})),l=[Te("mousemove",u,n),Te("touchmove",u,n),Te("drag",u,n)];return F(()=>{l.forEach(f=>f())})}function ah({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],u=null,l=f=>p=>{let m=Fr(p);if(Xe(m,r,s,i,!0))return;let g=null,_=f;if("pointerType"in p){switch(p.pointerType){case"mouse":g=Tt.Mouse;break;case"touch":g=Tt.Touch;break;case"pen":g=Tt.Pen;break}g===Tt.Touch?ye[f]===ye.MouseDown?_="TouchStart":ye[f]===ye.MouseUp&&(_="TouchEnd"):Tt.Pen}else vo(p)&&(g=Tt.Touch);g!==null?(u=g,(_.startsWith("Touch")&&g===Tt.Touch||_.startsWith("Mouse")&&g===Tt.Mouse)&&(g=null)):ye[f]===ye.Click&&(g=u,u=null);let y=vo(p)?p.changedTouches[0]:p;if(!y)return;let S=n.getId(m),{clientX:b,clientY:x}=y;F(e)(d({type:ye[_],id:S,x:b,y:x},g!==null&&{pointerType:g}))};return Object.keys(ye).filter(f=>Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1).forEach(f=>{let p=Ln(f),m=l(f);if(window.PointerEvent)switch(ye[f]){case ye.MouseDown:case ye.MouseUp:p=p.replace("mouse","pointer");break;case ye.TouchStart:case ye.TouchEnd:return}c.push(Te(p,m,t))}),F(()=>{c.forEach(f=>f())})}function ol({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){let a=F(Mr(F(c=>{let u=Fr(c);if(!u||Xe(u,r,s,i,!0))return;let l=n.getId(u);if(u===t&&t.defaultView){let f=Vu(t.defaultView);e({id:l,x:f.left,y:f.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return Te("scroll",a,t)}function ch({viewportResizeCb:e},{win:t}){let n=-1,r=-1,s=F(Mr(F(()=>{let i=Ju(),o=Xu();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return Te("resize",s,t)}var uh=["INPUT","TEXTAREA","SELECT"],Nu=new WeakMap;function lh({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:f,maskTextClass:p,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:_}){function y(I){let B=Fr(I),ee=I.isTrusted,v=B&&bo(B.tagName);if(v==="OPTION"&&(B=B.parentElement),!B||!v||uh.indexOf(v)<0||Xe(B,r,s,i,!0))return;let N=B;if(N.classList.contains(o)||a&&N.matches(a))return;let X=Yo(B),ie=Ls(N,v,X),re=!1,Ce=qs({maskInputOptions:c,tagName:v,type:X}),z=Pn(B,p,g,m,_,Ce);(X==="radio"||X==="checkbox")&&(re=B.checked),ie=Ar({isMasked:z,element:B,value:ie,maskInputFn:u}),S(B,f?{text:ie,isChecked:re,userTriggered:ee}:{text:ie,isChecked:re});let Ze=B.name;X==="radio"&&Ze&&re&&t.querySelectorAll(`input[type="radio"][name="${Ze}"]`).forEach(te=>{if(te!==B){let be=Ar({isMasked:z,element:te,value:Ls(te,v,X),maskInputFn:u});S(te,f?{text:be,isChecked:!re,userTriggered:!1}:{text:be,isChecked:!re})}})}function S(I,B){let ee=Nu.get(I);if(!ee||ee.text!==B.text||ee.isChecked!==B.isChecked){Nu.set(I,B);let v=n.getId(I);F(e)(E(d({},B),{id:v}))}}let x=(l.input==="last"?["change"]:["input","change"]).map(I=>Te(I,F(y),t)),O=t.defaultView;if(!O)return()=>{x.forEach(I=>I())};let $=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),w=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return $&&$.set&&x.push(...w.map(I=>Ku(I[0],I[1],{set(){F(y)({target:this,isTrusted:!1})}},!1,O))),F(()=>{x.forEach(I=>I())})}function Bs(e){let t=[];function n(r,s){if(As("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||As("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||As("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||As("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function Ot(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function dh({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:F((l,f,p)=>{let[m,g]=p,{id:_,styleId:y}=Ot(f,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,adds:[{rule:m,index:g}]}),l.apply(f,p)})});let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:F((l,f,p)=>{let[m]=p,{id:g,styleId:_}=Ot(f,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,removes:[{index:m}]}),l.apply(f,p)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:F((l,f,p)=>{let[m]=p,{id:g,styleId:_}=Ot(f,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,replace:m}),l.apply(f,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((l,f,p)=>{let[m]=p,{id:g,styleId:_}=Ot(f,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,replaceSync:m}),l.apply(f,p)})}));let c={};Os("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Os("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Os("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Os("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([l,f])=>{u[l]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[l].insertRule,{apply:F((p,m,g)=>{let[_,y]=g,{id:S,styleId:b}=Ot(m.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:_,index:[...Bs(m),y||0]}]}),p.apply(m,g)})}),f.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:F((p,m,g)=>{let[_]=g,{id:y,styleId:S}=Ot(m.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,removes:[{index:[...Bs(m),_]}]}),p.apply(m,g)})})}),F(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,f])=>{f.prototype.insertRule=u[l].insertRule,f.prototype.deleteRule=u[l].deleteRule})})}function al({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let s=n.nodeName==="#document"?dt([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):dt([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=dt([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(dt([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return dt([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){let a=dt([i,"access",c=>c.set,"optionalAccess",c=>c.call,"call",c=>c(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),F(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function fh({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){let i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:F((a,c,u)=>{let[l,f,p]=u;if(n.has(l))return i.apply(c,[l,f,p]);let{id:m,styleId:g}=Ot(dt([c,"access",_=>_.parentRule,"optionalAccess",_=>_.parentStyleSheet]),t,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,set:{property:l,value:f,priority:p},index:Bs(c.parentRule)}),a.apply(c,u)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((a,c,u)=>{let[l]=u;if(n.has(l))return o.apply(c,[l]);let{id:f,styleId:p}=Ot(dt([c,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,remove:{property:l},index:Bs(c.parentRule)}),a.apply(c,u)})}),F(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function ph({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){let a=F(u=>Mr(F(l=>{let f=Fr(l);if(!f||Xe(f,t,n,r,!0))return;let{currentTime:p,volume:m,muted:g,playbackRate:_}=f;e({type:u,id:s.getId(f),currentTime:p,volume:m,muted:g,playbackRate:_})}),i.media||500)),c=[Te("play",a(0),o),Te("pause",a(1),o),Te("seeked",a(2),o),Te("volumechange",a(3),o),Te("ratechange",a(4),o)];return F(()=>{c.forEach(u=>u())})}function mh({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,l){let f=new i(c,u,l);return s.set(f,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};let o=Jo(t.fonts,"add",function(a){return function(c){return setTimeout(F(()=>{let u=s.get(c);u&&(e(u),s.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(o),F(()=>{r.forEach(a=>a())})}function hh(e){let{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e,a=!0,c=F(()=>{let u=t.getSelection();if(!u||a&&dt([u,"optionalAccess",p=>p.isCollapsed]))return;a=u.isCollapsed||!1;let l=[],f=u.rangeCount||0;for(let p=0;p<f;p++){let m=u.getRangeAt(p),{startContainer:g,startOffset:_,endContainer:y,endOffset:S}=m;Xe(g,r,s,i,!0)||Xe(y,r,s,i,!0)||l.push({start:n.getId(g),startOffset:_,end:n.getId(y),endOffset:S})}o({ranges:l})});return c(),Te("selectionchange",c)}function gh({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Jo(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function _h(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=il(e,e.doc),s=oh(e),i=ah(e),o=ol(e),a=ch(e,{win:n}),c=lh(e),u=ph(e),l=dh(e,{win:n}),f=al(e,e.doc),p=fh(e,{win:n}),m=e.collectFonts?mh(e):()=>{},g=hh(e),_=gh(e),y=[];for(let S of e.plugins)y.push(S.observer(S.callback,n,S.options));return F(()=>{Nn.forEach(S=>S.reset()),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),f(),p(),m(),g(),_(),y.forEach(S=>S())})}function As(e){return typeof window[e]<"u"}function Os(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Nr=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){let i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){let s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=s.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};function Du(e){let t,n=e[0],r=1;for(;r<e.length;){let s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var Ao=class{constructor(){this.crossOriginIframeMirror=new Nr(Ko),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Oo=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Nr(Ko),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Nr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Du([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case D.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:D.IncrementalSnapshot,data:{source:L.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case D.Meta:case D.Load:case D.DomContentLoaded:return!1;case D.Plugin:return n;case D.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case D.IncrementalSnapshot:switch(n.data.source){case L.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case L.Drag:case L.TouchMove:case L.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case L.ViewportResize:return!1;case L.MediaInteraction:case L.MouseInteraction:case L.Scroll:case L.CanvasMutation:case L.Input:return this.replaceIds(n.data,t,["id"]),n;case L.StyleSheetRule:case L.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case L.Font:return n;case L.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case L.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Du([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(let i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==pe.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Mo=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},No=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!kr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let r=il(E(d({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ol(E(d({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(al({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(Jo(t.prototype,"attachShadow",function(s){return function(i){let o=s.call(this,i);return this.shadowRoot&&nl(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Hs=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},Do=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ro,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},s=[];for(let i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:zu(a),index:c}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Lo=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){nh(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}};function ae(e){let t=e;return t.timestamp=Fs(),t}var Us,Je=wm();function Nt(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:f=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:g=!0,maskAllInputs:_,maskInputOptions:y,slimDOMOptions:S,maskAttributeFn:b,maskInputFn:x,maskTextFn:O,packFn:$,sampling:w={},dataURLOptions:I={},mousemoveWait:B,recordCanvas:ee=!1,recordCrossOriginIframes:v=!1,recordAfter:N=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:X=!1,collectFonts:ie=!1,inlineImages:re=!1,plugins:Ce,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:Ze=new Set([]),errorHandler:te,onMutation:be,getCanvasManager:Qe}=e;sh(te);let Bn=v?window.parent===window:!0,Pt=!1;if(!Bn)try{window.parent.document&&(Pt=!1)}catch{Pt=!0}if(Bn&&!t)throw new Error("emit function is required");B!==void 0&&w.mousemove===void 0&&(w.mousemove=B),Je.reset();let Ft=_===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},rn=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};Zm();let Hn,ni=0,Sa=M=>{for(let je of Ce||[])je.eventProcessor&&(M=je.eventProcessor(M));return $&&!Pt&&(M=$(M)),M},se=(M,je)=>{if(or([Nn,"access",H=>H[0],"optionalAccess",H=>H.isFrozen,"call",H=>H()])&&M.type!==D.FullSnapshot&&!(M.type===D.IncrementalSnapshot&&M.data.source===L.Mutation)&&Nn.forEach(H=>H.unfreeze()),Bn)or([t,"optionalCall",H=>H(Sa(M),je)]);else if(Pt){let H={type:"rrweb",event:Sa(M),origin:window.location.origin,isCheckout:je};window.parent.postMessage(H,"*")}if(M.type===D.FullSnapshot)Hn=M,ni=0;else if(M.type===D.IncrementalSnapshot){if(M.data.source===L.Mutation&&M.data.isAttachIframe)return;ni++;let H=r&&ni>=r,We=n&&Hn&&M.timestamp-Hn.timestamp>n;(H||We)&&si(!0)}},Ur=M=>{se(ae({type:D.IncrementalSnapshot,data:d({source:L.Mutation},M)}))},ya=M=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.Scroll},M)})),hd=M=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.CanvasMutation},M)})),gd=M=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.AdoptedStyleSheet},M)})),Bt=new Do({mutationCb:Ur,adoptedStyleSheetCb:gd}),Ht=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Ao:new Oo({mirror:Je,mutationCb:Ur,stylesheetManager:Bt,recordCrossOriginIframes:v,wrappedEmit:se});for(let M of Ce||[])M.getMirror&&M.getMirror({nodeMirror:Je,crossOriginIframeMirror:Ht.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ht.crossOriginIframeStyleMirror});let ri=new Lo,Ea=yh(Qe,{mirror:Je,win:window,mutationCb:M=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.CanvasMutation},M)})),recordCanvas:ee,blockClass:s,blockSelector:i,unblockSelector:o,sampling:w.canvas,dataURLOptions:I,errorHandler:te}),$r=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Mo:new No({mutationCb:Ur,scrollCb:ya,bypassOptions:{onMutation:be,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:Ft,dataURLOptions:I,maskAttributeFn:b,maskTextFn:O,maskInputFn:x,recordCanvas:ee,inlineImages:re,sampling:w,slimDOMOptions:rn,iframeManager:Ht,stylesheetManager:Bt,canvasManager:Ea,keepIframeSrcFn:z,processedNodeManager:ri},mirror:Je}),si=(M=!1)=>{se(ae({type:D.Meta,data:{href:window.location.href,width:Xu(),height:Ju()}}),M),Bt.reset(),$r.init(),Nn.forEach(H=>H.lock());let je=Jm(document,{mirror:Je,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:g,maskAllInputs:Ft,maskAttributeFn:b,maskInputFn:x,maskTextFn:O,slimDOM:rn,dataURLOptions:I,recordCanvas:ee,inlineImages:re,onSerialize:H=>{Qu(H,Je)&&Ht.addIframe(H),el(H,Je)&&Bt.trackLinkElement(H),xo(H)&&$r.addShadowRoot(H.shadowRoot,document)},onIframeLoad:(H,We)=>{Ht.attachIframe(H,We),$r.observeAttachShadow(H)},onStylesheetLoad:(H,We)=>{Bt.attachLinkElement(H,We)},keepIframeSrcFn:z});if(!je)return console.warn("Failed to snapshot the document");se(ae({type:D.FullSnapshot,data:{node:je,initialOffset:Vu(window)}})),Nn.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Bt.adoptStyleSheets(document.adoptedStyleSheets,Je.getId(document))};Us=si;try{let M=[],je=We=>F(_h)({onMutation:be,mutationCb:Ur,mousemoveCb:(G,Ut)=>se(ae({type:D.IncrementalSnapshot,data:{source:Ut,positions:G}})),mouseInteractionCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.MouseInteraction},G)})),scrollCb:ya,viewportResizeCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.ViewportResize},G)})),inputCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.Input},G)})),mediaInteractionCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.MediaInteraction},G)})),styleSheetRuleCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.StyleSheetRule},G)})),styleDeclarationCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.StyleDeclaration},G)})),canvasMutationCb:hd,fontCb:G=>se(ae({type:D.IncrementalSnapshot,data:d({source:L.Font},G)})),selectionCb:G=>{se(ae({type:D.IncrementalSnapshot,data:d({source:L.Selection},G)}))},customElementCb:G=>{se(ae({type:D.IncrementalSnapshot,data:d({source:L.CustomElement},G)}))},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:Ft,inlineStylesheet:g,sampling:w,recordCanvas:ee,inlineImages:re,userTriggeredOnInput:X,collectFonts:ie,doc:We,maskAttributeFn:b,maskInputFn:x,maskTextFn:O,keepIframeSrcFn:z,blockSelector:i,unblockSelector:o,slimDOMOptions:rn,dataURLOptions:I,mirror:Je,iframeManager:Ht,stylesheetManager:Bt,shadowDomManager:$r,processedNodeManager:ri,canvasManager:Ea,ignoreCSSAttributes:Ze,plugins:or([Ce,"optionalAccess",G=>G.filter,"call",G=>G(Ut=>Ut.observer),"optionalAccess",G=>G.map,"call",G=>G(Ut=>({observer:Ut.observer,options:Ut.options,callback:_d=>se(ae({type:D.Plugin,data:{plugin:Ut.name,payload:_d}}))}))])||[]},{});Ht.addLoadListener(We=>{try{M.push(je(We.contentDocument))}catch(G){console.warn(G)}});let H=()=>{si(),M.push(je(document))};return document.readyState==="interactive"||document.readyState==="complete"?H():(M.push(Te("DOMContentLoaded",()=>{se(ae({type:D.DomContentLoaded,data:{}})),N==="DOMContentLoaded"&&H()})),M.push(Te("load",()=>{se(ae({type:D.Load,data:{}})),N==="load"&&H()},window))),()=>{M.forEach(We=>We()),ri.destroy(),Us=void 0,ih()}}catch(M){console.warn(M)}}function Sh(e){if(!Us)throw new Error("please take full snapshot after start recording");Us(e)}Nt.mirror=Je;Nt.takeFullSnapshot=Sh;function yh(e,t){try{return e?e(t):new Hs}catch{return console.warn("Unable to initialize CanvasManager"),new Hs}}var Eh=3,Th=5;function Xo(e){return e>9999999999?e:e*1e3}function To(e){return e>9999999999?e/1e3:e}function Br(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:D.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:we(t,10,1e3)}}),t.category==="console")))}var Ih="button,a";function cl(e){return e.closest(Ih)||e}function ul(e){let t=ll(e);return!t||!(t instanceof Element)?t:cl(t)}function ll(e){return bh(e)?e.target:e}function bh(e){return typeof e=="object"&&!!e&&"target"in e}var Mt;function vh(e){return Mt||(Mt=[],xh()),Mt.push(e),()=>{let t=Mt?Mt.indexOf(e):-1;t>-1&&Mt.splice(t,1)}}function xh(){K(J,"open",function(e){return function(...t){if(Mt)try{Mt.forEach(n=>n())}catch{}return e.apply(J,t)}})}function Rh(e,t,n){e.handleClick(t,n)}var Po=class{constructor(t,n,r=Br){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=vh(()=>{this._lastMutation=Lu()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(kh(n,this._ignoreSelector)||!Ch(t))return;let r={timestamp:To(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=To(t)}registerScroll(t=Date.now()){this._lastScroll=To(t)}registerClick(t){let n=cl(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=Lu();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:E(d({},a.data),{url:J.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:o||1})};this._addBreadcrumbEvent(n,l);return}if(o>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:E(d({},a.data),{url:J.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0})};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},wh=["A","BUTTON","INPUT"];function kh(e,t){return!!(!wh.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Ch(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Lu(){return Date.now()/1e3}function Ah(e,t){try{if(!Oh(t))return;let{source:n}=t.data;if(n===L.Mutation&&e.registerMutation(t.timestamp),n===L.Scroll&&e.registerScroll(t.timestamp),Mh(t)){let{type:r,id:s}=t.data,i=Nt.mirror.getNode(s);i instanceof HTMLElement&&r===ye.Click&&e.registerClick(i)}}catch{}}function Oh(e){return e.type===Eh}function Mh(e){return e.data.source===L.MouseInteraction}function ft(e){return d({timestamp:Date.now()/1e3,type:"default"},e)}var Zo=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(Zo||{}),Nh=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Dh(e){let t={};for(let n in e)if(Nh.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var Lh=e=>t=>{if(!e.isEnabled())return;let n=Ph(t);if(!n)return;let r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Rh(e.clickDetector,n,ul(t.event)),Br(e,n)};function dl(e,t){let n=Nt.mirror.getId(e),r=n&&Nt.mirror.getNode(n),s=r&&Nt.mirror.getMeta(r),i=s&&Bh(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Zo.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Dh(i.attributes)}}:{}}}function Ph(e){let{target:t,message:n}=Fh(e);return ft(d({category:`ui.${e.name}`},dl(t,n)))}function Fh(e){let t=e.name==="click",n,r=null;try{r=t?ul(e.event):ll(e.event),n=Oe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Bh(e){return e.type===Zo.Element}function Hh(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=Uh(t);n&&Br(e,n)}function Uh(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||$h(o)||!i)return null;let a=t||r||s,c=i.length===1;if(!a&&c)return null;let u=Oe(o,{maxStringLength:200})||"<unknown>",l=dl(o,u);return ft({category:"ui.keyDown",message:u,data:E(d({},l.data),{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i})})}function $h(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var Pu={resource:qh,paint:Wh,navigation:zh};function Gh(e){return e.map(jh).filter(Boolean)}function jh(e){return Pu[e.entryType]?Pu[e.entryType](e):null}function Fn(e){return((fe||J.performance.timeOrigin)+e)/1e3}function Wh(e){let{duration:t,entryType:n,name:r,startTime:s}=e,i=Fn(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function zh(e){let{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:f,redirectCount:p,startTime:m,transferSize:g,type:_}=e;return s===0?null:{type:`${t}.${_}`,start:Fn(m),end:Fn(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:f,domComplete:i,redirectCount:p}}}function qh(e){let{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Fn(i),end:Fn(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}}function Yh(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,s=e.value,i=Fn(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?Nt.mirror.getId(r):void 0}}}function Kh(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Ve(s,n))}),r.push(Tr(({metric:s})=>{e.replayPerformanceEntries.push(Yh(s))})),()=>{r.forEach(s=>s())}}var Y=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vh='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Jh(){let e=new Blob([Vh]);return URL.createObjectURL(e)}function Ee(e,t){Y&&(h.info(e),t&&fl(e))}function Dn(e,t){Y&&(h.info(e),t&&setTimeout(()=>{fl(e)},0))}function fl(e){He({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}var Dr=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qo}.`)}},$s=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}addEvent(t){return Z(this,null,function*(){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>qo)throw new Dr;this.events.push(t)})}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?Xo(t):null}},Fo=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Ee("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((s,i)=>{let o=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",o),!c.success){Y&&h.error("[Replay]",c.response),i(new Error("Error in compression worker"));return}s(c.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},Bo=class{constructor(t){this._worker=new Fo(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=Xo(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>qo?Promise.reject(new Dr):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Y&&h.warn('[Replay] Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}_finishRequest(){return Z(this,null,function*(){let t=yield this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t})}},Ho=class{constructor(t){this._fallback=new $s,this._compression=new Bo(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}finish(){return Z(this,null,function*(){return yield this.ensureWorkerIsLoaded(),this._used.finish()})}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}_ensureWorkerIsLoaded(){return Z(this,null,function*(){try{yield this._compression.ensureReady()}catch{Ee("[Replay] Failed to load the compression worker, falling back to simple buffer");return}yield this._switchToCompressionWorker()})}_switchToCompressionWorker(){return Z(this,null,function*(){let{events:t,hasCheckout:n}=this._fallback,r=[];for(let s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{yield Promise.all(r)}catch(s){Y&&h.warn("[Replay] Failed to add events when switching buffers.",s)}})}};function Xh({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=Zh(t);if(n)return n}return Ee("[Replay] Using simple buffer"),new $s}function Zh(e){try{let t=e||Qh();if(!t)return;Ee(`[Replay] Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new Ho(n)}catch{Ee("[Replay] Failed to create compression worker")}}function Qh(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Jh():""}function Qo(){try{return"sessionStorage"in J&&!!J.sessionStorage}catch{return!1}}function eg(e){tg(),e.session=void 0}function tg(){if(Qo())try{J.sessionStorage.removeItem(Wo)}catch{}}function pl(e){return e===void 0?!1:Math.random()<e}function ml(e){let t=Date.now(),n=e.id||U(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function ea(e){if(Qo())try{J.sessionStorage.setItem(Wo,JSON.stringify(e))}catch{}}function ng(e,t){return pl(e)?"session":t?"buffer":!1}function Fu({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let s=ng(e,t),i=ml({sampled:s,previousSessionId:r});return n&&ea(i),i}function rg(e){if(!Qo())return null;try{let t=J.sessionStorage.getItem(Wo);if(!t)return null;let n=JSON.parse(t);return Dn("[Replay] Loading existing session",e),ml(n)}catch{return null}}function Uo(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function hl(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Uo(e.started,t,r)||Uo(e.lastActivity,n,r)}function gl(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!hl(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Io({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},s){let i=s.stickySession&&rg(e);return i?gl(i,{sessionIdleExpire:t,maxReplayDuration:n})?(Dn("[Replay] Session in sessionStorage is expired, creating new one..."),Fu(s,{previousSessionId:i.id})):i:(Dn("[Replay] Creating new session",e),Fu(s,{previousSessionId:r}))}function sg(e){return e.type===D.Custom}function ta(e,t,n){return Sl(e,t)?(_l(e,t,n),!0):!1}function ig(e,t,n){return Sl(e,t)?_l(e,t,n):Promise.resolve(null)}function _l(e,t,n){return Z(this,null,function*(){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),s=og(t,r.beforeAddRecordingEvent);return s?yield e.eventBuffer.addEvent(s):void 0}catch(r){let s=r&&r instanceof Dr?"addEventSizeExceeded":"addEvent";Y&&h.error(r),yield e.stop({reason:s});let i=k();i&&i.recordDroppedEvent("internal_sdk_error","replay")}})}function Sl(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Xo(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ee(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function og(e,t){try{if(typeof t=="function"&&sg(e))return t(e)}catch(n){return Y&&h.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return e}function na(e){return!e.type}function $o(e){return e.type==="transaction"}function ag(e){return e.type==="replay_event"}function Bu(e){return e.type==="feedback"}function yl(e){let t=lg();return(n,r)=>{if(!e.isEnabled()||!na(n)&&!$o(n))return;let s=r&&r.statusCode;if(!(t&&(!s||s<200||s>=300))){if($o(n)){cg(e,n);return}ug(e,n)}}}function cg(e,t){let 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 ug(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function lg(){let e=k();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function dg(e){return t=>{!e.isEnabled()||!na(t)||fg(e,t)}}function fg(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=ft({category:"replay.hydrate-error"});Br(e,r)}}function pg(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function mg(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:D.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function hg(e,t){return e.recordingMode!=="buffer"||t.message===zo||!t.exception||t.type?!1:pl(e.getOptions().errorSampleRate)}function gg(e,t=!1){let n=t?yl(e):void 0;return Object.assign((r,s)=>e.isEnabled()?ag(r)?(delete r.breadcrumbs,r):!na(r)&&!$o(r)&&!Bu(r)||!e.checkAndHandleExpiredSession()?r:Bu(r)?(e.flush(),r.contexts.feedback.replay_id=e.getSessionId(),mg(e,r),r):pg(r,s)&&!e.getOptions()._experiments.captureExceptions?(Y&&h.log("[Replay] Ignoring error from rrweb internals",r),null):((hg(e,r)||e.recordingMode==="session")&&(r.tags=E(d({},r.tags),{replayId:e.getSessionId()})),n&&n(r,{statusCode:200}),r):r,{id:"Replay"})}function Ys(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{let a=e.throttledAddEvent({type:D.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function _g(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Sg(e){return t=>{if(!e.isEnabled())return;let n=_g(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Ys(e,[n]),!1)))}}function yg(e,t){return Y&&e.getOptions()._experiments.traceInternals?!1:io(t,k())}function Ks(e,t){e.isEnabled()&&t!==null&&(yg(e,t.name)||e.addUpdate(()=>(Ys(e,[t]),!0)))}function Eg(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:s}=e;if(!n)return null;let{method:i,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}function Tg(e){return t=>{if(!e.isEnabled())return;let n=Eg(t);Ks(e,n)}}function Ig(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,s=r[Fe];if(!t||!n||!s)return null;let{method:i,url:o,status_code:a}=s;return o===void 0?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:i,statusCode:a}}}function bg(e){return t=>{if(!e.isEnabled())return;let n=Ig(t);Ks(e,n)}}function Vs(e,t){if(e)try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=bl(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function El(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Tl(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[bl(e)];if(!e)return[void 0]}catch{return Y&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Y&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Gs(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n=d({},e._meta),r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function Il(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:q({method:i,statusCode:o,request:a,response:c})}}function Lr(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Dt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:s,warnings:i}=vg(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function Go(e,t){return Object.keys(e).reduce((n,r)=>{let s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=e[r]),n},{})}function bl(e){return new URLSearchParams(e).toString()}function vg(e){if(!e||typeof e!="string")return{body:e};let t=e.length>vu,n=xg(e);if(t){let r=e.slice(0,vu);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function xg(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function js(e,t){let n=Rg(e);return nt(n,t)}function Rg(e,t=J.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(J.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}function wg(e,t,n){return Z(this,null,function*(){try{let r=yield Cg(e,t,n),s=Il("resource.fetch",r);Ks(n.replay,s)}catch(r){Y&&h.error("[Replay] Failed to capture fetch breadcrumb",r)}})}function kg(e,t,n){let{input:r,response:s}=t,i=r?vl(r):void 0,o=Vs(i,n.textEncoder),a=s?El(s.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),a!==void 0&&(e.data.response_body_size=a)}function Cg(e,t,n){return Z(this,null,function*(){let r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,f=js(o,n.networkDetailAllowUrls)&&!js(o,n.networkDetailDenyUrls),p=f?Ag(n,t.input,u):Lr(u),m=yield Og(f,n,t.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:p,response:m}})}function Ag({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let s=n?Dg(n,t):{};if(!e)return Dt(s,r,void 0);let i=vl(n),[o,a]=Tl(i),c=Dt(s,r,o);return a?Gs(c,a):c}function Og(o,a,c,u){return Z(this,arguments,function*(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},s,i){if(!e&&i!==void 0)return Lr(i);let l=s?xl(s.headers,r):{};if(!s||!t&&i!==void 0)return Dt(l,i,void 0);let[f,p]=yield Ng(s),m=Mg(f,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:l});return p?Gs(m,p):m})}function Mg(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{let o=e&&e.length&&r===void 0?Vs(e,n):r;return s?t?Dt(i,o,e):Dt(i,o,void 0):Lr(o)}catch(o){return Y&&h.warn("[Replay] Failed to serialize response body",o),Dt(i,r,void 0)}}function Ng(e){return Z(this,null,function*(){let t=Lg(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[yield Pg(t)]}catch(n){return Y&&h.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}})}function vl(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function xl(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Dg(e,t){return e.length===1&&typeof e[0]!="string"?Hu(e[0],t):e.length===2?Hu(e[1],t):{}}function Hu(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?xl(n,t):Array.isArray(n)?{}:Go(n,t):{}}function Lg(e){try{return e.clone()}catch(t){Y&&h.warn("[Replay] Failed to clone response body",t)}}function Pg(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(new Error("Timeout while trying to read response body")),500);Fg(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}function Fg(e){return Z(this,null,function*(){return yield e.text()})}function Bg(e,t,n){return Z(this,null,function*(){try{let r=Ug(e,t,n),s=Il("resource.xhr",r);Ks(n.replay,s)}catch(r){Y&&h.error("[Replay] Failed to capture xhr breadcrumb",r)}})}function Hg(e,t,n){let{xhr:r,input:s}=t;if(!r)return;let i=Vs(s,n.textEncoder),o=r.getResponseHeader("content-length")?El(r.getResponseHeader("content-length")):Wg(r.response,r.responseType,n.textEncoder);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function Ug(e,t,n){let r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:f,response_body_size:p}=e.data;if(!c)return null;if(!a||!js(c,n.networkDetailAllowUrls)||js(c,n.networkDetailDenyUrls)){let w=Lr(f),I=Lr(p);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:w,response:I}}let m=a[Fe],g=m?Go(m.request_headers,n.networkRequestHeaders):{},_=Go($g(a),n.networkResponseHeaders),[y,S]=n.networkCaptureBodies?Tl(o):[void 0],[b,x]=n.networkCaptureBodies?Gg(a):[void 0],O=Dt(g,f,y),$=Dt(_,p,b);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:S?Gs(O,S):O,response:x?Gs($,x):$}}function $g(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,r)=>{let[s,i]=r.split(": ");return n[s.toLowerCase()]=i,n},{}):{}}function Gg(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return jg(e.response,e.responseType)}catch(n){t.push(n)}return Y&&h.warn("[Replay] Failed to get xhr response body",...t),[void 0]}function jg(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch{return Y&&h.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Y&&h.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Wg(e,t,n){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Vs(r,n)}catch{return}}function zg(e){let t=k();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(u,l)=>qg(c,u,l)):(zt(Tg(e)),qt(bg(e)))}catch{}}function qg(e,t,n){if(t.data)try{Yg(t)&&Vg(n)&&(Hg(t,n,e),Bg(t,n,e)),Kg(t)&&Jg(n)&&(kg(t,n,e),wg(t,n,e))}catch{Y&&h.warn("Error when enriching network breadcrumb")}}function Yg(e){return e.category==="xhr"}function Kg(e){return e.category==="fetch"}function Vg(e){return e&&e.xhr}function Jg(e){return e&&e.response}var Uu=null;function Xg(e){return!!e.category}var Zg=e=>t=>{if(!e.isEnabled())return;let n=Qg(t);n&&Br(e,n)};function Qg(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Uu===t||!t||(Uu=t,!Xg(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:t.category==="console"?e_(t):ft(t)}function e_(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return ft(e);let n=!1,r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Cs?(n=!0,`${s.slice(0,Cs)}\u2026`):s;if(typeof s=="object")try{let i=we(s,7);return JSON.stringify(i).length>Cs?(n=!0,`${JSON.stringify(i,null,2).slice(0,Cs)}\u2026`):i}catch{}return s});return ft(E(d({},e),{data:d(E(d({},e.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function t_(e){let t=Q(),n=k();t.addScopeListener(Zg(e)),Jn(Lh(e)),ht(Sg(e)),zg(e);let r=gg(e,!$u(n));n&&n.addEventProcessor?n.addEventProcessor(r):ys(r),$u(n)&&(n.on("beforeSendEvent",dg(e)),n.on("afterSendEvent",yl(e)),n.on("createDsc",s=>{let i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("startTransaction",s=>{e.lastTransaction=s}),n.on("finishTransaction",s=>{e.lastTransaction=s}),n.on("beforeSendFeedback",(s,i)=>{let o=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&o&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=o)}))}function $u(e){return!!(e&&e.on)}function n_(e){return Z(this,null,function*(){try{return Promise.all(Ys(e,[r_(J.performance.memory)]))}catch{return[]}})}function r_(e){let{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 s_(e,t,n){let r,s,i,o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return c(),r=e(),r}function c(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function l(){return s&&clearTimeout(s),s=setTimeout(a,t),o&&i===void 0&&(i=setTimeout(a,o)),r}return l.cancel=c,l.flush=u,l}function i_(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Y&&h.warn("[Replay] Received replay event after session expired.");return}let s=r||!t;t=!0,e.clickDetector&&Ah(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!ta(e,n,s))return!0;if(!s)return!1;if(a_(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){let i=e.eventBuffer.getEarliestTimestamp();i&&(Ee(`[Replay] Updating session start time to earliest event in buffer to ${new Date(i)}`,e.getOptions()._experiments.traceInternals),e.session.started=i,e.getOptions().stickySession&&ea(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function o_(e){let t=e.getOptions();return{type:D.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function a_(e,t){!t||!e.session||e.session.segmentId!==0||ta(e,o_(e),!1)}function c_(e,t,n,r){return ge(rr(e,mn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function u_({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${r}${e}`;else{let i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}function l_(s){return Z(this,arguments,function*({client:e,scope:t,replayId:n,event:r}){let i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit&&e.emit("preprocessEvent",r,o);let a=yield cr(e.getOptions(),r,o,t,e,Se());if(!a)return null;a.platform=a.platform||"javascript";let c=e.getSdkMetadata&&e.getSdkMetadata(),{name:u,version:l}=c&&c.sdk||{};return a.sdk=E(d({},a.sdk),{name:u||"sentry.javascript.unknown",version:l||"0.0.0"}),a})}function d_(o){return Z(this,arguments,function*({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){let a=u_({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:l,initialTimestamp:f}=r,p=k(),m=Q(),g=p&&p.getTransport(),_=p&&p.getDsn();if(!p||!g||!_||!i.sampled)return;let y={type:cm,replay_start_timestamp:f/1e3,timestamp:s/1e3,error_ids:u,trace_ids:l,urls:c,replay_id:t,segment_id:n,replay_type:i.sampled},S=yield l_({scope:m,client:p,replayId:t,event:y});if(!S){p.recordDroppedEvent("event_processor","replay",y),Ee("An event processor returned `null`, will not send event.");return}delete S.sdkProcessingMetadata;let b=c_(S,a,_,p.getOptions().tunnel),x;try{x=yield g.send(b)}catch($){let w=new Error(zo);try{w.cause=$}catch{}throw w}if(!x)return x;if(typeof x.statusCode=="number"&&(x.statusCode<200||x.statusCode>=300))throw new Ws(x.statusCode);let O=ir({},x);if(sr(O,"replay"))throw new zs(O);return x})}var Ws=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},zs=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};function Rl(n){return Z(this,arguments,function*(e,t={count:0,interval:mm}){let{recordingData:r,options:s}=e;if(r.length)try{return yield d_(e),!0}catch(i){if(i instanceof Ws||i instanceof zs)throw i;if(_n("Replays",{_retryCount:t.count}),Y&&s._experiments&&s._experiments.captureExceptions&&St(i),t.count>=hm){let o=new Error(`${zo} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,a)=>{setTimeout(()=>Z(this,null,function*(){try{yield Rl(e,t),o(!0)}catch(c){a(c)}}),t.interval)})}})}var wl="__THROTTLED",f_="__SKIPPED";function p_(e,t,n){let r=new Map,s=a=>{let c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0),o=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(s(c),i()>=t){let l=o;return o=!0,l?f_:wl}o=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var jo=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:um,sessionIdleExpire:lm},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=s_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=p_((o,a)=>ig(this,o,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(gm,r),timeout:r,scrollTimeout:_m,ignoreSelector:s?s.join(","):""}:void 0;i&&(this.clickDetector=new Po(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options;if(!(n<=0&&r<=0)){if(this._initializeSessionForSampling(t),!this.session){this._handleException(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Dn(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session")throw new Error("Replay recording is already in progress");if(this._isEnabled&&this.recordingMode==="buffer")throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Dn("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);let t=Io({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Dn("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);let t=Io({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Nt(d(E(d(d({},this._recordingOptions),this.recordingMode==="buffer"&&{checkoutEveryNms:pm}),{emit:i_(this),onMutation:this._onMutationHandler}),t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}))}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}stop(){return Z(this,arguments,function*({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{Ee(`[Replay] Stopping Replay${n?` triggered by ${n}`:""}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&(yield this._flush({force:!0})),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,eg(this)}catch(r){this._handleException(r)}}})}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ee("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ee("[Replay] Resuming replay",this._options._experiments.traceInternals))}sendBufferedReplayOrFlush(){return Z(this,arguments,function*({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();Ee("[Replay] Converting buffer to session",this._options._experiments.traceInternals),yield this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())})}addUpdate(t){let n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Uo(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${J.location.pathname}${J.location.hash}${J.location.search}`,n=`${J.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===wl){let s=ft({category:"replay.throttled"});this.addUpdate(()=>!ta(this,{type:Th,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastTransaction||Q().getTransaction(),r=(t&&P(t).data||{})[ce];if(!(!t||!r||!["route","custom"].includes(r)))return P(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Xh({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Y&&h.error("[Replay]",t),Y&&this._options._experiments&&this._options._experiments.captureExceptions&&St(t)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Io({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return gl(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}_refreshSession(t){return Z(this,null,function*(){this._isEnabled&&(yield this.stop({reason:"refresh session"}),this.initializeSampling(t.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||(t_(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Kh(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(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{J.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let t=ft({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{let t=ft({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{Hh(this,t)}}_doChangeToBackgroundTasks(t){!this.session||hl(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ee("[Replay] Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:D.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Gh(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(Ys(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}_runFlush(){return Z(this,null,function*(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Y&&h.error("[Replay] No session or eventBuffer found to flush.");return}if(yield this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(yield n_(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();let i=yield this.eventBuffer.finish();yield Rl({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this._handleException(n),this.stop({reason:"sendReplay"});let r=k();r&&r.recordDroppedEvent("send_error","replay")}})}__init5(){this._flush=(...n)=>Z(this,[...n],function*({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Y&&h.error("[Replay] Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,i=Date.now()-r;this._debouncedFlush.cancel();let o=i<this._options.minReplayDuration,a=i>this._options.maxReplayDuration+5e3;if(o||a){Ee(`[Replay] Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),o&&this._debouncedFlush();return}let c=this.eventBuffer;if(c&&this.session.segmentId===0&&!c.hasCheckout&&Ee("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),yield this._flushLock,this._flushLock=void 0;return}try{yield this._flushLock}catch(u){Y&&h.error(u)}finally{this._debouncedFlush()}})}_maybeSaveSession(){this.session&&this._options.stickySession&&ea(this.session)}__init6(){this._onMutationHandler=t=>{let n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){let o=ft({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}};function Rr(e,t,n,r){let s=typeof r=="string"?r.split(","):[],i=[...e,...s,...t];return typeof n<"u"&&(typeof n=="string"&&i.push(`.${n}`),Le(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}function m_({mask:e,unmask:t,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){let l=['base[href="/"]'],f=Rr(e,[".sentry-mask","[data-sentry-mask]"],a,c),p=Rr(t,[".sentry-unmask","[data-sentry-unmask]"]),m={maskTextSelector:f,unmaskTextSelector:p,blockSelector:Rr(n,[".sentry-block","[data-sentry-block]",...l],i,o),unblockSelector:Rr(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Rr(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(m.blockClass=i),a instanceof RegExp&&(m.maskTextClass=a),m}function h_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}var Gu='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',g_=["content-length","content-type","accept"],ju=!1,__=e=>new Pr(e),Pr=class e{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=dm,flushMaxDelay:n=fm,minReplayDuration:r=Sm,maxReplayDuration:s=xu,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:c={},sessionSampleRate:u,errorSampleRate:l,maskAllText:f=!0,maskAllInputs:p=!0,blockAllMedia:m=!0,mutationBreadcrumbLimit:g=750,mutationLimit:_=1e4,slowClickTimeout:y=7e3,slowClickIgnoreSelectors:S=[],networkDetailAllowUrls:b=[],networkDetailDenyUrls:x=[],networkCaptureBodies:O=!0,networkRequestHeaders:$=[],networkResponseHeaders:w=[],mask:I=[],maskAttributes:B=["title","placeholder"],unmask:ee=[],block:v=[],unblock:N=[],ignore:X=[],maskFn:ie,beforeAddRecordingEvent:re,beforeErrorSampling:Ce,blockClass:z,blockSelector:Ze,maskInputOptions:te,maskTextClass:be,maskTextSelector:Qe,ignoreClass:Bn}={}){this.name=e.id;let Pt=m_({mask:I,unmask:ee,block:v,unblock:N,ignore:X,blockClass:z,blockSelector:Ze,maskTextClass:be,maskTextSelector:Qe,ignoreClass:Bn});if(this._recordingOptions=E(d({maskAllInputs:p,maskAllText:f,maskInputOptions:E(d({},te||{}),{password:!0}),maskTextFn:ie,maskInputFn:ie,maskAttributeFn:(Ft,rn,Hn)=>h_({maskAttributes:B,maskAllText:f,privacyOptions:Pt,key:Ft,value:rn,el:Hn})},Pt),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Ft=>{try{Ft.__rrweb__=!0}catch{}}}),this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ym),maxReplayDuration:Math.min(s,xu),stickySession:i,sessionSampleRate:u,errorSampleRate:l,useCompression:o,workerUrl:a,blockAllMedia:m,maskAllInputs:p,maskAllText:f,mutationBreadcrumbLimit:g,mutationLimit:_,slowClickTimeout:y,slowClickIgnoreSelectors:S,networkDetailAllowUrls:b,networkDetailDenyUrls:x,networkCaptureBodies:O,networkRequestHeaders:Wu($),networkResponseHeaders:Wu(w),beforeAddRecordingEvent:re,beforeErrorSampling:Ce,_experiments:c},typeof u=="number"&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysSessionSampleRate: ${u} })`),this._initialOptions.sessionSampleRate=u),typeof l=="number"&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
This option is deprecated and will be removed soon.
Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
Sentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Gu}`:Gu),this._isInitialized&&ss())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ju}set _isInitialized(t){ju=t}setupOnce(){ss()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(t)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let t=S_(this._initialOptions);this._replay=new jo({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let n=k().getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};Pr.__initStatic();function S_(e){let t=k(),n=t&&t.getOptions(),r=d({sessionSampleRate:0,errorSampleRate:0},q(e));return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Le(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate=="number"&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate=="number"&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Le(()=>{console.warn("SDK client is not available.")}),r)}function Wu(e){return[...g_,...e.map(t=>t.toLowerCase())]}var A=R,ra=0;function sa(){return ra>0}function y_(){ra++,setTimeout(()=>{ra--})}function Lt(e,t={},n){if(typeof e!="function")return e;try{let s=e.__sentry_wrapped__;if(s)return s;if(Wt(e))return e}catch{return e}let r=function(){let s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=s.map(o=>Lt(o,t));return e.apply(this,i)}catch(i){throw y_(),lr(o=>{o.addEventProcessor(a=>(t.mechanism&&(dn(a,void 0,void 0),mt(a,t.mechanism)),a.extra=E(d({},a.extra),{arguments:s}),a)),St(i)}),i}};try{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Kr(r,e),Pe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var me=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function aa(e,t){let n=ca(e,t),r={type:t&&t.name,value:b_(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function E_(e,t,n,r){let s=k(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Gt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:v_(t,{isUnhandledRejection:r})}]},extra:{__serialized__:os(t,i)}};if(n){let a=ca(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function ia(e,t){return{exception:{values:[aa(e,t)]}}}function ca(e,t){let n=t.stacktrace||t.stack||"",r=I_(t);try{return e(n,r)}catch{}return[]}var T_=/Minified React error #\d+;/i;function I_(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(T_.test(e.message))return 1}return 0}function b_(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function kl(e,t,n,r){let s=n&&n.syntheticException||void 0,i=Js(e,t,s,r);return mt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ye(i)}function Cl(e,t,n="info",r,s){let i=r&&r.syntheticException||void 0,o=oa(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ye(o)}function Js(e,t,n,r,s){let i;if(an(t)&&t.error)return ia(e,t.error);if(zr(t)||ai(t)){let o=t;if("stack"in t)i=ia(e,t);else{let a=o.name||(zr(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=oa(e,c,n,r),dn(i,c)}return"code"in o&&(i.tags=E(d({},i.tags),{"DOMException.code":`${o.code}`})),i}return $n(t)?ia(e,t):ze(t)||Gt(t)?(i=E_(e,t,n,s),mt(i,{synthetic:!0}),i):(i=oa(e,t,n,r),dn(i,`${t}`,void 0),mt(i,{synthetic:!0}),i)}function oa(e,t,n,r){let s={};if(r&&n){let i=ca(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(cn(t)){let{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function v_(e,{isUnhandledRejection:t}){let n=gi(e),r=t?"promise rejection":"exception";return an(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Gt(e)?`Event \`${x_(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function x_(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Al(e,{metadata:t,tunnel:n,dsn:r}){let s=d(d({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:_e(r)}),i=R_(e);return ge(s,[i])}function R_(e){return[{type:"user_report"},e]}var Xs=class extends gr{constructor(t){let n=A.SENTRY_SDK_SOURCE||Ri();_r(t,"browser",["browser"],n),super(t),t.sendClientReports&&A.document&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return kl(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Cl(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){me&&h.warn("SDK not enabled, will not capture user feedback.");return}let n=Al(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){me&&h.log("No outcomes to send");return}if(!this._dsn){me&&h.log("No dsn provided, will not send outcomes");return}me&&h.log("Sending outcomes:",t);let n=Fi(t,this._options.tunnel&&_e(this._dsn));this._sendEnvelope(n)}};var Hr;function Ol(){if(Hr)return Hr;if(Xn(A.fetch))return Hr=A.fetch.bind(A);let e=A.document,t=A.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){me&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Hr=t.bind(A)}function Ml(){Hr=void 0}function Nl(e,t=Ol()){let n=0,r=0;function s(i){let o=i.body.length;n+=o,r++;let a=d({body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{return t(e.url,a).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Ml(),n-=o,r--,Yt(c)}}return vn(e,s)}var w_=4;function Dl(e){function t(n){return new Me((r,s)=>{let i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===w_&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(let o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return vn(e,t)}var Zs="?";var k_=30,C_=40,A_=50;function ua(e,t,n,r){let s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}var O_=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,M_=/\((\S*)(?::(\d+))(?::(\d+))\)/,N_=e=>{let t=O_.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=M_.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,s]=Pl(t[1]||Zs,t[2]);return ua(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},D_=[k_,N_],L_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,P_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,F_=e=>{let t=L_.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=P_.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Zs;return[s,r]=Pl(s,r),ua(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},B_=[A_,F_],H_=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,U_=e=>{let t=H_.exec(e);return t?ua(t[2],t[1]||Zs,+t[3],t[4]?+t[4]:void 0):void 0},$_=[C_,U_];var G_=[D_,B_,$_],Ll=Jr(...G_),Pl=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Zs,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Qs=1024,Fl="Breadcrumbs",j_=(e={})=>{let t=d({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:Fl,setupOnce(){},setup(n){t.console&&yi(q_(n)),t.dom&&Jn(z_(n,t.dom)),t.xhr&&qt(Y_(n)),t.fetch&&zt(K_(n)),t.history&&ht(V_(n)),t.sentry&&n.on&&n.on("beforeSendEvent",W_(n))}}},la=j_,Bl=ue(Fl,la);function W_(e){return function(n){k()===e&&He({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:qe(n)},{event:n})}}function z_(e,t){return function(r){if(k()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Qs&&(me&&h.warn(`\`dom.maxStringLength\` cannot exceed ${Qs}, but a value of ${a} was configured. Sentry will use ${Qs} instead.`),a=Qs),typeof o=="string"&&(o=[o]);try{let u=r.event,l=J_(u)?u.target:u;s=Oe(l,{keyAttrs:o,maxStringLength:a}),i=qn(l)}catch{s="<unknown>"}if(s.length===0)return;let c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),He(c,{event:r.event,name:r.name,global:r.global})}}function q_(e){return function(n){if(k()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Ci(n.level),message:qr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${qr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;He(r,{input:n.args,level:n.level})}}function Y_(e){return function(n){if(k()!==e)return;let{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Fe];if(!r||!s||!i)return;let{method:o,url:a,status_code:c,body:u}=i,l={method:o,url:a,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};He({category:"xhr",data:l,type:"http"},f)}}function K_(e){return function(n){if(k()!==e)return;let{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};He({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=n.response,o=E(d({},n.fetchData),{status_code:i&&i.status}),a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};He({category:"fetch",data:o,type:"http"},a)}}}function V_(e){return function(n){if(k()!==e)return;let r=n.from,s=n.to,i=Kt(A.location.href),o=r?Kt(r):void 0,a=Kt(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),He({category:"navigation",data:{from:r,to:s}})}}function J_(e){return!!e&&!!e.target}var $l="Dedupe",X_=()=>{let e;return{name:$l,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Z_(t,e))return me&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},da=X_,Gl=ue($l,da);function Z_(e,t){return t?!!(Q_(e,t)||eS(e,t)):!1}function Q_(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Wl(e,t)||!jl(e,t))}function eS(e,t){let n=Hl(t),r=Hl(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Wl(e,t)||!jl(e,t))}function jl(e,t){let n=Ul(e),r=Ul(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){let i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Wl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Hl(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ul(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var ql="GlobalHandlers",tS=(e={})=>{let t=d({onerror:!0,onunhandledrejection:!0},e);return{name:ql,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(nS(n),zl("onerror")),t.onunhandledrejection&&(rS(n),zl("onunhandledrejection"))}}},fa=tS,Yl=ue(ql,fa);function nS(e){Zn(t=>{let{stackParser:n,attachStacktrace:r}=Vl();if(k()!==e||sa())return;let{msg:s,url:i,line:o,column:a,error:c}=t,u=c===void 0&&oe(s)?oS(s,i,o,a):Kl(Js(n,c||s,void 0,r,!1),i,o,a);u.level="error",ur(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function rS(e){Qn(t=>{let{stackParser:n,attachStacktrace:r}=Vl();if(k()!==e||sa())return;let s=sS(t),i=$t(s)?iS(s):Js(n,s,void 0,r,!0);i.level="error",ur(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function sS(e){if($t(e))return e;let t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function iS(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function oS(e,t,n,r){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=an(e)?e.message:e,o="Error",a=i.match(s);return a&&(o=a[1],i=a[2]),Kl({exception:{values:[{type:o,value:i}]}},t,n,r)}function Kl(e,t,n,r){let s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=oe(t)&&t.length>0?t:fi();return c.length===0&&c.push({colno:u,filename:f,function:"?",in_app:!0,lineno:l}),e}function zl(e){me&&h.log(`Global Handler attached: ${e}`)}function Vl(){let e=k();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Jl="HttpContext",aS=()=>({name:Jl,setupOnce(){},preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;let t=e.request&&e.request.url||A.location&&A.location.href,{referrer:n}=A.document||{},{userAgent:r}=A.navigator||{},s=d(d(d({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),i=E(d(d({},e.request),t&&{url:t}),{headers:s});e.request=i}}),pa=aS,Xl=ue(Jl,pa);var cS="cause",uS=5,Zl="LinkedErrors",lS=(e={})=>{let t=e.limit||uS,n=e.key||cS;return{name:Zl,setupOnce(){},preprocessEvent(r,s,i){let o=i.getOptions();Wn(aa,o.stackParser,o.maxValueLength,n,t,r,s)}}},ma=lS,Ql=ue(Zl,ma);var dS=["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"],td="TryCatch",fS=(e={})=>{let t=d({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:td,setupOnce(){t.setTimeout&&K(A,"setTimeout",ed),t.setInterval&&K(A,"setInterval",ed),t.requestAnimationFrame&&K(A,"requestAnimationFrame",pS),t.XMLHttpRequest&&"XMLHttpRequest"in A&&K(XMLHttpRequest.prototype,"send",mS);let n=t.eventTarget;n&&(Array.isArray(n)?n:dS).forEach(hS)}}},ha=fS,nd=ue(td,ha);function ed(e){return function(...t){let n=t[0];return t[0]=Lt(n,{mechanism:{data:{function:ve(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function pS(e){return function(t){return e.apply(this,[Lt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ve(e)},handled:!1,type:"instrument"}})])}}function mS(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&K(n,s,function(i){let o={mechanism:{data:{function:s,handler:ve(i)},handled:!1,type:"instrument"}},a=Wt(i);return a&&(o.mechanism.data.handler=ve(a)),Lt(i,o)})}),e.apply(this,t)}}function hS(e){let t=A,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(K(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Lt(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ve(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Lt(i,{mechanism:{data:{function:"addEventListener",handler:ve(i),target:e},handled:!1,type:"instrument"}}),o])}}),K(n,"removeEventListener",function(r){return function(s,i,o){let a=i;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,o)}catch{}return r.call(this,s,a,o)}}))}var rd=[Sr(),yr(),ha(),la(),fa(),ma(),da(),pa()];function ei(e){return[...rd]}function ga(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=ei()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),A.SENTRY_RELEASE&&A.SENTRY_RELEASE.id&&(e.release=A.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);let t=E(d({},e),{stackParser:Si(e.stackParser||Ll),integrations:Qi(e),transport:e.transport||(Qr()?Nl:Dl)});no(Xs,t),e.autoSessionTracking&&gS()}var ti=(e={},t=j())=>{if(!A.document){me&&h.error("Global document not defined in showReportDialog call");return}let{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){me&&h.error("DSN not configured for showReportDialog call");return}r&&(e.user=d(d({},r.getUser()),e.user)),e.eventId||(e.eventId=t.lastEventId());let i=A.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=Zi(s,e),e.onLoad&&(i.onload=e.onLoad);let{onClose:o}=e;if(o){let c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{o()}finally{A.removeEventListener("message",c)}};A.addEventListener("message",c)}let a=A.document.head||A.document.body;a?a.appendChild(i):me&&h.error("Not injecting report dialog. No injection point found in HTML")};function gS(){if(typeof A.document>"u"){me&&h.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}dr({ignoreDuration:!0}),fr(),ht(({from:e,to:t})=>{e!==void 0&&e!==t&&(dr({ignoreDuration:!0}),fr())})}var _a={};Ia(_a,{Breadcrumbs:()=>Bl,Dedupe:()=>Gl,GlobalHandlers:()=>Yl,HttpContext:()=>Xl,LinkedErrors:()=>Ql,TryCatch:()=>nd});var sd={};A.Sentry&&A.Sentry.Integrations&&(sd=A.Sentry.Integrations);var mC=d(d(d({},sd),jc),_a);var ad=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__;function BC(e){let t=Object.assign({defaultIntegrations:ei(e).filter(n=>n.name!=="TryCatch")},e);_r(t,"angular-ivy"),yS(),ga(t)}function yS(){let t=Wr&&Wr.major?parseInt(Wr.major,10):void 0;t&&(t<12&&ad&&h.warn(`This Sentry SDK does not officially support Angular ${t}.`,"This SDK only supports Angular 12 and above.","If you're using Angular 10 or 11, please use `@sentry/angular` instead.","Otherwise, please consider upgrading your Angular version."),_n("angular",{version:t}))}var ES=typeof Zone<"u"&&!!Zone.current;function cd(e){return ES?Zone.root.run(e):e()}function TS(e){return e&&e.ngOriginalError?e.ngOriginalError:e}function IS(e){return ud(e.error)?e.error:e.error instanceof ErrorEvent&&e.error.message?e.error.message:typeof e.error=="string"?`Server returned code ${e.status} with body "${e.error}"`:e.message}function ud(e){if(e instanceof Error)return!0;if(e===null||typeof e!="object")return!1;let t=e;return oe(t.name)&&oe(t.message)&&(t.stack===void 0||oe(t.stack))}var bS=(()=>{class e{constructor(n){this._registeredAfterSendEventHandler=!1,this._options=Object.assign({logErrors:!0},n)}handleError(n){let r=this._extractError(n)||"Handled unknown error",s=cd(()=>St(r,{mechanism:{type:"angular",handled:!1}}));if(this._options.logErrors&&console.error(r),this._options.showDialog){let i=k();i&&i.on&&!this._registeredAfterSendEventHandler?(i.on("afterSendEvent",o=>{o.type||ti(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:o.event_id}))}),this._registeredAfterSendEventHandler=!0):(!i||!i.on)&&ti(Object.assign(Object.assign({},this._options.dialogOptions),{eventId:s}))}}_extractError(n){if(this._options.extractor){let r=this._defaultExtractor.bind(this);return this._options.extractor(n,r)}return this._defaultExtractor(n)}_defaultExtractor(n){let r=TS(n);return r instanceof va?IS(r):typeof r=="string"||ud(r)?r:null}}return e.\u0275fac=function(n){return new(n||e)(ii("errorHandlerOptions"))},e.\u0275prov=Un({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function HC(e){return new bS(e)}var id="ui.angular.routing";var ld,vS,xS,dd=!1;function UC(e={}){return e.instrumentNavigation!==!1&&(ld=!0,dd=!0),ks(Object.assign(Object.assign({},e),{instrumentNavigation:!1}))}function od(){return Q().getTransaction()}var $C=(()=>{class e{constructor(n){this._router=n,this.navStart$=this._router.events.pipe(Gr(r=>r instanceof xa),jr(r=>{if(!ld){ad&&h.error("Angular integration has tracing enabled, but Tracing integration is not configured");return}this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);let s=k(),i=ki(r.url);if(s&&dd){kt()||xr(s,{name:i,origin:"auto.navigation.angular",attributes:{[ce]:"url"}}),this._routingSpan=wt({name:`${r.url}`,op:id,origin:"auto.ui.angular",tags:Object.assign({"routing.instrumentation":"@sentry/angular",url:i},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})})||null;return}let o=od();!o&&xS&&(o=vS({name:i,op:"navigation",origin:"auto.navigation.angular",attributes:{[ce]:"url"}})),o&&(this._routingSpan=o.startChild({description:`${r.url}`,op:id,origin:"auto.ui.angular",tags:Object.assign({"routing.instrumentation":"@sentry/angular",url:i},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))})),this.resEnd$=this._router.events.pipe(Gr(r=>r instanceof Ca),jr(r=>{let s=RS(r.state.root),i=od(),o=i&&P(i).data||{};i&&o[ce]==="url"&&(i.updateName(s),i.setAttribute(ce,"route"),i.setAttribute(Ne,`auto.${P(i).op}.angular`))})),this.navEnd$=this._router.events.pipe(Gr(r=>r instanceof Ra||r instanceof wa||r instanceof ka),jr(()=>{this._routingSpan&&(cd(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._subscription=new ba,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}ngOnDestroy(){this._subscription.unsubscribe()}}return e.\u0275fac=function(n){return new(n||e)(ii(Aa))},e.\u0275prov=Un({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function RS(e){let t=[],n=e&&e.firstChild;for(;n;){let s=n&&n.routeConfig&&n.routeConfig.path;if(s==null)break;t.push(s),n=n.firstChild}let r=t.filter(s=>s).join("/");return r?`/${r}/`:"/"}var fd=(()=>{let t=class t{constructor(r){this.payload=r}};t.type="[Library Games] Set library games";let e=t;return e})(),pd=(()=>{let t=class t{constructor(r){this.payload=r}};t.type="[Library Games] Set Game status";let e=t;return e})();var md=Sd(yd());var wS={data:{},status:{},meta:{date:null}},It,Ie=(It=class{static getLibraryGames(t){return t.data}static getGameStates(t){return t.status}static getRequestDate(t){return t.meta.date}static getLastPurchasedGame(t,n){return Object.values(n)[0]}static getLastPurchasedGameStatus(t,n,r){return r[n.game.id]?.status}setLibraryGames({setState:t,getState:n},{payload:r}){let s=(0,md.default)(n(),()=>{let i=r.data,o=r.meta,a={};return i.length===0?{data:{},meta:o,status:a}:{data:i.reduce((u,l)=>E(d({},u),{[l.game.id]:l}),{}),status:a,meta:o}});t(s)}setGameStatus({getState:t,patchState:n},{payload:r}){n({status:E(d({},t().status),{[r.gameId]:{status:r.status,data:r.data??null}})})}},It.\u0275fac=function(n){return new(n||It)},It.\u0275prov=Un({token:It,factory:It.\u0275fac}),It);pt([oi(fd)],Ie.prototype,"setLibraryGames",null);pt([oi(pd)],Ie.prototype,"setGameStatus",null);pt([sn([Ie])],Ie,"getLibraryGames",null);pt([sn([Ie])],Ie,"getGameStates",null);pt([sn([Ie])],Ie,"getRequestDate",null);pt([sn([Ie.getLibraryGames])],Ie,"getLastPurchasedGame",null);pt([sn([Ie.getLastPurchasedGame,Ie.getGameStates])],Ie,"getLastPurchasedGameStatus",null);Ie=pt([Oa({name:"libraryGames",defaults:wS})],Ie);export{pc as a,mc as b,__ as c,BC as d,HC as e,UC as f,$C as g,fd as h,pd as i,Ie as j};
//# sourceMappingURL=chunk-NU4K734B.js.map

//# debugId=8cdccc81-e8d6-5bc4-91db-419459fa0f62
