import"./react-B_SyE9nW.js";const t=Object.prototype.toString;function e(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(e,Error)}}function n(e,n){return t.call(e)===`[object ${n}]`}function r(t){return n(t,"ErrorEvent")}function s(t){return n(t,"DOMError")}function i(t){return n(t,"String")}function o(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function a(t){return null===t||o(t)||"object"!=typeof t&&"function"!=typeof t}function c(t){return n(t,"Object")}function u(t){return"undefined"!=typeof Event&&p(t,Event)}function l(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return"number"==typeof t&&t!=t}function p(t,e){try{return t instanceof e}catch(n){return!1}}function h(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}function m(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function f(t,e){if(!Array.isArray(t))return"";const n=[];for(let s=0;s<t.length;s++){const e=t[s];try{h(e)?n.push("[VueViewModel]"):n.push(String(e))}catch(r){n.push("[value cannot be serialized]")}}return n.join(e)}function g(t,e,r=!1){return!!i(t)&&(n(e,"RegExp")?e.test(t):!!i(e)&&(r?t===e:t.includes(e)))}function _(t,e=[],n=!1){return e.some((e=>g(t,e,n)))}function y(t,e,n=250,r,s,i,o){if(!(i.exception&&i.exception.values&&o&&p(o.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var c,u;a&&(i.exception.values=(c=v(t,e,s,o.originalException,r,i.exception.values,a,0),u=n,c.map((t=>(t.value&&(t.value=m(t.value,u)),t)))))}function v(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(p(r[s],Error)){S(o,a);const i=t(e,r[s]),u=c.length;b(i,s,u,a),c=v(t,e,n,r[s],s,[i,...c],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(p(r,Error)){S(o,a);const u=t(e,r),l=c.length;b(u,`errors[${i}]`,l,a),c=v(t,e,n,r,s,[u,...c],u,l)}})),c}function S(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:e}}function b(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function k(t){return t&&t.Math==Math?t:void 0}const E="object"==typeof globalThis&&k(globalThis)||"object"==typeof window&&k(window)||"object"==typeof self&&k(self)||"object"==typeof global&&k(global)||function(){return this}()||{};function w(){return E}function T(t,e,n){const r=n||E,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const x=w(),I=80;function C(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||I;for(;n&&i++<r&&(u=R(n,l),!("html"===u||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(n){return"<unknown>"}}function R(t,e){const n=t,r=[];let s,o,a,c,u;if(!n||!n.tagName)return"";if(x.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(l&&l.length)l.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&i(s))for(o=s.split(/\s+/),u=0;u<o.length;u++)r.push(`.${o[u]}`);const d=["aria-label","type","name","title","alt"];for(u=0;u<d.length;u++)a=d[u],c=n.getAttribute(a),c&&r.push(`[${a}="${c}"]`);return r.join("")}function M(t){if(!x.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}const O="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,D=["debug","info","warn","error","log","assert","trace"],A={};function N(t){if(!("console"in E))return t();const e=E.console,n={},r=Object.keys(A);r.forEach((t=>{const r=A[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const L=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return O?D.forEach((n=>{e[n]=(...e)=>{t&&N((()=>{E.console[n](`Sentry Logger [${n}]:`,...e)}))}})):D.forEach((t=>{e[t]=()=>{}})),e}(),P=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function F(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function j(t){const e="string"==typeof t?function(t){const e=P.exec(t);if(!e)return void N((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,s="",i,o="",a]=e.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return F({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}(t):F(t);if(e&&function(t){if(!O)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(L.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(L.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(L.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(L.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class B extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function U(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);"function"==typeof s&&z(s,r),t[e]=s}function H(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(r){O&&L.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function z(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,H(t,"__sentry_original__",e)}catch(n){}}function q(t){return t.__sentry_original__}function W(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...J(t)};if(u(t)){const e={type:t.type,target:Y(t.target),currentTarget:Y(t.currentTarget),...J(t)};return"undefined"!=typeof CustomEvent&&p(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Y(t){try{return e=t,"undefined"!=typeof Element&&p(e,Element)?C(t):Object.prototype.toString.call(t)}catch(n){return"<unknown>"}var e}function J(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function G(t){return V(t,new Map)}function V(t,e){if(function(t){if(!c(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(e){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const s of Object.keys(t))void 0!==t[s]&&(r[s]=V(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(V(t,e))})),r}return t}const K=50,X=/\(error: (.*)\)/,Q=/captureMessage|captureException/;function Z(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[],s=t.split("\n");for(let i=n;i<s.length;i++){const t=s[i];if(t.length>1024)continue;const n=X.test(t)?t.replace(X,"$1"):t;if(!n.match(/\S*Error: /)){for(const t of e){const e=t(n);if(e){r.push(e);break}}if(r.length>=K)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop();e.reverse(),Q.test(e[e.length-1].function||"")&&(e.pop(),Q.test(e[e.length-1].function||"")&&e.pop());return e.slice(0,K).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(r)}}const tt="<anonymous>";function et(t){try{return t&&"function"==typeof t&&t.name||tt}catch(e){return tt}}const nt={},rt={};function st(t,e){nt[t]=nt[t]||[],nt[t].push(e)}function it(t,e){rt[t]||(e(),rt[t]=!0)}function ot(t,e){const n=t&&nt[t];if(n)for(const s of n)try{s(e)}catch(r){O&&L.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${et(s)}\nError:`,r)}}function at(){"console"in E&&D.forEach((function(t){t in E.console&&U(E.console,t,(function(e){return A[t]=e,function(...e){ot("console",{args:e,level:t});const n=A[t];n&&n.apply(E.console,e)}}))}))}function ct(){const t=E,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(r){}return"10000000100040008000100000000000".replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function ut(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function lt(t){const{message:e,event_id:n}=t;if(e)return e;const r=ut(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function dt(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function pt(t,e){const n=ut(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function ht(t){if(t&&t.__sentry_captured__)return!0;try{H(t,"__sentry_captured__",!0)}catch(e){}return!1}function mt(t){return Array.isArray(t)?t:[t]}const ft=E,gt=1e3;let _t,yt,vt;function St(){if(!ft.document)return;const t=ot.bind(null,"dom"),e=bt(t,!0);ft.document.addEventListener("click",e,!1),ft.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=ft[e]&&ft[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(U(n,"addEventListener",(function(e){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=i[n]=i[n]||{refCount:0};if(!o.handler){const r=bt(t);o.handler=r,e.call(this,n,r,s)}o.refCount++}catch(i){}return e.call(this,n,r,s)}})),U(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,s=n.__sentry_instrumentation_handlers__||{},i=s[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete s[e]),0===Object.keys(s).length&&delete n.__sentry_instrumentation_handlers__)}catch(s){}return t.call(this,e,n,r)}})))}))}function bt(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch(e){return null}}(n);if(function(t,e){return"keypress"===t&&(!e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;H(n,"_sentryCaptured",!0),r&&!r._sentryId&&H(r,"_sentryId",ct());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==yt)return!1;try{if(!t.target||t.target._sentryId!==vt)return!1}catch(e){}return!0}(n)){t({event:n,name:s,global:e}),yt=n.type,vt=r?r._sentryId:void 0}clearTimeout(_t),_t=ft.setTimeout((()=>{vt=void 0,yt=void 0}),gt)}}const kt=w();function Et(){if(!("fetch"in kt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function wt(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Tt(t){const e="fetch";st(e,t),it(e,xt)}function xt(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!Et())return!1;if(wt(kt.fetch))return!0;let t=!1;const e=kt.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=wt(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){O&&L.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t})()&&U(E,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Ct(e),method:It(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Ct(e),method:It(e,"method")?String(e.method).toUpperCase():"GET"}}(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ot("fetch",{...s}),t.apply(E,e).then((t=>(ot("fetch",{...s,endTimestamp:Date.now(),response:t}),t)),(t=>{throw ot("fetch",{...s,endTimestamp:Date.now(),error:t}),t}))}}))}function It(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Ct(t){return"string"==typeof t?t:t?It(t,"url")?t.url:t.toString?t.toString():"":""}let Rt=null;function Mt(t){const e="error";st(e,t),it(e,Ot)}function Ot(){Rt=E.onerror,E.onerror=function(t,e,n,r,s){return ot("error",{column:r,error:s,line:n,msg:t,url:e}),!(!Rt||Rt.__SENTRY_LOADER__)&&Rt.apply(this,arguments)},E.onerror.__SENTRY_INSTRUMENTED__=!0}let Dt=null;function At(t){const e="unhandledrejection";st(e,t),it(e,Nt)}function Nt(){Dt=E.onunhandledrejection,E.onunhandledrejection=function(t){return ot("unhandledrejection",t),!(Dt&&!Dt.__SENTRY_LOADER__)||Dt.apply(this,arguments)},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Lt=w();const Pt=E;let $t;function Ft(t){const e="history";st(e,t),it(e,jt)}function jt(){if(!function(){const t=Lt.chrome,e=t&&t.app&&t.app.runtime,n="history"in Lt&&!!Lt.history.pushState&&!!Lt.history.replaceState;return!e&&n}())return;const t=Pt.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=$t,e=String(n);$t=e;ot("history",{from:t,to:e})}return t.apply(this,e)}}Pt.onpopstate=function(...e){const n=Pt.location.href,r=$t;$t=n;if(ot("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(s){}},U(Pt.history,"pushState",e),U(Pt.history,"replaceState",e)}const Bt=E,Ut="__sentry_xhr_v3__";function Ht(t){st("xhr",t),it("xhr",zt)}function zt(){if(!Bt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;U(t,"open",(function(t){return function(...e){const n=Date.now(),r=i(e[0])?e[0].toUpperCase():void 0,s=function(t){if(i(t))return t;try{return t.toString()}catch(e){}return}(e[1]);if(!r||!s)return t.apply(this,e);this[Ut]={method:r,url:s,request_headers:{}},"POST"===r&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const t=this[Ut];if(t&&4===this.readyState){try{t.status_code=this.status}catch(e){}ot("xhr",{args:[r,s],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?U(this,"onreadystatechange",(function(t){return function(...e){return o(),t.apply(this,e)}})):this.addEventListener("readystatechange",o),U(this,"setRequestHeader",(function(t){return function(...e){const[n,r]=e,s=this[Ut];return s&&i(n)&&i(r)&&(s.request_headers[n.toLowerCase()]=r),t.apply(this,e)}})),t.apply(this,e)}})),U(t,"send",(function(t){return function(...e){const n=this[Ut];if(!n)return t.apply(this,e);void 0!==e[0]&&(n.body=e[0]);return ot("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}function qt(t,e=100,n=1/0){try{return Yt("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Wt(t,e=3,n=102400){const r=qt(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?Wt(t,e-1,n):r;var s}function Yt(t,e,n=1/0,r=1/0,s=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[i,o]=s;if(null==e||["number","boolean","string"].includes(typeof e)&&!d(e))return e;const a=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(h(e))return"[VueViewModel]";if(c(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${et(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const u="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===u)return a.replace("object ","");if(i(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return Yt("",l.toJSON(),u-1,r,s)}catch(g){}const p=Array.isArray(e)?[]:{};let m=0;const f=W(e);for(const c in f){if(!Object.prototype.hasOwnProperty.call(f,c))continue;if(m>=r){p[c]="[MaxProperties ~]";break}const t=f[c];p[c]=Yt(c,t,u-1,r,s),m++}return o(e),p}var Jt;function Gt(t){return new Kt((e=>{e(t)}))}function Vt(t){return new Kt(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Jt||(Jt={}));let Kt=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=Jt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t(((t,r)=>{this._handlers.push([!1,n=>{if(e)try{t(e(n))}catch(s){r(s)}else t(n)},e=>{if(n)try{t(n(e))}catch(s){r(s)}else r(e)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(e){return new t(((t,n)=>{let r,s;return this.then((t=>{s=!1,r=t,e&&e()}),(t=>{s=!0,r=t,e&&e()})).then((()=>{s?n(r):t(r)}))}))}__init(){this._resolve=t=>{this._setResult(Jt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Jt.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===Jt.PENDING&&(l(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Jt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===Jt.RESOLVED&&t[1](this._value),this._state===Jt.REJECTED&&t[2](this._value),t[0]=!0)}))}}};function Xt(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Vt(new B("Not adding Promise because buffer limit was reached."));const s=r();return-1===e.indexOf(s)&&e.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new Kt(((n,r)=>{let s=e.length;if(!s)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{Gt(t).then((()=>{--s||(clearTimeout(i),n(!0))}),r)}))}))}}}function Qt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const Zt=["fatal","error","warning","log","info","debug"];function te(t){return"warn"===t?"warning":Zt.includes(t)?t:"log"}const ee=1e3;function ne(){return Date.now()/ee}const re=function(){const{performance:t}=E;if(!t||!t.now)return ne;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/ee}(),se=(()=>{const{performance:t}=E;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s<e,o=t.timing&&t.timing.navigationStart,a="number"==typeof o?Math.abs(o+n-r):e;return i||a<e?s<=a?t.timeOrigin:o:r})(),ie="baggage",oe="sentry-",ae=/^sentry-/,ce=8192;function ue(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[e,n],r)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,i=0===r?s:`${t},${s}`;return i.length>ce?(O&&L.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):i}),"")}(Object.entries(t).reduce(((t,[e,n])=>(n&&(t[`${oe}${e}`]=n),t)),{}))}function le(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[e,n])=>(t[e]=n,t)),{})}const de=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function pe(t,e){const n=function(t){if(!t)return;const e=t.match(de);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=function(t){if(!i(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce(((t,e)=>{const n=le(e);for(const r of Object.keys(n))t[r]=n[r];return t}),{});else{if(!t)return;e=le(t)}const n=Object.entries(e).reduce(((t,[e,n])=>(e.match(ae)&&(t[e.slice(oe.length)]=n),t)),{});return Object.keys(n).length>0?n:void 0}(e),{traceId:s,parentSpanId:o,parentSampled:a}=n||{};return n?{traceId:s||ct(),parentSpanId:o||ct().substring(16),spanId:ct().substring(16),sampled:a,dsc:r||{}}:{traceId:s||ct(),spanId:ct().substring(16)}}function he(t=ct(),e=ct().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function me(t,e=[]){return[t,e]}function fe(t,e){const[n,r]=t;return[n,[...r,e]]}function ge(t,e){const n=t[1];for(const r of n){if(e(r,r[0].type))return!0}return!1}function _e(t,e){return(e||new TextEncoder).encode(t)}function ye(t,e){const[n,r]=t;let s=JSON.stringify(n);function i(t){"string"==typeof s?s="string"==typeof t?s+t:[_e(s,e),t]:s.push("string"==typeof t?_e(t,e):t)}for(const a of r){const[t,e]=a;if(i(`\n${JSON.stringify(t)}\n`),"string"==typeof e||e instanceof Uint8Array)i(e);else{let t;try{t=JSON.stringify(e)}catch(o){t=JSON.stringify(qt(e))}i(t)}}return"string"==typeof s?s:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}(s)}function ve(t,e){const n="string"==typeof t.data?_e(t.data,e):t.data;return[G({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Se={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 be(t){return Se[t]}function ke(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const Ee=6e4;function we(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[t,e,,,n]=a.split(":",5),i=parseInt(t,10),o=1e3*(isNaN(i)?60:i);if(e)for(const a of e.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(s[a]=r+o);else s.all=r+o}else o?s.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?Ee:r-e}(o,r):429===e&&(s.all=r+6e4);return s}const Te="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,xe="production";function Ie(){return T("globalEventProcessors",(()=>[]))}function Ce(t){Ie().push(t)}function Re(t,e,n,r=0){return new Kt(((s,i)=>{const o=t[r];if(null===e||"function"!=typeof o)s(e);else{const a=o({...e},n);Te&&o.id&&null===a&&L.log(`Event processor "${o.id}" dropped event`),l(a)?a.then((e=>Re(t,e,n,r+1).then(s))).then(null,i):Re(t,a,n,r+1).then(s).then(null,i)}}))}function Me(t){const e=re(),n={sid:ct(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return G({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&Oe(n,t),n}function Oe(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||re(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:ct()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function De(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),Oe(t,n)}const Ae=1;function Ne(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=Fe(t);return G({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function Le(t){const{traceId:e,spanId:n}=t.spanContext();return he(e,n,je(t))}function Pe(t){return"number"==typeof t?$e(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?$e(t.getTime()):re()}function $e(t){return t>9999999999?t/1e3:t}function Fe(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function je(t){const{traceFlags:e}=t.spanContext();return Boolean(e&Ae)}function Be(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||ct(),timestamp:e.timestamp||ne()},u=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:xe);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==s&&(t.dist=s);t.message&&(t.message=m(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=m(o.value,i));const a=t.request;a&&a.url&&(a.url=m(a.url,i))}(c,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(c,u),void 0===e.type&&function(t,e){const n=E._sentryDebugIds;if(!n)return;let r;const s=Ue.get(e);s?r=s:(r=new Map,Ue.set(e,r));const i=Object.keys(n).reduce(((t,s)=>{let i;const o=r.get(s);o?i=o:(i=e(s),r.set(s,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[s];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(o){}}(c,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new rn;return n.update(e),n}(r,n.captureContext);n.mechanism&&pt(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],p=function(){nn||(nn=new rn);return nn}().getScopeData();if(i){tn(p,i.getScopeData())}if(l){tn(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Ze(c,p);return Re([...d,...Ie(),...p.eventProcessors],c,n).then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(r){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof o&&o>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:qt(t.data,e,n)}})))},...t.user&&{user:qt(t.user,e,n)},...t.contexts&&{contexts:qt(t.contexts,e,n)},...t.extra&&{extra:qt(t.extra,e,n)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=qt(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>{const r=Fe(t).data;return r&&(t.data=qt(r,e,n)),t})));return r}(t,o,a):t)))}const Ue=new WeakMap;function He(t,e){return pn().captureEvent(t,e)}function ze(t,e){pn().addBreadcrumb(t,e)}function qe(){return pn().getClient()}function We(){return pn().getScope()}function Ye(t){const e=qe(),n=hn(),r=We(),{release:s,environment:i=xe}=e&&e.getOptions()||{},{userAgent:o}=E.navigator||{},a=Me({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...t}),c=n.getSession();return c&&"ok"===c.status&&Oe(c,{status:"exited"}),Je(),n.setSession(a),r.setSession(a),a}function Je(){const t=hn(),e=We(),n=e.getSession()||t.getSession();n&&De(n),Ge(),t.setSession(),e.setSession()}function Ge(){const t=hn(),e=We(),n=qe(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Ve(t=!1){t?Je():Ge()}function Ke(t){return t.transaction}function Xe(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=G({environment:r.environment||xe,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}function Qe(t){const e=qe();if(!e)return{};const n=Xe(Fe(t).trace_id||"",e,We()),r=Ke(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;null!=i&&(n.sample_rate=`${i}`);const a=Fe(r);return o&&"url"!==o&&(n.transaction=a.description),n.sampled=String(je(r)),e.emit&&e.emit("createDsc",n),n}function Ze(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e,c=G(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=G(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=G(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=G(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts});o&&(t.level=o);a&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:Ne(e),...t.contexts};const n=Ke(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:Qe(e),...t.sdkProcessingMetadata};const r=Fe(n).description;r&&(t.tags={transaction:r,...t.tags})}}(t,r),function(t,e){t.fingerprint=t.fingerprint?mt(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function tn(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:m}=e;en(t,"extra",n),en(t,"tags",r),en(t,"user",s),en(t,"contexts",i),en(t,"sdkProcessingMetadata",a),o&&(t.level=o),h&&(t.transactionName=h),m&&(t.span=m),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...p}}function en(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}let nn,rn=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=sn()}static clone(e){return e?e.clone():new t}clone(){const e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}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&&Oe(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={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const 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(e){if(!e)return this;const n="function"==typeof e?e(this):e;if(n instanceof t){const t=n.getScopeData();this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&Object.keys(t.user).length&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint.length&&(this._fingerprint=t.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),t.propagationContext&&(this._propagationContext=t.propagationContext)}else if(c(n)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.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=sn(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:ne(),...t},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:r,_extra:s,_user:i,_level:o,_fingerprint:a,_eventProcessors:c,_propagationContext:u,_sdkProcessingMetadata:l,_transactionName:d,_span:p}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:s,user:i,level:o,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:l,transactionName:d,span:p}}applyToEvent(t,e={},n=[]){Ze(t,this.getScopeData());return Re([...n,...Ie(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:ct();if(!this._client)return L.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:ct();if(!this._client)return L.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ct();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(L.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}};function sn(){return{traceId:ct(),spanId:ct().substring(16)}}const on="7.116.0",an=parseFloat(on),cn=100;let un=class{constructor(t,e,n,r=an){let s,i;this._version=r,e?s=e:(s=new rn,s.setClient(t)),n?i=n:(i=new rn,i.setClient(t)),this._stack=[{scope:s}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(r){throw this.popScope(),r}return l(n)?n.then((t=>(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}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,e){const n=this._lastEventId=e&&e.event_id?e.event_id:ct(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:ct(),s=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ct();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=cn}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const o={timestamp:ne(),...t},a=s?N((()=>s(o,e))):o;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,i))}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,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=dn(this);try{t(this)}finally{dn(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(n){return Te&&L.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);if(Te&&!n){this.getClient()?L.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):L.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&De(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:s=xe}=n&&n.getOptions()||{},{userAgent:i}=E.navigator||{},o=Me({release:r,environment:s,user:e.getUser(),...i&&{userAgent:i},...t}),a=e.getSession&&e.getSession();return a&&"ok"===a.status&&Oe(a,{status:"exited"}),this.endSession(),e.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=ln().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Te&&L.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function ln(){return E.__SENTRY__=E.__SENTRY__||{extensions:{},hub:void 0},E}function dn(t){const e=ln(),n=mn(e);return fn(e,t),n}function pn(){const t=ln();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=ln()){e=t,e&&e.__SENTRY__&&e.__SENTRY__.hub&&!mn(t).isOlderThan(an)||fn(t,new un);var e;return mn(t)}(t)}function hn(){return pn().getIsolationScope()}function mn(t){return T("hub",(()=>new un),t)}function fn(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function gn(t){return pn().getScope().getTransaction()}let _n=!1;function yn(){const t=gn();if(t){const e="internal_error";Te&&L.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}var vn;function Sn(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){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(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);"unknown_error"!==n&&t.setStatus(n)}function bn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=qe(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function kn(t){if(!bn())return;const e=function(t){if(t.startTime){const e={...t};return e.startTimestamp=Pe(t.startTime),delete e.startTime,e}return t}(t),n=pn(),r=t.scope?t.scope.getSpan():En();if(t.onlyIfParent&&!r)return;const s=(t.scope||We()).clone();return function(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:s}){if(!bn())return;const i=hn();let o;if(e&&!r)o=e.startChild(n);else if(e){const r=Qe(e),{traceId:s,spanId:i}=e.spanContext(),a=je(e);o=t.startTransaction({traceId:s,parentSpanId:i,parentSampled:a,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{const{traceId:e,dsc:r,parentSpanId:a,sampled:c}={...i.getPropagationContext(),...s.getPropagationContext()};o=t.startTransaction({traceId:e,parentSpanId:a,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return s.setSpan(o),function(t,e,n){t&&(H(t,Tn,n),H(t,wn,e))}(o,s,i),o}(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:s})}function En(){return We().getSpan()}yn.tag="sentry_tracingErrorCallback",function(t){t.Ok="ok";t.DeadlineExceeded="deadline_exceeded";t.Unauthenticated="unauthenticated";t.PermissionDenied="permission_denied";t.NotFound="not_found";t.ResourceExhausted="resource_exhausted";t.InvalidArgument="invalid_argument";t.Unimplemented="unimplemented";t.Unavailable="unavailable";t.InternalError="internal_error";t.UnknownError="unknown_error";t.Cancelled="cancelled";t.AlreadyExists="already_exists";t.FailedPrecondition="failed_precondition";t.Aborted="aborted";t.OutOfRange="out_of_range";t.DataLoss="data_loss"}(vn||(vn={}));const wn="_sentryScope",Tn="_sentryIsolationScope";const xn="sentry.source",In="sentry.sample_rate",Cn="sentry.op",Rn="sentry.origin";class Mn{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class On{constructor(t={}){this._traceId=t.traceId||ct(),this._spanId=t.spanId||ct().substring(16),this._startTime=t.startTimestamp||re(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[Rn]:t.origin||"manual",[Cn]: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),void 0!==t.exclusiveTime&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...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[Cn]}set op(t){this.setAttribute(Cn,t)}get origin(){return this._attributes[Rn]}set origin(t){this.setAttribute(Rn,t)}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?Ae:0}}startChild(t){const e=new On({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e);const n=Ke(this);if(e.transaction=n,Te&&n){const r=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${Fe(e).description||"< unknown name >"}' (${n.spanContext().spanId}).`;L.log(r),this._logMessage=r}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setAttribute(t,e){void 0===e?delete this._attributes[t]:this._attributes[t]=e}setAttributes(t){Object.keys(t).forEach((e=>this.setAttribute(e,t[e])))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Sn(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return"ok"===this._status}finish(t){return this.end(t)}end(t){if(this._endTime)return;const e=Ke(this);if(Te&&e&&e.spanContext().spanId!==this._spanId){const t=this._logMessage;t&&L.log(t.replace("Starting","Finishing"))}this._endTime=Pe(t)}toTraceparent(){return Le(this)}toContext(){return G({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 Ne(this)}getSpanJSON(){return G({data:this._getData(),description:this._name,op:this._attributes[Cn],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[Rn],_metrics_summary:void 0,profile_id:this._attributes.profile_id,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(){const{data:t,_attributes:e}=this,n=Object.keys(t).length>0,r=Object.keys(e).length>0;if(n||r)return n&&r?{...t,...e}:n?t:e}}class Dn extends On{constructor(t,e){super(t),this._contexts={},this._hub=e||pn(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[xn]&&{source:this._attributes[xn]},...this._attributes[In]&&{sampleRate:this._attributes[In]}}}set metadata(t){this._metadata=t}setName(t,e="custom"){this._name=t,this.setAttribute(xn,e)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Mn(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const e=Pe(t),n=this._finishTransaction(e);if(n)return this._hub.captureEvent(n)}toContext(){return G({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Qe(this)}setHub(t){this._hub=t}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(t){if(void 0!==this._endTime)return;this._name||(Te&&L.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this._sampled)return Te&&L.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&Fe(t).timestamp)):[];if(this._trimEnd&&n.length>0){const t=n.map((t=>Fe(t).timestamp)).filter(Boolean);this._endTime=t.reduce(((t,e)=>t>e?t:e))}const{scope:r,isolationScope:s}={scope:(i=this)[wn],isolationScope:i[Tn]};var i;const{metadata:o}=this,{source:a}=o,c={contexts:{...this._contexts,trace:Ne(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:r,capturedSpanIsolationScope:s,...G({dynamicSamplingContext:Qe(this)})},_metrics_summary:void 0,...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(Te&&L.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),Te&&L.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const An={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Nn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Ln extends Mn{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const e=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),e.apply(t,n)),void 0===Fe(t).timestamp&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class Pn extends Dn{constructor(t,e,n=An.idleTimeout,r=An.finalTimeout,s=An.heartbeatInterval,i=!1,o=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=s,this._onScope=i,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Nn[4],this._autoFinishAllowed=!o,i&&(Te&&L.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),e.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Nn[3],this.end())}),this._finalTimeout)}end(t){const e=Pe(t);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){Te&&L.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanContext().spanId===this.spanContext().spanId)return!0;Fe(t).timestamp||(t.setStatus("cancelled"),t.end(e),Te&&L.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const{start_timestamp:n,timestamp:r}=Fe(t),s=n&&n<e,i=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&n&&r-n<i;if(Te){const e=JSON.stringify(t,void 0,2);s?o||L.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):L.log("[Tracing] discarding Span since it happened after Transaction was finished",e)}return s&&o})),Te&&L.log("[Tracing] flushing IdleTransaction")}else Te&&L.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const e=t=>{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)};this.spanRecorder=new Ln(e,n,this.spanContext().spanId,t),Te&&L.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Nn[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(Te&&L.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Nn[1],this.end(t))}),this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),Te&&L.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,Te&&L.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(Te&&L.log(`[Tracing] popActivity ${t}`),delete this.activities[t],Te&&L.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=re();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Nn[5],this.end(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(Te&&L.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Nn[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){Te&&L.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function $n(t,e,n){if(!bn(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setAttribute(In,Number(t.sampled)),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setAttribute(In,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setAttribute(In,Number(r))):(r=1,t.setAttribute(In,r)),Fn(r)?r?(t.sampled=Math.random()<r,t.sampled?(Te&&L.log(`[Tracing] starting ${t.op} transaction - ${Fe(t).description}`),t):(Te&&L.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(Te&&L.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(Te&&L.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function Fn(t){return d(t)||"number"!=typeof t&&"boolean"!=typeof t?(Te&&L.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):!(t<0||t>1)||(Te&&L.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1)}function jn(){const t=this.getScope().getSpan();return t?{"sentry-trace":Le(t)}:{}}function Bn(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=t.instrumenter||"sentry";s!==i&&(Te&&L.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.\nThe transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1);let o=new Dn(t,this);return o=$n(o,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function Un(t,e,n,r,s,i,o,a=!1){const c=t.getClient(),u=c&&c.getOptions()||{};let l=new Pn(e,t,n,r,o,s,a);return l=$n(l,u,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...i}),l.isRecording()&&l.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",l),l}function Hn(){const t=ln();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Bn),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=jn),_n||(_n=!0,Mt(yn),At(yn)))}function zn(t,e,n,r){const s=ke(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const o=function(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:$(r)},...s&&{trace:G({...s})}}}(t,s,r,e);delete t.sdkProcessingMetadata;return me(o,[[{type:i},t]])}const qn="7";function Wn(t,e){return n={sentry_key:t.publicKey,sentry_version:qn,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}const Yn=[];function Jn(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?mt(n(e)):e;const s=function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.keys(e).map((t=>e[t]))}(r),i=function(t,e){for(let n=0;n<t.length;n++)if(!0===e(t[n]))return n;return-1}(s,(t=>"Debug"===t.name));if(-1!==i){const[t]=s.splice(i,1);s.push(t)}return s}function Gn(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Vn(t,e,n){if(n[e.name])Te&&L.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,-1===Yn.indexOf(e.name)&&(e.setupOnce(Ce,pn),Yn.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(t.addEventProcessor&&"function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}Te&&L.log(`Integration installed: ${e.name}`)}}function Kn(t,e){return Object.assign((function(...t){return e(...t)}),{id:t})}function Xn(t,e,n,r){const s={sent_at:(new Date).toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(s.dsn=$(e));const i=function(t){const e=function(t){let e="";for(const n of t){const t=Object.entries(n.tags),r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}(t);return[{type:"statsd",length:e.length},e]}(t);return me(s,[i])}const Qn="Not capturing exception because it's already been captured.";class Zn{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=j(t.dsn):Te&&L.warn("No DSN provided, client will not send events."),this._dsn){const e=function(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return n||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(t)}?${Wn(t,r)}`}(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(ht(t))return void(Te&&L.log(Qn));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let s=n&&n.event_id;const i=o(t)?t:String(t),c=a(t)?this.eventFromMessage(i,e,n):this.eventFromException(t,n);return this._process(c.then((t=>this._captureEvent(t,n,r))).then((t=>{s=t}))),s}captureEvent(t,e,n){if(e&&e.originalException&&ht(e.originalException))return void(Te&&L.log(Qn));let r=e&&e.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,e,s||n).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release?Te&&L.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Oe(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t))))):Gt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}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(e){return Te&&L.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const e=this._integrations[t.name];Vn(this,t,this._integrations),e||Gn(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=zn(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of e.attachments||[])n=fe(n,ve(s,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,r){const s=ke(n);return me({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:$(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;Te&&L.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(t){Te&&L.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const e=Xn(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach((t=>t(...e)))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach((e=>{e&&Vn(t,e,n)})),n}(this,t),Gn(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,e){let n=!1,r=!1;const s=e.exception&&e.exception.values;if(s){r=!0;for(const t of s){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&(Oe(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Kt((e=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r=hn()){const s=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),Be(s,t,e,n,this,r).then((t=>{if(null===t)return t;const e={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&e){const{traceId:r,spanId:s,parentSpanId:i,dsc:o}=e;t.contexts={trace:{trace_id:r,span_id:s,parent_span_id:i},...t.contexts};const a=o||Xe(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:a,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if(Te){const e=t;"log"===e.logLevel?L.log(e.message):L.warn(e)}}))}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:s}=r,i=er(t),o=tr(t),a=t.type||"error",u=`before send for type \`${a}\``;if(o&&"number"==typeof s&&Math.random()>s)return this.recordDroppedEvent("sample_rate","error",t),Vt(new B(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const d="replay_event"===a?"replay":a,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,p).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",d,t),new B("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const s=function(t,e,n){const{beforeSend:r,beforeSendTransaction:s}=t;if(tr(e)&&r)return r(e,n);if(er(e)&&s)return s(e,n);return e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(l(t))return t.then((t=>{if(!c(t)&&null!==t)throw new B(n);return t}),(t=>{throw new B(`${e} rejected with ${t}`)}));if(!c(t)&&null!==t)throw new B(n);return t}(s,u)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",d,t),new B(`${u} returned \`null\`, will not send event.`,"log");const s=n&&n.getSession();!i&&s&&this._updateSessionFromEvent(s,r);const o=r.transaction_info;if(i&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}return this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof B)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new B(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++,t.then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t)))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,(t=>{Te&&L.error("Error while sending event:",t)}));Te&&L.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}function tr(t){return void 0===t.type}function er(t){return"transaction"===t.type}function nr(t,e){!0===e.debug&&(Te?L.enable():N((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));We().update(e.initialScope);const n=new t(e);!function(t){const e=pn().getStackTop();e.client=t,e.scope.setClient(t)}(n),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(n)}const rr=30;function sr(t,e,n=Xt(t.bufferSize||rr)){let r={};function s(s){const i=[];if(ge(s,((e,n)=>{const s=be(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,s)){const r=ir(e,n);t.recordDroppedEvent("ratelimit_backoff",s,r)}else i.push(e)})),0===i.length)return Gt();const o=me(s[0],i),a=e=>{ge(o,((n,r)=>{const s=ir(n,r);t.recordDroppedEvent(e,be(r),s)}))};return n.add((()=>e({body:ye(o,t.textEncoder)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&Te&&L.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=we(r,t),t)),(t=>{throw a("network_error"),t})))).then((t=>t),(t=>{if(t instanceof B)return Te&&L.error("Skipped sending event because buffer is full."),a("queue_overflow"),Gt();throw t}))}return s.__sentry__baseTransport__=!0,{send:s,flush:t=>n.drain(t)}}function ir(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}function or(t){return[{type:"span"},t]}const ar=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],cr=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ur="InboundFilters",lr=(t={})=>({name:ur,setupOnce(){},processEvent(e,n,r){const s=r.getOptions(),i=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:ar],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:cr],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,s);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(e){}return!1}(t))return Te&&L.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${lt(t)}`),!0;if(function(t,e){if(t.type||!e||!e.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch(r){}n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`));Te&&0===e.length&&L.error(`Could not extract message for event ${lt(t)}`);return e}(t).some((t=>_(t,e)))}(t,e.ignoreErrors))return Te&&L.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${lt(t)}`),!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&_(n,e)}(t,e.ignoreTransactions))return Te&&L.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${lt(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;const n=dr(t);return!!n&&_(n,e)}(t,e.denyUrls))return Te&&L.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${lt(t)}.\nUrl: ${dr(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;const n=dr(t);return!n||_(n,e)}(t,e.allowUrls))return Te&&L.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${lt(t)}.\nUrl: ${dr(t)}`),!0;return!1}(e,i)?null:e}});function dr(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(e){}return n?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return Te&&L.error(`Cannot extract url for event ${lt(t)}`),null}}let pr;Kn(ur,lr);const hr="FunctionToString",mr=new WeakMap,fr=()=>({name:hr,setupOnce(){pr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=q(this),n=mr.has(qe())&&void 0!==e?e:this;return pr.apply(n,t)}}catch(t){}},setup(t){mr.set(t,!0)}});Kn(hr,fr);const gr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,_r=E;const yr=(t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||void 0===r)&&(r=e.value,e.delta=s,t(e)))}},vr=()=>_r.__WEB_VITALS_POLYFILL__?_r.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=_r.performance.timing,e=_r.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const r in t)"navigationStart"!==r&&"toJSON"!==r&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n})()):_r.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Sr=()=>{const t=vr();return t&&t.activationStart||0},br=(t,e)=>{const n=vr();let r="navigate";return n&&(r=_r.document&&_r.document.prerendering||Sr()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},kr=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(r){}},Er=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==_r.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};_r.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},wr=(t,e={})=>{const n=br("CLS",0);let r,s=0,i=[];const o=t=>{t.forEach((t=>{if(!t.hadRecentInput){const e=i[0],o=i[i.length-1];s&&0!==i.length&&t.startTime-o.startTime<1e3&&t.startTime-e.startTime<5e3?(s+=t.value,i.push(t)):(s=t.value,i=[t]),s>n.value&&(n.value=s,n.entries=i,r&&r())}}))},a=kr("layout-shift",o);if(a){r=yr(t,n,e.reportAllChanges);const s=()=>{o(a.takeRecords()),r(!0)};return Er(s),s}};let Tr=-1;const xr=()=>(Tr<0&&(_r.document&&_r.document.visibilityState&&(Tr="hidden"!==_r.document.visibilityState||_r.document.prerendering?1/0:0),Er((({timeStamp:t})=>{Tr=t}),!0)),{get firstHiddenTime(){return Tr}}),Ir=t=>{const e=xr(),n=br("FID");let r;const s=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},i=t=>{t.forEach(s)},o=kr("first-input",i);r=yr(t,n),o&&Er((()=>{i(o.takeRecords()),o.disconnect()}),!0)};let Cr=0,Rr=1/0,Mr=0;const Or=t=>{t.forEach((t=>{t.interactionId&&(Rr=Math.min(Rr,t.interactionId),Mr=Math.max(Mr,t.interactionId),Cr=Mr?(Mr-Rr)/7+1:0)}))};let Dr;const Ar=()=>Dr?Cr:performance.interactionCount||0,Nr=[],Lr={},Pr=t=>{const e=Nr[Nr.length-1],n=Lr[t.interactionId];if(n||Nr.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const e={id:t.interactionId,latency:t.duration,entries:[t]};Lr[e.id]=e,Nr.push(e)}Nr.sort(((t,e)=>e.latency-t.latency)),Nr.splice(10).forEach((t=>{delete Lr[t.id]}))}},$r=(t,e)=>{e=e||{},"interactionCount"in performance||Dr||(Dr=kr("event",Or,{type:"event",buffered:!0,durationThreshold:0}));const n=br("INP");let r;const s=t=>{t.forEach((t=>{if(t.interactionId&&Pr(t),"first-input"===t.entryType){!Nr.some((e=>e.entries.some((e=>t.duration===e.duration&&t.startTime===e.startTime))))&&Pr(t)}}));const e=(()=>{const t=Math.min(Nr.length-1,Math.floor(Ar()/50));return Nr[t]})();e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,r())},i=kr("event",s,{durationThreshold:e.durationThreshold||40});r=yr(t,n,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Er((()=>{s(i.takeRecords()),n.value<0&&Ar()>0&&(n.value=0,n.entries=[]),r(!0)})))},Fr={},jr=t=>{const e=xr(),n=br("LCP");let r;const s=t=>{const s=t[t.length-1];if(s){const t=Math.max(s.startTime-Sr(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[s],r())}},i=kr("largest-contentful-paint",s);if(i){r=yr(t,n);const e=()=>{Fr[n.id]||(s(i.takeRecords()),i.disconnect(),Fr[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{_r.document&&addEventListener(t,e,{once:!0,capture:!0})})),Er(e,!0),e}},Br=t=>{_r.document&&(_r.document.prerendering?addEventListener("prerenderingchange",(()=>Br(t)),!0):"complete"!==_r.document.readyState?addEventListener("load",(()=>Br(t)),!0):setTimeout(t,0))},Ur=(t,e)=>{e=e||{};const n=br("TTFB"),r=yr(t,n,e.reportAllChanges);Br((()=>{const t=vr();if(t){if(n.value=Math.max(t.responseStart-Sr(),0),n.value<0||n.value>performance.now())return;n.entries=[t],r(!0)}}))},Hr={},zr={};let qr,Wr,Yr,Jr,Gr;function Vr(t,e){return rs(t,e),zr[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);kr(t,(e=>{Kr(t,{entries:e})}),e)}(t),zr[t]=!0),ss(t,e)}function Kr(t,e){const n=Hr[t];if(n&&n.length)for(const s of n)try{s(e)}catch(r){gr&&L.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${et(s)}\nError:`,r)}}function Xr(){return wr((t=>{Kr("cls",{metric:t}),qr=t}),{reportAllChanges:!0})}function Qr(){return Ir((t=>{Kr("fid",{metric:t}),Wr=t}))}function Zr(){return jr((t=>{Kr("lcp",{metric:t}),Yr=t}))}function ts(){return Ur((t=>{Kr("ttfb",{metric:t}),Jr=t}))}function es(){return $r((t=>{Kr("inp",{metric:t}),Gr=t}))}function ns(t,e,n,r,s=!1){let i;return rs(t,e),zr[t]||(i=n(),zr[t]=!0),r&&e({metric:r}),ss(t,e,s?i:void 0)}function rs(t,e){Hr[t]=Hr[t]||[],Hr[t].push(e)}function ss(t,e,n){return()=>{n&&n();const r=Hr[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}function is(t){return"number"==typeof t&&isFinite(t)}function os(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}const as=2147483647;function cs(t){return t/1e3}function us(){return _r&&_r.addEventListener&&_r.performance}let ls,ds,ps=0,hs={};function ms(){const t=us();if(t&&se){t.mark&&_r.performance.mark("sentry-tracing-init");const e=ns("fid",(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=cs(se),r=cs(e.startTime);gr&&L.log("[Measurements] Adding FID"),hs.fid={value:t.value,unit:"millisecond"},hs["mark.fid"]={value:n+r,unit:"second"}}),Qr,Wr),n=function(t,e=!1){return ns("cls",t,Xr,qr,e)}((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(gr&&L.log("[Measurements] Adding CLS"),hs.cls={value:t.value,unit:""},ds=e)}),!0),r=function(t,e=!1){return ns("lcp",t,Zr,Yr,e)}((({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(gr&&L.log("[Measurements] Adding LCP"),hs.lcp={value:t.value,unit:"millisecond"},ls=e)}),!0),s=function(t){return ns("ttfb",t,ts,Jr)}((({metric:t})=>{t.entries[t.entries.length-1]&&(gr&&L.log("[Measurements] Adding TTFB"),hs.ttfb={value:t.value,unit:"millisecond"})}));return()=>{e(),n(),r(),s()}}return()=>{}}function fs(t,e){if(us()&&se){const n=function(t,e){return n=({metric:n})=>{if(void 0===n.value)return;const r=n.entries.find((t=>t.duration===n.value&&void 0!==gs[t.name])),s=qe();if(!r||!s)return;const i=gs[r.name],o=s.getOptions(),a=cs(se+r.startTime),c=cs(n.value),u=void 0!==r.interactionId?t[r.interactionId]:void 0;if(void 0===u)return;const{routeName:l,parentContext:d,activeTransaction:p,user:h,replayId:m}=u,f=void 0!==h?h.email||h.id||h.ip_address:void 0,g=void 0!==p?p.getProfileId():void 0,_=new On({startTimestamp:a,endTimestamp:a+c,op:`ui.interaction.${i}`,name:C(r.target),attributes:{release:o.release,environment:o.environment,transaction:l,...void 0!==f&&""!==f?{user:f}:{},...void 0!==g?{profile_id:g}:{},...void 0!==m?{replay_id:m}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),y=function(t,e,n){if(!bn(e))return!1;let r;return r=void 0!==t&&"function"==typeof e.tracesSampler?e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:_r.location}):void 0!==t&&void 0!==t.sampled?t.sampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1,Fn(r)?!0===r?n:!1===r?0:r*n:(gr&&L.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}(d,o,e);if(y&&Math.random()<y){const t=_?function(t,e){const n={sent_at:(new Date).toISOString()};return e&&(n.dsn=$(e)),me(n,t.map(or))}([_],s.getDsn()):void 0,e=s&&s.getTransport();e&&t&&e.send(t).then(null,(t=>{gr&&L.error("Error while sending interaction:",t)}))}},ns("inp",n,es,Gr);var n}(t,e);return()=>{n()}}return()=>{}}const gs={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 _s(t){const e=us();if(!e||!_r.performance.getEntries||!se)return;gr&&L.log("[Tracing] Adding & adjusting spans using Performance API");const n=cs(se),r=e.getEntries(),{op:s,start_timestamp:i}=Fe(t);if(r.slice(ps).forEach((e=>{const r=cs(e.startTime),s=cs(e.duration);if(!("navigation"===t.op&&i&&n+r<i))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{ys(t,e,r,n)})),ys(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),ys(t,e,"fetch",n,"cache","domainLookupStart"),ys(t,e,"domainLookup",n,"DNS"),function(t,e,n){e.responseEnd&&(os(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+cs(e.requestStart),endTimestamp:n+cs(e.responseEnd)}),os(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+cs(e.responseStart),endTimestamp:n+cs(e.responseEnd)}))}(t,e,n)}(t,e,n);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,s){const i=s+n,o=i+r;os(t,{description:e.name,endTimestamp:o,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(t,e,r,s,n);const i=xr(),o=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&o&&(gr&&L.log("[Measurements] Adding FP"),hs.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&o&&(gr&&L.log("[Measurements] Adding FCP"),hs.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":!function(t,e,n,r,s,i){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const o=Qt(n),a={};vs(a,e,"transferSize","http.response_transfer_size"),vs(a,e,"encodedBodySize","http.response_content_length"),vs(a,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop());o.host&&(a["server.address"]=o.host);a["url.same_origin"]=n.includes(_r.location.origin);const c=i+r,u=c+s;os(t,{description:n.replace(_r.location.origin,""),endTimestamp:u,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:a})}(t,e,e.name,r,s,n)}})),ps=Math.max(r.length-1,0),function(t){const e=_r.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),is(n.rtt)&&(hs["connection.rtt"]={value:n.rtt,unit:"millisecond"}));is(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`);is(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===s){!function(t){const e=vr();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(gr&&L.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(hs),["fcp","fp","lcp"].forEach((t=>{if(!hs[t]||!i||n>=i)return;const e=hs[t].value,r=n+cs(e),s=Math.abs(1e3*(r-i)),o=s-e;gr&&L.log(`[Measurements] Normalized ${t} from ${e} to ${s} (${o})`),hs[t].value=s}));const e=hs["mark.fid"];e&&hs.fid&&(os(t,{description:"first input delay",endTimestamp:e.value+cs(hs.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:e.value}),delete hs["mark.fid"]),"fcp"in hs||delete hs.cls,Object.keys(hs).forEach((t=>{!function(t,e,n){const r=gn();r&&r.setMeasurement(t,e,n)}(t,hs[t].value,hs[t].unit)})),function(t){ls&&(gr&&L.log("[Measurements] Adding LCP Data"),ls.element&&t.setTag("lcp.element",C(ls.element)),ls.id&&t.setTag("lcp.id",ls.id),ls.url&&t.setTag("lcp.url",ls.url.trim().slice(0,200)),t.setTag("lcp.size",ls.size));ds&&ds.sources&&(gr&&L.log("[Measurements] Adding CLS Data"),ds.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,C(e.node)))))}(t)}ls=void 0,ds=void 0,hs={}}function ys(t,e,n,r,s,i){const o=i?e[i]:e[`${n}End`],a=e[`${n}Start`];a&&o&&os(t,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+cs(a),endTimestamp:r+cs(o)})}function vs(t,e,n,r){const s=e[n];null!=s&&s<as&&(t[r]=s)}function Ss(t,e,n,r,s="auto.http.browser"){if(!bn()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(!function(t,e){if(e.response){Sn(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const e=parseInt(n);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus("internal_error");t.end()}(n,t),delete r[e]))}const o=We(),a=qe(),{method:c,url:u}=t.fetchData,l=function(t){try{return new URL(t).href}catch(e){return}}(u),d=l?Qt(l).host:void 0,h=i?kn({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":l,"server.address":d,[Rn]:s},op:"http.client"}):void 0;if(h&&(t.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),n(t.fetchData.url)&&a){const e=t.args[0];t.args[1]=t.args[1]||{};const n=t.args[1];n.headers=function(t,e,n,r,s){const i=s||n.getSpan(),o=hn(),{traceId:a,spanId:c,sampled:u,dsc:l}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?Le(i):he(a,c,u),h=ue(l||(i?Qe(i):Xe(a,e,n))),m=r.headers||("undefined"!=typeof Request&&p(t,Request)?t.headers:void 0);if(m){if("undefined"!=typeof Headers&&p(m,Headers)){const t=new Headers(m);return t.append("sentry-trace",d),h&&t.append(ie,h),t}if(Array.isArray(m)){const t=[...m,["sentry-trace",d]];return h&&t.push([ie,h]),t}{const t="baggage"in m?m.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),h&&e.push(h),{...m,"sentry-trace":d,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":d,baggage:h}}(e,a,o,n,h)}return h}const bs=["localhost",/^\/(?!\/)/],ks={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:bs,tracePropagationTargets:bs};function Es(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:ks.traceFetch,traceXHR:ks.traceXHR,...t},a="function"==typeof i?i:t=>!0,c=t=>function(t,e){return _(t,e||bs)}(t,r||s),u={};e&&Tt((t=>{const e=Ss(t,a,c,u);if(e){const n=xs(t.fetchData.url),r=n?Qt(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r})}o&&e&&ws(e)})),n&&Ht((t=>{const e=function(t,e,n,r){const s=t.xhr,i=s&&s[Ut];if(!bn()||!s||s.__sentry_own_request__||!i)return;const o=e(i.url);if(t.endTimestamp&&o){const t=s.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&void 0!==i.status_code&&(Sn(e,i.status_code),e.end(),delete r[t]))}const a=We(),c=hn(),u=xs(i.url),l=u?Qt(u).host:void 0,d=o?kn({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":l,[Rn]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const p=qe();if(s.setRequestHeader&&n(i.url)&&p){const{traceId:t,spanId:e,sampled:n,dsc:r}={...c.getPropagationContext(),...a.getPropagationContext()};!function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(ie,n)}catch(r){}}(s,d?Le(d):he(t,e,n),ue(r||(d?Qe(d):Xe(t,p,a))))}return d}(t,a,c,u);o&&e&&ws(e)}))}function ws(t){const{url:e}=Fe(t).data||{};if(!e||"string"!=typeof e)return;const n=Vr("resource",(({entries:r})=>{r.forEach((r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(e)){(function(t){const{name:e,version:n}=function(t){let e="unknown",n="unknown",r="";for(const s of t){if("/"===s){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=s}r===t&&(e=r);return{name:e,version:n}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",e]),!se)return r;return[...r,["http.request.redirect_start",Ts(t.redirectStart)],["http.request.fetch_start",Ts(t.fetchStart)],["http.request.domain_lookup_start",Ts(t.domainLookupStart)],["http.request.domain_lookup_end",Ts(t.domainLookupEnd)],["http.request.connect_start",Ts(t.connectStart)],["http.request.secure_connection_start",Ts(t.secureConnectionStart)],["http.request.connection_end",Ts(t.connectEnd)],["http.request.request_start",Ts(t.requestStart)],["http.request.response_start",Ts(t.responseStart)],["http.request.response_end",Ts(t.responseEnd)]]})(r).forEach((e=>t.setAttribute(...e))),setTimeout(n)}}))}))}function Ts(t=0){return((se||performance.timeOrigin)+t)/1e3}function xs(t){try{return new URL(t,_r.location.origin).href}catch(e){return}}const Is={...An,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...ks},Cs=(t={})=>{const e=!!gr&&!(!t.tracePropagationTargets&&!t.tracingOrigins);Hn(),!t.tracePropagationTargets&&t.tracingOrigins&&(t.tracePropagationTargets=t.tracingOrigins);const n={...Is,...t},r=ms(),s={};n.enableInp&&fs(s,n.interactionsSampleRate),n.enableLongTask&&Vr("longtask",(({entries:t})=>{for(const e of t){const t=gn();if(!t)return;const n=cs(se+e.startTime),r=cs(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),n._experiments.enableInteractions&&Vr("event",(({entries:t})=>{for(const e of t){const t=gn();if(!t)return;if("click"===e.name){const n=cs(se+e.startTime),r=cs(e.duration),s={description:C(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},i=M(e.target);i&&(s.attributes={"ui.component_name":i}),t.startChild(s)}}}));const i={name:void 0,context:void 0};function o(t){const e=pn(),{beforeStartSpan:s,idleTimeout:o,finalTimeout:a,heartbeatInterval:c}=n,u="pageload"===t.op;let l;if(u){const e=u?Os("sentry-trace"):"",n=u?Os("baggage"):void 0,{traceId:r,dsc:s,parentSpanId:i,sampled:o}=pe(e,n);l={traceId:r,parentSpanId:i,parentSampled:o,...t,metadata:{...t.metadata,dynamicSamplingContext:s},trimEnd:!0}}else l={trimEnd:!0,...t};const d=s?s(l):l;d.metadata=d.name!==l.name?{...d.metadata,source:"custom"}:d.metadata,i.name=d.name,i.context=d,!1===d.sampled&&gr&&L.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),gr&&L.log(`[Tracing] Starting ${d.op} transaction on scope`);const{location:p}=_r,h=Un(e,d,o,a,!0,{location:p},c,u);return u&&_r.document&&(_r.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(_r.document.readyState)&&h.sendAutoFinishSignal()})),["interactive","complete"].includes(_r.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback((t=>{r(),_s(t)})),h}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(t){const r=t.getOptions(),{markBackgroundSpan:a,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:d,_experiments:p}=n,h=r&&r.tracePropagationTargets,m=h||n.tracePropagationTargets;let f;gr&&e&&h&&L.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 g=_r.location&&_r.location.href;if(t.on&&(t.on("startNavigationSpan",(t=>{f&&(gr&&L.log(`[Tracing] Finishing current transaction with op: ${Fe(f).op}`),f.end()),f=o({op:"navigation",...t})})),t.on("startPageLoadSpan",(t=>{f&&(gr&&L.log(`[Tracing] Finishing current transaction with op: ${Fe(f).op}`),f.end()),f=o({op:"pageload",...t})}))),n.instrumentPageLoad&&t.emit&&_r.location){const e={name:_r.location.pathname,startTimestamp:se?se/1e3:void 0,origin:"auto.pageload.browser",attributes:{[xn]:"url"}};Rs(t,e)}n.instrumentNavigation&&t.emit&&_r.location&&Ft((({to:e,from:n})=>{if(void 0===n&&g&&-1!==g.indexOf(e))g=void 0;else if(n!==e){g=void 0;const e={name:_r.location.pathname,origin:"auto.navigation.browser",attributes:{[xn]:"url"}};Ms(t,e)}})),a&&(_r.document?_r.document.addEventListener("visibilitychange",(()=>{const t=gn();if(_r.document.hidden&&t){const e="cancelled",{op:n,status:r}=Fe(t);gr&&L.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}})):gr&&L.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&function(t,e){let n;const r=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=t,o="ui.action.click",a=gn();if(a&&a.op&&["navigation","pageload"].includes(a.op))return void(gr&&L.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`));if(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!e.name)return void(gr&&L.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`));const{location:c}=_r,u={name:e.name,op:o,trimEnd:!0,data:{[xn]:e.context?As(e.context):"url"}};n=Un(pn(),u,r,s,!0,{location:c},i)};["click"].forEach((t=>{_r.document&&addEventListener(t,r,{once:!1,capture:!0})}))}(n,i),n.enableInp&&function(t,e){const n=({entries:n})=>{const r=qe(),s=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,i=void 0!==s?s.getReplayId():void 0,o=gn(),a=We(),c=void 0!==a?a.getUser():void 0;n.forEach((n=>{if(function(t){return"duration"in t}(n)){const r=n.interactionId;if(void 0===r)return;const s=t[r],a=n.duration,u=n.startTime,l=Object.keys(t),d=l.length>0?l.reduce(((e,n)=>t[e].duration<t[n].duration?e:n)):void 0;if("first-input"===n.entryType){if(l.map((e=>t[e])).some((t=>t.duration===a&&t.startTime===u)))return}if(!r)return;if(s)s.duration=Math.max(s.duration,a);else if(l.length<Ds||void 0===d||a>t[d].duration){const n=e.name,s=e.context;n&&s&&(d&&Object.keys(t).length>=Ds&&delete t[d],t[r]={routeName:n,duration:a,parentContext:s,user:c,activeTransaction:o,replayId:i,startTime:u})}}}))};Vr("event",n),Vr("first-input",n)}(s,i),Es({traceFetch:c,traceXHR:u,tracePropagationTargets:m,shouldCreateSpanForRequest:l,enableHTTPTimings:d})},options:n}};function Rs(t,e){if(!t.emit)return;t.emit("startPageLoadSpan",e);const n=En();return"pageload"===(n&&Fe(n).op)?n:void 0}function Ms(t,e){if(!t.emit)return;t.emit("startNavigationSpan",e);const n=En();return"navigation"===(n&&Fe(n).op)?n:void 0}function Os(t){const e=(n=`meta[name=${t}]`,x.document&&x.document.querySelector?x.document.querySelector(n):null);var n;return e?e.getAttribute("content"):void 0}const Ds=10;function As(t){const e=t.attributes&&t.attributes[xn],n=t.data&&t.data[xn],r=t.metadata&&t.metadata.source;return e||n||r}const Ns=E;let Ls=0;function Ps(){return Ls>0}function $s(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(q(t))return t}catch(s){return t}const r=function(){const n=Array.prototype.slice.call(arguments);try{const r=n.map((t=>$s(t,e)));return t.apply(this,r)}catch(r){throw Ls++,setTimeout((()=>{Ls--})),function(...t){const e=pn();if(2===t.length){const[n,r]=t;return n?e.withScope((()=>(e.getStackTop().scope=n,r(n)))):e.withScope(r)}e.withScope(t[0])}((t=>{var s;t.addEventProcessor((t=>(e.mechanism&&(dt(t,void 0),pt(t,e.mechanism)),t.extra={...t.extra,arguments:n},t))),s=r,pn().captureException(s,void 0)})),r}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(i){}z(r,t),H(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(i){}return r}const Fs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function js(t,e){const n=Us(t,e),r={type:e&&e.name,value:zs(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Bs(t,e){return{exception:{values:[js(t,e)]}}}function Us(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Hs.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(s){}return[]}const Hs=/Minified React error #\d+;/i;function zs(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function qs(t,i,o,a,l){let d;if(r(i)&&i.error){return Bs(t,i.error)}if(s(i)||n(i,"DOMException")){const e=i;if("stack"in i)d=Bs(t,i);else{const n=e.name||(s(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;d=Ws(t,r,o,a),dt(d,r)}return"code"in e&&(d.tags={...d.tags,"DOMException.code":`${e.code}`}),d}if(e(i))return Bs(t,i);if(c(i)||u(i)){return d=function(t,e,n,r){const s=qe(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:u(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ys(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Wt(e,i)}};if(n){const e=Us(t,n);e.length&&(o.exception.values[0].stacktrace={frames:e})}return o}(t,i,o,l),pt(d,{synthetic:!0}),d}return d=Ws(t,i,o,a),dt(d,`${i}`),pt(d,{synthetic:!0}),d}function Ws(t,e,n,r){const s={};if(r&&n){const r=Us(t,n);r.length&&(s.exception={values:[{value:e,stacktrace:{frames:r}}]})}if(o(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return s.logentry={message:t,params:n},s}return s.message=e,s}function Ys(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(W(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return m(n[0],e);for(let r=n.length;r>0;r--){const t=n.slice(0,r).join(", ");if(!(t.length>e))return r===n.length?t:m(t,e)}return""}(t),s=e?"promise rejection":"exception";if(r(t))return`Event \`ErrorEvent\` captured as ${s} with message \`${t.message}\``;if(u(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}(t)}\` (type=${t.type}) captured as ${s}`}return`Object captured as ${s} with keys: ${n}`}class Js extends Zn{constructor(t){!function(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:on}))),version:on}),t._metadata=s}(t,"browser",["browser"],Ns.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Ns.document&&Ns.document.addEventListener("visibilitychange",(()=>{"hidden"===Ns.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return function(t,e,n,r){const s=qs(t,e,n&&n.syntheticException||void 0,r);return pt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Gt(s)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,s){const i=Ws(t,e,r&&r.syntheticException||void 0,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Gt(i)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(Fs&&L.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:$(r)}},i=function(t){return[{type:"user_report"},t]}(t);return me(s,[i])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(Fs&&L.log("No outcomes to send"));if(!this._dsn)return void(Fs&&L.log("No dsn provided, will not send outcomes"));Fs&&L.log("Sending outcomes:",t);const e=(n=t,me((r=this._options.tunnel&&$(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:ne(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let Gs;function Vs(t,e=function(){if(Gs)return Gs;if(wt(Ns.fetch))return Gs=Ns.fetch.bind(Ns);const t=Ns.document;let e=Ns.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){Fs&&L.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Gs=e.bind(Ns)}()){let n=0,r=0;return sr(t,(function(s){const i=s.body.length;n+=i,r++;const o={body:s.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,o).then((t=>(n-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(a){return Gs=void 0,n-=i,r--,Vt(a)}}))}const Ks=4;function Xs(t){return sr(t,(function(e){return new Kt(((n,r)=>{const s=new XMLHttpRequest;s.onerror=r,s.onreadystatechange=()=>{s.readyState===Ks&&n({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&s.setRequestHeader(e,t.headers[e]);s.send(e.body)}))}))}const Qs="?";function Zs(t,e,n,r){const s={filename:t,function:e,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const ti=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ei=/\((\S*)(?::(\d+))(?::(\d+))\)/,ni=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ri=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,si=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ii=Z(...[[30,t=>{const e=ti.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=ei.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=oi(e[1]||Qs,e[2]);return Zs(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=ni.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=ri.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Qs;return[n,t]=oi(n,t),Zs(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=si.exec(t);return e?Zs(e[2],e[1]||Qs,+e[3],e[4]?+e[4]:void 0):void 0}]]),oi=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Qs,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},ai=1024,ci="Breadcrumbs",ui=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:ci,setupOnce(){},setup(t){var n;e.console&&function(t){const e="console";st(e,t),it(e,at)}(function(t){return function(e){if(qe()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:te(e.level),message:f(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${f(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}ze(n,{input:e.args,level:e.level})}}(t)),e.dom&&(n=function(t,e){return function(n){if(qe()!==t)return;let r,s,i="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>ai&&(Fs&&L.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=ai),"string"==typeof i&&(i=[i]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=C(e,{keyAttrs:i,maxStringLength:o}),s=M(e)}catch(c){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),ze(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom),st("dom",n),it("dom",St)),e.xhr&&Ht(function(t){return function(e){if(qe()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,s=e.xhr[Ut];if(!n||!r||!s)return;const{method:i,url:o,status_code:a,body:c}=s;ze({category:"xhr",data:{method:i,url:o,status_code:a},type:"http"},{xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r})}}(t)),e.fetch&&Tt(function(t){return function(e){if(qe()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){ze({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args,startTimestamp:n,endTimestamp:r})}else{const t=e.response;ze({category:"fetch",data:{...e.fetchData,status_code:t&&t.status},type:"http"},{input:e.args,response:t,startTimestamp:n,endTimestamp:r})}}}(t)),e.history&&Ft(function(t){return function(e){if(qe()!==t)return;let n=e.from,r=e.to;const s=Qt(Ns.location.href);let i=n?Qt(n):void 0;const o=Qt(r);i&&i.path||(i=s),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),s.protocol===i.protocol&&s.host===i.host&&(n=i.relative),ze({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(e){qe()===t&&ze({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:lt(e)},{event:e})}}(t))}}};Kn(ci,ui);const li="Dedupe",di=()=>{let t;return{name:li,setupOnce(){},processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!hi(t,e))return!1;if(!pi(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=mi(e),r=mi(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!hi(t,e))return!1;if(!pi(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return Fs&&L.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return t=e}}};function pi(t,e){let n=fi(t),r=fi(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const t=r[s],e=n[s];if(t.filename!==e.filename||t.lineno!==e.lineno||t.colno!==e.colno||t.function!==e.function)return!1}return!0}function hi(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(s){return!1}}function mi(t){return t.exception&&t.exception.values&&t.exception.values[0]}function fi(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}}Kn(li,di);const gi="GlobalHandlers",_i=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:gi,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(!function(t){Mt((e=>{const{stackParser:n,attachStacktrace:s}=Si();if(qe()!==t||Ps())return;const{msg:o,url:a,line:c,column:u,error:l}=e,d=void 0===l&&i(o)?function(t,e,n,s){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=r(t)?t.message:t,a="Error";const c=o.match(i);c&&(a=c[1],o=c[2]);const u={exception:{values:[{type:a,value:o}]}};return yi(u,e,n,s)}(o,a,c,u):yi(qs(n,l||o,void 0,s,!1),a,c,u);d.level="error",He(d,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}(t),vi("onerror")),e.onunhandledrejection&&(!function(t){At((e=>{const{stackParser:n,attachStacktrace:r}=Si();if(qe()!==t||Ps())return;const s=function(t){if(a(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(n){}return t}(e),i=a(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:qs(n,s,void 0,r,!0);i.level="error",He(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t),vi("onunhandledrejection"))}}};function yi(t,e,n,r){const s=t.exception=t.exception||{},o=s.values=s.values||[],a=o[0]=o[0]||{},c=a.stacktrace=a.stacktrace||{},u=c.frames=c.frames||[],l=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,p=i(e)&&e.length>0?e:function(){try{return x.document.location.href}catch(t){return""}}();return 0===u.length&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:d}),t}function vi(t){Fs&&L.log(`Global Handler attached: ${t}`)}function Si(){const t=qe();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}Kn(gi,_i);const bi="HttpContext",ki=()=>({name:bi,setupOnce(){},preprocessEvent(t){if(!Ns.navigator&&!Ns.location&&!Ns.document)return;const e=t.request&&t.request.url||Ns.location&&Ns.location.href,{referrer:n}=Ns.document||{},{userAgent:r}=Ns.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}});Kn(bi,ki);const Ei="LinkedErrors",wi=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:Ei,setupOnce(){},preprocessEvent(t,r,s){const i=s.getOptions();y(js,i.stackParser,i.maxValueLength,n,e,t,r)}}};Kn(Ei,wi);const Ti=["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"],xi="TryCatch",Ii=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:xi,setupOnce(){e.setTimeout&&U(Ns,"setTimeout",Ci),e.setInterval&&U(Ns,"setInterval",Ci),e.requestAnimationFrame&&U(Ns,"requestAnimationFrame",Ri),e.XMLHttpRequest&&"XMLHttpRequest"in Ns&&U(XMLHttpRequest.prototype,"send",Mi);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Ti).forEach(Oi)}}}};function Ci(t){return function(...e){const n=e[0];return e[0]=$s(n,{mechanism:{data:{function:et(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Ri(t){return function(e){return t.apply(this,[$s(e,{mechanism:{data:{function:"requestAnimationFrame",handler:et(t)},handled:!1,type:"instrument"}})])}}function Mi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&U(n,t,(function(e){const n={mechanism:{data:{function:t,handler:et(e)},handled:!1,type:"instrument"}},r=q(e);return r&&(n.mechanism.data.handler=et(r)),$s(e,n)}))})),t.apply(this,e)}}function Oi(t){const e=Ns,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(U(n,"addEventListener",(function(e){return function(n,r,s){try{"function"==typeof r.handleEvent&&(r.handleEvent=$s(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:et(r),target:t},handled:!1,type:"instrument"}}))}catch(i){}return e.apply(this,[n,$s(r,{mechanism:{data:{function:"addEventListener",handler:et(r),target:t},handled:!1,type:"instrument"}}),s])}})),U(n,"removeEventListener",(function(t){return function(e,n,r){const s=n;try{const n=s&&s.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(i){}return t.call(this,e,s,r)}})))}Kn(xi,Ii);const Di=[lr(),fr(),Ii(),ui(),_i(),wi(),di(),ki()];function Ai(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=[...Di]),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),Ns.SENTRY_RELEASE&&Ns.SENTRY_RELEASE.id&&(t.release=Ns.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||ii,Array.isArray(n)?Z(...n):n),integrations:Jn(t),transport:t.transport||(Et()?Vs:Xs)};var n;nr(Js,e),t.autoSessionTracking&&function(){if(void 0===Ns.document)return void(Fs&&L.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Ye({ignoreDuration:!0}),Ve(),Ft((({from:t,to:e})=>{void 0!==t&&t!==e&&(Ye({ignoreDuration:!0}),Ve())}))}()}const Ni=Object.prototype.toString;function Li(t,e){return Ni.call(t)===`[object ${e}]`}function Pi(t){return Li(t,"String")}function $i(t){return Li(t,"Object")}function Fi(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function ji(t,e){try{return t instanceof e}catch(n){return!1}}function Bi(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Ui(t,e,n=!1){return!!Pi(t)&&(Li(e,"RegExp")?e.test(t):!!Pi(e)&&(n?t===e:t.includes(e)))}function Hi(t){return t&&t.Math==Math?t:void 0}const zi="object"==typeof globalThis&&Hi(globalThis)||"object"==typeof window&&Hi(window)||"object"==typeof self&&Hi(self)||"object"==typeof global&&Hi(global)||function(){return this}()||{};function qi(){return zi}function Wi(t,e,n){const r=n||zi,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const Yi=qi(),Ji=80;function Gi(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Ji;for(;n&&i++<r&&(u=Vi(n,l),!("html"===u||i>1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(n){return"<unknown>"}}function Vi(t,e){const n=t,r=[];let s,i,o,a,c;if(!n||!n.tagName)return"";if(Yi.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(u&&u.length)u.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&Pi(s))for(i=s.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const 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("")}const Ki="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Xi=["debug","info","warn","error","log","assert","trace"],Qi={};function Zi(t){if(!("console"in zi))return t();const e=zi.console,n={},r=Object.keys(Qi);r.forEach((t=>{const r=Qi[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const to=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Ki?Xi.forEach((n=>{e[n]=(...e)=>{t&&Zi((()=>{zi.console[n](`Sentry Logger [${n}]:`,...e)}))}})):Xi.forEach((t=>{e[t]=()=>{}})),e}();function eo(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${o}`}function no(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);"function"==typeof s&&function(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,ro(t,"__sentry_original__",e)}catch(n){}}(s,r),t[e]=s}function ro(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(r){Ki&&to.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function so(t){if(function(t){switch(Ni.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ji(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...oo(t)};if(e=t,"undefined"!=typeof Event&&ji(e,Event)){const e={type:t.type,target:io(t.target),currentTarget:io(t.currentTarget),...oo(t)};return"undefined"!=typeof CustomEvent&&ji(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function io(t){try{return e=t,"undefined"!=typeof Element&&ji(e,Element)?Gi(t):Object.prototype.toString.call(t)}catch(n){return"<unknown>"}var e}function oo(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function ao(t){return co(t,new Map)}function co(t,e){if(function(t){if(!$i(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(e){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const s of Object.keys(t))void 0!==t[s]&&(r[s]=co(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(co(t,e))})),r}return t}const uo="<anonymous>";function lo(t){try{return t&&"function"==typeof t&&t.name||uo}catch(e){return uo}}const po={},ho={};function mo(t,e){po[t]=po[t]||[],po[t].push(e)}function fo(t,e){ho[t]||(e(),ho[t]=!0)}function go(t,e){const n=t&&po[t];if(n)for(const s of n)try{s(e)}catch(r){Ki&&to.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${lo(s)}\nError:`,r)}}function _o(){const t=zi,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(r){}return"10000000100040008000100000000000".replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}const yo=zi,vo=1e3;let So,bo,ko;function Eo(){if(!yo.document)return;const t=go.bind(null,"dom"),e=wo(t,!0);yo.document.addEventListener("click",e,!1),yo.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=yo[e]&&yo[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(no(n,"addEventListener",(function(e){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=i[n]=i[n]||{refCount:0};if(!o.handler){const r=wo(t);o.handler=r,e.call(this,n,r,s)}o.refCount++}catch(i){}return e.call(this,n,r,s)}})),no(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,s=n.__sentry_instrumentation_handlers__||{},i=s[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete s[e]),0===Object.keys(s).length&&delete n.__sentry_instrumentation_handlers__)}catch(s){}return t.call(this,e,n,r)}})))}))}function wo(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch(e){return null}}(n);if(function(t,e){return"keypress"===t&&(!e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;ro(n,"_sentryCaptured",!0),r&&!r._sentryId&&ro(r,"_sentryId",_o());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==bo)return!1;try{if(!t.target||t.target._sentryId!==ko)return!1}catch(e){}return!0}(n)){t({event:n,name:s,global:e}),bo=n.type,ko=r?r._sentryId:void 0}clearTimeout(So),So=yo.setTimeout((()=>{ko=void 0,bo=void 0}),vo)}}const To=qi();function xo(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Io(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in To))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(xo(To.fetch))return!0;let t=!1;const e=To.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=xo(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Ki&&to.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Co(){Io()&&no(zi,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Mo(e),method:Ro(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Mo(e),method:Ro(e,"method")?String(e.method).toUpperCase():"GET"}}(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return go("fetch",{...s}),t.apply(zi,e).then((t=>(go("fetch",{...s,endTimestamp:Date.now(),response:t}),t)),(t=>{throw go("fetch",{...s,endTimestamp:Date.now(),error:t}),t}))}}))}function Ro(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Mo(t){return"string"==typeof t?t:t?Ro(t,"url")?t.url:t.toString?t.toString():"":""}const Oo=qi();const Do=zi;let Ao;function No(){if(!function(){const t=Oo.chrome,e=t&&t.app&&t.app.runtime,n="history"in Oo&&!!Oo.history.pushState&&!!Oo.history.replaceState;return!e&&n}())return;const t=Do.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=Ao,e=String(n);Ao=e;go("history",{from:t,to:e})}return t.apply(this,e)}}Do.onpopstate=function(...e){const n=Do.location.href,r=Ao;Ao=n;if(go("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(s){}},no(Do.history,"pushState",e),no(Do.history,"replaceState",e)}const Lo=zi,Po="__sentry_xhr_v3__";function $o(){if(!Lo.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;no(t,"open",(function(t){return function(...e){const n=Date.now(),r=Pi(e[0])?e[0].toUpperCase():void 0,s=function(t){if(Pi(t))return t;try{return t.toString()}catch(e){}return}(e[1]);if(!r||!s)return t.apply(this,e);this[Po]={method:r,url:s,request_headers:{}},"POST"===r&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[Po];if(t&&4===this.readyState){try{t.status_code=this.status}catch(e){}go("xhr",{args:[r,s],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?no(this,"onreadystatechange",(function(t){return function(...e){return i(),t.apply(this,e)}})):this.addEventListener("readystatechange",i),no(this,"setRequestHeader",(function(t){return function(...e){const[n,r]=e,s=this[Po];return s&&Pi(n)&&Pi(r)&&(s.request_headers[n.toLowerCase()]=r),t.apply(this,e)}})),t.apply(this,e)}})),no(t,"send",(function(t){return function(...e){const n=this[Po];if(!n)return t.apply(this,e);void 0!==e[0]&&(n.body=e[0]);return go("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}function Fo(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function jo(){return"undefined"!=typeof window&&(!Fo()||void 0!==zi.process&&"renderer"===zi.process.type)}function Bo(t,e=100,n=1/0){try{return Uo("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Uo(t,e,n=1/0,r=1/0,s=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[i,o]=s;if(null==e||["number","boolean","string"].includes(typeof e)&&("number"!=typeof(a=e)||a==a))return e;var a;const c=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}(e))return"[VueViewModel]";if(function(t){return $i(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${lo(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const n=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const u="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===u)return c.replace("object ","");if(i(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return Uo("",l.toJSON(),u-1,r,s)}catch(m){}const d=Array.isArray(e)?[]:{};let p=0;const h=so(e);for(const f in h){if(!Object.prototype.hasOwnProperty.call(h,f))continue;if(p>=r){d[f]="[MaxProperties ~]";break}const t=h[f];d[f]=Uo(f,t,u-1,r,s),p++}return o(e),d}var Ho;!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Ho||(Ho={}));class zo{constructor(t){zo.prototype.__init.call(this),zo.prototype.__init2.call(this),zo.prototype.__init3.call(this),zo.prototype.__init4.call(this),this._state=Ho.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,e){return new zo(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(s){r(s)}else n(e)},t=>{if(e)try{n(e(t))}catch(s){r(s)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new zo(((e,n)=>{let r,s;return this.then((e=>{s=!1,r=e,t&&t()}),(e=>{s=!0,r=e,t&&t()})).then((()=>{s?n(r):e(r)}))}))}__init(){this._resolve=t=>{this._setResult(Ho.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ho.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===Ho.PENDING&&(Fi(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Ho.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===Ho.RESOLVED&&t[1](this._value),this._state===Ho.REJECTED&&t[2](this._value),t[0]=!0)}))}}}const qo=1e3;function Wo(){return Date.now()/qo}const Yo=function(){const{performance:t}=zi;if(!t||!t.now)return Wo;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/qo}(),Jo=(()=>{const{performance:t}=zi;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s<e,o=t.timing&&t.timing.navigationStart,a="number"==typeof o?Math.abs(o+n-r):e;return i||a<e?s<=a?t.timeOrigin:o:r})();const Go=6e4;function Vo(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[t,e,,,n]=a.split(":",5),i=parseInt(t,10),o=1e3*(isNaN(i)?60:i);if(e)for(const a of e.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(s[a]=r+o);else s.all=r+o}else o?s.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?Go:r-e}(o,r):429===e&&(s.all=r+6e4);return s}function Ko(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}const Xo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Qo="production";function Zo(){return Wi("globalEventProcessors",(()=>[]))}function ta(t,e,n,r=0){return new zo(((s,i)=>{const o=t[r];if(null===e||"function"!=typeof o)s(e);else{const a=o({...e},n);Xo&&o.id&&null===a&&to.log(`Event processor "${o.id}" dropped event`),Fi(a)?a.then((e=>ta(t,e,n,r+1).then(s))).then(null,i):ta(t,a,n,r+1).then(s).then(null,i)}}))}function ea(t){const e=Yo(),n={sid:_o(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return ao({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&na(n,t),n}function na(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Yo(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:_o()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}const ra=1;function sa(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:c}=ia(t);return ao({data:r,op:s,parent_span_id:i,span_id:e,status:o,tags:a,trace_id:n,origin:c})}function ia(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function oa(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||_o(),timestamp:e.timestamp||Wo()},u=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:Qo);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==s&&(t.dist=s);t.message&&(t.message=Bi(t.message,i));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=Bi(o.value,i));const a=t.request;a&&a.url&&(a.url=Bi(a.url,i))}(c,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(c,u),void 0===e.type&&function(t,e){const n=zi._sentryDebugIds;if(!n)return;let r;const s=aa.get(e);s?r=s:(r=new Map,aa.set(e,r));const i=Object.keys(n).reduce(((t,s)=>{let i;const o=r.get(s);o?i=o:(i=e(s),r.set(s,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[s];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(o){}}(c,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new _a;return n.update(e),n}(r,n.captureContext);n.mechanism&&function(t,e){const n=function(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}(c,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],p=function(){ga||(ga=new _a);return ga}().getScopeData();if(i){ma(p,i.getScopeData())}if(l){ma(p,l.getScopeData())}const h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),ha(c,p);return ta([...d,...Zo(),...p.eventProcessors],c,n).then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(r){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof o&&o>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Bo(t.data,e,n)}})))},...t.user&&{user:Bo(t.user,e,n)},...t.contexts&&{contexts:Bo(t.contexts,e,n)},...t.extra&&{extra:Bo(t.extra,e,n)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Bo(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>{const r=ia(t).data;return r&&(t.data=Bo(r,e,n)),t})));return r}(t,o,a):t)))}const aa=new WeakMap;function ca(t,e){return wa().captureException(t,void 0)}function ua(){return wa().getClient()}function la(){return wa().getScope()}function da(t){return t.transaction}function pa(t){const e=ua();if(!e)return{};const n=function(t,e,n){const r=e.getOptions(),{publicKey:s}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=ao({environment:r.environment||Qo,release:r.release,user_segment:i,public_key:s,trace_id:t});return e.emit&&e.emit("createDsc",o),o}(ia(t).trace_id||"",e,la()),r=da(t);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;null!=i&&(n.sample_rate=`${i}`);const a=ia(r);return o&&"url"!==o&&(n.transaction=a.description),n.sampled=String(function(t){const{traceFlags:e}=t.spanContext();return Boolean(e&ra)}(r)),e.emit&&e.emit("createDsc",n),n}function ha(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e,c=ao(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=ao(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=ao(s);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=ao(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts});o&&(t.level=o);a&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:sa(e),...t.contexts};const n=da(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:pa(e),...t.sdkProcessingMetadata};const r=ia(n).description;r&&(t.tags={transaction:r,...t.tags})}}(t,r),function(t,e){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function ma(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:m}=e;fa(t,"extra",n),fa(t,"tags",r),fa(t,"user",s),fa(t,"contexts",i),fa(t,"sdkProcessingMetadata",a),o&&(t.level=o),h&&(t.transactionName=h),m&&(t.span=m),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...p}}function fa(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}let ga;class _a{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ya()}static clone(t){return t?t.clone():new _a}clone(){const t=new _a;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...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={...this._sdkProcessingMetadata},t._propagationContext={...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&&na(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={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const 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;const e="function"==typeof t?t(this):t;if(e instanceof _a){const t=e.getScopeData();this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&Object.keys(t.user).length&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint.length&&(this._fingerprint=t.fingerprint),e.getRequestSession()&&(this._requestSession=e.getRequestSession()),t.propagationContext&&(this._propagationContext=t.propagationContext)}else if($i(e)){const e=t;this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.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=ya(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Wo(),...t},s=this._breadcrumbs;return s.push(r),this._breadcrumbs=s.length>n?s.slice(-n):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:r,_extra:s,_user:i,_level:o,_fingerprint:a,_eventProcessors:c,_propagationContext:u,_sdkProcessingMetadata:l,_transactionName:d,_span:p}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:s,user:i,level:o,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:l,transactionName:d,span:p}}applyToEvent(t,e={},n=[]){ha(t,this.getScopeData());return ta([...n,...Zo(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:_o();if(!this._client)return to.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:_o();if(!this._client)return to.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:_o();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(to.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}function ya(){return{traceId:_o(),spanId:_o().substring(16)}}const va=parseFloat("7.116.0"),Sa=100;class ba{constructor(t,e,n,r=va){let s,i;this._version=r,e?s=e:(s=new _a,s.setClient(t)),n?i=n:(i=new _a,i.setClient(t)),this._stack=[{scope:s}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(r){throw this.popScope(),r}return Fi(n)?n.then((t=>(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}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,e){const n=this._lastEventId=e&&e.event_id?e.event_id:_o(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:_o(),s=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:_o();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Sa}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const o={timestamp:Wo(),...t},a=s?Zi((()=>s(o,e))):o;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,i))}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,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=Ea(this);try{t(this)}finally{Ea(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(n){return Xo&&to.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);if(Xo&&!n){this.getClient()?to.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):to.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),na(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:s=Qo}=n&&n.getOptions()||{},{userAgent:i}=zi.navigator||{},o=ea({release:r,environment:s,user:e.getUser(),...i&&{userAgent:i},...t}),a=e.getSession&&e.getSession();return a&&"ok"===a.status&&na(a,{status:"exited"}),this.endSession(),e.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=ka().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Xo&&to.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function ka(){return zi.__SENTRY__=zi.__SENTRY__||{extensions:{},hub:void 0},zi}function Ea(t){const e=ka(),n=Ta(e);return xa(e,t),n}function wa(){const t=ka();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=ka()){e=t,e&&e.__SENTRY__&&e.__SENTRY__.hub&&!Ta(t).isOlderThan(va)||xa(t,new ba);var e;return Ta(t)}(t)}function Ta(t){return Wi("hub",(()=>new ba),t)}function xa(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function Ia(t,e){const n=e&&function(t){return void 0!==t.getClient}(e)?e.getClient():e,r=n&&n.getDsn(),s=n&&n.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,r)||function(t,e){if(!e)return!1;return Ca(t)===Ca(e)}(t,s)}function Ca(t){return"/"===t[t.length-1]?t.slice(0,-1):t}const Ra="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ma=zi,Oa=()=>Ma.__WEB_VITALS_POLYFILL__?Ma.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Ma.performance.timing,e=Ma.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const r in t)"navigationStart"!==r&&"toJSON"!==r&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n})()):Ma.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Da=()=>{const t=Oa();return t&&t.activationStart||0},Aa=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(r){}},Na=(t,e)=>{const n=e=>{"pagehide"!==e.type&&"hidden"!==Ma.document.visibilityState||(t(e),removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0))};Ma.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))};let La=-1;const Pa=()=>(La<0&&(Ma.document&&Ma.document.visibilityState&&(La="hidden"!==Ma.document.visibilityState||Ma.document.prerendering?1/0:0),Na((({timeStamp:t})=>{La=t}))),{get firstHiddenTime(){return La}}),$a={},Fa=t=>{const e=Pa(),n=((t,e)=>{const n=Oa();let r="navigate";return n&&(r=Ma.document&&Ma.document.prerendering||Da()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:-1,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}})("LCP");let r;const s=t=>{const s=t[t.length-1];if(s){const t=Math.max(s.startTime-Da(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[s],r())}},i=Aa("largest-contentful-paint",s);if(i){r=((t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||void 0===r)&&(r=e.value,e.delta=s,t(e)))}})(t,n);const e=()=>{$a[n.id]||(s(i.takeRecords()),i.disconnect(),$a[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{Ma.document&&addEventListener(t,e,{once:!0,capture:!0})})),Na(e),e}},ja={},Ba={};let Ua;function Ha(t,e=!1){return function(t,e,n,r,s=!1){let i;Ya(t,e),Ba[t]||(i=n(),Ba[t]=!0);r&&e({metric:r});return Ja(t,e,s?i:void 0)}("lcp",t,Wa,Ua,e)}function za(t,e){return Ya(t,e),Ba[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Aa(t,(e=>{qa(t,{entries:e})}),e)}(t),Ba[t]=!0),Ja(t,e)}function qa(t,e){const n=ja[t];if(n&&n.length)for(const s of n)try{s(e)}catch(r){Ra&&to.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${lo(s)}\nError:`,r)}}function Wa(){return Fa((t=>{qa("lcp",{metric:t}),Ua=t}))}function Ya(t,e){ja[t]=ja[t]||[],ja[t].push(e)}function Ja(t,e,n){return()=>{n&&n();const r=ja[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}const Ga=zi,Va="sentryReplaySession",Ka="replay_event",Xa="Unable to send Replay",Qa=15e4,Za=5e3,tc=2e7,ec=36e5;function nc(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}var rc,sc;function ic(t){const e=nc([t,"optionalAccess",t=>t.host]);return Boolean(nc([e,"optionalAccess",t=>t.shadowRoot])===t)}function oc(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function ac(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,cc).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e):null}catch(n){return null}var e}function cc(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=ac(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(n){}else if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":"))return function(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}(t.cssText);return e||t.cssText}(sc=rc||(rc={}))[sc.Document=0]="Document",sc[sc.DocumentType=1]="DocumentType",sc[sc.Element=2]="Element",sc[sc.Text=3]="Text",sc[sc.CDATA=4]="CDATA",sc[sc.Comment=5]="Comment";class uc{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const e=nc([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]);return r=()=>-1,null!=(n=e)?n:r();var n,r}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function lc({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function dc({isMasked:t,element:e,value:n,maskInputFn:r}){let s=n||"";return t?(r&&(s=r(s,e)),"*".repeat(s.length)):s}function pc(t){return t.toLowerCase()}function hc(t){return t.toUpperCase()}const mc="__rrweb_original__";function fc(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?pc(e):null}function gc(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let _c=1;const yc=new RegExp("[^a-z0-9-_:]"),vc=-2;function Sc(){return _c++}let bc,kc;const Ec=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wc=/^(?:[a-z+]+:)?\/\//i,Tc=/^www\..*/i,xc=/^(data:)([^,]*),(.*)/i;function Ic(t,e){return(t||"").replace(Ec,((t,n,r,s,i,o)=>{const a=r||i||o,c=n||s||"";if(!a)return t;if(wc.test(a)||Tc.test(a))return`url(${c}${a}${c})`;if(xc.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const u=e.split("/"),l=a.split("/");u.pop();for(const e of l)"."!==e&&(".."===e?u.pop():u.push(e));return`url(${c}${u.join("/")}${c})`}))}const Cc=/^[^ \t\n\r\u000c]+/,Rc=/^[, \t\n\r\u000c]+/;function Mc(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Oc(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Dc(){const t=document.createElement("a");return t.href="",t.href}function Ac(t,e,n,r,s,i){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Mc(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const s=t.exec(e.substring(n));return s?(r=s[0],n+=r.length,r):""}const s=[];for(;r(Rc),!(n>=e.length);){let i=r(Cc);if(","===i.slice(-1))i=Mc(t,i.substring(0,i.length-1)),s.push(i);else{let r="";i=Mc(t,i);let o=!1;for(;;){const t=e.charAt(n);if(""===t){s.push((i+r).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){n+=1,s.push((i+r).trim());break}"("===t&&(o=!0)}r+=t,n+=1}}}return s.join(", ")}(t,r):"style"===n?Ic(r,Dc()):"object"===e&&"data"===n?Mc(t,r):"function"==typeof i?i(n,r,s):r:Mc(t,r):r}function Nc(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Lc(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Lc(t.parentNode,e,n,r+1):-1}function Pc(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(s){return!1}}}function $c(t,e,n,r,s,i){try{const o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){const t=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,c=-1;if(i){if(c=Lc(o,Pc(r,s)),c<0)return!0;a=Lc(o,Pc(e,n),c>=0?c:1/0)}else{if(a=Lc(o,Pc(e,n)),a<0)return!1;c=Lc(o,Pc(r,s),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(o){}return!!i}function Fc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:_={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:b=!1}=e,k=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:rc.Document,childNodes:[],compatMode:t.compatMode}:{type:rc.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:rc.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:k};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskAllText:g,maskTextClass:_,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:S}=e,b=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(s){}return!1}(t,r,s,i),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=pc(t.tagName);return yc.test(e)?"div":e}(t);let E={};const w=t.attributes.length;for(let I=0;I<w;I++){const e=t.attributes[I];e.name&&!Nc(k,e.name,e.value)&&(E[e.name]=Ac(n,k,pc(e.name),e.value,t,c))}if("link"===k&&o){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;e&&(r=ac(e)),r&&(delete E.rel,delete E.href,E._cssText=Ic(r,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=ac(t.sheet);e&&(E._cssText=Ic(e,Dc()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=fc(e),r=gc(e,hc(k),n),s=e.checked;if("submit"!==n&&"button"!==n&&r){const t=$c(e,_,v,y,S,lc({type:n,tagName:hc(k),maskInputOptions:a}));E.value=dc({isMasked:t,element:e,value:r,maskInputFn:u})}s&&(E.checked=s)}"option"===k&&(t.selected&&!a.select?E.selected=!0:delete E.selected);if("canvas"===k&&p)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const s=e.getImageData,i=mc in s?s[mc]:s;if(new Uint32Array(i.call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const e=t.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(l.type,l.quality)&&(E.rr_dataURL=e)}if("img"===k&&d){bc||(bc=n.createElement("canvas"),kc=bc.getContext("2d"));const e=t,r=e.crossOrigin;e.crossOrigin="anonymous";const s=()=>{e.removeEventListener("load",s);try{bc.width=e.naturalWidth,bc.height=e.naturalHeight,kc.drawImage(e,0,0),E.rr_dataURL=bc.toDataURL(l.type,l.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?E.crossOrigin=r:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}"audio"!==k&&"video"!==k||(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime);m||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop));if(b){const{width:e,height:n}=t.getBoundingClientRect();E={class:E.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==k||h(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src);let T;try{customElements.get(k)&&(T=!0)}catch(x){}return{type:rc.Element,tagName:k,attributes:E,childNodes:[],isSVG:Oc(t)||void 0,needBlock:b,rootId:f,isCustom:T}}(t,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:y,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:b,rootId:k,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,d=t.parentNode&&t.parentNode.tagName;let p=t.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{t.nextSibling||t.previousSibling||nc([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])&&(p=ac(t.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,t)}p=Ic(p,Dc())}m&&(p="SCRIPT_PLACEHOLDER");const g=$c(t,r,i,s,o,n);h||m||f||!p||!g||(p=a?a(p,t.parentElement):p.replace(/[\S]/g,"*"));f&&p&&(c.textarea||g)&&(p=u?u(p,t.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=dc({isMasked:$c(t,r,i,s,o,lc({type:null,tagName:d,maskInputOptions:c})),element:t,value:p,maskInputFn:u})}return{type:rc.Text,textContent:p||"",isStyle:h,rootId:l}}(t,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case t.CDATA_SECTION_NODE:return{type:rc.CDATA,textContent:"",rootId:k};case t.COMMENT_NODE:return{type:rc.Comment,textContent:t.textContent||"",rootId:k};default:return!1}}function jc(t){return null==t?"":t.toLowerCase()}function Bc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v={},inlineImages:S=!1,recordCanvas:b=!1,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:I=(()=>!1),newlyAddedElement:C=!1}=e;let{preserveWhiteSpace:R=!0}=e;const M=Fc(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,dataURLOptions:v,inlineImages:S,recordCanvas:b,keepIframeSrcFn:I,newlyAddedElement:C});if(!M)return console.warn(t,"not serialized"),null;let O;O=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===rc.Comment)return!0;if(t.type===rc.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(jc(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===jc(t.attributes.name)||"icon"===jc(t.attributes.rel)||"apple-touch-icon"===jc(t.attributes.rel)||"shortcut icon"===jc(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&jc(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(jc(t.attributes.property).match(/^(og|twitter|fb):/)||jc(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===jc(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===jc(t.attributes.name)||"googlebot"===jc(t.attributes.name)||"bingbot"===jc(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===jc(t.attributes.name)||"generator"===jc(t.attributes.name)||"framework"===jc(t.attributes.name)||"publisher"===jc(t.attributes.name)||"progid"===jc(t.attributes.name)||jc(t.attributes.property).match(/^article:/)||jc(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===jc(t.attributes.name)||"yandex-verification"===jc(t.attributes.name)||"csrf-token"===jc(t.attributes.name)||"p:domain_verify"===jc(t.attributes.name)||"verify-v1"===jc(t.attributes.name)||"verification"===jc(t.attributes.name)||"shopify-checkout-api-token"===jc(t.attributes.name)))return!0}}return!1}(M,y)&&(R||M.type!==rc.Text||M.isStyle||M.textContent.replace(/^\s+|\s+$/gm,"").length)?Sc():vc;const D=Object.assign(M,{id:O});if(r.add(t,D),O===vc)return null;k&&k(t);let A=!p;if(D.type===rc.Element){A=A&&!D.needBlock,delete D.needBlock;const e=t.shadowRoot;e&&oc(e)&&(D.isShadowHost=!0)}if((D.type===rc.Document||D.type===rc.Element)&&A){y.headWhitespace&&D.type===rc.Element&&"head"===D.tagName&&(R=!1);const e={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:I};for(const n of Array.from(t.childNodes)){const t=Bc(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=Bc(n,e);r&&(oc(t.shadowRoot)&&(r.isShadow=!0),D.childNodes.push(r))}}return t.parentNode&&ic(t.parentNode)&&oc(t.parentNode)&&(D.isShadow=!0),D.type===rc.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let s,i=!1;try{s=r.document.readyState}catch(a){return}if("complete"!==s){const r=setTimeout((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(r),i=!0,e()}))}const o="about:blank";if(r.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&E){const n=Bc(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:I});n&&E(t,n)}}),w),D.type===rc.Element&&"link"===D.tagName&&"stylesheet"===D.attributes.rel&&function(t,e,n){let r,s=!1;try{r=t.sheet}catch(o){return}if(r)return;const i=setTimeout((()=>{s||(e(),s=!0)}),n);t.addEventListener("load",(()=>{clearTimeout(i),s=!0,e()}))}(t,(()=>{if(T){const e=Bc(t,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:y,dataURLOptions:v,inlineImages:S,recordCanvas:b,preserveWhiteSpace:R,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:I});e&&T(t,e)}}),x),D}function Uc(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}function Hc(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const zc="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let qc={map:{},getId:()=>(console.error(zc),-1),getNode:()=>(console.error(zc),null),removeNodeFromMap(){console.error(zc)},has:()=>(console.error(zc),!1),reset(){console.error(zc)}};function Wc(t,e,n={}){let r=null,s=0;return function(...i){const o=Date.now();s||!1!==n.leading||(s=o);const a=e-(o-s),c=this;a<=0||a>e?(r&&(!function(...t){du("clearTimeout")(...t)}(r),r=null),s=o,t.apply(c,i)):r||!1===n.trailing||(r=pu((()=>{s=!1===n.leading?0:Date.now(),r=null,t.apply(c,i)}),a))}}function Yc(t,e,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,r?n:{set(t){pu((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>Yc(t,e,i||{},!0)}function Jc(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],s=n(r);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=s,()=>{t[e]=r}}catch(r){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(qc=new Proxy(qc,{get:(t,e,n)=>("map"===e&&console.error(zc),Reflect.get(t,e,n))}));let Gc=Date.now;function Vc(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:Uc([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||Uc([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||Uc([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:Uc([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||Uc([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||Uc([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function Kc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Xc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Qc(t){if(!t)return null;return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}function Zc(t,e,n,r,s){if(!t)return!1;const i=Qc(t);if(!i)return!1;const o=Pc(e,n);if(!s){const t=r&&i.matches(r);return o(i)&&!t}const a=Lc(i,o);let c=-1;return!(a<0)&&(r&&(c=Lc(i,Pc(null,r))),a>-1&&c<0||a<c)}function tu(t,e){return e.getId(t)===vc}function eu(t,e){if(ic(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||eu(t.parentNode,e))}function nu(t){return Boolean(t.changedTouches)}function ru(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function su(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function iu(t){return Boolean(Uc([t,"optionalAccess",t=>t.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Gc=()=>(new Date).getTime());class ou{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return e=this.styleIDMap.get(t),n=()=>-1,null!=e?e:n();var e,n}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 au(t){let e=null;return Uc([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function cu(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=au(n);)n=e;return n}(t);return e.contains(n)}function uu(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||cu(t))}const lu={};function du(t){const e=lu[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const s=e.contentWindow;s&&s[t]&&(r=s[t]),n.head.removeChild(e)}catch(s){}return lu[t]=r.bind(window)}function pu(...t){return du("setTimeout")(...t)}var hu=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(hu||{}),mu=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(mu||{}),fu=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(fu||{}),gu=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(gu||{});function _u(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}function yu(t){return"__ln"in t}class vu{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 e=this.head;for(let n=0;n<t;n++)e=_u([e,"optionalAccess",t=>t.next])||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&yu(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&yu(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Su=(t,e)=>`${t}@${e}`;class bu{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new vu,r=t=>{let e=t,n=vc;for(;n===vc;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},s=s=>{if(!s.parentNode||!uu(s))return;const i=ic(s.parentNode)?this.mirror.getId(au(s)):this.mirror.getId(s.parentNode),o=r(s);if(-1===i||-1===o)return n.addNode(s);const a=Bc(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{ru(t,this.mirror)&&this.iframeManager.addIframe(t),su(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),iu(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});a&&(t.push({parentId:i,nextId:o,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Eu(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||s(a);for(const a of this.addedSet)Tu(this.droppedSet,a)||Eu(this.removes,a,this.mirror)?Tu(this.movedSet,a)?s(a):this.droppedSet.add(a):s(a);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),s(t.value)}const o={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);n.length<e.style.length&&(n+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=t=>{if(!tu(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;Zc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:$c(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,Qc(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if("value"===r){const e=fc(n),r=n.tagName;s=gc(n,r,e);const i=lc({maskInputOptions:this.maskInputOptions,tagName:r,type:e});s=dc({isMasked:$c(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:n,value:s,maskInputFn:this.maskInputFn})}if(Zc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),"type"===r&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Nc(n.tagName,r)&&(i.attributes[r]=Ac(this.doc,pc(n.tagName),pc(r),s,n,this.maskAttributeFn),"style"===r)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");t.oldValue&&r.setAttribute("style",t.oldValue);for(const t of Array.from(n.style)){const e=n.style.getPropertyValue(t),s=n.style.getPropertyPriority(t);e!==r.style.getPropertyValue(t)||s!==r.style.getPropertyPriority(t)?i.styleDiff[t]=""===s?e:[e,s]:i._unchangedStyles[t]=[e,s]}for(const t of Array.from(r.style))""===n.style.getPropertyValue(t)&&(i.styleDiff[t]=!1)}break}case"childList":if(Zc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=ic(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Zc(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||tu(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(ku(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||eu(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Su(n,r)]?ku(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!ic(t.target)||!oc(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(tu(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Su(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Zc(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),iu(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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((e=>{this[e]=t[e]}))}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 ku(t,e){t.delete(e),e.childNodes.forEach((e=>ku(t,e)))}function Eu(t,e,n){return 0!==t.length&&wu(t,e,n)}function wu(t,e,n){const{parentNode:r}=e;if(!r)return!1;const s=n.getId(r);return!!t.some((t=>t.id===s))||wu(t,r,n)}function Tu(t,e){return 0!==t.size&&xu(t,e)}function xu(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||xu(t,n))}let Iu;const Cu=t=>{if(!Iu)return t;return(...e)=>{try{return t(...e)}catch(n){if(Iu&&!0===Iu(n))return()=>{};throw n}}};function Ru(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}const Mu=[];function Ou(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function Du(t,e){const n=new bu;Mu.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const s=Ru([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(Cu((e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)})));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Au({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,c=[];let u=null;return Object.keys(fu).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t])).forEach((o=>{let a=pc(o);const l=(e=>o=>{const a=Ou(o);if(Zc(a,r,s,i,!0))return;let c=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":c=gu.Mouse;break;case"touch":c=gu.Touch;break;case"pen":c=gu.Pen}c===gu.Touch?fu[e]===fu.MouseDown?l="TouchStart":fu[e]===fu.MouseUp&&(l="TouchEnd"):gu.Pen}else nu(o)&&(c=gu.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===gu.Touch||l.startsWith("Mouse")&&c===gu.Mouse)&&(c=null)):fu[e]===fu.Click&&(c=u,u=null);const d=nu(o)?o.changedTouches[0]:o;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;Cu(t)({type:fu[l],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(o);if(window.PointerEvent)switch(fu[o]){case fu.MouseDown:case fu.MouseUp:a=a.replace("mouse","pointer");break;case fu.TouchStart:case fu.TouchEnd:return}c.push(Hc(a,l,e))})),Cu((()=>{c.forEach((t=>t()))}))}function Nu({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){return Hc("scroll",Cu(Wc(Cu((o=>{const a=Ou(o);if(!a||Zc(a,r,s,i,!0))return;const c=n.getId(a);if(a===e&&e.defaultView){const n=Vc(e.defaultView);t({id:c,x:n.left,y:n.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})})),o.scroll||100)),e)}const Lu=["INPUT","TEXTAREA","SELECT"],Pu=new WeakMap;function $u({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(t){let n=Ou(t);const l=t.isTrusted,g=n&&hc(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Lu.indexOf(g)<0||Zc(n,r,s,i,!0))return;const y=n;if(y.classList.contains(o)||a&&y.matches(a))return;const v=fc(n);let S=gc(y,g,v),b=!1;const k=lc({maskInputOptions:c,tagName:g,type:v}),E=$c(n,p,m,h,f,k);"radio"!==v&&"checkbox"!==v||(b=n.checked),S=dc({isMasked:E,element:n,value:S,maskInputFn:u}),_(n,d?{text:S,isChecked:b,userTriggered:l}:{text:S,isChecked:b});const w=n.name;"radio"===v&&w&&b&&e.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach((t=>{if(t!==n){const e=dc({isMasked:E,element:t,value:gc(t,g,v),maskInputFn:u});_(t,d?{text:e,isChecked:!b,userTriggered:!1}:{text:e,isChecked:!b})}}))}function _(e,r){const s=Pu.get(e);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){Pu.set(e,r);const s=n.getId(e);Cu(t)({...r,id:s})}}const y=("last"===l.input?["change"]:["input","change"]).map((t=>Hc(t,Cu(g),e))),v=e.defaultView;if(!v)return()=>{y.forEach((t=>t()))};const S=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),b=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&y.push(...b.map((t=>Yc(t[0],t[1],{set(){Cu(g)({target:this,isTrusted:!1})}},!1,v)))),Cu((()=>{y.forEach((t=>t()))}))}function Fu(t){return function(t,e){if(Hu("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Hu("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Hu("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Hu("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function ju(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function Bu({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const s="#document"===n.nodeName?Ru([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):Ru([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]),i=Ru([s,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(Ru([s,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&s&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Ru([i,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=Ru([i,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(s){}return n}}),Cu((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function Uu(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=Du(t,t.doc),s=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const s="number"==typeof e.mousemove?e.mousemove:50,i="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,a=[];const c=Wc(Cu((e=>{const n=Date.now()-o;t(a.map((t=>(t.timeOffset-=n,t))),e),a=[],o=null})),i),u=Cu(Wc(Cu((t=>{const e=Ou(t),{clientX:n,clientY:s}=nu(t)?t.changedTouches[0]:t;o||(o=Gc()),a.push({x:n,y:s,id:r.getId(e),timeOffset:Gc()-o}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?mu.Drag:t instanceof MouseEvent?mu.MouseMove:mu.TouchMove)})),s,{trailing:!1})),l=[Hc("mousemove",u,n),Hc("touchmove",u,n),Hc("drag",u,n)];return Cu((()=>{l.forEach((t=>t()))}))}(t),i=Au(t),o=Nu(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return Hc("resize",Cu(Wc(Cu((()=>{const e=Kc(),s=Xc();n===e&&r===s||(t({width:Number(s),height:Number(e)}),n=e,r=s)})),200)),e)}(t,{win:n}),c=$u(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=Cu((o=>Wc(Cu((i=>{const a=Ou(i);if(!a||Zc(a,e,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;t({type:o,id:s.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})})),i.media||500))),c=[Hc("play",a(0),o),Hc("pause",a(1),o),Hc("seeked",a(2),o),Hc("volumechange",a(3),o),Hc("ratechange",a(4),o)];return Cu((()=>{c.forEach((t=>t()))}))}(t),l=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Cu(((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=ju(s,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:a}]}),r.apply(s,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Cu(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=ju(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:o}]}),r.apply(s,i)}))}),r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Cu(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=ju(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:o}),r.apply(s,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Cu(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=ju(s,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:o}),r.apply(s,i)}))}));const c={};zu("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(zu("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),zu("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),zu("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach((([r,s])=>{u[r]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Cu(((r,s,i)=>{const[o,a]=i,{id:c,styleId:u}=ju(s.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:o,index:[...Fu(s),a||0]}]}),r.apply(s,i)}))}),s.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Cu(((r,s,i)=>{const[o]=i,{id:a,styleId:c}=ju(s.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...Fu(s),o]}]}),r.apply(s,i)}))})})),Cu((()=>{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((([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule}))}))}(t,{win:n}),d=Bu(t,t.doc),p=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Cu(((s,o,a)=>{const[c,u,l]=a;if(n.has(c))return i.apply(o,[c,u,l]);const{id:d,styleId:p}=ju(Ru([o,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&t({id:d,styleId:p,set:{property:c,value:u,priority:l},index:Fu(o.parentRule)}),s.apply(o,a)}))});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Cu(((s,i,a)=>{const[c]=a;if(n.has(c))return o.apply(i,[c]);const{id:u,styleId:l}=ju(Ru([i,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&t({id:u,styleId:l,remove:{property:c},index:Fu(i.parentRule)}),s.apply(i,a)}))}),Cu((()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o}))}(t,{win:n}),h=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(t,e,n){const r=new i(t,e,n);return s.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const o=Jc(e.fonts,"add",(function(e){return function(n){return pu(Cu((()=>{const e=s.get(n);e&&(t(e),s.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(o),Cu((()=>{r.forEach((t=>t()))}))}(t):()=>{},m=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=t;let a=!0;const c=Cu((()=>{const t=e.getSelection();if(!t||a&&Ru([t,"optionalAccess",t=>t.isCollapsed]))return;a=t.isCollapsed||!1;const c=[],u=t.rangeCount||0;for(let e=0;e<u;e++){const o=t.getRangeAt(e),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=o;Zc(a,r,s,i,!0)||Zc(l,r,s,i,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}o({ranges:c})}));return c(),Hc("selectionchange",c)}(t),f=function({doc:t,customElementCb:e}){const n=t.defaultView;return n&&n.customElements?Jc(n.customElements,"define",(function(t){return function(n,r,s){try{e({define:{name:n}})}catch(i){}return t.apply(this,[n,r,s])}})):()=>{}}(t),g=[];for(const _ of t.plugins)g.push(_.observer(_.callback,n,_.options));return Cu((()=>{Mu.forEach((t=>t.reset())),r.disconnect(),s(),i(),o(),a(),c(),u(),l(),d(),p(),h(),m(),f(),g.forEach((t=>t()))}))}function Hu(t){return void 0!==window[t]}function zu(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class qu{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const s=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let o=s.get(e);return o||(o=this.generateIdFn(),s.set(e,o),i.set(o,e)),o}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;const s=r.get(e);return s||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}function Wu(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],i=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=i(n)):"call"!==s&&"optionalCall"!==s||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}class Yu{constructor(){this.crossOriginIframeMirror=new qu(Sc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Ju{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new qu(Sc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new qu(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,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Wu([this,"access",t=>t.loadListener,"optionalCall",e=>e(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case hu.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:hu.IncrementalSnapshot,data:{source:mu.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case hu.Meta:case hu.Load:case hu.DomContentLoaded:return!1;case hu.Plugin:return e;case hu.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case hu.IncrementalSnapshot:switch(e.data.source){case mu.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case mu.Drag:case mu.TouchMove:case mu.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case mu.ViewportResize:return!1;case mu.MediaInteraction:case mu.MouseInteraction:case mu.Scroll:case mu.CanvasMutation:case mu.Input:return this.replaceIds(e.data,t,["id"]),e;case mu.StyleSheetRule:case mu.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case mu.Font:return e;case mu.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case mu.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),Wu([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]),e}}return!1}replace(t,e,n,r){for(const s of r)(Array.isArray(e[s])||"number"==typeof e[s])&&(Array.isArray(e[s])?e[s]=t.getIds(n,e[s]):e[s]=t.getId(n,e[s]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===rc.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class Gu{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Vu{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,e){if(!oc(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Du({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Nu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),pu((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Bu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(Jc(t.prototype,"attachShadow",(function(t){return function(r){const s=t.call(this,r);return this.shadowRoot&&uu(this)&&n.addShadowRoot(this.shadowRoot,e),s}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Ku{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class Xu{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new ou,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const s of t){let t;this.styleMirror.has(s)?t=this.styleMirror.getId(s):(t=this.styleMirror.add(s),r.push({styleId:t,rules:Array.from(s.rules||CSSRule,((t,e)=>({rule:cc(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Qu{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...t){du("requestAnimationFrame")(...t)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let Zu,tl;const el=new uc;function nl(t={}){const{emit:e,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:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:y,maskInputFn:v,maskTextFn:S,maxCanvasSize:b=null,packFn:k,sampling:E={},dataURLOptions:w={},mousemoveWait:T,recordCanvas:x=!1,recordCrossOriginIframes:I=!1,recordAfter:C=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:M=!1,inlineImages:O=!1,plugins:D,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:N=new Set([]),errorHandler:L,onMutation:P,getCanvasManager:$}=t;Iu=L;const F=!I||window.parent===window;let j=!1;if(!F)try{window.parent.document&&(j=!1)}catch(tt){j=!0}if(F&&!e)throw new Error("emit function is required");void 0!==T&&void 0===E.mousemove&&(E.mousemove=T),el.reset();const B=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},U=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};let H;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let z=0;const q=t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return k&&!j&&(t=k(t)),t};Zu=(t,s)=>{const i=t;if(i.timestamp=Gc(),!Ko([Mu,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])||i.type===hu.FullSnapshot||i.type===hu.IncrementalSnapshot&&i.data.source===mu.Mutation||Mu.forEach((t=>t.unfreeze())),F)Ko([e,"optionalCall",t=>t(q(i),s)]);else if(j){const t={type:"rrweb",event:q(i),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(i.type===hu.FullSnapshot)H=i,z=0;else if(i.type===hu.IncrementalSnapshot){if(i.data.source===mu.Mutation&&i.data.isAttachIframe)return;z++;const t=r&&z>=r,e=n&&H&&i.timestamp-H.timestamp>n;(t||e)&&Z(!0)}};const W=t=>{Zu({type:hu.IncrementalSnapshot,data:{source:mu.Mutation,...t}})},Y=t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.Scroll,...t}}),J=t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.CanvasMutation,...t}}),G=new Xu({mutationCb:W,adoptedStyleSheetCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.AdoptedStyleSheet,...t}})}),V="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Yu:new Ju({mirror:el,mutationCb:W,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:Zu});for(const nt of D||[])nt.getMirror&&nt.getMirror({nodeMirror:el,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const K=new Qu,X=function(t,e){try{return t?t(e):new Ku}catch(tt){return console.warn("Unable to initialize CanvasManager"),new Ku}}($,{mirror:el,win:window,mutationCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.CanvasMutation,...t}}),recordCanvas:x,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:b,sampling:E.canvas,dataURLOptions:w,errorHandler:L}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Gu:new Vu({mutationCb:W,scrollCb:Y,bypassOptions:{onMutation:P,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:B,dataURLOptions:w,maskAttributeFn:y,maskTextFn:S,maskInputFn:v,recordCanvas:x,inlineImages:O,sampling:E,slimDOMOptions:U,iframeManager:V,stylesheetManager:G,canvasManager:X,keepIframeSrcFn:A,processedNodeManager:K},mirror:el}),Z=(t=!1)=>{Zu({type:hu.Meta,data:{href:window.location.href,width:Xc(),height:Kc()}},t),G.reset(),Q.init(),Mu.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new uc,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:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:S,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:x=(()=>!1)}=e||{};return Bc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:_,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:S,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:el,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:B,maskAttributeFn:y,maskInputFn:v,maskTextFn:S,slimDOM:U,dataURLOptions:w,recordCanvas:x,inlineImages:O,onSerialize:t=>{ru(t,el)&&V.addIframe(t),su(t,el)&&G.trackLinkElement(t),iu(t)&&Q.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),Q.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{G.attachLinkElement(t,e)},keepIframeSrcFn:A});if(!e)return console.warn("Failed to snapshot the document");Zu({type:hu.FullSnapshot,data:{node:e,initialOffset:Vc(window)}}),Mu.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,el.getId(document))};tl=Z;try{const t=[],e=t=>Cu(Uu)({onMutation:P,mutationCb:W,mousemoveCb:(t,e)=>Zu({type:hu.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.MouseInteraction,...t}}),scrollCb:Y,viewportResizeCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.ViewportResize,...t}}),inputCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.Input,...t}}),mediaInteractionCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.MediaInteraction,...t}}),styleSheetRuleCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.StyleSheetRule,...t}}),styleDeclarationCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.StyleDeclaration,...t}}),canvasMutationCb:J,fontCb:t=>Zu({type:hu.IncrementalSnapshot,data:{source:mu.Font,...t}}),selectionCb:t=>{Zu({type:hu.IncrementalSnapshot,data:{source:mu.Selection,...t}})},customElementCb:t=>{Zu({type:hu.IncrementalSnapshot,data:{source:mu.CustomElement,...t}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:B,inlineStylesheet:m,sampling:E,recordCanvas:x,inlineImages:O,userTriggeredOnInput:R,collectFonts:M,doc:t,maskAttributeFn:y,maskInputFn:v,maskTextFn:S,keepIframeSrcFn:A,blockSelector:i,unblockSelector:o,slimDOMOptions:U,dataURLOptions:w,mirror:el,iframeManager:V,stylesheetManager:G,shadowDomManager:Q,processedNodeManager:K,canvasManager:X,ignoreCSSAttributes:N,plugins:Ko([D,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>Zu({type:hu.Plugin,data:{plugin:t.name,payload:e}})})))])||[]},{});V.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(r){console.warn(r)}}));const n=()=>{Z(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(Hc("DOMContentLoaded",(()=>{Zu({type:hu.DomContentLoaded,data:{}}),"DOMContentLoaded"===C&&n()}))),t.push(Hc("load",(()=>{Zu({type:hu.Load,data:{}}),"load"===C&&n()}),window))),()=>{t.forEach((t=>t())),K.destroy(),tl=void 0,Iu=void 0}}catch(et){console.warn(et)}}nl.mirror=el,nl.takeFullSnapshot=function(t){if(!tl)throw new Error("please take full snapshot after start recording");tl(t)};const rl=3;function sl(t){return t>9999999999?t:1e3*t}function il(t){return t>9999999999?t/1e3:t}function ol(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:hu.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:Bo(e,10,1e3)}}),"console"===e.category))))}const al="button,a";function cl(t){return t.closest(al)||t}function ul(t){const e=ll(t);return e&&e instanceof Element?cl(e):e}function ll(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let dl;function pl(t){return dl||(dl=[],no(Ga,"open",(function(t){return function(...e){if(dl)try{dl.forEach((t=>t()))}catch(n){}return t.apply(Ga,e)}}))),dl.push(t),()=>{const e=dl?dl.indexOf(t):-1;e>-1&&dl.splice(e,1)}}class hl{constructor(t,e,n=ol){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=pl((()=>{this._lastMutation=fl()}));this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){if(function(t,e){if(!ml.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this._ignoreSelector)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:il(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=il(t)}registerScroll(t=Date.now()){this._lastScroll=il(t)}registerClick(t){const e=cl(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[],e=fl();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=e&&t.push(n)}));for(const n of t){const t=this._clicks.indexOf(n);t>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(t,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!n&&!r,{clickCount:i,clickBreadcrumb:o}=t;if(s){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Ga.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(e,s)}else if(i>1){const t={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Ga.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const ml=["A","BUTTON","INPUT"];function fl(){return Date.now()/1e3}function gl(t,e){try{if(!function(t){return t.type===rl}(e))return;const{source:n}=e.data;if(n===mu.Mutation&&t.registerMutation(e.timestamp),n===mu.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===mu.MouseInteraction}(e)){const{type:n,id:r}=e.data,s=nl.mirror.getNode(r);s instanceof HTMLElement&&n===fu.Click&&t.registerClick(s)}}catch(n){}}function _l(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var yl;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(yl||(yl={}));const vl=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Sl(t){const e={};for(const n in t)if(vl.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const bl=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?ul(t.event):ll(t.event),n=Gi(r,{maxStringLength:200})||"<unknown>"}catch(s){n="<unknown>"}return{target:r,message:n}}(t);return _l({category:`ui.${t.name}`,...kl(e,n)})}(e);if(!n)return;const r="click"===e.name,s=r?e.event:void 0;var i,o,a;!(r&&t.clickDetector&&s&&s.target)||s.altKey||s.metaKey||s.ctrlKey||s.shiftKey||(i=t.clickDetector,o=n,a=ul(e.event),i.handleClick(o,a)),ol(t,n)};function kl(t,e){const n=nl.mirror.getId(t),r=n&&nl.mirror.getNode(n),s=r&&nl.mirror.getMeta(r),i=s&&function(t){return t.type===yl.Element}(s)?s:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((t=>t.type===yl.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Sl(i.attributes)}}:{}}}function El(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=t;if(!o||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(o)||!i)return null;const a=e||r||s,c=1===i.length;if(!a&&c)return null;const u=Gi(o,{maxStringLength:200})||"<unknown>",l=kl(o,u);return _l({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}(e);n&&ol(t,n)}const wl={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:c,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:xl(i),end:xl(s),name:r,data:{size:u,statusCode:c,decodedBodySize:o,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:s}=t,i=xl(s);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=t;if(0===s)return null;return{type:`${e}.${f}`,start:xl(h),end:xl(i),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:p}}}};function Tl(t){return wl[t.entryType]?wl[t.entryType](t):null}function xl(t){return((Jo||Ga.performance.timeOrigin)+t)/1e3}function Il(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach((t=>{r.push(za(t,n))})),r.push(Ha((({metric:e})=>{t.replayPerformanceEntries.push(function(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,s=t.value,i=xl(s);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:r?nl.mirror.getId(r):void 0}}}(e))}))),()=>{r.forEach((t=>t()))}}const Cl="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Rl='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 Ml(t,e){Cl&&(to.info(t),e&&Dl(t))}function Ol(t,e){Cl&&(to.info(t),e&&setTimeout((()=>{Dl(t)}),0))}function Dl(t){var e,n;e={category:"console",data:{logger:"replay"},level:"info",message:t},n={level:"info"},wa().addBreadcrumb(e,n)}class Al extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Nl{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>tc)throw new Al;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?sl(t):null}}class Ll{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this._worker.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this._ensureReadyPromise}destroy(){Ml("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,s)=>{const i=({data:e})=>{const o=e;if(o.method===t&&o.id===n){if(this._worker.removeEventListener("message",i),!o.success)return Cl&&to.error("[Replay]",o.response),void s(new Error("Error in compression worker"));r(o.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class Pl{constructor(t){this._worker=new Ll(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=sl(t.timestamp);(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>tc?Promise.reject(new Al):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(t=>{Cl&&to.warn('[Replay] Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class $l{constructor(t){this._fallback=new Nl,this._compression=new Pl(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void Ml("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback,n=[];for(const s of t)n.push(this._compression.addEvent(s));this._compression.hasCheckout=e,this._used=this._compression;try{await Promise.all(n)}catch(r){Cl&&to.warn("[Replay] Failed to add events when switching buffers.",r)}}}function Fl({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob([Rl]);return URL.createObjectURL(t)}();return""}();if(!e)return;Ml("[Replay] Using compression worker"+(t?` from ${t}`:""));const n=new Worker(e);return new $l(n)}catch(e){Ml("[Replay] Failed to create compression worker")}}(e);if(t)return t}return Ml("[Replay] Using simple buffer"),new Nl}function jl(){try{return"sessionStorage"in Ga&&!!Ga.sessionStorage}catch(t){return!1}}function Bl(t){!function(){if(!jl())return;try{Ga.sessionStorage.removeItem(Va)}catch(t){}}(),t.session=void 0}function Ul(t){return void 0!==t&&Math.random()<t}function Hl(t){const e=Date.now();return{id:t.id||_o(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,previousSessionId:t.previousSessionId}}function zl(t){if(jl())try{Ga.sessionStorage.setItem(Va,JSON.stringify(t))}catch(e){}}function ql({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const s=function(t,e){return Ul(t)?"session":!!e&&"buffer"}(t,e),i=Hl({sampled:s,previousSessionId:r});return n&&zl(i),i}function Wl(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function Yl(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return Wl(t.started,e,r)||Wl(t.lastActivity,n,r)}function Jl(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!!Yl(t,{sessionIdleExpire:e,maxReplayDuration:n})&&("buffer"!==t.sampled||0!==t.segmentId)}function Gl({traceInternals:t,sessionIdleExpire:e,maxReplayDuration:n,previousSessionId:r},s){const i=s.stickySession&&function(t){if(!jl())return null;try{const e=Ga.sessionStorage.getItem(Va);if(!e)return null;const n=JSON.parse(e);return Ol("[Replay] Loading existing session",t),Hl(n)}catch(e){return null}}(t);return i?Jl(i,{sessionIdleExpire:e,maxReplayDuration:n})?(Ol("[Replay] Session in sessionStorage is expired, creating new one..."),ql(s,{previousSessionId:i.id})):i:(Ol("[Replay] Creating new session",t),ql(s,{previousSessionId:r}))}function Vl(t,e,n){return!!Xl(t,e)&&(Kl(t,e,n),!0)}async function Kl(t,e,n){if(!t.eventBuffer)return null;try{n&&"buffer"===t.recordingMode&&t.eventBuffer.clear(),n&&(t.eventBuffer.hasCheckout=!0);const r=function(t,e){try{if("function"==typeof e&&function(t){return t.type===hu.Custom}(t))return e(t)}catch(n){return Cl&&to.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",n),null}return t}(e,t.getOptions().beforeAddRecordingEvent);if(!r)return;return await t.eventBuffer.addEvent(r)}catch(r){const e=r&&r instanceof Al?"addEventSizeExceeded":"addEvent";Cl&&to.error(r),await t.stop({reason:e});const n=ua();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function Xl(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=sl(e.timestamp);return!(n+t.timeouts.sessionIdlePause<Date.now())&&(!(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(Ml(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),!1))}function Ql(t){return!t.type}function Zl(t){return"transaction"===t.type}function td(t){return"feedback"===t.type}function ed(t){const e=function(){const t=ua();if(!t)return!1;const e=t.getTransport();if(!e)return!1;return e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!t.isEnabled()||!Ql(n)&&!Zl(n))return;const s=r&&r.statusCode;e&&(!s||s<200||s>=300)||(Zl(n)?function(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,n):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();if("function"==typeof r&&!r(e))return;setTimeout((()=>{t.sendBufferedReplayOrFlush()}))}(t,n))}}function nd(t){return e=>{t.isEnabled()&&Ql(e)&&function(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0].value;if("string"!=typeof n)return;if(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)){ol(t,_l({category:"replay.hydrate-error"}))}}(t,e)}}function rd(t,e=!1){const n=e?ed(t):void 0;return Object.assign(((e,r)=>{if(!t.isEnabled())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Ql(e)&&!Zl(e)&&!td(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(td(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:hu.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1)))}(t,e),e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length||!e.originalException||!e.originalException.__rrweb__)}(e,r)&&!t.getOptions()._experiments.captureExceptions)return Cl&&to.log("[Replay] Ignoring error from rrweb internals",e),null;const s=function(t,e){return"buffer"===t.recordingMode&&e.message!==Xa&&!(!e.exception||e.type)&&Ul(t.getOptions().errorSampleRate)}(t,e);return(s||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}),{id:"Replay"})}function sd(t,e){return e.map((({type:e,start:n,end:r,name:s,data:i})=>{const o=t.throttledAddEvent({type:hu.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:s,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof o?Promise.resolve(null):o}))}function id(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(sd(t,[n]),!1))))}}function od(t,e){t.isEnabled()&&null!==e&&(function(t,e){return(!Cl||!t.getOptions()._experiments.traceInternals)&&Ia(e,ua())}(t,e.name)||t.addUpdate((()=>(sd(t,[e]),!0))))}function ad(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,s=r[Po];if(!e||!n||!s)return null;const{method:i,url:o,status_code:a}=s;return void 0===o?null:{type:"resource.xhr",name:o,start:e/1e3,end:n/1e3,data:{method:i,statusCode:a}}}(e);od(t,n)}}function cd(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=gd(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(n){}}function ud(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function ld(t){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[gd(t)];if(!t)return[void 0]}catch(e){return Cl&&to.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Cl&&to.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function dd(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function pd(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:s,data:ao({method:i,statusCode:o,request:a,response:c})}}function hd(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function md(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:s,warnings:i}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>Qa,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,Qa);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch(r){}return{body:t}}(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function fd(t,e){return Object.keys(t).reduce(((n,r)=>{const s=r.toLowerCase();return e.includes(s)&&t[r]&&(n[s]=t[r]),n}),{})}function gd(t){return new URLSearchParams(t).toString()}function _d(t,e){const n=function(t,e=Ga.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(Ga.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return function(t,e=[],n=!1){return e.some((e=>Ui(t,e,n)))}(n,e)}async function yd(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=e,{url:o,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=t.data,d=_d(o,n.networkDetailAllowUrls)&&!_d(o,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const s=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return bd(t[0],e);if(2===t.length)return bd(t[1],e);return{}}(n,e):{};if(!t)return md(s,r,void 0);const i=vd(n),[o,a]=ld(i),c=md(s,r,o);if(a)return dd(c,a);return c}(n,e.input,u):hd(u),h=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},s,i){if(!t&&void 0!==i)return hd(i);const o=s?Sd(s.headers,r):{};if(!s||!e&&void 0!==i)return md(o,i,void 0);const[a,c]=await async function(t){const e=function(t){try{return t.clone()}catch(e){Cl&&to.warn("[Replay] Failed to clone response body",e)}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise(((e,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(t){return await t.text()})(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}(e);return[t]}catch(n){return Cl&&to.warn("[Replay] Failed to get text body from response",n),[void 0,"BODY_PARSE_ERROR"]}}(s),u=function(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:s,headers:i}){try{const o=t&&t.length&&void 0===r?cd(t,n):r;return s?md(i,o,e?t:void 0):hd(o)}catch(o){return Cl&&to.warn("[Replay] Failed to serialize response body",o),md(i,r,void 0)}}(a,{networkCaptureBodies:e,textEncoder:n,responseBodySize:i,captureDetails:t,headers:o});if(c)return dd(u,c);return u}(d,n,e.response,l);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:c,request:p,response:h}}(t,e,n),s=pd("resource.fetch",r);od(n.replay,s)}catch(r){Cl&&to.error("[Replay] Failed to capture fetch breadcrumb",r)}}function vd(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function Sd(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function bd(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Sd(n,e):Array.isArray(n)?{}:fd(n,e):{}}async function kd(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=e,{url:c,method:u,status_code:l=0,request_body_size:d,response_body_size:p}=t.data;if(!c)return null;if(!a||!_d(c,n.networkDetailAllowUrls)||_d(c,n.networkDetailDenyUrls)){return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:hd(d),response:hd(p)}}const h=a[Po],m=h?fd(h.request_headers,n.networkRequestHeaders):{},f=fd(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t}),{})}(a),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?ld(o):[void 0],[y,v]=n.networkCaptureBodies?function(t){const e=[];try{return[t.responseText]}catch(n){e.push(n)}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return Cl&&to.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Cl&&to.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(n){e.push(n)}return Cl&&to.warn("[Replay] Failed to get xhr response body",...e),[void 0]}(a):[void 0],S=md(m,d,g),b=md(f,p,y);return{startTimestamp:s,endTimestamp:i,url:c,method:u,statusCode:l,request:_?dd(S,_):S,response:v?dd(b,v):b}}(t,e,n),s=pd("resource.xhr",r);od(n.replay,s)}catch(r){Cl&&to.error("[Replay] Failed to capture xhr breadcrumb",r)}}function Ed(t,e,n){const{xhr:r,input:s}=e;if(!r)return;const i=cd(s,n.textEncoder),o=r.getResponseHeader("content-length")?ud(r.getResponseHeader("content-length")):function(t,e,n){try{return cd("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t,n)}catch(r){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(t.data.request_body_size=i),void 0!==o&&(t.data.response_body_size=o)}function wd(t){const e=ua();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(Ed(e,n,t),kd(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e,n){const{input:r,response:s}=e,i=cd(r?vd(r):void 0,n.textEncoder),o=s?ud(s.headers.get("content-length")):void 0;void 0!==i&&(t.data.request_body_size=i),void 0!==o&&(t.data.response_body_size=o)}(e,n,t),yd(e,n,t))}catch(r){Cl&&to.warn("Error when enriching network breadcrumb")}}(c,t,e))):(!function(t){const e="fetch";mo(e,t),fo(e,Co)}(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:s}=t;if(!n)return null;const{method:i,url:o}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s?s.status:void 0}}}(e);od(t,n)}}(t)),mo("xhr",ad(t)),fo("xhr",$o))}catch(n){}}let Td=null;const xd=t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();if(Td===e||!e)return null;if(Td=e,!function(t){return!!t.category}(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return _l(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>Za?(n=!0,`${t.slice(0,Za)}…`):t;if("object"==typeof t)try{const e=Bo(t,7);return JSON.stringify(e).length>Za?(n=!0,`${JSON.stringify(e,null,2).slice(0,Za)}…`):e}catch(e){}return t}));return _l({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return _l(e)}(e);n&&ol(t,n)};function Id(t){const e=la(),n=ua();e.addScopeListener(xd(t)),mo("dom",bl(t)),fo("dom",Eo),function(t){const e="history";mo(e,t),fo(e,No)}(id(t)),wd(t);const r=rd(t,!Cd(n));n&&n.addEventProcessor?n.addEventProcessor(r):function(t){const e=ua();e&&e.addEventProcessor&&e.addEventProcessor(t)}(r),Cd(n)&&(n.on("beforeSendEvent",nd(t)),n.on("afterSendEvent",ed(t)),n.on("createDsc",(e=>{const n=t.getSessionId();if(n&&t.isEnabled()&&"session"===t.recordingMode){t.checkAndHandleExpiredSession()&&(e.replay_id=n)}})),n.on("startTransaction",(e=>{t.lastTransaction=e})),n.on("finishTransaction",(e=>{t.lastTransaction=e})),n.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();n&&n.includeReplay&&t.isEnabled()&&r&&e.contexts&&e.contexts.feedback&&(e.contexts.feedback.replay_id=r)})))}function Cd(t){return!(!t||!t.on)}function Rd(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Md(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(Cl&&to.warn("[Replay] Received replay event after session expired."));const s=r||!e;e=!0,t.clickDetector&&gl(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&s&&t.setInitialState(),!Vl(t,n,s))return!0;if(!s)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;Vl(t,function(t){const e=t.getOptions();return{type:hu.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,s),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(Ml(`[Replay] Updating session start time to earliest event in buffer to ${new Date(e)}`,t.getOptions()._experiments.traceInternals),t.session.started=e,t.getOptions().stickySession&&zl(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}function Od(t,e,n,r){return function(t,e=[]){return[t,e]}(function(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:eo(r)},...s&&{trace:ao({...s})}}}(t,function(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}async function Dd({client:t,scope:e,replayId:n,event:r}){const s={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit&&t.emit("preprocessEvent",r,s);const i=await oa(t.getOptions(),r,s,e,t,wa().getIsolationScope());if(!i)return null;i.platform=i.platform||"javascript";const o=t.getSdkMetadata&&t.getSdkMetadata(),{name:a,version:c}=o&&o.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},i}async function Ad({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=ua(),p=la(),h=d&&d.getTransport(),m=d&&d.getDsn();if(!(d&&h&&m&&i.sampled))return;const f={type:Ka,replay_start_timestamp:l/1e3,timestamp:s/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:i.sampled},g=await Dd({scope:p,client:d,replayId:e,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay",f),void Ml("An event processor returned `null`, will not send event.");delete g.sdkProcessingMetadata;const _=Od(g,o,m,d.getOptions().tunnel);let y;try{y=await h.send(_)}catch(S){const t=new Error(Xa);try{t.cause=S}catch(b){}throw t}if(!y)return y;if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new Nd(y.statusCode);const v=Vo({},y);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(v,"replay"))throw new Ld(v);return y}class Nd extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ld extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Pd(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var s,i;if(n.length)try{return await Ad(t),!0}catch(o){if(o instanceof Nd||o instanceof Ld)throw o;if(s="Replays",i={_retryCount:e.count},wa().setContext(s,i),Cl&&r._experiments&&r._experiments.captureExceptions&&ca(o),e.count>=3){const t=new Error(`${Xa} - max retries exceeded`);try{t.cause=o}catch(a){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Pd(t,e),n(!0)}catch(s){r(s)}}),e.interval)}))}}const $d="__THROTTLED";function Fd(t,e,n){const r=new Map;let s=!1;return(...i)=>{const o=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{n<e&&r.delete(n)}))})(o),[...r.values()].reduce(((t,e)=>t+e),0)>=e){const t=s;return s=!0,t?"__SKIPPED":$d}s=!1;const a=r.get(o)||0;return r.set(o,a+1),t(...i)}}class jd{constructor({options:t,recordingOptions:e}){jd.prototype.__init.call(this),jd.prototype.__init2.call(this),jd.prototype.__init3.call(this),jd.prototype.__init4.call(this),jd.prototype.__init5.call(this),jd.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},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=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return c(),r=t(),r}function c(){void 0!==s&&clearTimeout(s),void 0!==i&&clearTimeout(i),s=i=void 0}function u(){return s&&clearTimeout(s),s=setTimeout(a,e),o&&void 0===i&&(i=setTimeout(a,o)),r}return u.cancel=c,u.flush=function(){return void 0!==s||void 0!==i?a():r},u}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Fd(((t,e)=>function(t,e,n){return Xl(t,e)?Kl(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),s=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;s&&(this.clickDetector=new hl(this,s))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;e<=0&&n<=0||(this._initializeSessionForSampling(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Ol(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Ol("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const t=Gl({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");Ol("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=Gl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=nl({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Md(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this._isEnabled){this._isEnabled=!1;try{Ml("[Replay] Stopping Replay"+(e?` triggered by ${e}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Bl(this)}catch(n){this._handleException(n)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ml("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Ml("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();Ml("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(e),this._updateSessionActivity(e),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Wl(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const t=`${Ga.location.pathname}${Ga.location.hash}${Ga.location.search}`,e=`${Ga.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===$d){const t=_l({category:"replay.throttled"});this.addUpdate((()=>!Vl(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastTransaction||la().getTransaction(),e=(t&&ia(t).data||{})["sentry.source"];if(t&&e&&["route","custom"].includes(e))return ia(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Fl({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Cl&&to.error("[Replay]",t),Cl&&this._options._experiments&&this._options._experiments.captureExceptions&&ca(t)}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0,n=Gl({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return!Jl(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(t),!1)}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Ga.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ga.addEventListener("blur",this._handleWindowBlur),Ga.addEventListener("focus",this._handleWindowFocus),Ga.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Id(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=Il(this)}_removeListeners(){try{Ga.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ga.removeEventListener("blur",this._handleWindowBlur),Ga.removeEventListener("focus",this._handleWindowFocus),Ga.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{"visible"===Ga.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=_l({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=_l({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{El(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;Yl(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):Ml("[Replay] Document has become active, but session has expired")}_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:hu.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=(e=this.performanceEntries,e.map(Tl).filter(Boolean)).concat(this.replayPerformanceEntries);var e;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(sd(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(this.session&&this.eventBuffer&&t){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(sd(t,[Rd(Ga.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await Pd({replayId:t,recordingData:s,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=ua();t&&t.recordDroppedEvent("send_error","replay")}}else Cl&&to.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession())return void(Cl&&to.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const e=this.session.started,n=Date.now()-e;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,s=n>this._options.maxReplayDuration+5e3;if(r||s)return Ml(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&Ml("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(o){Cl&&to.error(o)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&zl(this.session)}__init6(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=_l({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Bd(t,e,n,r){const s=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&s.push(`.${n}`),Zi((()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),s.join(",")}const Ud='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Hd=["content-length","content-type","accept"];let zd=!1;const qd=t=>new Wd(t);class Wd{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:s=!0,useCompression:i=!0,workerUrl:o,_experiments:a={},sessionSampleRate:c,errorSampleRate:u,maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:h=750,mutationLimit:m=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:v=!0,networkRequestHeaders:S=[],networkResponseHeaders:b=[],mask:k=[],maskAttributes:E=["title","placeholder"],unmask:w=[],block:T=[],unblock:x=[],ignore:I=[],maskFn:C,beforeAddRecordingEvent:R,beforeErrorSampling:M,blockClass:O,blockSelector:D,maskInputOptions:A,maskTextClass:N,maskTextSelector:L,ignoreClass:P}={}){this.name=Wd.id;const $=function({mask:t,unmask:e,block:n,unblock:r,ignore:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l={maskTextSelector:Bd(t,[".sentry-mask","[data-sentry-mask]"],a,c),unmaskTextSelector:Bd(e,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:Bd(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,o),unblockSelector:Bd(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Bd(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(l.blockClass=i),a instanceof RegExp&&(l.maskTextClass=a),l}({mask:k,unmask:w,block:T,unblock:x,ignore:I,blockClass:O,blockSelector:D,maskTextClass:N,maskTextSelector:L,ignoreClass:P});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{...A||{},password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return r?s.unmaskTextSelector&&t.matches(s.unmaskTextSelector)?i:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:E,maskAllText:l,privacyOptions:$,key:t,value:e,el:n}),...$,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,ec),stickySession:s,sessionSampleRate:c,errorSampleRate:u,useCompression:i,workerUrl:o,blockAllMedia:p,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:h,mutationLimit:m,slowClickTimeout:f,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:v,networkRequestHeaders:Yd(S),networkResponseHeaders:Yd(b),beforeAddRecordingEvent:R,beforeErrorSampling:M,_experiments:a},"number"==typeof c&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${c} })`),this._initialOptions.sessionSampleRate=c),"number"==typeof u&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ud}`:Ud),this._isInitialized&&jo())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return zd}set _isInitialized(t){zd=t}setupOnce(){jo()&&(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:"session"===this._replay.recordingMode}):Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=function(t){const e=ua(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ao(t)};if(!n)return Zi((()=>{console.warn("SDK client is not available.")})),r;null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&Zi((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this._initialOptions);this._replay=new jd({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const t=ua().getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(t){}}}function Yd(t){return[...Hd,...t.map((t=>t.toLowerCase()))]}Wd.__initStatic();const Jd="7.116.0",Gd="sentry.source",Vd="sentry.op",Kd="sentry.origin";function Xd(t){const e={...t};!function(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:Jd}))),version:Jd}),t._metadata=s}(e,"react"),Ai(e)}let Qd;function Zd(t){const e=Cs({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:s}=t;return{...e,afterAllSetup(i){e.afterAllSetup(i);const o=function(t,e,n){return function(t,e,n=[],r){function s(){return t&&t.location?t.location.pathname:Ns&&Ns.location?Ns.location.pathname:void 0}function i(t){if(0===n.length||!r)return[t,"url"];const e=tp(n,t,r);for(let n=0;n<e.length;n++)if(e[n].match.isExact)return[e[n].match.path,"route"];return[t,"url"]}return(n,r=!0,o=!0)=>{const a=s();if(r&&a){const[t,r]=i(a);Qd=n({name:t,attributes:{[Vd]:"pageload",[Kd]:`auto.pageload.react.${e}`,[Gd]:r}})}o&&t.listen&&t.listen(((t,r)=>{if(r&&("PUSH"===r||"POP"===r)){Qd&&Qd.end();const[r,s]=i(t.pathname);Qd=n({name:r,attributes:{[Vd]:"navigation",[Kd]:`auto.navigation.react.${e}`,[Gd]:s}})}}))}}(t,"reactrouter_v5",e,n)}(n,r,s);o((t=>{Rs(i,t)}),t.instrumentPageLoad,!1),o((t=>{Ms(i,t)}),!1,t.instrumentNavigation)}}}function tp(t,e,n,r=[]){return t.some((t=>{const s=t.path?n(e,t):r.length?r[r.length-1].match:function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}}(e);return s&&(r.push({route:t,match:s}),t.routes&&tp(t.routes,e,n,r)),!!s})),r}export{qd as a,We as g,Xd as i,Zd as r};