1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1fdeca3b-12fd-5ce2-9c6c-28861f5d614c")}catch(e){}}(); 3import{d as Kf,e as Xf,f as Qf,g as Zf,i as ep,l as tp}from"./chunk-PMBEOHG3.js";import{C as Jf}from"./chunk-HEM4QIQA.js";import{Ab as Yf,La as zf,R as Ps,T as nu,X as ru,Y as jf,a as Wf,aa as ou,pb as qf,z as Ls,zb as Vf}from"./chunk-CS323LLY.js";import{a as f,b as E,d as hn,f as $f}from"./chunk-ED5XCO6M.js";var b=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var N=globalThis;var xt="10.45.0";function ut(){return jn(N),N}function jn(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||xt,t[xt]=t[xt]||{}}function on(e,t,n=N){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[xt]=r[xt]||{};return o[e]||(o[e]=t())}var gr=["debug","info","warn","error","log","assert","trace"],IT="Sentry Logger ",to={};function We(e){if(!("console"in N))return e();let t=N.console,n={},r=Object.keys(to);r.forEach(o=>{let i=to[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function bT(){su().enabled=!0}function AT(){su().enabled=!1}function np(){return su().enabled}function RT(...e){iu("log",...e)}function vT(...e){iu("warn",...e)}function NT(...e){iu("error",...e)}function iu(e,...t){b&&np()&&We(()=>{N.console[e](`${IT}[${e}]:`,...t)})}function su(){return b?on("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var _={enable:bT,disable:AT,isEnabled:np,log:RT,warn:vT,error:NT};var rp=/\(error: (.*)\)/,op=/captureMessage|captureException/;function Ds(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let i=[],s=n.split(` 4`);for(let a=r;a<s.length;a++){let c=s[a];c.length>1024&&(c=c.slice(0,1024));let u=rp.test(c)?c.replace(rp,"$1"):c;if(!u.match(/\S*Error: /)){for(let d of t){let l=d(u);if(l){i.push(l);break}}if(i.length>=50+o)break}}return ip(i.slice(o))}}function cu(e){return Array.isArray(e)?Ds(...e):e}function ip(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Us(t).function||"")&&t.pop(),t.reverse(),op.test(Us(t).function||"")&&(t.pop(),op.test(Us(t).function||"")&&t.pop()),t.slice(0,50).map(n=>E(f({},n),{filename:n.filename||Us(t).filename,function:n.function||"?"}))}function Us(e){return e[e.length-1]||{}}var au="<anonymous>";function St(e){try{return!e||typeof e!="function"?au:e.name||au}catch{return au}}function no(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Bs(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function sp(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var Fs={},ap={};function Xe(e,t){Fs[e]=Fs[e]||[],Fs[e].push(t)}function Qe(e,t){if(!ap[e]){ap[e]=!0;try{t()}catch(n){b&&_.error(`Error while instrumenting ${e}`,n)}}}function Be(e,t){let n=e&&Fs[e];if(n)for(let r of n)try{r(t)}catch(o){b&&_.error(`Error while triggering instrumentation handler. 5Type: ${e} 6Name: ${St(r)} 7Error:`,o)}}var uu=null;function li(e){let t="error";Xe(t,e),Qe(t,CT)}function CT(){uu=N.onerror,N.onerror=function(e,t,n,r,o){return Be("error",{column:r,error:o,line:n,msg:e,url:t}),uu?uu.apply(this,arguments):!1},N.onerror.__SENTRY_INSTRUMENTED__=!0}var lu=null;function di(e){let t="unhandledrejection";Xe(t,e),Qe(t,wT)}function wT(){lu=N.onunhandledrejection,N.onunhandledrejection=function(e){return Be("unhandledrejection",e),lu?lu.apply(this,arguments):!0},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var cp=Object.prototype.toString;function Ze(e){switch(cp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return kt(e,Error)}}function ro(e,t){return cp.call(e)===`[object ${t}]`}function fi(e){return ro(e,"ErrorEvent")}function Gs(e){return ro(e,"DOMError")}function du(e){return ro(e,"DOMException")}function ke(e){return ro(e,"String")}function kn(e){return typeof e=="object"&&e!==null&&"__sentry_template_str
7ing__"in e&&"__sentry_template_values__"in e}function lt(e){return e===null||kn(e)||typeof e!="object"&&typeof e!="function"}function we(e){return ro(e,"Object")}function Sr(e){return typeof Event<"u"&&kt(e,Event)}function fu(e){return typeof Element<"u"&&kt(e,Element)}function pu(e){return ro(e,"RegExp")}function Et(e){return!!(e?.then&&typeof e.then=="function")}function mu(e){return we(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function kt(e,t){try{return e instanceof t}catch{return!1}}function pi(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function mi(e){return typeof Request<"u"&&kt(e,Request)}var hu=N,xT=80;function Oe(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],i=0,s=0,a=" > ",c=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||xT;for(;n&&i++<r&&(u=kT(n,d),!(u==="html"||i>1&&s+o.length*c+u.length>=l));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function kT(e,t){let n=e,r=[];if(!n?.tagName)return"";if(hu.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let o=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let i=n.className;if(i&&ke(i)){let s=i.split(/\s+/);for(let a of s)r.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=n.getAttribute(i);s&&r.push(`[${i}="${s}"]`)}return r.join("")}function dt(){try{return hu.document.location.href}catch{return""}}function hi(e){if(!hu.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Ee(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&Hs(o,r);try{e[t]=o}catch{b&&_.log(`Failed to replace method "${t}" in object`,e)}}function Te(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{b&&_.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Hs(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Te(e,"__sentry_original__",t)}catch{}}function Er(e){return e.__sentry_original__}function $s(e){if(Ze(e))return f({message:e.message,name:e.name,stack:e.stack},lp(e));if(Sr(e)){let t=f({type:e.type,target:up(e.target),currentTarget:up(e.currentTarget)},lp(e));return typeof CustomEvent<"u"&&kt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function up(e){try{return fu(e)?Oe(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function lp(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function _u(e){let t=Object.keys($s(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var oo;function Tr(e){if(oo!==void 0)return oo?oo(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=N;return t in n&&typeof n[t]=="function"?(oo=n[t],oo(e)):(oo=null,e())}function Tt(){return Tr(()=>Math.random())}function yr(){return Tr(()=>Date.now())}function _n(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function _i(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n}function Ir(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{pi(o)?n.push(Bs(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function io(e,t,n=!1){return ke(e)?pu(t)?t.test(e):ke(t)?n?e===t:e.includes(t):!1:!1}function Je(e,t=[],n=!1){return t.some(r=>io(e,r,n))}function OT(){let e=N;return e.crypto||e.msCrypto}var gu;function MT(){return Tt()*16}function pe(e=OT()){try{if(e?.randomUUID)return Tr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return gu||(gu="10000000100040008000"+1e11),gu.replace(/[018]/g,t=>(t^(MT()&15)>>t/4).toString(16))}function dp(e){return e.exception?.values?.[0]}function gn(e){let{message:t,event_id:n}=e;if(t)return t;let r=dp(e);return r?r.type&&r.value?`${r.type}: ${r.value}
7`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function so(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function et(e,t){let n=dp(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism=f(f(f({},r),o),t),t&&"data"in t){let i=f(f({},o?.data),t.data);n.mechanism.data=i}}function Su(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(s=>_i(s,0));let i=Math.min(r-1,o);t.context_line=_i(e[i],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(s=>_i(s,0))}function Ws(e){if(fp(e))return!0;try{Te(e,"__sentry_captured__",!0)}catch{}return!1}function fp(e){try{return e.__sentry_captured__}catch{}}var mp=1e3;function Ot(){return yr()/mp}function LT(){let{performance:e}=N;if(!e?.now||!e.timeOrigin)return Ot;let t=e.timeOrigin;return()=>(t+Tr(()=>e.now()))/mp}var pp;function Q(){return(pp??(pp=LT()))()}var Eu=null;function PT(){let{performance:e}=N;if(!e?.now)return;let t=3e5,n=Tr(()=>e.now()),r=yr(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+n-r)<t?i:r-n}function ye(){return Eu===null&&(Eu=PT()),Eu}function hp(e){let t=Q(),n={sid:pe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>UT(n)};return e&&On(n,e),n}function On(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Q(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:pe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function _p(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),On(e,n)}function UT(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function zn(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r=f({},e);for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=zn(r[o],t[o],n-1));return r}function Ke(){return pe()}function tt(){return pe().substring(16)}var Tu="_sentrySpan";function ft(e,t){t?Te(e,Tu,t):delete e[Tu]}function sn(e){return e[Tu]}var DT=100,pt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ke(),sampleRand:Tt()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags=f({},this._tags),t._attributes=f({},this._attributes),t._extra=f({},this._extra),t._contexts=f({},this._contexts),this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata=f({},this._sdkProcessingMetadata),t._propagationContext=f({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,ft(t,sn(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}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,username:void 0},this._session&&On(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags=f(f({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes=f(f({},this._attributes),t),this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra=f(f({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=E(f({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():we(n)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l,conversationId:p}=r||{};return this._tags=f(f({},this._tags),o),this._attributes=f(f({},this._attributes),i),this._extra=f(f({},this._extra),s),this._contexts=f(f({},this._contexts),c),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,ft(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ke(),sampleRand:Tt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:DT;if(r<=0)return this;let o=E(f({timestamp:Ot()},t),{message:t.message?_n(t.message,2048):t.message});return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:sn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=zn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||pe();if(!this._client)return b&&_.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,E(f({originalException:t,syntheticException:o},n),{event_id:r}),this),r}captureMessage(t,n,r){let o=r?.event_id||pe();if(!this._client)return b&&_.warn("No client configured on scope - will not capture message!"),o;let i=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,E(f({originalException:t,syntheticException:i},r),{event_id:o}),this),o}captureEvent(t,n){let r=t.event_id||n?.event_id||pe();return this._client?(this._client.captureEvent(t,E(f({},n),{event_id:r}),this),r):(b&&_.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
7h(t=>{t(this)}),this._notifyingListeners=!1)}};function gp(){return on("defaultCurrentScope",()=>new pt)}function Sp(){return on("defaultIsolationScope",()=>new pt)}var yu=class{constructor(t,n){let r;t?r=t:r=new pt;let o;n?o=n:o=new pt,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return Et(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function ao(){let e=ut(),t=jn(e);return t.stack=t.stack||new yu(gp(),Sp())}function BT(e){return ao().withScope(e)}function FT(e,t){let n=ao();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ep(e){return ao().withScope(()=>e(ao().getIsolationScope()))}function Tp(){return{withIsolationScope:Ep,withScope:BT,withSetScope:FT,withSetIsolationScope:(e,t)=>Ep(t),getCurrentScope:()=>ao().getScope(),getIsolationScope:()=>ao().getIsolationScope()}}function qt(e){let t=jn(e);return t.acs?t.acs:Tp()}function x(){let e=ut();return qt(e).getCurrentScope()}function se(){let e=ut();return qt(e).getIsolationScope()}function Sn(){return on("globalScope",()=>new pt)}function je(...e){let t=ut(),n=qt(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function Iu(...e){let t=ut(),n=qt(t);if(e.length===2){let[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function I(){return x().getClient()}function gi(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,i={trace_id:n,span_id:o||tt()};return r&&(i.parent_span_id=r),i}var Ie="sentry.source",qn="sentry.sample_rate",Si="sentry.previous_trace_sample_rate",le="sentry.op",$="sentry.origin",Vn="sentry.idle_span_finish_reason",En="sentry.measurement_unit",Tn="sentry.measurement_value",co="sentry.custom_span_name",uo="sentry.profile_id",Vt="sentry.exclusive_time";var bu="http.request.method",Au="url.full",Ru="sentry.link.type",vu="gen_ai.conversation.id";function Nu(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function Mn(e,t){e.setAttribute("http.response.status_code",t);let n=Nu(t);n.message!=="unknown_error"&&e.setStatus(n)}var yp="_sentryScope",Ip="_sentryIsolationScope";function GT(e){try{let t=N.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function HT(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function bp(e,t,n){e&&(Te(e,Ip,GT(n)),Te(e,yp,t))}function br(e){let t=e;return{scope:t[yp],isolationScope:HT(t[Ip])}}var Ei="sentry-";var $T=8192;function lo(e){let t=WT(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,i])=>{if(o.startsWith(Ei)){let s=o.slice(Ei.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function js(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Ei}${r}`]=o),n),{});return jT(t)}function WT(e){if(!(!e||!ke(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Ap(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):Ap(e)}function Ap(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function jT(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>$T?(b&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var zT=/^o(\d+)\./,qT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function VT(e){return e==="http"||e==="https"}
7function ze(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function zs(e){let t=qT.exec(e);if(!t){We(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",i="",s="",a=""]=t.slice(1),c="",u=a,d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Rp({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function Rp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function YT(e){if(!b)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(_.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?VT(r)?t&&isNaN(parseInt(t,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function JT(e){return e.match(zT)?.[1]}function qs(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=JT(n)),r}function Ti(e){let t=typeof e=="string"?zs(e):Rp(e);if(!(!t||!YT(t)))return t}function Mt(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var Vs=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function vp(e){if(!e)return;let t=e.match(Vs);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function yi(e,t){let n=vp(e),r=lo(t);if(!n?.traceId)return{traceId:Ke(),sampleRand:Tt()};let o=KT(n,r);r&&(r.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=n;return{traceId:i,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:o}}function Ii(e=Ke(),t=tt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function bi(e=Ke(),t=tt(),n){return`00-${e}-${t}-${n?"01":"00"}`}function KT(e,t){let n=Mt(t?.sample_rand);if(n!==void 0)return n;let r=Mt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Tt()*r:r+Tt()*(1-r):Tt()}function Cu(e,t){let n=qs(e);return t&&n&&t!==n?(_.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(_.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var Js=0,Ks=1,Np=!1;function wp(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:a,links:c}=M(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:s,origin:a,links:c}}function Ai(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:M(e).parent_span_id,i=br(e).scope,s=r?i?.getPropagationContext().propagationSpanId||tt():t;return{parent_span_id:o,span_id:s,trace_id:n}}function Xs(e){let{traceId:t,spanId:n}=e.spanContext(),r=Lt(e);return Ii(t,n,r)}function xp(e){let{traceId:t,spanId:n}=e.spanContext(),r=Lt(e);return bi(t,n,r)}function Qs(e){if(e&&e.length>0)return e.map(s=>{var a=s,{context:c}=a,u=c,{spanId:t,traceId:n,traceFlags:r}=u,o=hn(u,["spanId","traceId","traceFlags"]),{attributes:i}=a;return f({span_id:t,trace_id:n,sampled:r===Ks,attributes:i},o)})}function an(e){return typeof e=="number"?Cp(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Cp(e.getTime()):Q()}function Cp(e){return e>9999999999?e/1e3:e}function M(e){if(ZT(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(QT(e)){let{attributes:r,startTime:o,name:i,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:an(o),timestamp:an(s)||void 0,status:Zs(a),op:r[le],origin:r[$],links:Qs(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function QT(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ZT(e){return typeof e.getSpanJSON=="function"}function Lt(e){let{traceFlags:t}=e.spanContext();return t===Ks}function Zs(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var Ar="_sentryChildSpans",wu="_sentryRootSpan";function ea(e,t){let n=e[wu]||e;Te(t,wu,n),e[Ar]?e[Ar].add(t):Te(e,Ar,new Set([t]))}function kp(e,t){e[Ar]&&e[Ar].delete(t)}function Yn(e){let t=new Set;function n(r){if(!t.has(r)&&Lt(r)){t.add(r);let o=r[Ar]?Array.from(r[Ar]):[];for(let i of o)n(i)}}return n(e),Array.from(t)}function Z(e){return e[wu]||e}function K(){let e=ut(),t=qt(e);return t.getActiveSpan?t.getActiveSpan():sn(x())}function Ri(){Np||(We(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Np=!0)}function Op(e,t){e.updateName(t),e.setAttributes({[Ie]:"custom",[co]:t})}var Mp=!1;function ta(){if(Mp)return;function e(){let t=K(),n=t&&Z(t);if(n){let r="internal_error";b&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Mp=!0,li(e),di(e)}function Le(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||I()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Lp(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Rr(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(ey(n)){if(io(e.description,n))return b&&Lp(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?io(e.description,n.name):!0,o=n.op?e.op&&io(e.op,n.op):!0;if(r&&o)return b&&Lp(e),!0}return!1}function Pp(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function ey(e){return typeof e=="string"||e instanceof RegExp}var Ln="production";var Up="_frozenDsc";function fo(e,t){Te(e,Up,t)}function xu(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ln,release:n.release,public_key:r,trace_id:e,org_id:qs(t)};return t.emit("createDsc",o),o}function vr(e,t){let n=t.getPropagationContext();return n.dsc||xu(n.traceId,e)}function Pe(e){let t=I();if(!t)return{};let n=Z(e),r=M(n),o=r.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[qn]??o[Si];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let c=n[Up];if(c)return a(c);let u=i?.get("sentry.dsc"),d=u&&lo(u);if(d)return a(d);let l=xu(e.spanContext().traceId,t),p=o[Ie],m=r.description;return p!=="url"&&m&&(l.transaction=m),Le()&&(l.sampled=String(Lt(n)),l.sample_rand=i?.get("sentry.sample_rand")??br(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function Dp(e){let t=Pe(e);return js(t)}var nt=class{constructor(t={}){this._traceId=t.traceId||Ke(),this._spanId=t.spanId||tt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Js}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
7addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}};function Ne(e,t=100,n=1/0){try{return ku("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function na(e,t=3,n=100*1024){let r=Ne(e,t);return oy(r)>n?na(e,t-1,n):r}function ku(e,t,n=1/0,r=1/0,o=iy()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=ty(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return ku("",m,c-1,r,o)}catch{}let d=Array.isArray(t)?[]:{},l=0,p=$s(t);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(l>=r){d[m]="[MaxProperties ~]";break}let h=p[m];d[m]=ku(m,h,c-1,r,o),l++}return s(t),d}function ty(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(pi(t))return Bs(t);if(mu(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${St(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=ny(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ny(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function ry(e){return~-encodeURI(e).split(/%..|./).length}function oy(e){return ry(JSON.stringify(e))}function iy(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Ue(e,t=[]){return[e,t]}function Ou(e,t){let[n,r]=e;return[n,[...r,t]]}function Pt(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function po(e,t){return Pt(e,(n,r)=>t.includes(r))}function ra(e){let t=jn(N);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function sy(e){let t=jn(N);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Jn(e){let[t,n]=e,r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[ra(r),i]:r.push(typeof i=="string"?ra(i):i)}for(let i of n){let[s,a]=i;if(o(` 8${JSON.stringify(s)} 9`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ne(a))}o(c)}}return typeof r=="string"?r:ay(r)}function ay(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Mu(e){let t=typeof e=="string"?ra(e):e;function n(s){let a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(sy(n(s)))}let o=r(),i=[];for(;t.length;){let s=r(),a=typeof s.length=="number"?s.length:void 0;i.push([s,a?n(a):r()])}return[o,i]}function Lu(e){return[{type:"span"},e]}function Pu(e){let t=typeof e.data=="string"?ra(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Bp={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function cy(e){return e in Bp}function oa(e){return cy(e)?Bp[e]:e}function Kn(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function vi(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return f(f(f({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ze(r)}),o&&{trace:o})}function uy(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk=E(f({},n),{name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?f(f({},e.sdk?.settings),t.settings):void 0}),e}function Fp(e,t,n,r){let o=Kn(n),i=f(f({sent_at:new Date().toISOString()},o&&{sdk:o}),!!r&&t&&{dsn:ze(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ue(i,[s])}function Gp(e,t,n,r){let o=Kn(n),i=e.type&&e.type!=="replay_event"?e.type:"event";uy(e,n?.sdk);let s=vi(e,o,r,t);return delete e.sdkProcessingMetadata,Ue(s,[[{type:i},e]])}function Hp(e,t){function n(m){return!!m.trace_id&&!!m.public_key}let r=Pe(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s=f(f({sent_at:new Date().toISOString()},n(r)&&{trace:r}),!!i&&o&&{dsn:ze(o)}),{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(m=>!Rr(M(m),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);let l=a?m=>{let h=M(m),g=a(h);return g||(Ri(),h)}:M,p=[];for(let m of u){let h=l(m);h&&p.push(Lu(h))}return Ue(s,p)}function $p(e){if(!b)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=M(e),{spanId:o}=e.spanContext(),i=Lt(e),s=Z(e),a=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){let{op:d,description:l}=M(s);u.push(`root ID: ${s.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}_.log(`${c} 10 ${u.join(` 11 `)}`)}function Wp(e){if(!b)return;let{description:t="< unknown name >",op:n="< unknown op >"}=M(e),{spanId:r}=e.spanContext(),i=Z(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;_.log(s)}function ia(e,t,n,r=K()){let o=r&&Z(r);o&&(b&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Tn]:t,[En]:n}))}function sa(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let r=n.attributes||{},o=r[En],i=r[Tn];
11typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}var jp=1e3,Xn=class{constructor(t={}){this._traceId=t.traceId||Ke(),this._spanId=t.spanId||tt(),this._startTime=t.startTimestamp||Q(),this._links=t.links,this._attributes={},this.setAttributes(f({[$]:"manual",[le]:t.op},t.attributes)),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Ks:Js}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=an(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Ie,"custom"),this}end(t){this._endTime||(this._endTime=an(t),Wp(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[le],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Zs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[$],profile_id:this._attributes[uo],exclusive_time:this._attributes[Vt],measurements:sa(this._events),is_segment:this._isStandaloneSpan&&Z(this)===this||void 0,segment_id:this._isStandaloneSpan?Z(this).spanContext().spanId:void 0,links:Qs(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){b&&_.log("[Tracing] Adding an event to span:",t);let o=zp(n)?n:r||Q(),i=zp(n)?{}:n||{},s={name:t,time:an(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=I();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Z(this)))return;if(this._isStandaloneSpan){this._sampled?dy(Hp([this],t)):(b&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}let r=this._convertSpanToTransaction();r&&(br(this).scope||x()).captureEvent(r)}_convertSpanToTransaction(){if(!qp(M(this)))return;this._name||(b&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=br(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=Yn(this).filter(d=>d!==this&&!ly(d)).map(d=>M(d)).filter(qp),s=this._attributes[Ie];delete this._attributes[co],i.forEach(d=>{delete d.data[co]});let a=f({contexts:{trace:wp(this)},spans:i.length>jp?i.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,jp):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Pe(this)},request:r},s&&{transaction_info:{source:s}}),c=sa(this._events);return c&&Object.keys(c).length&&(b&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}};function zp(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function qp(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ly(e){return e instanceof Xn&&e.isStandaloneSpan()}function dy(e){let t=I();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Nr(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(i){throw t(i),n(),i}return fy(o,t,n,r)}function fy(e,t,n,r){return Et(e)?e.then(o=>(n(),r(o),o),o=>{throw t(o),n(),o}):(n(),r(e),e)}function Vp(e,t,n){if(!Le(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler(E(f({},t),{inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a})),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);let i=Mt(o);if(i===void 0)return b&&_.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return b&&_.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];let s=n<i;return s||b&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,r]}var aa="__SENTRY_SUPPRESS_TRACING__";function rt(e,t){let n=Ni();if(n.startSpan)return n.startSpan(e,t);let r=Bu(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return je(a,()=>Kp(i)(()=>{let u=x(),d=Fu(u,i),p=e.onlyIfParent&&!d?new nt:Du({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return ft(u,p),Nr(()=>t(p),()=>{let{status:m}=M(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:2,message:"internal_error"})},()=>{p.end()})}))}function yt(e,t){let n=Ni();if(n.startSpanManual)return n.startSpanManual(e,t);let r=Bu(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return je(a,()=>Kp(i)(()=>{let u=x(),d=Fu(u,i),p=e.onlyIfParent&&!d?new nt:Du({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return ft(u,p),Nr(()=>t(p,()=>p.end()),()=>{let{status:m}=M(p);p.isRecording()&&(!m||m==="ok")&&p.setStatus({code:2,message:"internal_error"})})}))}function qe(e){let t=Ni();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Bu(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>je(e.scope,s):o!==void 0?s=>Cr(o,s):s=>s())(()=>{let s=x(),a=Fu(s,o);return e.onlyIfParent&&!a?new nt:Du({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}var Jp=(e,t)=>{let n=ut(),r=qt(n);if(r.continueTrace)return r.continueTrace(e,t);let{sentryTrace:o,baggage:i}=e,s=I(),a=lo(i);return s&&!Cu(s,a?.org_id)?Uu(t):je(c=>{let u=yi(o,i);return c.setPropagationContext(u),ft(c,void 0),t()})};function Cr(e,t){let n=Ni();return n.withActiveSpan?n.withActiveSpan(e,t):je(r=>(ft(r,e||void 0),t(r)))}function ca(e){let t=Ni();return t.suppressTracing?t.suppressTracing(e):je(n=>{n.setSDKProcessingMetadata({[aa]:!0});let r=e();return n.setSDKProcessingMetadata({[aa]:void 0}),r})}function Uu(e){return je(t=>(t.setPropagationContext({traceId:Ke(),sampleRand:Tt()}
11),b&&_.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Cr(null,e)))}function Du({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Le()){let s=new nt;if(n||!e){let a=f({sampled:"false",sample_rate:"0",transaction:t.name},Pe(s));fo(s,a)}return s}let o=se(),i;if(e&&!n)i=py(e,r,t),ea(e,i);else if(e){let s=Pe(e),{traceId:a,spanId:c}=e.spanContext(),u=Lt(e);i=Yp(f({traceId:a,parentSpanId:c},t),r,u),fo(i,s)}else{let{traceId:s,dsc:a,parentSpanId:c,sampled:u}=f(f({},o.getPropagationContext()),r.getPropagationContext());i=Yp(f({traceId:s,parentSpanId:c},t),r,u),a&&fo(i,a)}return $p(i),bp(i,r,o),i}function Bu(e){let t=e.experimental||{},n=f({isStandalone:t.standalone},e);if(e.startTime){let r=f({},n);return r.startTimestamp=an(e.startTime),delete r.startTime,r}return n}function Ni(){let e=ut();return qt(e)}function Yp(e,t,n){let r=I(),o=r?.getOptions()||{},{name:i=""}=e,s={spanAttributes:f({},e.attributes),spanName:i,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[d,l,p]=t.getScopeData().sdkProcessingMetadata[aa]?[!1]:Vp(o,{name:i,parentSampled:a,attributes:c,parentSampleRate:
11Mt(u.dsc?.sample_rate)},u.sampleRand),m=new Xn(E(f({},e),{attributes:f({[Ie]:"custom",[qn]:l!==void 0&&p?l:void 0},c),sampled:d}));return!d&&r&&(b&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",m),m}function py(e,t,n){let{spanId:r,traceId:o}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[aa]?!1:Lt(e),s=i?new Xn(E(f({},n),{parentSpanId:r,traceId:o,sampled:i})):new nt({traceId:o});ea(e,s);let a=I();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function Fu(e,t){if(t)return t;if(t===null)return;let n=sn(e);if(!n)return;let r=I();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Z(n):n}function Kp(e){return e!==void 0?t=>Cr(e,t):t=>t()}var mo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},my="heartbeatFailed",hy="idleTimeout",_y="finalTimeout",gy="externalFinish";function ua(e,t={}){let n=new Map,r=!1,o,i=gy,s=!t.disableAutoFinish,a=[],{idleTimeout:c=mo.idleTimeout,finalTimeout:u=mo.finalTimeout,childSpanTimeout:d=mo.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:p=!0}=t,m=I();if(!m||!Le()){let y=new nt,O=f({sample_rate:"0",sampled:"false"},Pe(y));return fo(y,O),y}let h=x(),g=K(),S=Sy(e);S.end=new Proxy(S.end,{apply(y,O,V){if(l&&l(S),O instanceof nt)return;let[v,...L]=V,w=v||Q(),D=an(w),H=Yn(S).filter(U=>U!==S),oe=M(S);if(!H.length||!p)return G(D),Reflect.apply(y,O,[D,...L]);let ie=m.getOptions().ignoreSpans,ae=H?.reduce((U,j)=>{let ue=M(j);return!ue.timestamp||ie&&Rr(ue,ie)?U:U?Math.max(U,ue.timestamp):ue.timestamp},void 0),P=oe.start_timestamp,W=Math.min(P?P+u/1e3:1/0,Math.max(P||-1/0,Math.min(D,ae||1/0)));return G(W),Reflect.apply(y,O,[W,...L])}});function T(){o&&(clearTimeout(o),o=void 0)}function A(y){T(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=hy,S.end(y))},c)}function B(y){o=setTimeout(()=>{!r&&s&&(i=my,S.end(y))},d)}function k(y){T(),n.set(y,!0);let O=Q();B(O+d/1e3)}function Y(y){if(n.has(y)&&n.delete(y),n.size===0){let O=Q();A(O+c/1e3)}}function G(y){r=!0,n.clear(),a.forEach(H=>H()),ft(h,g);let O=M(S),{start_timestamp:V}=O;if(!V)return;O.data[Vn]||S.setAttribute(Vn,i);let L=O.status;(!L||L==="unknown")&&S.setStatus({code:1}),_.log(`[Tracing] Idle span "${O.op}" finished`);let w=Yn(S).filter(H=>H!==S),D=0;w.forEach(H=>{H.isRecording()&&(H.setStatus({code:2,message:"cancelled"}),H.end(y),b&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(H,void 0,2)));let oe=M(H),{timestamp:ie=0,start_timestamp:ae=0}=oe,P=ae<=y,W=(u+c)/1e3,U=ie-ae<=W;if(b){let j=JSON.stringify(H,void 0,2);P?U||_.log("[Tracing] Discarding span since it finished after idle span final timeout",j):_.log("[Tracing] Discarding span since it happened after idle span was finished",j)}(!U||!P)&&(kp(S,H),D++)}),D>0&&S.setAttribute("sentry.idle_span_discarded_spans",D)}return a.push(m.on("spanStart",y=>{if(r||y===S||M(y).timestamp||y instanceof Xn&&y.isStandaloneSpan())return;Yn(S).includes(y)&&k(y.spanContext().spanId)})),a.push(m.on("spanEnd",y=>{r||Y(y.spanContext().spanId)})),a.push(m.on("idleSpanEnableAutoFinish",y=>{y===S&&(s=!0,A(),n.size&&B())})),t.disableAutoFinish||A(),setTimeout(()=>{r||(S.setStatus({code:2,message:"deadline_exceeded"}),i=_y,S.end())},u),S}function Sy(e){let t=qe(e);return ft(x(),t),b&&_.log("[Tracing] Started span is an idle span"),t}var Gu=0,Xp=1,Qp=2;function yn(e){return new Ci(t=>{t(e)})}function wr(e){return new Ci((t,n)=>{n(e)})}var Ci=class e{constructor(t){this._state=Gu,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Gu)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Xp&&n[1](this._value),this._state===Qp&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(i,s)=>{if(this._state===Gu){if(Et(s)){s.then(r,o);return}this._state=i,this._value=s,this._executeHandlers()}},r=i=>{n(Xp,i)},o=i=>
11{n(Qp,i)};try{t(r,o)}catch(i){o(i)}}};function Zp(e,t,n,r=0){try{let o=Hu(t,n,e,r);return Et(o)?o:yn(o)}catch(o){return wr(o)}}function Hu(e,t,n,r){let o=n[r];if(!e||!o)return e;let i=o(f({},e),t);return b&&i===null&&_.log(`Event processor "${o.id||"?"}" dropped event`),Et(i)?i.then(s=>Hu(s,t,n,r+1)):Hu(i,t,n,r+1)}var xr,em,tm,Qn;function la(e){let t=N._sentryDebugIds,n=N._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Qn&&r.length===em&&o.length===tm)return Qn;em=r.length,tm=o.length,Qn={},xr||(xr={});let i=(s,a)=>{for(let c of s){let u=a[c],d=xr?.[c];if(d&&Qn&&u)Qn[d[0]]=u,xr&&(xr[c]=[d[0],u]);else if(u){let l=e(c);for(let p=l.length-1;p>=0;p--){let h=l[p]?.filename;if(h&&Qn&&xr){Qn[h]=u,xr[c]=[h,u];break}}}}};return t&&i(r,t),n&&i(o,n),Qn}function $u(e,t){let n=la(e);if(!n)return[];let r=[];for(let o of t){let i=sp(o);i&&n[i]&&r.push({type:"sourcemap",code_file:o,debug_id:n[i]})}return r}function rm(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;Ey(e,t),r&&Iy(e,r),by(e,n),Ty(e,o),yy(e,i)}function nm(e,t){let{extra:n,tags:r,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:p,propagationContext:m,transactionName:h,span:g}=t;wi(e,"extra",n),wi(e,"tags",r),wi(e,"attributes",o),wi(e,"user",i),wi(e,"contexts",s),e.sdkProcessingMetadata=zn(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),g&&(e.span=g),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext=f(f({},e.propagationContext),m)}function wi(e,t,n){e[t]=zn(e[t],n,1)}function Zn(e,t){let n=Sn().getScopeData();return e&&nm(n,e.getScopeData()),t&&nm(n,t.getScopeData()),n}function Ey(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra=f(f({},n),e.extra)),Object.keys(r).length&&(e.tags=f(f({},r),e.tags)),Object.keys(o).length&&(e.user=f(f({},o),e.user)),Object.keys(i).length&&(e.contexts=f(f({},i),e.contexts)),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Ty(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function yy(e,t){e.sdkProcessingMetadata=f(f({},e.sdkProcessingMetadata),t)}function Iy(e,t){e.contexts=f({trace:Ai(t)},e.contexts),e.sdkProcessingMetadata=f({dynamicSamplingContext:Pe(t)},e.sdkProcessingMetadata);let n=Z(t),r=M(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function by(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function xi(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c=E(f({},t),{event_id:t.event_id||n.event_id||pe(),timestamp:t.timestamp||Ot()}),u=n.integrations||e.integrations.map(T=>T.name);Ay(c,e),Ny(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ry(c,e.stackParser);let d=wy(r,n.captureContext);n.mechanism&&et(c,n.mechanism);let l=o?o.getEventProcessors():[],p=Zn(i,d),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),rm(c,p);let h=[...l,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?yn(c):Zp(h,c,n)).then(T=>(T&&vy(T),typeof s=="number"&&s>0?Cy(T,s,a):T))}function Ay(e,t){let{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||Ln,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=_n(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=_n(a.value,i))})}function Ry(e,t){let n=la(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function vy(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Ny(e,t){t.length>0&&(e.sdk=e.sdk||{}
11,e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Cy(e,t,n){if(!e)return null;let r=f(f(f(f(f({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>f(f({},o),o.data&&{data:Ne(o.data,t,n)}))}),e.user&&{user:Ne(e.user,t,n)}),e.contexts&&{contexts:Ne(e.contexts,t,n)}),e.extra&&{extra:Ne(e.extra,t,n)});return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ne(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>f(f({},o),o.data&&{data:Ne(o.data,t,n)}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ne(e.contexts.flags,3,n)),r}function wy(e,t){if(!t)return e;let n=e?e.clone():new pt;return n.update(t),n}function om(e){if(e)return xy(e)?{captureContext:e}:Oy(e)?{captureContext:e}:e}function xy(e){return e instanceof pt||typeof e=="function"}var ky=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Oy(e){return Object.keys(e).some(t=>ky.includes(t))}function X(e,t){return x().captureException(e,om(t))}function da(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return x().captureMessage(e,n,r)}function In(e,t){return x().captureEvent(e,t)}function ho(e,t){se().setContext(e,t)}function im(e){se().setExtras(e)}function sm(e,t){se().setExtra(e,t)}function am(e){se().setTags(e)}function cm(e,t){se().setTag(e,t)}function um(e){se().setUser(e)}function lm(e){se().setConversationId(e)}function fa(){return se().lastEventId()}async function dm(e){let t=I();return t?t.flush(e):(b&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function fm(e){let t=I();return t?t.close(e):(b&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function pm(){return!!I()}function pa(){let e=I();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function ma(e){se().addEventProcessor(e)}function ki(e){let t=se(),{user:n}=Zn(t,x()),{userAgent:r}=N.navigator||{},o=hp(f(f({user:n},r&&{userAgent:r}),e)),i=t.getSession();return i?.status==="ok"&&On(i,{status:"exited"}),ha(),t.setSession(o),o}function ha(){let e=se(),n=x().getSession()||e.getSession();n&&_p(n),mm(),e.setSession()}function mm(){let e=se(),t=I(),n=e.getSession();n&&t&&t.captureSession(n)}function _o(e=!1){if(e){ha();return}mm()}var My="7";function hm(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ly(e){return`${hm(e)}${e.projectId}/envelope/`}function Py(e,t){let n={sentry_version:My};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Oi(e,t,n){return t||`${Ly(e)}?${Py(e,n)}`}function Wu(e,t){let n=Ti(e);if(!n)return"";let r=`${hm(n)}embed/error-page/`,o=`dsn=${ze(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}var ju=[];function Uy(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function zu(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return Uy(r)}function _m(e,t){let n={};return t.forEach(r=>{r&&Vu(e,r,n)}),n}function qu(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Vu(e,t,n){if(n[t.name]){b&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ju.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ju.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}b&&_.log(`Integration installed: ${t.name}`)}function Mi(e){let t=I();if(!t){b&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Dy(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function By(e,t){let{value:n,unit:r}=Dy(e)?e:{value:e,unit:void 0},o=Fy(n),i=r&&typeof r=="string"?{unit:r}:{};if(o)return f(f({},o),i);if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return f({value:s,type:"string"},i)}function go(e,t=!1){let n={};for(let[r,o]of Object.entries(e??{})){let i=By(o,t);
11i&&(n[r]=i)}return n}function Fy(e){let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var Gy="sentry.timestamp.sequence",Yu=0,Ju;function _a(e){let t=Math.floor(e*1e3);Ju!==void 0&&t!==Ju&&(Yu=0);let n=Yu;return Yu++,Ju=t,{key:Gy,value:{value:n,type:"integer"}}}function ga(e,t){return t?je(t,()=>{let n=K(),r=n?Ai(n):gi(t);return[n?Pe(n):vr(e,t),r]}):[void 0,void 0]}var gm={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Hy(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Sm(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=ze(r)),Ue(o,[Hy(e)])}var $y=100;function bn(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Em(e,t){let n=Ku(),r=Tm(e);r===void 0?n.set(e,[t]):r.length>=$y?(kr(e,r),n.set(e,[t])):n.set(e,[...r,t])}function er(e,t=x(),n=Em){let r=t?.getClient()??I();if(!r){b&&_.warn("No client available to capture log.");return}let{release:o,environment:i,enableLogs:s=!1,beforeSendLog:a}=r.getOptions();if(!s){b&&_.warn("logging option not enabled, log will not be captured.");return}let[,c]=ga(r,t),u=f({},e.attributes),{user:{id:d,email:l,username:p},attributes:m={}}=Zn(se(),t);bn(u,"user.id",d,!1),bn(u,"user.email",l,!1),bn(u,"user.name",p,!1),bn(u,"sentry.release",o),bn(u,"sentry.environment",i);let{name:h,version:g}=r.getSdkMetadata()?.sdk??{};bn(u,"sentry.sdk.name",h),bn(u,"sentry.sdk.version",g);let S=r.getIntegrationByName("Replay"),T=S?.getReplayId(!0);bn(u,"sentry.replay_id",T),T&&S?.getRecordingMode()==="buffer"&&bn(u,"sentry._internal.replay_is_buffering",!0);let A=e.message;if(kn(A)){let{__sentry_template_string__:D,__sentry_template_values__:H=[]}=A;H?.length&&(u["sentry.message.template"]=D),H.forEach((oe,ie)=>{u[`sentry.message.parameter.${ie}`]=oe})}let B=sn(t);bn(u,"sentry.trace.parent_span_id",B?.spanContext().spanId);let k=E(f({},e),{attributes:u});r.emit("beforeCaptureLog",k);let Y=a?We(()=>a(k)):k;if(!Y){r.recordDroppedEvent("before_send","log_item",1),b&&_.warn("beforeSendLog returned null, log will not be captured.");return}let{level:G,message:y,attributes:O={},severityNumber:V}=Y,v=Q(),L=_a(v),w={timestamp:v,level:G,body:y,trace_id:c?.trace_id,severity_number:V??gm[G],attributes:E(f(f({},go(m)),go(O,!0)),{[L.key]:L.value})};n(r,w),r.emit("afterCaptureLog",Y)}function kr(e,t){let n=t??Tm(e)??[];if(n.length===0)return;let r=e.getOptions(),o=Sm(n,r._metadata,r.tunnel,e.getDsn());Ku().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Tm(e){return Ku().get(e)}function Ku(){return on("clientToLogBufferMap",()=>new WeakMap)}function Wy(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function ym(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=ze(r)),Ue(o,[Wy(e)])}var jy=1e3;function Pn(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Im(e,t){let n=Qu(),r=bm(e);r===void 0?n.set(e,[t]):r.length>=jy?(So(e,r),n.set(e,[t])):n.set(e,[...r,t])}function zy(e,t,n){let{release:r,environment:o}=t.getOptions(),i=f({},e.attributes);Pn(i,"user.id",n.id,!1),Pn(i,"user.email",n.email,!1),Pn(i,"user.name",n.username,!1),Pn(i,"sentry.release",r),Pn(i,"sentry.environment",o);let{name:s,version:a}=t.getSdkMetadata()?.sdk??{};Pn(i,"sentry.sdk.name",s),Pn(i,"sentry.sdk.version",a);let c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Pn(i,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&Pn(i,"sentry._internal.replay_is_buffering",!0),E(f({},e),{attributes:i})}function qy(e,t,n,r){let[,o]=ga(t,n),i=sn(n),s=i?i.spanContext().traceId:o?.trace_id,a=i?i.spanContext().spanId:void 0,c=Q(),u=_a(c);return{timestamp:c,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:E(f(f({},go(r)),go(e.attributes,"skip-undefined")),{[u.key]:u.value})}}function Xu(e,t){let n=t?.scope??x(),r=t?.captureSerializedMetric??Im,o=n?.getClient()??I();
11if(!o){b&&_.warn("No client available to capture metric.");return}let{_experiments:i,enableMetrics:s,beforeSendMetric:a}=o.getOptions();if(!(s??i?.enableMetrics??!0)){b&&_.warn("metrics option not enabled, metric will not be captured.");return}let{user:u,attributes:d}=Zn(se(),n),l=zy(e,o,u);o.emit("processMetric",l);let p=a||i?.beforeSendMetric,m=p?p(l):l;if(!m){b&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}let h=qy(m,o,n,d);b&&_.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",m)}function So(e,t){let n=t??bm(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ym(n,r._metadata,r.tunnel,e.getDsn());Qu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function bm(e){return Qu().get(e)}function Qu(){return on("clientToMetricBufferMap",()=>new WeakMap)}function Eo(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var To=Symbol.for("SentryBufferFullError");function Or(e=100){let t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function o(s){if(!n())return wr(To);let a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function i(s){if(!t.size)return yn(!0);
11let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let c=[a,new Promise(u=>Eo(setTimeout(()=>u(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:i}}var Am=60*1e3;function Sa(e,t=yr()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Am:r-t}function Rm(e,t){return e[t]||e.all||0}function Li(e,t,n=yr()){return Rm(e,t)>n}function Pi(e,{statusCode:t,headers:n},r=yr()){let o=f({},e),i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+Sa(s,r):t===429&&(o.all=r+60*1e3);return o}var Zu=64;function Ea(e,t,n=Or(e.bufferSize||Zu)){let r={},o=s=>n.drain(s);function i(s){let a=[];if(Pt(s,(l,p)=>{let m=oa(p);Li(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(l)}),a.length===0)return Promise.resolve({});let c=Ue(s[0],a),u=l=>{if(po(c,["client_report"])){b&&_.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Pt(c,(p,m)=>{e.recordDroppedEvent(l,oa(m))})},d=()=>t({body:Jn(c)}).then(l=>l.statusCode===413?(b&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(b&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Pi(r,l),l),l=>{throw u("network_error"),b&&_.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===To)return b&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:i,flush:o}}function vm(e,t,n){let r=[{type:"client_report"},{timestamp:n||Ot(),discarded_events:e}];return Ue(t?{dsn:t}:{},[r])}function Ta(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Nm(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[uo],exclusive_time:s?.[Vt],measurements:e.measurements,is_segment:!0}}function Cm(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:f(f(f({},e.data),e.profile_id&&{[uo]:e.profile_id}),e.exclusive_time&&{[Vt]:e.exclusive_time})}},measurements:e.measurements}}var wm="Not capturing exception because it's already been captured.",xm="Discarded session because of missing or non-string release",Um=Symbol.for("SentryInternalError"),Dm=Symbol.for("SentryDoNotSendEventError"),Vy=5e3;function ya(e){return{message:e,[Um]:!0}}function el(e){return{message:e,[Dm]:!0}}function km(e){return!!e&&typeof e=="object"&&Um in e}function Om(e){return!!e&&typeof e=="object"&&Dm in e}function Mm(e,t,n,r,o){let i=0,s,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,c=>{i+=r(c),i>=8e5?o(e):a||(a=!0,s=Eo(setTimeout(()=>{o(e)},Vy)))}),e.on("flush",()=>{o(e)})}var Ui=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Or(t.transportOptions?.bufferSize??Zu),t.dsn?this._dsn=Ti(t.dsn):b&&_.warn("No DSN provided, client will not send events."),this._dsn){let r=Oi(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(E(f({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:r}))}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Mm(this,"afterCaptureLog","flushLogs",Xy,kr),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Mm(this,"afterCaptureMetric","flushMetrics",Ky,So)}captureException(t,n,r){let o=pe();if(Ws(t))return b&&_.log(wm),o;let i=f({event_id:o},n);return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r)).then(s=>s),"error"),i.event_id}captureMessage(t,n,r,o){let i=f({event_id:pe()},r),s=kn(t)?t:String(t),a=lt(t),c=a?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(()=>c.then(u=>this._captureEvent(u,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,n,r){let o=pe();if(n?.originalException&&Ws(n.originalException))return b&&_.log(wm),o;let i=f({event_id:o},n),s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope,u=Lm(t.type);return this._process(()=>this._captureEvent(t,i,a||r,c),u),i.event_id}captureSession(t){this.sendSession(t),On(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(!n)return!0;
11this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){kr(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];Vu(this,t,this._integrations),n||qu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Gp(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Ou(r,Pu(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=Ln}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!n){b&&_.warn(xm);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){b&&_.warn(xm);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Fp(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;b&&_.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>n(...i);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return b&&_.error("Error while sending envelope:",n),{}}return b&&_.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=_m(this,t),qu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,i=n.exception?.values;if(i){o=!0,r=!1;for(let c of i)if(c.mechanism?.handled===!1){r=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(On(t,E(f({},r&&{status:"crashed"}),{errors:t.errors||Number(o||r)})),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),xi(i,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts=f({trace:f(f({},a.contexts?.trace),gi(r))},a.contexts);let c=vr(this,r);return a.sdkProcessingMetadata=f({dynamicSamplingContext:c},a.sdkProcessingMetadata),a})}_captureEvent(t,n={},r=x(),o=se()){return b&&tl(t)&&_.log(`Captured error event \`${Ta(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(i=>i.event_id,i=>{b&&(Om(i)?_.log(i.message):km(i)?_.warn(i.message):_.warn(i))})}_processEvent(t,n,r,o){let i=this.getOptions(),{sampleRate:s}=i,a=Bm(t),c=tl(t),d=`before send for type \`${t.type||"error"}\``,l=typeof s>"u"?void 0:Mt(s);if(c&&typeof l=="number"&&Tt()>l)return this.recordDroppedEvent("sample_rate","error"),wr(el(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Lm(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",p),el("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let g=Jy(this,i,m,n);return Yy(g,d)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",p),a){let T=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",T)}throw el(`${d} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let S=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,T=m.spans?m.spans.length:0,A=S-T;A>0&&this.recordDroppedEvent("before_send","span",A)}let g=m.transaction_info;if(a&&g&&m.transaction!==t.transaction){let S="custom";m.transaction_info=E(f({},g),{source:S})}return this.sendEvent(m,n),m}).then(null,m=>{throw Om(m)||km(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),ya(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 12Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===To&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){b&&_.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){b&&_.log("No outcomes to send");return}if(!this._dsn){b&&_.log("No dsn provided, will not send outcomes");return}b&&_.log("Sending outcomes:",t);let n=vm(t,this._options.tunnel&&ze(this._dsn));this.sendEnvelope(n)}};function Lm(e){return e==="replay_event"?"replay":e||"error"}function Yy(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Et(e))return e.then(r=>{if(!we(r)&&r!==null)throw ya(n);return r},r=>
12{throw ya(`${t} rejected with ${r}`)});if(!we(e)&&e!==null)throw ya(n);return e}function Jy(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s,ignoreSpans:a}=t,c=n;if(tl(c)&&o)return o(c,r);if(Bm(c)){if(s||a){let u=Nm(c);if(a?.length&&Rr(u,a))return null;if(s){let d=s(u);d?c=zn(n,Cm(d)):Ri()}if(c.spans){let d=[],l=c.spans;for(let m of l){if(a?.length&&Rr(m,a)){Pp(l,m);continue}if(s){let h=s(m);h?d.push(h):(Ri(),d.push(m))}else d.push(m)}let p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(i){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata=E(f({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:u})}return i(c,r)}}return c}function tl(e){return e.type===void 0}function Bm(e){return e.type==="transaction"}function Ky(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Fm(e.attributes)}function Xy(e){let t=0;return e.message&&(t+=e.message.length*2),t+Fm(e.attributes)}function Fm(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Pm(n[0]):lt(n)?t+=Pm(n):t+=100}),t}function Pm(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Qy(e){return Ze(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function Ia(e){return Qy(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function nl(e,t){t.debug===!0&&(b?_.enable():We(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),x().update(t.initialScope);let r=new e(t);return rl(r),r.init(),r}function rl(e){x().setClient(e)}var ol=100,il=5e3,Zy=36e5;function sl(e){function t(...n){b&&_.log("[Offline]:",...n)}return n=>{let r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");let o=n.createStore(n),i=il,s;function a(l,p,m){return po(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,m):!0}function c(l){s&&clearTimeout(s),s=Eo(setTimeout(async()=>{s=void 0;let p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date().toISOString(),d(p,!0).catch(m=>{t("Failed to retry sending",m)}))},l))}function u(){s||(c(i),i=Math.min(i*2,Zy))}async function d(l,p=!1){if(!p&&po(l,["replay_event","replay_recording"]))return await o.push(l),c(ol),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");let m=await r.send(l),h=ol;if(m){if(m.headers?.["retry-after"])h=Sa(m.headers["retry-after"]);else if(m.headers?.["x-sentry-rate-limits"])h=6e4;else if((m.statusCode||0)>=400)return m}return c(h),i=il,m}catch(m){if(await a(l,m,i))return p?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(i=il,c(ol)),r.flush(l))}}}var Di="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Gm(e,t){let n;return Pt(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function eI(e,t){return n=>{let r=e(n);return E(f({},r),{send:async o=>{let i=Gm(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}})}}function tI(e,t){return Ue(t?E(f({},e[0]),{dsn:t}):e[0],e[1])}function Hm(e,t){return n=>{let r=e(n),o=new Map,i=t||(u=>{let d=u.getEvent();return d?.extra?.[Di]&&Array.isArray(d.extra[Di])?d.extra[Di]:[]});function s(u,d){let l=d?`${u}:${d}`:u,p=o.get(l);if(!p){let m=zs(u);if(!m)return;let h=Oi(m,n.tunnel);p=d?eI(e,d)(E(f({},n),{url:h})):e(E(f({},n),{url:h})),o.set(l,p)}return[u,p]}async function a(u){function d(h){let g=h?.length?h:["event"];return Gm(u,g)}let l=i({envelope:u,getEvent:d}).map(h=>typeof h=="string"?s(h,void 0):s(h.dsn,h.release)).filter(h=>!!h),p=l.length?l:[["",r]];return(await Promise.all(p.map(([h,g])=>g.send(tI(u,h)))))[0]}async function c(u){let d=[...o.values(),r];return(await Promise.all(d.map(p=>p.flush(u)))).every(p=>p)}return{send:a,flush:c}}}var nI="thismessage:/";function yo(e){return"isRelative"in e}function Mr(e,t){let n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?nI:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;let o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function al(e){if(yo(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function cn(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Lr(e){return e.split(/[?#]/,1)[0]}function Yt(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}function Bi(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return oI(e,n)||rI(e,r)}function rI(e,t){return t?$m(e)===$m(t):!1}function oI(e,t){let n=Mr(e);return!n||yo(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function $m(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function cl(e,...t){let n=new String(String.raw(e,...t));
12return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}var ul=cl;function ll(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs=E(f({},e.attrs),{ip_address:"{{auto}}"})):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Fi(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:xt})),o.version=xt)}function Io(e={}){let t=e.client||I();if(!pa()||!t)return{};let n=ut(),r=qt(n);if(r.getTraceData)return r.getTraceData(e);let o=e.scope||x(),i=e.span||K(),s=i?Xs(i):iI(o),a=i?Pe(i):vr(t,o),c=js(a);if(!Vs.test(s))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let d={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(d.traceparent=i?xp(i):sI(o)),d}function iI(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ii(t,r,n)}function sI(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return bi(t,r,n)}function dl(e,t,n){let r,o,i,s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function d(){return o!==void 0||i!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),s&&i===void 0&&(i=a(c,s)),r}return l.cancel=u,l.flush=d,l}var aI=100;function It(e,t){let n=I(),r=se();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=aI}=n.getOptions();if(i<=0)return;let s=Ot(),a=f({timestamp:s},e),c=o?We(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}var Wm,cI="FunctionToString",jm=new WeakMap,uI=()=>({name:cI,setupOnce(){Wm=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Er(this),n=jm.has(I())&&t!==void 0?t:this;return Wm.apply(n,e)}}catch{}},setup(e){jm.set(e,!0)}}),bo=uI;var lI=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],dI="EventFilters",fl=(e={})=>{let t;return{name:dI,setup(n){let r=n.getOptions();t=zm(e,r)},processEvent(n,r,o){if(!t){let i=o.getOptions();t=zm(e,i)}return fI(n,t)?null:n}}},Ao=(e={})=>E(f({},fl(e)),{name:"InboundFilters"});function zm(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:lI],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function fI(e,t){if(e.type){if(e.type==="transaction"&&mI(e,t.ignoreTransactions))return b&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 13Event: ${gn(e)}`),!0}else{if(pI(e,t.ignoreErrors))return b&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 14Event: ${gn(e)}`),!0;if(SI(e))return b&&_.warn(`Event dropped due to not having an error message, error type or stacktrace. 15Event: ${gn(e)}`),!0;if(hI(e,t.denyUrls))return b&&_.warn(`Event dropped due to being matched by \`denyUrls\` option. 16Event: ${gn(e)}. 17Url: ${ba(e)}`),!0;if(!_I(e,t.allowUrls))return b&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option. 18Event: ${gn(e)}. 19Url: ${ba(e)}`),!0}return!1}function pI(e,t){return t?.length?Ta(e).some(n=>Je(n,t)):!1}function mI(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Je(n,t):!1}function hI(e,t){if(!t?.length)return!1;let n=ba(e);return n?Je(n,t):!1}function _I(e,t){if(!t?.length)return!0;let n=ba(e);return n?Je(n,t):!0}function gI(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ba(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?gI(n):null}catch{return b&&_.error(`Cannot extract url for event ${gn(e)}`),null}}function SI(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}
19function ml(e,t,n,r,o,i){if(!o.exception?.values||!i||!kt(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=pl(e,t,r,i.originalException,n,o.exception.values,s,0))}function pl(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(kt(r[o],Error)){qm(s,a,r);let u=e(t,r[o]),d=c.length;Vm(u,o,d,a),c=pl(e,t,n,r[o],o,[u,...c],u,d)}return Ym(r)&&r.errors.forEach((u,d)=>{if(kt(u,Error)){qm(s,a,r);let l=e(t,u),p=c.length;Vm(l,`errors[${d}]`,p,a),c=pl(e,t,n,u,o,[l,...c],l,p)}}),c}function Ym(e){return Array.isArray(e.errors)}function qm(e,t,n){e.mechanism=E(f(f({handled:!0,type:"auto.core.linked_errors"},Ym(n)&&{is_exception_group:!0}),e.mechanism),{exception_id:t})}function Vm(e,t,n,r){e.mechanism=E(f({handled:!0},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}var Km=new Map,Jm=new Set;function EI(e){if(N._sentryModuleMetadata)for(let t of Object.keys(N._sentryModuleMetadata)){let n=N._sentryModuleMetadata[t];if(Jm.has(t))continue;Jm.add(t);let r=e(t);for(let o of r.reverse())if(o.filename){Km.set(o.filename,n);break}}}function TI(e,t){return EI(e),Km.get(t)}function Aa(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;let o=TI(e,r.filename);o&&(r.module_metadata=o)})})}function Ra(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}var Xm=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Pt(t,(n,r)=>{if(r==="event"){let o=Array.isArray(n)?n[1]:void 0;o&&(Ra(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;let n=e.getOptions().stackParser;Aa(n,t)})}});function Pr(e){let t="console";Xe(t,e),Qe(t,yI)}function yI(){"console"in N&&gr.forEach(function(e){e in N.console&&Ee(N.console,e,function(t){return to[e]=t,function(...n){Be("console",{args:n,level:e}),to[e]?.apply(N.console,n)}})})}function tr(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var II="CaptureConsole",bI=(e={})=>{let t=e.levels||gr,n=e.handled??!0;return{name:II,setup(r){"console"in N&&Pr(({args:o,level:i})=>{I()!==r||!t.includes(i)||AI(o,i,n)})}}},Qm=bI;function AI(e,t,n){let r=tr(t),o=new Error,i={level:tr(t),extra:{arguments:e}};je(s=>{if(s.addEventProcessor(u=>(u.logger="console",et(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){let u=`Assertion failed: ${Ir(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(u,r,{captureContext:i,syntheticException:o})}return}let a=e.find(u=>u instanceof Error);if(a){X(a,i);return}let c=Ir(e," ");s.captureMessage(c,r,{captureContext:i,syntheticException:o})})}var RI="Dedupe",vI=()=>{let e;return{name:RI,processEvent(t){if(t.type)return t;try{if(NI(t,e))return b&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Ro=vI;function NI(e,t){return t?!!(CI(e,t)||wI(e,t)):!1}function CI(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!th(e,t)||!eh(e,t))}function wI(e,t){let n=Zm(t),r=Zm(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!th(e,t)||!eh(e,t))}function eh(e,t){let n=no(e),r=no(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function th(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Zm(e){return e.exception?.values?.[0]}var xI="ExtraErrorData",kI=(e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:xI,processEvent(r,o,i){let{maxValueLength:s}=i.getOptions();return OI(r,o,t,n,s)}}},nh=kI;function OI(e,t={},n,r,o){if(!t.originalException||!Ze(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,s=rh(t.originalException,r,o);if(s){let a=f({},e.contexts),c=Ne(s,n);return we(c)&&(Te(c,"__sentry_skip_normalization__",!0),a[i]=c),E(f({},e),{contexts:a})}return e}function rh(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(let i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;let s=e[i];o[i]=Ze(s)||typeof s=="string"?n?_n(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(Ze(e.cause)){let i=e.cause.name||e.cause.constructor.name;o.cause={[i]:rh(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){let i=e.toJSON();for(let s of Object.keys(i)){let a=i[s];o[s]=Ze(a)?a.toString():a}}return o}catch(r){b&&_.error("Unable to extract extra data from the Error object:",r)}return null}function MI(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var LI=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function PI(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=LI.exec(t);return n?n.slice(1):[]}function oh(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=MI(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function ih(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function sh(e,t){e=oh(e).slice(1),t=oh(t).slice(1);let n=ih(e.split("/")),r=ih(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function ah(e,t){let n=PI(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var UI="RewriteFrames",ch=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in N&&!!N.window,o=e.iteratee||DI({isBrowser:r,root:t,prefix:n});function i(a){try{return E(f({},a),{exception:E(f({},a.exception),{values:a.exception.values.map(c=>f(f({},c),c.stacktrace&&{stacktrace:s(c.stacktrace)}))})})}catch{return a}}function s(a){return E(f({},a),{frames:a?.frames?.map(c=>o(c))})}return{name:UI,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=i(c)),c}}};function DI({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){let s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){let s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?sh(t,s):ah(s);r.filename=`${n}${a}`}return r}}var BI=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],FI=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],GI={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},lh=["select","insert","upsert","update","delete"];function va(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Na(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function HI(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function $I(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;let[n,...r]=t.split("."),o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&GI[n]||"filter",`${o}(${e}, ${r.join(".")})`}function uh(e,t=!1){return new Proxy(e,{apply(n,r,o){return rt({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[$]:"auto.db.supabase",[le]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},i=>Reflect.apply(n,r,o).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(i.setStatus({code:2}),X(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):i.setStatus({code:1}),i.end(),s)).catch(s=>{throw i.setStatus({code:2}),i.end(),X(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...o))}})}function WI(e){let t=e.auth;if(!(!t||Na(e.auth))){for(let n of BI){let r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=uh(r))}for(let n of FI){let r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=uh(r,!0))}va(e.auth)}}function jI(e){Na(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){let o=Reflect.apply(t,n,r),i=o.constructor;return qI(i),o}}),va(e.prototype.from))}function zI(e){Na(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){let o=lh,i=n,s=HI(i.method,i.headers);if(!o.includes(s)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(t,n,r);let a=i.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];
19for(let[m,h]of i.url.searchParams.entries())u.push($I(m,h));let d=Object.create(null);if(we(i.body))for(let[m,h]of Object.entries(i.body))d[m]=h;let l=`${s==="select"?"":`${s}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,p={"db.table":c,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":i.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[$]:"auto.db.supabase",[le]:"db"};return u.length&&(p["db.query"]=u),Object.keys(d).length&&(p["db.body"]=d),rt({name:l,attributes:p},m=>Reflect.apply(t,n,[]).then(h=>{if(m&&(h&&typeof h=="object"&&"status"in h&&Mn(m,h.status||500),m.end()),h.error){let T=new Error(h.error.message);h.error.code&&(T.code=h.error.code),h.error.details&&(T.details=h.error.details);let A={};u.length&&(A.query=u),Object.keys(d).length&&(A.body=d),X(T,B=>(B.addEventProcessor(k=>(et(k,{handled:!1,type:"auto.db.supabase.postgres"}),k)),B.setContext("supabase",A),B))}let g={type:"supabase",category:`db.${s}`,message:l},S={};return u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),Object.keys(S).length&&(g.data=S),It(g),h},h=>{throw m&&(Mn(m,500),m.end()),h}).then(...r))}}),va(e.prototype.then))}function qI(e){for(let t of lh)Na(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){let i=Reflect.apply(n,r,o),s=i.constructor;return b&&_.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),zI(s),i}}),va(e.prototype[t]))}var hl=e=>{if(!e){b&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}let t=e.constructor===Function?e:e.constructor;jI(t),WI(e)},VI="Supabase",YI=e=>({setupOnce(){hl(e)},name:VI}),dh=e=>YI(e.supabaseClient);var JI=10,KI="ZodErrors";function XI(e){return Ze(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function QI(e){return E(f({},e),{path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0})}function ZI(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function eb(e){let t=new Set;for(let r of e.issues){let o=ZI(r.path);o.length>0&&t.add(o)}let n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){let o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${_n(n.join(", "),100)}`}function tb(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!XI(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(QI);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),E(f({},n),{exception:E(f({},n.exception),{values:[E(f({},n.exception.values[0]),{value:eb(r.originalException)}),...n.exception.values.slice(1)]}),extra:E(f({},n.extra),{"zoderror.issues":i.slice(0,e)})})}catch(o){return E(f({},n),{extra:E(f({},n.extra),{"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message} 20${o.stack}`:"unknown"}})})}}var nb=(e={})=>{let t=e.limit??JI;return{name:KI,processEvent(n,r){return tb(t,e.saveZodIssuesAsAttachment,n,r)}}},fh=nb;var mh=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Pt(n,(r,o)=>{if(o==="event"){let i=Array.isArray(r)?r[1]:void 0;i&&(Ra(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;let r=t.getOptions().stackParser;Aa(r,n)})},processEvent(t){let n=ob(t,e.ignoreSentryInternalFrames);if(n){let r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags=E(f({},t.tags),{third_party_code:!0})}}return t}});function rb(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(sb))return!1;if(e.pre_context){let n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(ib))return!0}return!1}function ob(e,t){let n=no(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!rb(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(ph)).map(o=>o.slice(ph.length)):[])}var ph="_sentryBundlerPluginAppKey:",ib="Attempt to invoke user-land function",sb="fn.apply(this, wrappedArguments)";var hh=100,_h=10,Ca="flag.evaluation.";function Ut(e){let n=x().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function bt(e,t,n=hh){let r=x().getScopeData().contexts;r.flags||(r.flags={values:[]});let o=r.flags.values;ab(o,e,t,n)}function ab(e,t,n,r){if(typeof n!="boolean")return;if(e.length>
20r){b&&_.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}let o=e.findIndex(i=>i.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function At(e,t,n=_h){if(typeof t!="boolean")return;let r=K();if(!r)return;let o=M(r).data;if(`${Ca}${e}`in o){r.setAttribute(`${Ca}${e}`,t);return}Object.keys(o).filter(s=>s.startsWith(Ca)).length<n&&r.setAttribute(`${Ca}${e}`,t)}var gh=()=>({name:"FeatureFlags",processEvent(e,t,n){return Ut(e)},addFeatureFlag(e,t){bt(e,t),At(e,t)}});var _l=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){let t=e.prototype;typeof t.isOn=="function"&&Ee(t,"isOn",Sh),typeof t.getFeatureValue=="function"&&Ee(t,"getFeatureValue",Sh)},processEvent(t,n,r){return Ut(t)}});function Sh(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(bt(n,r),At(n,r)),r}}var cb="ConversationId",ub=()=>({name:cb,setup(e){e.on("spanStart",t=>{let n=x().getScopeData(),r=se().getScopeData(),o=n.conversationId||r.conversationId;o&&t.setAttribute(vu,o)})}}),Gi=ub;function gl(e,t,n,r,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=Le()&&t(s);if(e.endTimestamp){let m=e.fetchData.__span;if(!m)return;let h=r[m];h&&(a&&(fb(h,e),lb(h,e,o)),delete r[m]);return}let{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},d=!!K(),l=a&&d?qe(mb(s,i,c)):new nt;if(e.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(e.fetchData.url)){let m=e.args[0],h=f({},e.args[1]||{}),g=db(m,h,Le()&&d?l:void 0,u);g&&(e.args[1]=h,h.headers=g)}let p=I();if(p){let m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",l,m)}return l}function lb(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function db(e,t,n,r){let o=Io({span:n,propagateTraceparent:r}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let c=t.headers||(mi(e)?e.headers:void 0);if(c)if(pb(c)){let u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",i),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),s){let d=u.get("baggage");d?wa(d)||u.set("baggage",`${d},${s}`):u.set("baggage",s)}return u}else if(Array.isArray(c)){let u=[...c];c.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&a&&!c.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);let d=c.find(l=>l[0]==="baggage"&&wa(l[1]));return s&&!d&&u.push(["baggage",s]),u}else{let u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],m=l&&(Array.isArray(l)?l.find(g=>wa(g)):wa(l));s&&!m&&p.push(s);let h=E(f({},c),{"sentry-trace":u??i,baggage:p.length>0?p.join(","):void 0});return r&&a&&!d&&(h.traceparent=a),h}else return f({},o)}function fb(e,t){if(t.response){Mn(e,t.response.status);let n=t.response?.headers?.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function wa(e){return e.split(",").some(t=>t.trim().startsWith(Ei))}function pb(e){return typeof Headers<"u"&&kt(e,Headers)}function mb(e,t,n){if(e.startsWith("data:")){let i=Yt(e);return{name:`${t} ${i}`,attributes:Eh(e,void 0,t,n)}}let r=Mr(e),o=r?al(r):e;return{name:`${t} ${o}`,attributes:Eh(e,r,t,n)}}function Eh(e,t,n,r){let o={url:Yt(e),type:"fetch","http.method":n,[$]:r,[le]:"http.client"};return t&&(yo(t)||(o["http.url"]=Yt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function xa(e,t={},n=x()){let{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||I();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}var Sl={};$f(Sl,{debug:()=>_b,error:()=>Eb,fatal:()=>Tb,fmt:()=>ul,info:()=>gb,trace:()=>hb,warn:()=>Sb});function vo(e,t,n,r,o){er({level:e,message:t,attributes:n,severityNumber:o},r)}function hb(e,t,{scope:n}={}){vo("trace",e,t,n)}function _b(e,t,{scope:n}={}){vo("debug",e,t,n)}function gb(e,t,{scope:n}={}){vo("info",e,t,n)}function Sb(e,t,{scope:n}={}){vo("warn",e,t,n)}function Eb(e,t,{scope:n}={}){vo("error",e,t,n)}function Tb(e,t,{scope:n}={}){vo("fatal",e,t,n)}function No(e,t,n){return"util"in N&&typeof N.util.format=="function"?N.util.format(...e):yb(e,t,n)}function yb(e,t,n){return e.map(r=>lt(r)?String(r):JSON.stringify(Ne(r,t,n))).join(" ")}function ka(e){return/%[sdifocO]/.test(e)}function Oa(e,t){let n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,i)=>{n[`sentry.message.parameter.${i}`]=o}),n}var Ib="ConsoleLogs",Th={[$]:"auto.log.console"},bb=(e={})=>{let t=e.levels||gr;return{name:Ib,setup(n){let{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:i=1e3}=n.getOptions();if(!r){b&&_.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Pr(({args:s,level:a})=>{if(I()!==n||!t.includes(a))return;let c=s[0],u=s.slice(1);if(a==="assert"){if(!c){let m=u.length>0?`Assertion failed: ${No(u,o,i)}`:"Assertion failed";er({level:"error",message:m,attributes:Th})}return}let d=a==="log",l=s.length>1&&typeof s[0]=="string"&&!ka(s[0]),p=f(f({},Th),l?Oa(c,u):{});er({level:d?"info":a,message:No(s,o,i),severityNumber:d?10:void 0,attributes:p})})}}},yh=bb;var Tl={};$f(Tl,{count:()=>Ab,distribution:()=>vb,gauge:()=>Rb});function El(e,t,n,r){Xu({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function Ab(e,t=1,n){El("counter",e,t,n)}function Rb(e,t,n){El("gauge",e,t,n)}function vb(e,t,n){El("distribution",e,t,n)}var Nb=["trace","debug","info","warn","error","fatal"];function Ih(e={}){let t=new Set(e.levels??Nb),n=e.client;return{log(r){let T=r,{type:o,level:i,message:s,args:a,tag:c,date:u}=T,d=hn(T,["type","level","message","args","tag","date"]),l=n||I();if(!l)return;let p=xb(o,i);if(!t.has(p))return;let{normalizeDepth:m=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),g={};for(let[A,B]of Object.entries(d))g[A]=Ne(B,m,h);g["sentry.origin"]="auto.log.consola",c&&(g["consola.tag"]=c),o&&(g["consola.type"]=o),i!=null&&typeof i=="number"&&(g["consola.level"]=i);let S=Ob(kb(a,m,h),m,h);S?.attributes&&Object.assign(g,S.attributes),er({level:p,message:S?.message||s||a&&No(a,m,h)||"",attributes:g})}}}var Cb={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},wb={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function xb(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){let n=Cb[e];if(n)return n}if(typeof t=="number"){let n=wb[t];if(n)return n}return"info"}function kb(e,t,n){if(!e?.length)return{message:""};
20let r=No(e,t,n),o=e[0];if(we(o)){let i=typeof e[1]=="string"?2:1,s=e.slice(i);return{message:r,attributes:o,messageParameters:s}}else{let i=e.slice(1),s=i.length>0&&typeof o=="string"&&!ka(o);return{message:r,messageTemplate:s?o:void 0,messageParameters:s?i:void 0}}}function Ob(e,t,n){let{message:r,attributes:o,messageTemplate:i,messageParameters:s}=e,a={};if(i&&s){let c=Oa(i,s);for(let[u,d]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Ne(d,t,n):d}else s&&s.length>0&&s.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=Ne(c,t,n)});return{message:r,attributes:f(f({},Ne(o,t,n)),a)}}var bh="gen_ai.prompt",nr="gen_ai.system",Fe="gen_ai.request.model",Co="gen_ai.request.stream",rr="gen_ai.request.temperature",wo="gen_ai.request.max_tokens",or="gen_ai.request.frequency_penalty",xo="gen_ai.request.presence_penalty",ir="gen_ai.request.top_p",Ma="gen_ai.request.top_k",Ah="gen_ai.request.encoding_format",Rh="gen_ai.request.dimensions",Rt="gen_ai.response.finish_reasons",ot="gen_ai.response.model",Jt="gen_ai.response.id",vh="gen_ai.response.stop_reason",Dt="gen_ai.usage.input_tokens",Bt="gen_ai.usage.output_tokens",Ft="gen_ai.usage.total_tokens",vt="gen_ai.operation.name",Kt="sentry.sdk_meta.gen_ai.input.messages.original_length",un="gen_ai.input.messages";var An="gen_ai.system_instructions",Ge="gen_ai.response.text",sr="gen_ai.request.available_tools",Ur="gen_ai.response.streaming",Ve="gen_ai.response.tool_calls",yl="gen_ai.agent.name",Nh="gen_ai.pipeline.name",Hi="gen_ai.conversation.id",Ch="gen_ai.usage.cache_creation_input_tokens",wh="gen_ai.usage.cache_read_input_tokens";var xh="gen_ai.invoke_agent";var kh="gen_ai.embeddings.input";var Oh="gen_ai.tool.name";var Mh="gen_ai.tool.input",Lh="gen_ai.tool.output";var Il="openai.response.id",bl="openai.response.model",Al="openai.response.timestamp",Ph="openai.usage.completion_tokens",Uh="openai.usage.prompt_tokens",Dr={CHAT:"chat",EMBEDDINGS:"embeddings"},Rl="anthropic.response.timestamp";function ar(e){return!e||typeof e!="object"?!1:Lb(e)||Bh(e)||Mb(e)||Fh(e)||Gh(e)||Pb(e)||Ub(e)||Db(e)||Bb(e)||Fb(e)||Gb(e)||Hb(e)}function Mb(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):Dh(e):!1}function Dh(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function Lb(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&ar(e.source)}function Bh(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function Fh(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="str
20ing"}function Gh(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function Pb(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function Ub(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function Db(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function Bb(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function Fb(e){return"b64_json"in e}function Gb(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function Hb(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}var $i="[Blob substitute]",$b=["image_url","data","content","b64_json","result","uri","image"];function Br(e){let t=f({},e);ar(t.source)&&(t.source=Br(t.source)),Bh(e)&&(t.inlineData=E(f({},e.inlineData),{data:$i})),Dh(e)&&(t.image_url=E(f({},e.image_url),{url:$i})),Fh(e)&&(t.input_audio=E(f({},e.input_audio),{data:$i})),Gh(e)&&(t.file=E(f({},e.file),{file_data:$i}));for(let n of $b)typeof t[n]=="string"&&(t[n]=$i);return t}var $h=2e4,La=e=>new TextEncoder().encode(e).length,Nl=e=>La(JSON.stringify(e));function Pa(e,t){if(La(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){let i=Math.floor((n+r)/2),s=e.slice(0,i);La(s)<=t?(o=s,n=i+1):r=i-1}return o}function Wb(e){return typeof e=="string"?e:"text"in e?e.text:""}function Hh(e,t){return typeof e=="string"?t:E(f({},e),{text:t})}function jb(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function Wh(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function jh(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function zb(e,t){let n=E(f({},e),{content:""}),r=Nl(n),o=t-r;if(o<=0)return[];let i=Pa(e.content,o);return[E(f({},e),{content:i})]}function qb(e,t){let{parts:n}=e,r=n.map(a=>Hh(a,"")),o=Nl(E(f({},e),{parts:r})),i=t-o;if(i<=0)return[];let s=[];for(let a of n){let c=Wb(a),u=La(c);if(u<=i)s.push(a),i-=u;else if(s.length===0){let d=Pa(c,i);d&&s.push(Hh(a,d));break}else break}return s.length<=0?[]:[E(f({},e),{parts:s})]}function Vb(e,t){if(!e)return[];if(typeof e=="string"){let n=Pa(e,t);return n?[n]:[]}return typeof e!="object"?[]:jb(e)?zb(e,t):Wh(e)?[e]:jh(e)?qb(e,t):[]}function vl(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(Wh(n)?r=E(f({},n),{content:vl(n.content)}):"content"in n&&ar(n.content)&&(r=E(f({},n),{content:Br(n.content)})),jh(n)&&(r=E(f({},r??n),{parts:vl(n.parts)})),ar(r)?r=Br(r):ar(n)&&(r=Br(n))),r??n})}function Yb(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],o=vl([r]),i=o[0];return Nl(i)<=n?o:Vb(i,n)}function cr(e){return Yb(e,$h)}function zh(e){return Pa(e,$h)}function Rn(e){let t=!!I()?.getOptions().sendDefaultPii;return E(f({},e),{recordInputs:e?.recordInputs??t,recordOutputs:e?.recordOutputs??t})}function Fr(e){return e.includes("messages")?"chat":e.includes("completions")?"text_completion":e.includes("generateContent")?"generate_content":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function ko(e){return`gen_ai.${Fr(e)}`}function Ua(e,t){return e?`${e}.${t}`:t}function Wi(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[Dt]:t}),n!==void 0&&e.setAttributes({[Bt]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){let i=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[Ft]:i})}}function Da(e){if(typeof e=="string")return zh(e);if(Array.isArray(e)){let t=cr(e);return JSON.stringify(t)}return JSON.stringify(e)}function vn(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(s=>s&&typeof s=="object"&&"role"in s&&s.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};let o=JSON.stringify([{type:"text",content:r}]),i=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:i}}
20var qh=["responses.create","chat.completions.create","embeddings.create","conversations.create"],Jb=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],Vh=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...Jb];function Ba(e){return e.includes("chat.completions")?Dr.CHAT:e.includes("responses")?Dr.CHAT:e.includes("embeddings")?Dr.EMBEDDINGS:e.includes("conversations")?Dr.CHAT:e.split(".").pop()||"unknown"}function Yh(e){return`gen_ai.${Ba(e)}`}function Jh(e){return qh.includes(e)}function Kh(e,t){return e?`${e}.${t}`:t}function Xh(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion"}function Qh(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="response"}function Zh(e){if(e===null||typeof e!="object"||!("object"in e))return!1;let t=e;return t.object==="list"&&typeof t.model=="string"&&t.model.toLowerCase().includes("embedding")}function e_(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="conversation"}function t_(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function n_(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function r_(e,t,n){if(Fa(e,t.id,t.model,t.created),t.usage&&ji(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){let r=t.choices.map(o=>o.finish_reason).filter(o=>o!==null);if(r.length>0&&e.setAttributes({[Rt]:JSON.stringify(r)}),n){let o=t.choices.map(i=>i.message?.tool_calls).filter(i=>Array.isArray(i)&&i.length>0).flat();o.length>0&&e.setAttributes({[Ve]:JSON.stringify(o)})}}}function o_(e,t,n){if(Fa(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[Rt]:JSON.stringify([t.status])}),t.usage&&ji(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n){let r=t;if(Array.isArray(r.output)&&r.output.length>0){let o=r.output.filter(i=>typeof i=="object"&&i!==null&&i.type==="function_call");o.length>0&&e.setAttributes({[Ve]:JSON.stringify(o)})}}}function i_(e,t){e.setAttributes({[bl]:t.model,[ot]:t.model}),t.usage&&ji(e,t.usage.prompt_tokens,void 0,t.usage.total_tokens)}function s_(e,t){let{id:n,created_at:r}=t;e.setAttributes({[Il]:n,[Jt]:n,[Hi]:n}),r&&e.setAttributes({[Al]:new Date(r*1e3).toISOString()})}function ji(e,t,n,r){t!==void 0&&e.setAttributes({[Uh]:t,[Dt]:t}),n!==void 0&&e.setAttributes({[Ph]:n,[Bt]:n}),r!==void 0&&e.setAttributes({[Ft]:r})}function Fa(e,t,n,r){e.setAttributes({[Il]:t,[Jt]:t}),e.setAttributes({[bl]:n,[ot]:n}),e.setAttributes({[Al]:new Date(r*1e3).toISOString()})}function Kb(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function a_(e){let t={[Fe]:e.model??"unknown"};"temperature"in e&&(t[rr]=e.temperature),"top_p"in e&&(t[ir]=e.top_p),"frequency_penalty"in e&&(t[or]=e.frequency_penalty),"presence_penalty"in e&&(t[xo]=e.presence_penalty),"stream"in e&&(t[Co]=e.stream),"encoding_format"in e&&(t[Ah]=e.encoding_format),"dimensions"in e&&(t[Rh]=e.dimensions);let n=Kb(e);return n&&(t[Hi]=n),t}function Xb(e,t){for(let n of e){let r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]=E(f({},n),{function:{name:n.function.name,arguments:n.function.arguments||""}});else{let o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function Qb(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&Xb(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function Zb(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:2,message:"internal_error"}),X(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;let o=e;if(!Vh.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){let{response:i}=o;t.responseId=i.id??t.responseId,t.responseModel=i.model??t.responseModel,t.responseTimestamp=i.created_at??t.responseTimestamp,i.usage&&(t.promptTokens=i.usage.input_tokens,t.completionTokens=i.usage.output_tokens,t.totalTokens=i.usage.total_tokens),i.status&&t.finishReasons.push(i.status),n&&i.output_text&&t.responseTexts.push(i.output_text)}}async function*c_(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};
20try{for await(let o of e)n_(o)?Qb(o,r,n):t_(o)&&Zb(o,r,n,t),yield o}finally{Fa(t,r.responseId,r.responseModel,r.responseTimestamp),ji(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[Ur]:!0}),r.finishReasons.length&&t.setAttributes({[Rt]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[Ge]:r.responseTexts.join("")});let i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];i.length>0&&t.setAttributes({[Ve]:JSON.stringify(i)}),t.end()}}function eA(e){let t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[f({type:"web_search_options"},e.web_search_options)]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(i){b&&_.error("Failed to serialize OpenAI tools:",i);return}}function tA(e,t){let n={[nr]:"openai",[vt]:Ba(t),[$]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let r=e[0],o=eA(r);o&&(n[sr]=o),Object.assign(n,a_(r))}else n[Fe]="unknown";return n}function nA(e,t,n){if(!t||typeof t!="object")return;let r=t;if(Xh(r)){if(r_(e,r,n),n&&r.choices?.length){let o=r.choices.map(i=>i.message?.content||"");e.setAttributes({[Ge]:JSON.stringify(o)})}}else Qh(r)?(o_(e,r,n),n&&r.output_text&&e.setAttributes({[Ge]:r.output_text})):Zh(r)?i_(e,r):e_(r)&&s_(e,r)}function u_(e,t,n){if(n===Dr.EMBEDDINGS&&"input"in t){let a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(kh,typeof a=="string"?a:JSON.stringify(a));return}let r="input"in t?t.input:"messages"in t?t.messages:void 0;if(!r||Array.isArray(r)&&r.length===0)return;let{systemInstructions:o,filteredMessages:i}=vn(r);o&&e.setAttribute(An,o);let s=Da(i);e.setAttribute(un,s),Array.isArray(i)?e.setAttribute(Kt,i.length):e.setAttribute(Kt,1)}async function rA(e,t){let n=e.catch(i=>{throw X(i,{mechanism:{handled:!1,type:"auto.ai.openai"}}),i}),r=await t,o=await n;return o&&typeof o=="object"&&"data"in o?E(f({},o),{data:r}):r}function l_(e,t){return Et(e)?new Proxy(e,{get(n,r){let i=r in Promise.prototype||r===Symbol.toStringTag?t:n,s=Reflect.get(i,r);return r==="withResponse"&&typeof s=="function"?function(){let c=s.call(n);return rA(c,t)}:typeof s=="function"?s.bind(i):s}}):t}function oA(e,t,n,r){return function(...i){let s=tA(i,t),a=s[Fe]||"unknown",c=Ba(t),u=i[0],d=u&&typeof u=="object"&&u.stream===!0,l={name:`${c} ${a}`,op:Yh(t),attributes:s};if(d){let h,g=yt(l,S=>(h=e.apply(n,i),r.recordInputs&&u&&u_(S,u,c),(async()=>{try{let T=await h;return c_(T,S,r.recordOutputs??!1)}catch(T){throw S.setStatus({code:2,message:"internal_error"}),X(T,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),S.end(),T}})()));return l_(h,g)}let p,m=rt(l,h=>(p=e.apply(n,i),r.recordInputs&&u&&u_(h,u,c),p.then(g=>(nA(h,g,r.recordOutputs),g),g=>{throw X(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return l_(p,m)}}function d_(e,t="",n){return new Proxy(e,{get(r,o){let i=r[o],s=Kh(t,String(o));return typeof i=="function"&&Jh(s)?oA(i,s,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?d_(i,s,n):i}})}function f_(e,t){return d_(e,"",Rn(t))}var p_=["messages.create","messages.stream","messages.countTokens","models.get","completions.create","models.retrieve","beta.messages.create"];function m_(e){return p_.includes(e)}function h_(e,t){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:n,filteredMessages:r}=vn(t);n&&e.setAttributes({[An]:n});let o=Array.isArray(r)?r.length:1;e.setAttributes({[un]:Da(r),[Kt]:o})}var iA={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function Cl(e){return e&&iA[e]||"internal_error"}function __(e,t){t.error&&(e.setStatus({code:2,message:Cl(t.error.type)}),X(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function g_(e){let{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],i=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],a=i??s;return[...o,...a]}function sA(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:2,message:Cl(e.error?.type)}),X(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function aA(e,t){if(e.type==="message_delta"&&e.usage&&"output_tokens"in e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens=="number"&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function cA(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function uA(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&t
20ypeof e.delta.partial_json=="string"){let r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function lA(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;let n=t.activeToolBlocks[e.index];if(!n)return;let r=n.inputJsonParts.join(""),o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function S_(e,t,n,r){!(e&&typeof e=="object")||sA(e,r)||(aA(e,t),cA(e,t),uA(e,t,n),lA(e,t))}function dA(e,t,n){t.isRecording()&&(e.responseId&&t.setAttributes({[Jt]:e.responseId}),e.responseModel&&t.setAttributes({[ot]:e.responseModel}),Wi(t,e.promptTokens,e.completionTokens,e.cacheCreationInputTokens,e.cacheReadInputTokens),t.setAttributes({[Ur]:!0}),e.finishReasons.length>0&&t.setAttributes({[Rt]:JSON.stringify(e.finishReasons)}),n&&e.responseTexts.length>0&&t.setAttributes({[Ge]:e.responseTexts.join("")}),n&&e.toolCalls.length>0&&t.setAttributes({[Ve]:JSON.stringify(e.toolCalls)}),t.end())}async function*E_(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let o of e)S_(o,r,n,t),yield o}finally{r.responseId&&t.setAttributes({[Jt]:r.responseId}),r.responseModel&&t.setAttributes({[ot]:r.responseModel}),Wi(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[Ur]:!0}),r.finishReasons.length>0&&t.setAttributes({[Rt]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[Ge]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[Ve]:JSON.stringify(r.toolCalls)}),t.end()}}function T_(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{S_(o,r,n,t)}),e.on("message",()=>{dA(r,t,n)}),e.on("error",o=>{X(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end())}),e}function fA(e,t){let n={[nr]:"anthropic",[vt]:Fr(t),[$]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let r=e[0];r.tools&&Array.isArray(r.tools)&&(n[sr]=JSON.stringify(r.tools)),n[Fe]=r.model??"unknown","temperature"in r&&(n[rr]=r.temperature),"top_p"in r&&(n[ir]=r.top_p),"stream"in r&&(n[Co]=r.stream),"top_k"in r&&(n[Ma]=r.top_k),"frequency_penalty"in r&&(n[or]=r.frequency_penalty),"max_tokens"in r&&(n[wo]=r.max_tokens)}else t==="models.retrieve"||t==="models.get"?n[Fe]=e[0]:n[Fe]="unknown";return n}function wl(e,t){let n=g_(t);h_(e,n),"prompt"in t&&e.setAttributes({[bh]:JSON.stringify(t.prompt)})}function pA(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[Ge]:t.content.map(r=>r.text).filter(r=>!!r).join("")});let n=[];for(let r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[Ve]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[Ge]:t.completion}),"input_tokens"in t&&e.setAttributes({[Ge]:JSON.stringify(t.input_tokens)})}function mA(e,t){"id"in t&&"model"in t&&(e.setAttributes({[Jt]:t.id,[ot]:t.model}),"created"in t&&typeof t.created=="number"&&e.setAttributes({[Rl]:new Date(t.created*1e3).toISOString()}),"created_at"in t&&typeof t.created_at=="number"&&e.setAttributes({[Rl]:new Date(t.created_at*1e3).toISOString()}),"usage"in t&&t.usage&&Wi(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function hA(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){__(e,t);return}n&&pA(e,t),mA(e,t)}}function y_(e,t,n){throw X(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end()),e}function _A(e,t,n,r,o,i,s,a,c,u,d){let l=o[Fe]??"unknown",p={name:`${i} ${l}`,op:ko(s),attributes:o};return u&&!d?yt(p,async m=>{try{c.recordInputs&&a&&wl(m,a);let h=await e.apply(n,r);return E_(h,m,c.recordOutputs??!1)}catch(h){return y_(h,m,s)}}):yt(p,m=>{try{c.recordInputs&&a&&wl(m,a);let h=t.apply(n,r);return T_(h,m,c.recordOutputs??!1)}catch(h){return y_(h,m,s)}})}function gA(e,t,n,r){return new Proxy(e,{apply(o,i,s){let a=fA(s,t),c=a[Fe]??"unknown",u=Fr(t),d=typeof s[0]=="object"?s[0]:void 0,l=!!d?.stream,p=t==="messages.stream";return l||p?_A(e,o,n,s,a,u,t,d,r,l,p):rt({name:`${u} ${c}`,op:ko(t),attributes:a},m=>(r.recordInputs&&d&&wl(m,d),Nr(()=>o.apply(n,s),h=>{X(h,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}})},()=>{},h=>hA(m,h,r.recordOutputs))))}})}function I_(e,t="",n){return new Proxy(e,{get(r,o){let i=r[o],s=Ua(t,String(o));return typeof i=="function"&&m_(s)?gA(i,s,r,n):typeof i=="function"?i.bind(r):i&&typeof i=="object"?I_(i,s,n):i}})}function b_(e,t){return I_(e,"",Rn(t))}var xl=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],A_="google_genai",kl="chats.create",R_="chat";function SA(e,t){let n=e?.promptFeedback;if(n?.blockReason){let r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:"internal_error"}),X(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function EA(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="str
20ing"&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function TA(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(let o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function yA(e,t,n,r){!e||SA(e,r)||(EA(e,t),TA(e,t,n))}async function*v_(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let o of e)yA(o,r,n,t),yield o}finally{let o={[Ur]:!0};r.responseId&&(o[Jt]=r.responseId),r.responseModel&&(o[ot]=r.responseModel),r.promptTokens!==void 0&&(o[Dt]=r.promptTokens),r.completionTokens!==void 0&&(o[Bt]=r.completionTokens),r.totalTokens!==void 0&&(o[Ft]=r.totalTokens),r.finishReasons.length&&(o[Rt]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(o[Ge]=r.responseTexts.join("")),n&&r.toolCalls.length&&(o[Ve]=JSON.stringify(r.toolCalls)),t.setAttributes(o),t.end()}}function N_(e){if(xl.includes(e))return!0;let t=e.split(".").pop();return xl.includes(t)}function C_(e){return e.includes("Stream")}function Oo(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>Oo(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[E(f({},e),{role:t})]:[{role:t,content:e}]}function w_(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){let n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function IA(e){let t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[rr]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ir]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Ma]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[wo]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[or]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[xo]=e.presencePenalty),t}function bA(e,t,n){let r={[nr]:A_,[vt]:Fr(e),[$]:"auto.ai.google_genai"};if(t){if(r[Fe]=w_(t,n),"config"in t&&typeof t.config=="object"&&t.config){let o=t.config;if(Object.assign(r,IA(o)),"tools"in o&&Array.isArray(o.tools)){let i=o.tools.flatMap(s=>s.functionDeclarations);r[sr]=JSON.stringify(i)}}}else r[Fe]=w_({},n);return r}function x_(e,t){let n=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&n.push(...Oo(t.config.systemInstruction,"system")),"history"in t&&n.push(...Oo(t.history,"user")),"contents"in t&&n.push(...Oo(t.contents,"user")),"message"in t&&n.push(...Oo(t.message,"user")),Array.isArray(n)&&n.length){let{systemInstructions:r,filteredMessages:o}=vn(n);r&&e.setAttribute(An,r);let i=Array.isArray(o)?o.length:0;e.setAttributes({[Kt]:i,[un]:JSON.stringify(cr(o))})}}function AA(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(ot,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){let r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Dt]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Bt]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Ft]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[Ge]:r.join("")})}if(n&&t.functionCalls){let r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[Ve]:JSON.stringify(r)})}}}function k_(e,t,n,r){let o=t===kl;return new Proxy(e,{apply(i,s,a){let c=a[0],u=bA(t,c,n),d=u[Fe]??"unknown",l=Fr(t);return C_(t)?yt({name:`${l} ${d}`,op:ko(t),attributes:u},async p=>{try{r.recordInputs&&c&&x_(p,c);let m=await i.apply(n,a);return v_(m,p,!!r.recordOutputs)}catch(m){throw p.setStatus({code:2,message:"internal_error"}),X(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),p.end(),m}}):rt({name:o?`${l} ${d} create`:`${l} ${d}`,op:ko(t),attributes:u},p=>(r.recordInputs&&c&&x_(p,c),Nr(()=>i.apply(n,a),m=>{X(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},m=>{o||AA(p,m,r.recordOutputs)})))}})}function Ol(e,t="",n){return new Proxy(e,{get:(r,o,i)=>{let s=Reflect.get(r,o,i),a=Ua(t,String(o));if(typeof s=="function"&&N_(a)){if(a===kl){let c=k_(s,a,r,n);return function(...d){let l=c(...d);return l&&typeof l=="object"?Ol(l,R_,n):l}}return k_(s,a,r,n)}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?Ol(s,a,n):s}})}function O_(e,t){return Ol(e,"",Rn(t))}var Gr="auto.ai.langchain",M_={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"};
20var Xt=(e,t,n)=>{n!=null&&(e[t]=n)},Gt=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function Un(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Mo(e){if(Array.isArray(e))try{let t=e.map(n=>n&&typeof n=="object"&&ar(n)?Br(n):n);return JSON.stringify(t)}catch{return String(e)}return Un(e)}function zi(e){let t=e.toLowerCase();return M_[t]??t}function L_(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function Ml(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function qi(e){return e.map(t=>{let n=t._getType;if(typeof n=="function"){let o=n.call(t);return{role:zi(o),content:Mo(t.content)}}if(t.lc===1&&t.kwargs){let o=t.id,i=Array.isArray(o)&&o.length>0?o[o.length-1]:"",s=typeof i=="string"?L_(i):"user";return{role:zi(s),content:Mo(t.kwargs?.content)}}if(t.type){let o=String(t.type).toLowerCase();return{role:zi(o),content:Mo(t.content)}}if(t.role)return{role:zi(String(t.role)),content:Mo(t.content)};let r=t.constructor?.name;return r&&r!=="Object"?{role:zi(L_(r)),content:Mo(t.content)}:{role:"user",content:Mo(t.content)}})}function RA(e,t,n){let r={},o="kwargs"in e?e.kwargs:void 0,i=t?.temperature??n?.ls_temperature??o?.temperature;Gt(r,rr,i);let s=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;Gt(r,wo,s);let a=t?.top_p??o?.top_p;Gt(r,ir,a);let c=t?.frequency_penalty;Gt(r,or,c);let u=t?.presence_penalty;return Gt(r,xo,u),t&&"stream"in t&&Xt(r,Co,!!t.stream),r}function P_(e,t,n,r,o){return f({[nr]:Un(e??"langchain"),[vt]:"chat",[Fe]:Un(t),[$]:Gr},RA(n,r,o))}function U_(e,t,n,r,o){let i=o?.ls_provider,s=r?.model??o?.ls_model_name??"unknown",a=P_(i,s,e,r,o);if(n&&Array.isArray(t)&&t.length>0){Xt(a,Kt,t.length);let c=t.map(u=>({role:"user",content:u}));Xt(a,un,Un(c))}return a}function D_(e,t,n,r,o){let i=o?.ls_provider??e.id?.[2],s=r?.model??o?.ls_model_name??"unknown",a=P_(i,s,e,r,o);if(n&&Array.isArray(t)&&t.length>0){let c=qi(t.flat()),{systemInstructions:u,filteredMessages:d}=vn(c);u&&Xt(a,An,u);let l=Array.isArray(d)?d.length:0;Xt(a,Kt,l);let p=cr(d);Xt(a,un,Un(p))}return a}function vA(e,t){let n=[],r=e.flat();for(let o of r){let i=o.message?.content;if(Array.isArray(i))for(let s of i){let a=s;a.type==="tool_use"&&n.push(a)}}n.length>0&&Xt(t,Ve,Un(n))}function NA(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)Gt(t,Dt,n.promptTokens),Gt(t,Bt,n.completionTokens),Gt(t,Ft,n.totalTokens);else if(r){Gt(t,Dt,r.input_tokens),Gt(t,Bt,r.output_tokens);let o=Number(r.input_tokens),i=Number(r.output_tokens),s=(Number.isNaN(o)?0:o)+(Number.isNaN(i)?0:i);s>0&&Gt(t,Ft,s),r.cache_creation_input_tokens!==void 0&&Gt(t,Ch,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Gt(t,wh,r.cache_read_input_tokens)}}function B_(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let u=e.generations.flat().map(d=>d.generationInfo?.finish_reason?d.generationInfo.finish_reason:d.generation_info?.finish_reason?d.generation_info.finish_reason:null).filter(d=>typeof d=="string");if(u.length>0&&Xt(n,Rt,Un(u)),vA(e.generations,n),t){let d=e.generations.flat().map(l=>l.text??l.message?.content).filter(l=>typeof l=="string");d.length>0&&Xt(n,Ge,Un(d))}}NA(e.llmOutput,n);let r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??i?.response_metadata?.model_name;s&&Xt(n,ot,s);let a=r?.id??i?.id;a&&Xt(n,Jt,a);let c=r?.stop_reason??i?.response_metadata?.finish_reason;return c&&Xt(n,vh,Un(c)),n}function F_(e={}){let{recordInputs:t,recordOutputs:n}=Rn(e),r=new Map,o=s=>{let a=r.get(s);a?.isRecording()&&(a.end(),r.delete(s))},i={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(s,a,c,u,d,l,p,m){let h=Ml(l),g=U_(s,a,t,h,p),S=g[Fe],T=g[vt];yt({name:`${T} ${S}`,op:"gen_ai.chat",attributes:E(f({},g),{[le]:"gen_ai.chat"})},A=>(r.set(c,A),A))},handleChatModelStart(s,a,c,u,d,l,p,m){let h=Ml(l),g=D_(s,a,t,h,p),S=g[Fe],T=g[vt];yt({name:`${T} ${S}`,op:"gen_ai.chat",attributes:E(f({},g),{[le]:"gen_ai.chat"})},A=>(r.set(c,A),A))},handleLLMEnd(s,a,c,u,d){let l=r.get(a);if(l?.isRecording()){let p=B_(s,n);p&&l.setAttributes(p),o(a)}},handleLLMError(s,a){let c=r.get(a);c?.isRecording()&&(c.setStatus({code:2,message:"internal_error"}),o(a)),X(s,{mechanism:{handled:!1,type:`${Gr}.llm_error_handler`}})},handleChainStart(s,a,c,u,d,l,p,m){let h=m||s.name||"unknown_chain",g={[$]:"auto.ai.langchain","langchain.chain.name":h};t&&(g["langchain.chain.inputs"]=JSON.stringify(a)),yt({name:`chain ${h}`,op:"gen_ai.invoke_agent",attributes:E(f({},g),{[le]:"gen_ai.invoke_agent"})},S=>(r.set(c,S),S))},handleChainEnd(s,a){let c=r.get(a);c?.isRecording()&&(n&&c.setAttributes({"langchain.chain.outputs":JSON.stringify(s)}),o(a))},handleChainError(s,a){let c=r.get(a);c?.isRecording()&&(c.setStatus({code:2,message:"internal_error"}),o(a)),X(s,{mechanism:{handled:!1,type:`${Gr}.chain_error_handler`}})},handleToolStart(s,a,c,u){let d=s.name||"unknown_tool",l={[$]:Gr,[Oh]:d};t&&(l[Mh]=a),yt({name:`execute_tool ${d}`,op:"gen_ai.execute_tool",attributes:E(f({},l),{[le]:"gen_ai.execute_tool"})},p=>
20(r.set(c,p),p))},handleToolEnd(s,a){let c=r.get(a);c?.isRecording()&&(n&&c.setAttributes({[Lh]:JSON.stringify(s)}),o(a))},handleToolError(s,a){let c=r.get(a);c?.isRecording()&&(c.setStatus({code:2,message:"internal_error"}),o(a)),X(s,{mechanism:{handled:!1,type:`${Gr}.tool_error_handler`}})},copy(){return i},toJSON(){return{lc:1,type:"not_implemented",id:i.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:i.lc_id}}};return i}var Ll="auto.ai.langgraph";function CA(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n=="object"){let r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function wA(e){let t=e,n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){let i=t.usage_metadata;return typeof i.input_tokens=="number"&&(n=i.input_tokens),typeof i.output_tokens=="number"&&(r=i.output_tokens),typeof i.total_tokens=="number"&&(o=i.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){let i=t.response_metadata;if(i.tokenUsage&&typeof i.tokenUsage=="object"){let s=i.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(o=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function xA(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){let r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(ot,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(Rt,[r.finish_reason])}}function G_(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}function H_(e,t,n){let o=n?.messages;if(!o||!Array.isArray(o))return;let i=t?.length??0,s=o.length>i?o.slice(i):[];if(s.length===0)return;let a=CA(s);a&&e.setAttribute(Ve,JSON.stringify(a));let c=qi(s);e.setAttribute(Ge,JSON.stringify(c));let u=0,d=0,l=0;for(let p of s){let m=wA(p);u+=m.inputTokens,d+=m.outputTokens,l+=m.totalTokens,xA(e,p)}u>0&&e.setAttribute(Dt,u),d>0&&e.setAttribute(Bt,d),l>0&&e.setAttribute(Ft,l)}function $_(e,t){return new Proxy(e,{apply(n,r,o){return rt({op:"gen_ai.create_agent",name:"create_agent",attributes:{[$]:Ll,[le]:"gen_ai.create_agent",[vt]:"create_agent"}},i=>{try{let s=Reflect.apply(n,r,o),a=o.length>0?o[0]:{};a?.name&&typeof a.name=="string"&&(i.setAttribute(yl,a.name),i.updateName(`create_agent ${a.name}`));let c=s.invoke;return c&&typeof c=="function"&&(s.invoke=kA(c.bind(s),s,a,t)),s}catch(s){throw i.setStatus({code:2,message:"internal_error"}),X(s,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),s}})}})}function kA(e,t,n,r){return new Proxy(e,{apply(o,i,s){return rt({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[$]:Ll,[le]:xh,[vt]:"invoke_agent"}},async a=>{try{let c=n?.name;c&&typeof c=="string"&&(a.setAttribute(Nh,c),a.setAttribute(yl,c),a.updateName(`invoke_agent ${c}`));let l=(s.length>1?s[1]:void 0)?.configurable?.thread_id;l&&typeof l=="string"&&a.setAttribute(Hi,l);let p=G_(t);p&&a.setAttribute(sr,JSON.stringify(p));let m=r.recordInputs,h=r.recordOutputs,g=s.length>0?s[0]?.messages??[]:[];if(g&&m){let T=qi(g),{systemInstructions:A,filteredMessages:B}=vn(T);A&&a.setAttribute(An,A);let k=cr(B),Y=Array.isArray(B)?B.length:0;a.setAttributes({[un]:JSON.stringify(k),[Kt]:Y})}let S=await Reflect.apply(o,i,s);return h&&H_(a,g??null,S),S}catch(c){throw a.setStatus({code:2,message:"internal_error"}),X(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}})}function W_(e,t){return e.compile=$_(e.compile,Rn(t)),e}function Ga(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var Lo=N;function Pl(){return"history"in Lo&&!!Lo.history}function OA(){if(!("fetch"in Lo))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Vi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Yi(){if(typeof EdgeRuntime=="string")return!0;
20if(!OA())return!1;if(Vi(Lo.fetch))return!0;let e=!1,t=Lo.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Vi(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){b&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ul(){return"ReportingObserver"in Lo}function Hr(e,t){let n="fetch";Xe(n,e),Qe(n,()=>z_(void 0,t))}function Dl(e){let t="fetch-body-resolved";Xe(t,e),Qe(t,()=>z_(LA))}function z_(e,t=!1){t&&!Yi()||Ee(N,"fetch",function(n){return function(...r){let o=new Error,{method:i,url:s}=PA(r),a={args:r,fetchData:{method:i,url:s},startTimestamp:Q()*1e3,virtualError:o,headers:UA(r)};return e||Be("fetch",f({},a)),n.apply(N,r).then(async c=>(e?e(c):Be("fetch",E(f({},a),{endTimestamp:Q()*1e3,response:c})),c),c=>{Be("fetch",E(f({},a),{endTimestamp:Q()*1e3,error:c})),Ze(c)&&c.stack===void 0&&(c.stack=o.stack,Te(c,"framesToPop",1));let d=I()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{let m=new URL(a.fetchData.url).host;d==="always"?c.message=`${c.message} (${m})`:Te(c,"__sentry_fetch_url_host__",m)}catch{}throw c})}})}async function MA(e,t){if(e?.body){let n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:a}=await r.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function LA(e){let t;try{t=e.clone()}catch{return}MA(t,()=>{Be("fetch-body-resolved",{endTimestamp:Q()*1e3,response:e})})}function Ha(e,t){return!!e&&typeof e=="object"&&!!e[t]}function j_(e){return typeof e=="string"?e:e?Ha(e,"url")?e.url:e.toString?e.toString():"":""}function PA(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:j_(n),method:Ha(r,"method")?String(r.method).toUpperCase():mi(n)&&Ha(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:j_(t),method:Ha(t,"method")?String(t.method).toUpperCase():"GET"}}function UA(e){let[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(mi(t))return new Headers(t.headers)}catch{}}function Bl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Fl(){return"npm"}function q_(){return!Bl()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ur(){return typeof window<"u"&&(!q_()||DA())}function DA(){return N.process?.type==="renderer"}var dn=N,he=dn.document,Ji=dn.navigator,lg="Report a Bug",BA="Cancel",FA="Send Bug Report",GA="Confirm",HA="Report a Bug",$A="[email protected]",WA="Email",jA="What's the bug? What did you expect?",zA="Description",qA="Your Name",VA="Name",YA="Thank you for your report!",JA="(required)",KA="Add a screenshot",XA="Remove screenshot",QA="Highlight",ZA="Hide",eR="Remove",tR="widget",nR="api",rR=5e3,dg=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");let n=I();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&x().setTags(e.tags);let r=xa(f({source:nR,url:dt()},e),t);return new Promise((o,i)=>{let s=setTimeout(()=>i("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u?.statusCode&&u.statusCode>
20=200&&u.statusCode<300?o(r):u?.statusCode===403?i("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):i("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},za=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oR(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ji.userAgent)||/Macintosh/i.test(Ji.userAgent)&&Ji.maxTouchPoints&&Ji.maxTouchPoints>1||!isSecureContext)}function $a(e,t){return E(f(f({},e),t),{tags:f(f({},e.tags),t.tags),onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:f(f({},e.themeDark),t.themeDark),themeLight:f(f({},e.themeLight),t.themeLight)})}function iR(e){let t=he.createElement("style");return t.textContent=` 21.widget__actor { 22 position: fixed; 23 z-index: var(--z-index); 24 margin: var(--page-margin); 25 inset: var(--actor-inset); 26 27 display: flex; 28 align-items: center; 29 gap: 8px; 30 padding: 16px; 31 32 font-family: inherit; 33 font-size: var(--font-size); 34 font-weight: 600; 35 line-height: 1.14em; 36 text-decoration: none; 37 38 background: var(--actor-background, var(--background)); 39 border-radius: var(--actor-border-radius, 1.7em/50%); 40 border: var(--actor-border, var(--border));
41 box-shadow: var(--actor-box-shadow, var(--box-shadow)); 42 color: var(--actor-color, var(--foreground)); 43 fill: var(--actor-color, var(--foreground)); 44 cursor: pointer; 45 opacity: 1; 46 transition: transform 0.2s ease-in-out; 47 transform: translate(0, 0) scale(1); 48} 49.widget__actor[aria-hidden="true"] { 50 opacity: 0; 51 pointer-events: none; 52 visibility: hidden; 53 transform: translate(0, 16px) scale(0.98); 54} 55 56.widget__actor:hover { 57 background: var(--actor-hover-background, var(--background)); 58 filter: var(--interactive-filter); 59} 60 61.widget__actor svg { 62 width: 1.14em; 63 height: 1.14em; 64} 65 66@media (max-width: 600px) { 67 .widget__actor span { 68 display: none; 69 } 70} 71`,e&&t.setAttribute("nonce",e),t}function Ht(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var Po=20,sR="http://www.w3.org/2000/svg";function aR(){let e=a=>dn.document.createElementNS(sR,a),t=Ht(e("svg"),{width:`${Po}`,height:`${Po}`,viewBox:`0 0 ${Po} ${Po}`,fill:"var(--actor-color, var(--foreground))"}),n=Ht(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ht(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);let o=e("defs"),i=Ht(e("clipPath"),{id:"clip0_57_80"}),s=Ht(e("rect"),{width:`${Po}`,height:`${Po}`,fill:"white"});return i.appendChild(s),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(s),t}function cR({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let o=he.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||lg,o.appendChild(aR()),e){let s=he.createElement("span");s.appendChild(he.createTextNode(e)),o.appendChild(s)}let i=iR(r);return{el:o,appendToDom(){n.appendChild(i),n.appendChild(o)},removeFromDom(){o.remove(),i.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}var fg="rgba(88, 74, 192, 1)",uR={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:fg,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},V_={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
71d:fg,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Y_(e){return` 72 --foreground: ${e.foreground}; 73 --background: ${e.background}; 74 --accent-foreground: ${e.accentForeground}; 75 --accent-background: ${e.accentBackground}; 76 --success-color: ${e.successColor}; 77 --error-color: ${e.errorColor}; 78 --border: ${e.border}; 79 --box-shadow: ${e.boxShadow}; 80 --outline: ${e.outline}; 81 --interactive-filter: ${e.interactiveFilter}; 82 `}function J_({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let o=he.createElement("style");return o.textContent=` 83:host { 84 --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; 85 --font-size: 14px; 86 --z-index: 100000; 87 88 --page-margin: 16px; 89 --inset: auto 0 0 auto; 90 --actor-inset: var(--inset); 91 92 font-family: var(--font-family); 93 font-size: var(--font-size); 94 95 ${e!=="system"?`color-scheme: only ${e};`:""} 96 97 ${Y_(e==="dark"?f(f({},V_),t):f(f({},uR),n))} 98} 99 100${e==="system"?` 101@media (prefers-color-scheme: dark) { 102 :host { 103 color-scheme: only dark; 104 105 ${Y_(f(f({},V_),t))} 106 } 107}`:""} 108`,r&&o.setAttribute("nonce",r),o}var Xa=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:m,styleNonce:h,scriptNonce:g,colorScheme:S="system",themeLight:T={},themeDark:A={},addScreenshotButtonLabel:B=KA,cancelButtonLabel:k=BA,confirmButtonLabel:Y=GA,emailLabel:G=WA,emailPlaceholder:y=$A,formTitle:O=HA,isRequiredLabel:V=JA,messageLabel:v=zA,messagePlaceholder:L=jA,nameLabel:w=VA,namePlaceholder:D=qA,removeScreenshotButtonLabel:H=XA,submitButtonLabel:oe=FA,successMessageText:ie=YA,triggerLabel:ae=lg,triggerAriaLabel:P="",highlightToolText:W=QA,hideToolText:U=ZA,removeHighlightText:j=eR,onFormOpen:ue,onFormClose:me,onSubmitSuccess:Re,onSubmitError:Ct,onFormSubmitted:st}={})=>{let gt={id:o,autoInject:i,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:m,styleNonce:h,scriptNonce:g,colorScheme:S,themeDark:A,themeLight:T,triggerLabel:ae,triggerAriaLabel:P,cancelButtonLabel:k,submitButtonLabel:oe,confirmButtonLabel:Y,formTitle:O,emailLabel:G,emailPlaceholder:y,messageLabel:v,messagePlaceholder:L,nameLabel:w,namePlaceholder:D,successMessageText:ie,isRequiredLabel:V,addScreenshotButtonLabel:B,removeScreenshotButtonLabel:H,highlightToolText:W,hideToolText:U,removeHighlightText:j,onFormClose:me,onFormOpen:ue,onSubmitError:Ct,onSubmitSuccess:Re,onFormSubmitted:st},De=null,jt=null,wt=[],ci=de=>{if(!De){let Ce=he.createElement("div");Ce.id=String(de.id),he.body.appendChild(Ce),De=Ce.attachShadow({mode:"open"}),jt=J_(de),De.appendChild(jt)}return De},Os=async de=>{let Ce=de.enableScreenshot&&oR(),zt,$e;try{zt=(t?t():await e("feedbackModalIntegration",g))(),Mi(zt)}catch{throw za&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{let ne=Ce?n?n():await e("feedbackScreenshotIntegration",g):void 0;ne&&($e=ne(),Mi($e))}catch{za&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}let at=zt.createDialog({options:E(f({},de),{onFormClose:()=>{at?.close(),de.onFormClose?.()},onFormSubmitted:()=>{at?.close(),de.onFormSubmitted?.()}}),screenshotIntegration:$e,sendFeedback:dg,shadow:ci(de)});return at},Ms=(de,Ce={})=>{let zt=$a(gt,Ce),$e=typeof de=="string"?he.querySelector(de):typeof de.addEventListener=="function"?de:null;if(!$e)throw za&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let at=null,ne=async()=>{at||(at=await Os(E(f({},zt),{onFormSubmitted:()=>{at?.removeFromDom(),zt.onFormSubmitted?.()}}
108))),at.appendToDom(),at.open()};$e.addEventListener("click",ne);let ct=()=>{wt=wt.filter(re=>re!==ct),at?.removeFromDom(),at=null,$e.removeEventListener("click",ne)};return wt.push(ct),ct},rn=(de={})=>{let Ce=$a(gt,de),zt=ci(Ce),$e=cR({triggerLabel:Ce.triggerLabel,triggerAriaLabel:Ce.triggerAriaLabel,shadow:zt,styleNonce:h});return Ms($e.el,E(f({},Ce),{onFormOpen(){$e.hide()},onFormClose(){$e.show()},onFormSubmitted(){$e.show()}})),$e};return{name:"Feedback",setupOnce(){!ur()||!gt.autoInject||(he.readyState==="loading"?he.addEventListener("DOMContentLoaded",()=>rn().appendToDom()):rn().appendToDom())},attachTo:Ms,createWidget(de={}){let Ce=rn($a(gt,de));return Ce.appendToDom(),Ce},async createForm(de={}){return Os($a(gt,de))},setTheme(de){if(gt.colorScheme=de,De){let Ce=J_(gt);jt?De.replaceChild(Ce,jt):De.prepend(Ce),jt=Ce}},remove(){De&&(De.parentElement?.remove(),De=null,jt=null),wt.forEach(de=>de()),wt=[]}}};function lR(){return I()?.getIntegrationByName("Feedback")}var Qa,ge,pg,$r,K_,mg,zl,Ki={},Jl=[],dR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Kl=Array.isArray;function dr(e,t){for(var n in t)e[n]=t[n];return e}function hg(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Qa.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return qa(e,s,r,o,null)}function qa(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++pg,__i:-1,__u:0};return o==null&&ge.vnode!=null&&ge.vnode(i),i}function Xi(e){return e.children}function Va(e,t){this.props=e,this.context=t}function Do(e,t){if(t==null)return e.__?Do(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Do(e):null}function fR(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=dr({},o)).__v=o.__v+1,ge.vnode&&ge.vnode(r),Xl(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??Do(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&_g(r),r}function _g(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return _g(e)}}function X_(e){(!e.__d&&(e.__d=!0)&&$r.push(e)&&!Ka.__r++||K_!==ge.debounceRendering)&&((K_=ge.debounceRendering)||mg)(Ka)}function Ka(){var e,t,n,r=[],o=[];for($r.sort(zl);e=$r.shift();)e.__d&&(n=$r.length,t=fR(e,r,o)||t,n===0||$r.length>n?(ql(r,t,o),o.length=r.length=0,t=void 0,$r.sort(zl)):t&&ge.__c&&ge.__c(t,Jl));t&&ql(r,t,o),Ka.__r=0}function gg(e,t,n,r,o,i,s,a,c,u,d){var l,p,m,h,g,S=r&&r.__k||Jl,T=t.length;for(n.__d=c,pR(n,t,S),c=n.__d,l=0;l<T;l++)(m=n.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(p=m.__i===-1?Ki:S[m.__i]||Ki,m.__i=l,Xl(e,m,p,o,i,s,a,c,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Ql(p.ref,null,m),d.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),65536&m.__u||p.__k===m.__k?c=Sg(m,c,e):typeof m.type=="function"&&m.__d!==void 0?c=m.__d:h&&(c=h.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=c,n.__e=g}function pR(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?qa(null,o,null,null,o):Kl(o)?qa(Xi,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?qa(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=mR(o,n,s=r+l,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?l++:a>s?d>c-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==r+l&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=Do(i)),Vl(i,i,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=Do(i)),Vl(i,i))}function Sg(e,t,n){var r,o;
vendor: 4,242 bytes, line 108
108if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Sg(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function mR(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return a;a++}}return-1}function Q_(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||dR.test(t)?n:n+"px"}function Wa(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Q_(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Q_(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?eg:Z_,i)):e.removeEventListener(t,i?eg:Z_,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Z_(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(ge.event?ge.event(e):e)}}function eg(e){if(this.l)return this.l[e.type+!0](ge.event?ge.event(e):e)}function Xl(e,t,n,r,o,i,s,a,c,u){var d,l,p,m,h,g,S,T,A,B,k,Y,G,y,O,V=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=ge.__b)&&d(t);e:if(typeof V=="function")try{if(T=t.props,A=(d=V.contextType)&&r[d.__c],B=d?A?A.props.value:d.__:r,n.__c?S=(l=t.__c=n.__c).__=l.__E:("prototype"in V&&V.prototype.render?t.__c=l=new V(T,B):(t.__c=l=new Va(T,B),l.constructor=V,l.render=_R),A&&A.sub(l),l.props=T,l.state||(l.state={}),l.context=B,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),V.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=dr({},l.__s)),dr(l.__s,V.getDerivedStateFromProps(T,l.__s))),m=l.props,h=l.state,l.__v=t,p)V.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(V.getDerivedStateFromProps==null&&T!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(T,B),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(T,l.__s,B)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=T,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(v){v&&(v.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(T,l.__s,B),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,h,g)})}if(l.context=B,l.props=T,l.__P=e,l.__e=!1,Y=ge.__r,G=0,"prototype"in V&&V.prototype.render){for(l.state=l.__s,l.__d=!1,Y&&Y(t),d=l.render(l.props,l.state,l.context),y=0;y<l._sb.length;y++)l.__h.push(l._sb[y]);l._sb=[]}else do l.__d=!1,Y&&Y(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++G<25);l.state=l.__s,l.getChildContext!=null&&(r=dr(dr({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(g=l.getSnapshotBeforeUpdate(m,h)),gg(e,Kl(O=d!=null&&d.type===Xi&&d.key==null?d.props.children:d)?O:[O],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),S&&(l.__E=l.__=null)}catch(v){t.__v=null,c||i!=null?(t.__e=a,t.__u|=c?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),ge.__e(v,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=hR(n.__e,t,n,r,o,i,s,c,u);(d=ge.diffed)&&d(t)}function ql(e,t,n){for(var r=0;r<n.length;r++)Ql(n[r],n[++r],n[++r]);ge.__c&&ge.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){ge.__e(i,o.__v)}})}function hR(e,t,n,r,o,i,s,a,c){var u,d,l,p,m,h,g,S=n.props,T=t.props,A=t.type;if(A==="svg"&&(o=!0),i!=null){for(u=0;
vendor: 2,583 bytes, line 108
108u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!A&&(A?m.localName===A:m.nodeType===3)){e=m,i[u]=null;break}}if(e==null){if(A===null)return document.createTextNode(T);e=o?document.createElementNS("http://www.w3.org/2000/svg",A):document.createElement(A,T.is&&T),i=null,a=!1}if(A===null)S===T||a&&e.data===T||(e.data=T);else{if(i=i&&Qa.call(e.childNodes),S=n.props||Ki,!a&&i!=null)for(S={},u=0;u<e.attributes.length;u++)S[(m=e.attributes[u]).name]=m.value;for(u in S)m=S[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=m:u==="key"||u in T||Wa(e,u,null,m,o));for(u in T)m=T[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?h=m:u=="checked"?g=m:u==="key"||a&&typeof m!="function"||S[u]===m||Wa(e,u,m,S[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),gg(e,Kl(p)?p:[p],t,n,r,o&&A!=="foreignObject",i,s,i?i[0]:n.__k&&Do(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&hg(i[u]);a||(u="value",h!==void 0&&(h!==e[u]||A==="progress"&&!h||A==="option"&&h!==S[u])&&Wa(e,u,h,S[u],!1),u="checked",g!==void 0&&g!==e[u]&&Wa(e,u,g,S[u],!1))}return e}function Ql(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){ge.__e(r,n)}}function Vl(e,t,n){var r,o;if(ge.unmount&&ge.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ql(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){ge.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Vl(r[o],t,n||typeof e.type!="function");n||e.__e==null||hg(e.__e),e.__=e.__e=e.__d=void 0}function _R(e,t,n){return this.constructor(e,n)}function gR(e,t,n){var r,o,i,s;ge.__&&ge.__(e,t),o=(r=!1)?null:t.__k,i=[],s=[],Xl(t,e=t.__k=ee(Xi,null,[e]),o||Ki,Ki,t.ownerSVGElement!==void 0,o?null:t.firstChild?Qa.call(t.childNodes):null,i,o?o.__e:t.firstChild,r,s),e.__d=void 0,ql(i,e,s)}Qa=Jl.slice,ge={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},pg=0,Va.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=dr({},this.state),typeof e=="function"&&(e=e(dr({},n),this.props)),e&&dr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),X_(this))},Va.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),X_(this))},Va.prototype.render=Xi,$r=[],mg=typeof Promise=="function"?Promise.prototype.then.bind(Prom
108ise.resolve()):setTimeout,zl=function(e,t){return e.__v.__b-t.__v.__b},Ka.__r=0;var Dn,_e,Gl,tg,Bo=0,Eg=[],Ya=[],xe=ge,ng=xe.__b,rg=xe.__r,og=xe.diffed,ig=xe.__c,sg=xe.unmount,ag=xe.__;function jr(e,t){xe.__h&&xe.__h(_e,e,Bo||t),Bo=0;var n=_e.__H||(_e.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ya}),n.__[e]}function Wr(e){return Bo=1,Tg(Ig,e)}function Tg(e,t,n){var r=jr(Dn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ig(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=_e,!_e.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};_e.u=!0;var i=_e.shouldComponentUpdate,s=_e.componentWillUpdate;_e.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},_e.shouldComponentUpdate=o}return r.__N||r.__}function SR(e,t){var n=jr(Dn++,3);!xe.__s&&Zl(n.__H,t)&&(n.__=e,n.i=t,_e.__H.__h.push(n))}function yg(e,t){var n=jr(Dn++,4);!xe.__s&&Zl(n.__H,t)&&(n.__=e,n.i=t,_e.__h.push(n))}function ER(e){return Bo=5,Qi(function(){return{current:e}},[])}function TR(e,t,n){Bo=6,yg(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Qi(e,t){var n=jr(Dn++,7);return Zl(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Uo(e,t){return Bo=8,Qi(function(){return e},t)}function yR(e){var t=_e.context[e.__c],n=jr(Dn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(_e)),t.props.value):e.__}function IR(e,t){xe.useDebugValue&&xe.useDebugValue(t?t(e):e)}function bR(e){var t=jr(Dn++,10),n=Wr();return t.__=e,_e.componentDidCatch||(_e.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function AR(){var e=jr(Dn++,11);if(!e.__){for(var t=_e.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function RR(){for(var e;e=Eg.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ja),e.__H.__h.forEach(Yl),e.__H.__h=[]}catch(t){e.__H.__h=[],xe.__e(t,e.__v)}}xe.__b=function(e){_e=null,ng&&ng(e)},xe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ag&&ag(e,t)},xe.__r=function(e){rg&&rg(e),Dn=0;var t=(_e=e.__c).__H;t&&(Gl===_e?(t.__h=[],_e.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ya,n.__N=n.i=void 0})):(t.__h.forEach(Ja),t.__h.forEach(Yl),t.__h=[],Dn=0)),Gl=_e},xe.diffed=function(e){og&&og(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Eg.push(t)!==1&&tg===xe.requestAnimationFrame||((tg=xe.requestAnimationFrame)||vR)(RR)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ya&&(n.__=n.__V),n.i=void 0,n.__V=Ya})),Gl=_e=null},xe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ja),n.__h=n.__h.filter(function(r){return!r.__||Yl(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],xe.__e(r,n.__v)}}),ig&&ig(e,t)},xe.unmount=function(e){sg&&sg(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ja(r)}catch(o){t=o}}),n.__H=void 0,t&&xe.__e(t,n.__v))};var cg=typeof requestAnimationFrame=="function";function vR(e){var t,n=function(){clearTimeout(r),cg&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);cg&&(t=requestAnimationFrame(n))}function Ja(e){var t=_e,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),_e=t}function Yl(e){var t=_e;e.__c=e.__(),_e=t}function Zl(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Ig(e,t){return typeof t=="function"?t(e):t}var NR=Object.defineProperty({__proto__:null,useCallback:Uo,useContext:yR,useDebugValue:IR,useEffect:SR,useErrorBoundary:bR,useId:AR,useImperativeHandle:TR,useLayoutEffect:yg,useMemo:Qi,useReducer:Tg,useRef:ER,useState:Wr},Symbol.toStringTag,{value:"Module"}),CR="http://www.w3.org/2000/svg";function wR(){let e=r=>he.createElementNS(CR,r),t=Ht(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ht(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function xR({options:e}){let t=Qi(()=>({__html:wR().outerHTML}),[]);return ee("h2",{class:"dialog__header"},ee("span",{class:"dialog__title"},e.formTitle),e.showBranding?ee("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function kR(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Hl(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function OR({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail
108:a,showName:c,screenshotInput:u}){let{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:m,emailLabel:h,emailPlaceholder:g,isEmailRequired:S,isNameRequired:T,messageLabel:A,messagePlaceholder:B,nameLabel:k,namePlaceholder:Y,submitButtonLabel:G,isRequiredLabel:y}=e,[O,V]=Wr(!1),[v,L]=Wr(null),[w,D]=Wr(!1),H=u?.input,[oe,ie]=Wr(null),ae=Uo(U=>{ie(U),D(!1)},[]),P=Uo(U=>{let j=kR(U,{emailLabel:h,isEmailRequired:S,isNameRequired:T,messageLabel:A,nameLabel:k});return j.length>0?L(`Please enter in the following required fields: ${j.join(", ")}`):L(null),j.length===0},[h,S,T,A,k]),W=Uo(async U=>{V(!0);try{if(U.preventDefault(),!(U.target instanceof HTMLFormElement))return;let j=new FormData(U.target),ue=await(u&&w?u.value():void 0),me={name:Hl(j,"name"),email:Hl(j,"email"),message:Hl(j,"message"),attachments:ue?[ue]:void 0};if(!P(me))return;try{let Re=await o({name:me.name,email:me.email,message:me.message,source:tR,tags:d},{attachments:me.attachments});i(me,Re)}catch(Re){za&&_.error(Re),L(Re),s(Re)}}finally{V(!1)}},[u&&w,i,s]);return ee("form",{class:"form",onSubmit:W},H&&w?ee(H,{onError:ae}):null,ee("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:O},ee("div",{class:"form__top"},v?ee("div",{class:"form__error-container"},v):null,c?ee("label",{for:"name",class:"form__label"},ee($l,{label:k,isRequiredLabel:y,isRequired:T}),ee("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:Y,required:T,type:"text"})):ee("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ee("label",{for:"email",class:"form__label"},ee($l,{label:h,isRequiredLabel:y,isRequired:S}),ee("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:g,required:S,type:"email"})):ee("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ee("label",{for:"message",class:"form__label"},ee($l,{label:A,isRequiredLabel:y,isRequired:!0}),ee("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:B,required:!0,rows:5})),H?ee("label",{for:"screenshot",class:"form__label"},ee("button",{class:"btn btn--default",disabled:O,type:"button",onClick:()=>{ie(null),D(U=>!U)}},w?p:l),oe?ee("div",{class:"form__error-container"},oe.message):null):null),ee("div",{class:"btn-group"},ee("button",{class:"btn btn--primary",disabled:O,type:"submit"},G),ee("button",{class:"btn btn--default",disabled:O,type:"button",onClick:r},m))))}function $l({label:e,isRequired:t,isRequiredLabel:n}){return ee("span",{class:"form__label__text"},e,t&&ee("span",{class:"form__label__text--required"},n))}var ja=16,ug=17,MR="http://www.w3.org/2000/svg";function LR(){let e=c=>dn.document.createElementNS(MR,c),t=Ht(e("svg"),{width:`${ja}`,height:`${ug}`,viewBox:`0 0 ${ja} ${ug}`,fill:"inherit"}),n=Ht(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ht(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ht(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173
10810.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);let i=e("defs"),s=Ht(e("clipPath"),{id:"clip0_57_156"}),a=Ht(e("rect"),{width:`${ja}`,height:`${ja}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}function PR(r){var o=r,{open:e,onFormSubmitted:t}=o,n=hn(o,["open","onFormSubmitted"]);let i=n.options,s=Qi(()=>({__html:LR().outerHTML}),[]),[a,c]=Wr(null),u=Uo(()=>{a&&(clearTimeout(a),c(null)),t()},[a]),d=Uo((l,p)=>{n.onSubmitSuccess(l,p),c(setTimeout(()=>{t(),c(null)},rR))},[t]);return ee(Xi,null,a?ee("div",{class:"success__position",onClick:u},ee("div",{class:"success__content"},i.successMessageText,ee("span",{class:"success__icon",dangerouslySetInnerHTML:s}))):ee("dialog",{class:"dialog",onClick:i.onFormClose,open:e},ee("div",{class:"dialog__position"},ee("div",{class:"dialog__content",onClick:l=>{l.stopPropagation()}},ee(xR,{options:i}),ee(OR,E(f({},n),{onSubmitSuccess:d}))))))}var UR=` 109.dialog { 110 position: fixed; 111 z-index: var(--z-index); 112 margin: 0; 113 inset: 0; 114 115 display: flex; 116 align-items: center; 117 justify-content: center; 118 padding: 0; 119 height: 100vh; 120 width: 100vw; 121 122 color: var(--dialog-color, var(--foreground)); 123 fill: var(--dialog-color, var(--foreground)); 124 line-height: 1.75em; 125 126 background-color: rgba(0, 0, 0, 0.05); 127 border: none; 128 inset: 0; 129 opacity: 1; 130 transition: opacity 0.2s ease-in-out; 131} 132 133.dialog__position { 134 position: fixed; 135 z-index: var(--z-index); 136 inset: var(--dialog-inset); 137 padding: var(--page-margin); 138 display: flex; 139 max-height: calc(100vh - (2 * var(--page-margin))); 140} 141@media (max-width: 600px) { 142 .dialog__position { 143 inset: var(--page-margin); 144 padding: 0; 145 } 146} 147 148.dialog__position:has(.editor) { 149 inset: var(--page-margin); 150 padding: 0; 151} 152 153.dialog:not([open]) { 154 opacity: 0; 155 pointer-events: none; 156 visibility: hidden; 157} 158.dialog:not([open]) .dialog__content { 159 transform: translate(0, -16px) scale(0.98); 160} 161 162.dialog__content { 163 display: flex; 164 flex-direction: column; 165 gap: 16px; 166 padding: var(--dialog-padding, 24px); 167 max-width: 100%; 168 width: 100%; 169 max-height: 100%; 170 overflow: auto; 171 172 background: var(--dialog-background, var(--background)); 173 border-radius: var(--dialog-border-radius, 20px); 174 border: var(--dialog-border, var(--border));
175 box-shadow: var(--dialog-box-shadow, var(--box-shadow)); 176 transform: translate(0, 0) scale(1); 177 transition: transform 0.2s ease-in-out; 178} 179 180`,DR=` 181.dialog__header { 182 display: flex; 183 gap: 4px; 184 justify-content: space-between; 185 font-weight: var(--dialog-header-weight, 600); 186 margin: 0; 187} 188.dialog__title { 189 align-self: center; 190 width: var(--form-width, 272px); 191} 192 193@media (max-width: 600px) { 194 .dialog__title { 195 width: auto; 196 } 197} 198 199.dialog__position:has(.editor) .dialog__title { 200 width: auto; 201} 202 203 204.brand-link { 205 display: inline-flex; 206} 207.brand-link:focus-visible { 208 outline: var(--outline); 209} 210`,BR=` 211.form { 212 display: flex; 213 overflow: auto; 214 flex-direction: row; 215 gap: 16px; 216 flex: 1 0; 217} 218 219.form fieldset { 220 border: none; 221 margin: 0; 222 padding: 0; 223} 224 225.form__right { 226 flex: 0 0 auto; 227 display: flex; 228 overflow: auto; 229 flex-direction: column; 230 justify-content: space-between; 231 gap: 20px; 232 width: var(--form-width, 100%); 233} 234 235.dialog__position:has(.editor) .form__right { 236 width: var(--form-width, 272px); 237} 238 239.form__top { 240 display: flex; 241 flex-direction: column; 242 gap: 8px; 243} 244 245.form__error-container { 246 color: var(--error-color); 247 fill: var(--error-color); 248} 249 250.form__label { 251 display: flex; 252 flex-direction: column; 253 gap: 4px; 254 margin: 0px; 255} 256 257.form__label__text { 258 display: flex; 259 gap: 4px; 260 align-items: center; 261} 262 263.form__label__text--required { 264 font-size: 0.85em; 265} 266 267.form__input { 268 font-family: inherit; 269 line-height: inherit; 270 background: transparent; 271 box-sizing: border-box; 272 border: var(--input-border, var(--border)); 273 border-radius: var(--input-border-radius, 6px); 274 color: var(--input-color, inherit); 275 fill: var(--input-color, inherit); 276 font-size: var(--input-font-size, inherit); 277 font-weight: var(--input-font-weight, 500); 278 padding: 6px 12px; 279} 280 281.form__input::placeholder { 282 opacity: 0.65; 283 color: var(--input-placeholder-color, inherit); 284 filter: var(--interactive-filter); 285} 286 287.form__input:focus-visible { 288 outline: var(--input-focus-outline, var(--outline)); 289} 290 291.form__input--textarea { 292 font-family: inherit; 293 resize: vertical; 294} 295 296.error { 297 color: var(--error-color); 298 fill: var(--error-color); 299} 300`,FR=` 301.btn-group { 302 display: grid; 303 gap: 8px; 304} 305 306.btn { 307 line-height: inherit; 308 border: var(--button-border, var(--border)); 309 border-radius: var(--button-border-radius, 6px); 310 cursor: pointer; 311 font-family: inherit; 312 font-size: var(--button-font-size, inherit); 313 font-weight: var(--button-font-weight, 600); 314 padding: var(--button-padding, 6px 16px); 315} 316.btn[disabled] { 317 opacity: 0.6; 318 pointer-events: none; 319} 320 321.btn--primary { 322 color: var(--button-primary-color, var(--accent-foreground)); 323 fill: var(--button-primary-color, var(--accent-foreground)); 324 background: var(--button-primary-background, var(--accent-background)); 325 border: var(--button-primary-border, var(--border)); 326 border-radius: var(--button-primary-border-radius, 6px); 327 font-weight: var(--button-primary-font-weight, 500); 328} 329.btn--primary:hover { 330 color: var(--button-primary-hover-color, var(--accent-foreground)); 331 fill: var(--button-primary-hover-color, var(--accent-foreground)); 332 background: var(--button-primary-hover-background, var(--accent-background)); 333 filter: var(--interactive-filter); 334} 335.btn--primary:focus-visible { 336 background: var(--button-primary-hover-background, var(--accent-background)); 337 filter: var(--interactive-filter); 338 outline: var(--button-primary-focus-outline, var(--outline)); 339} 340 341.btn--default { 342 color: var(--button-color, var(--foreground)); 343 fill: var(--button-color, var(--foreground)); 344 background: var(--button-background, var(--background)); 345 border: var(--button-border, var(--border)); 346 border-radius: var(--button-border-radius, 6px); 347 font-weight: var(--button-font-weight, 500); 348} 349.btn--default:hover { 350 color: var(--button-color, var(--foreground)); 351 fill: var(--button-color, var(--foreground)); 352 background: var(--button-hover-background, var(--background)); 353 filter: var(--interactive-filter); 354} 355.btn--default:focus-visible { 356 background: var(--button-hover-background, var(--background)); 357 filter: var(--interactive-filter); 358 outline: var(--button-focus-outline, var(--outline)); 359} 360`,GR=` 361.success__position { 362 position: fixed; 363 inset: var(--dialog-inset); 364 padding: var(--page-margin); 365 z-index: var(--z-index); 366} 367.success__content { 368 background: var(--success-background, var(--background)); 369 border: var(--success-border, var(--border)); 370 border-radius: var(--success-border-radius, 1.7em/50%);
371 box-shadow: var(--success-box-shadow, var(--box-shadow)); 372 font-weight: var(--success-font-weight, 600); 373 color: var(--success-color); 374 fill: var(--success-color); 375 padding: 12px 24px; 376 line-height: 1.75em; 377 378 display: grid; 379 align-items: center; 380 grid-auto-flow: column; 381 gap: 6px; 382 cursor: default; 383} 384 385.success__icon { 386 display: flex; 387} 388`;function HR(e){let t=he.createElement("style");return t.textContent=` 389:host { 390 --dialog-inset: var(--inset); 391} 392 393${UR} 394${DR} 395${BR} 396${FR} 397${GR} 398`,e&&t.setAttribute("nonce",e),t}function $R(){let e=x().getUser(),t=se().getUser(),n=Sn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var bg=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let o=r,i=e.useSentryUser,s=$R(),a=he.createElement("div"),c=HR(e.styleNonce),u="",d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),he.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),I()?.emit("openFeedbackWidget"),u=he.body.style.overflow,he.body.style.overflow="hidden"},close(){p(!1),he.body.style.overflow=u}},l=t?.createInput({h:ee,hooks:NR,dialog:d,options:e}),p=m=>{gR(ee(PR,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(i&&s?.[i.name]||""),defaultEmail:String(i&&s?.[i.email]||""),onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,g)=>{p(!1),e.onSubmitSuccess?.(h,g)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:m}),a)};return d}});function WR({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function jR(e){let t=he.createElement("style"),n="#1A141F",r="#302735";return t.textContent=` 399.editor { 400 display: flex; 401 flex-grow: 1; 402 flex-direction: column; 403} 404 405.editor__image-container { 406 justify-items: center; 407 padding: 15px; 408 position: relative; 409 height: 100%; 410 border-radius: var(--menu-border-radius, 6px); 411 412 background-color: ${n}; 413 background-image: repeating-linear-gradient( 414 -145deg, 415 transparent, 416 transparent 8px, 417 ${n} 8px, 418 ${n} 11px 419 ), 420 repeating-linear-gradient( 421 -45deg, 422 transparent, 423 transparent 15px, 424 ${r} 15px, 425 ${r} 16px 426 ); 427} 428 429.editor__canvas-container { 430 width: 100%; 431 height: 100%; 432 position: relative; 433 display: flex; 434 align-items: center; 435 justify-content: center; 436} 437 438.editor__canvas-container > * { 439 object-fit: contain; 440 position: absolute; 441} 442 443.editor__tool-container { 444 padding-top: 8px; 445 display: flex; 446 justify-content: center; 447} 448 449.editor__tool-bar { 450 display: flex; 451 gap: 8px; 452} 453 454.editor__tool { 455 display: flex; 456 padding: 8px 12px; 457 justify-content: center; 458 align-items: center; 459 border: var(--button-border, var(--border)); 460 border-radius: var(--button-border-radius, 6px); 461 background: var(--button-background, var(--background)); 462 color: var(--button-color, var(--foreground)); 463} 464 465.editor__tool--active { 466 background: var(--button-primary-background, var(--accent-background)); 467 color: var(--button-primary-color, var(--accent-foreground)); 468} 469 470.editor__rect { 471 position: absolute; 472 z-index: 2; 473} 474 475.editor__rect button { 476 opacity: 0; 477 position: absolute; 478 top: -12px; 479 right: -12px; 480 cursor: pointer; 481 padding: 0; 482 z-index: 3; 483 border: none; 484 background: none; 485} 486 487.editor__rect:hover button { 488 opacity: 1; 489} 490`,e&&t.setAttribute("nonce",e),t}function zR({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function qR({hooks:e}){function t(){let[n,r]=e.useState(dn.devicePixelRatio??1);return e.useEffect(()=>{let o=()=>{r(dn.devicePixelRatio)},i=matchMedia(`(resolution: ${dn.devicePixelRatio}dppx)`);return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:i,onError:s}){let a=t();e.useEffect(()=>{(async()=>{r();let u=await Ji.mediaDevices.getDisplayMedia({video:{width:dn.innerWidth*a,height:dn.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=he.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>
490{o(d,a),u.getTracks().forEach(m=>m.stop()),l()},d.play().catch(p)}),i()})().catch(s)},[])}}function VR(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function lr(e,t,n){if(!e)return;let r=e.getContext("2d",t);r&&n(e,r)}function Wl(e,t){lr(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function jl(e,t,n){lr(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(i=>{VR(i,o,t)})})}function YR({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){let i=qR({hooks:t}),s=zR({h:e}),a=WR({h:e}),c={__html:jR(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{let[p,m]=t.useState("highlight"),[h,g]=t.useState([]),S=t.useRef(null),T=t.useRef(null),A=t.useRef(null),B=t.useRef(null),[k,Y]=t.useState(1),G=t.useMemo(()=>{let w=he.getElementById(o.id);if(!w)return"white";let D=getComputedStyle(w);return D.getPropertyValue("--button-primary-background")||D.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{let w=()=>{let D=S.current;D&&(lr(l.canvas,{alpha:!1},H=>{let oe=Math.min(D.clientWidth/H.width,D.clientHeight/H.height);Y(oe)}),(D.clientHeight===0||D.clientWidth===0)&&setTimeout(w,0))};return w(),dn.addEventListener("resize",w),()=>{dn.removeEventListener("resize",w)}},[l]);let y=t.useCallback((w,D)=>{lr(w,{alpha:!0},(H,oe)=>{oe.scale(D,D),H.width=l.canvas.width,H.height=l.canvas.height})},[l]);t.useEffect(()=>{y(T.current,l.dpi),Wl(T.current,l.canvas)},[l]),t.useEffect(()=>{y(A.current,l.dpi),lr(A.current,{alpha:!0},(w,D)=>{D.clearRect(0,0,w.width,w.height)}),jl(A.current,G,h)},[h,G]),t.useEffect(()=>{y(n,l.dpi),Wl(n,l.canvas),lr(he.createElement("canvas"),{alpha:!0},(w,D)=>{D.scale(l.dpi,l.dpi),w.width=l.canvas.width,w.height=l.canvas.height,jl(w,G,h),Wl(n,w)})},[h,l,G]);let O=w=>{if(!p||!B.current)return;let D=B.current.getBoundingClientRect(),H={type:p,x:w.offsetX/k,y:w.offsetY/k},oe=(P,W)=>{let U=(W.clientX-D.x)/k,j=(W.clientY-D.y)/k;return{type:P.type,x:Math.min(P.x,U),y:Math.min(P.y,j),w:Math.abs(U-P.x),h:Math.abs(j-P.y)}},ie=P=>{lr(A.current,{alpha:!0},(W,U)=>{U.clearRect(0,0,W.width,W.height)}),jl(A.current,G,[...h,oe(H,P)])},ae=P=>{let W=oe(H,P);W.w*k>=1&&W.h*k>=1&&g(U=>[...U,W]),he.removeEventListener("mousemove",ie),he.removeEventListener("mouseup",ae)};he.addEventListener("mousemove",ie),he.addEventListener("mouseup",ae)},V=t.useCallback(w=>D=>{D.preventDefault(),D.stopPropagation(),g(H=>{let oe=[...H];return oe.splice(w,1),oe})},[]),v={width:`${l.canvas.width*k}px`,height:`${l.canvas.height*k}px`},L=w=>{w.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:S},e("canvas",{ref:T,id:"background",style:v}),e("canvas",{ref:A,id:"foreground",style:v}),e("div",{ref:B,onMouseDown:O,style:v},h.map((w,D)=>e("div",{key:D,class:"editor__rect",style:{top:`${w.y*k}px`,left:`${w.x*k}px`,width:`${w.w*k}px`,height:`${w.h*k}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:V(D),onMouseDown:L,onMouseUp:L,type:"button"},e(a,null))))))),e(s,{options:o,action:p,setAction:m}))};return function({onError:p}){let[m,h]=t.useState();return i({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((g,S)=>{lr(he.createElement("canvas"),{alpha:!1},(T,A)=>{A.scale(S,S),T.width=g.videoWidth,T.height=g.videoHeight,A.drawImage(g,0,0,T.width,T.height),h({canvas:T,dpi:S})}),n.width=g.videoWidth,n.height=g.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(g=>{u.display="block",p(g)},[])}),m?e(d,{screenshot:m}):e("div",null)}}var Ag=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let o=he.createElement("canvas");return{input:YR({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{let i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}});var C=N,ed=0;function td(){return ed>0}function JR(){ed++,setTimeout(()=>{ed--})}function zr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Er(e))return e}catch{return e}let r=function(...o){try{let i=o.map(s=>zr(s,t));return e.apply(this,i)}catch(i){throw JR(),je(s=>{s.addEventProcessor(a=>(t.mechanism&&(so(a,void 0,void 0),et(a,t.mechanism)),a.extra=E(f({},a.extra),{arguments:o}),a)),X(i)}),i}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Hs(r,e),Te(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Zi(){let e=dt(),{referrer:t}=C.document||{},{userAgent:n}=C.navigator||{}
490,r=f(f({},t&&{Referer:t}),n&&{"User-Agent":n});return{url:e,headers:r}}var KR={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient",instrumentLangGraph:"instrumentlanggraph",createLangChainCallbackHandler:"createlangchaincallbackhandler"},Rg=C;async function nd(e,t){let n=KR[e],r=Rg.Sentry=Rg.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);let o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;let i=XR(n),s=C.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);let a=new Promise((l,p)=>{s.addEventListener("load",()=>l()),s.addEventListener("error",p)}),c=C.document.currentScript,u=C.document.body||C.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}let d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function XR(e){let n=I()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${xt}/${e}.min.js`,n).toString()}var QR=Xa({lazyLoadIntegration:nd});var vg=Xa({getModalIntegration:()=>bg,getScreenshotIntegration:()=>Ag});function es(e,t){let n=id(e,t),r={type:rv(t),value:ov(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ZR(e,t,n,r){let i=I()?.getOptions().normalizeDepth,s=av(t),a={__serialized__:na(t,i)};if(s)return{exception:{values:[es(e,s)]},extra:a};let c={exception:{values:[{type:Sr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:iv(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=id(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function rd(e,t){return{exception:{values:[es(e,t)]}}}function id(e,t){let n=t.stacktrace||t.stack||"",r=tv(t),o=nv(t);try{return e(n,r,o)}catch{}return[]}var ev=/Minified React error #\d+;/i;function tv(e){return e&&ev.test(e.message)?1:0}function nv(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ng(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function rv(e){let t=e?.name;return!t&&Ng(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ov(e){let t=e?.message;return Ng(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?Ia(t.error):Ia(e):"No error message"}function sd(e,t,n,r){let o=n?.syntheticException||void 0,i=Fo(e,t,o,r);return et(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),yn(i)}function ad(e,t,n="info",r,o){let i=r?.syntheticException||void 0,s=od(e,t,i,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),yn(s)}function Fo(e,t,n,r,o){let i;if(fi(t)&&t.error)return rd(e,t.error);if(Gs(t)||du(t)){let s=t;if("stack"in t)i=rd(e,t);else{let a=s.name||(Gs(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=od(e,c,n,r),so(i,c)}return"code"in s&&(i.tags=E(f({},i.tags),{"DOMException.code":`${s.code}`})),i}return Ze(t)?rd(e,t):we(t)||Sr(t)?(i=ZR(e,t,n,o),et(i,{synthetic:!0}),i):(i=od(e,t,n,r),so(i,`${t}`,void 0),et(i,{synthetic:!0}),i)}function od(e,t,n,r){let o={};
490if(r&&n){let i=id(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),et(o,{synthetic:!0})}if(kn(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function iv(e,{isUnhandledRejection:t}){let n=_u(e),r=t?"promise rejection":"exception";return fi(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Sr(e)?`Event \`${sv(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function sv(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function av(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}var ts=class extends Ui{constructor(t){let n=cv(t),r=C.SENTRY_SDK_SOURCE||Fl();Fi(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings=f({infer_ip:n.sendDefaultPii?"auto":"never"},n._metadata.sdk.settings)),super(n);let{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:c}=this._options,u=c??a?.enableMetrics??!0;C.document&&(i||s||u)&&C.document.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&kr(this),u&&So(this))}),o&&this.on("beforeSendSession",ll)}eventFromException(t,n){return sd(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return ad(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}};function cv(e){return f({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},e)}var Qt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var F=N;var uv=(e,t)=>
490e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Nn=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=uv(t.value,n),e(t)))}};var Bn=(e=!0)=>{let t=F.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var Zt=()=>Bn()?.activationStart??0;function en(e,t,n){F.document&&F.addEventListener(e,t,n)}function qr(e,t,n){F.document&&F.removeEventListener(e,t,n)}var Go=-1,Cg=new Set,lv=()=>F.document?.visibilityState==="hidden"&&!F.document?.prerendering?0:1/0,Za=e=>{if(dv(e)&&Go>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of Cg)t();isFinite(Go)||(Go=e.type==="visibilitychange"?e.timeStamp:0,qr("prerenderingchange",Za,!0))}},Cn=()=>{if(F.document&&Go<0){let e=Zt();Go=(F.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??lv(),en("visibilitychange",Za,!0),en("pagehide",Za,!0),en("prerenderingchange",Za,!0)}return{get firstHiddenTime(){return Go},onHidden(e){Cg.add(e)}}};function dv(e){return e.type==="pagehide"||F.document?.visibilityState==="hidden"}var wg=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var wn=(e,t=-1)=>{let n=Bn(),r="navigate";return n&&(F.document?.prerendering||Zt()>0?r="prerender":F.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:wg(),navigationType:r}};var cd=new WeakMap;function Ho(e,t){try{return cd.get(e)||cd.set(e,new t),cd.get(e)}catch{return new t}}var ec=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var tn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe(f({type:e,buffered:!0},n)),r}}catch{}};var $o=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var fr=e=>{F.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var fv=[1800,3e3],xg=(e,t={})=>{fr(()=>{let n=Cn(),r=wn("FCP"),o,s=tn("paint",a=>{for(let c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Zt(),0),r.entries.push(c),o(!0)))});s&&(o=Nn(e,r,fv,t.reportAllChanges))})};var pv=[.1,.25],kg=(e,t={})=>{xg($o(()=>{let n=wn("CLS",0),r,o=Cn(),i=Ho(t,ec),s=c=>{for(let u of c)i._processEntry(u);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=tn("layout-shift",s);a&&(r=Nn(e,n,pv,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),r(!0)}),F?.setTimeout?.(r))}))};var Og=0,ud=1/0,tc=0,mv=e=>{e.forEach(t=>{t.interactionId&&(ud=Math.min(ud,t.interactionId),tc=Math.max(tc,t.interactionId),Og=tc?(tc-ud)/7+1:0)})},ld,dd=()=>ld?Og:performance.interactionCount||0,Mg=()=>{"interactionCount"in performance||ld||(ld=tn("event",mv,{type:"event",buffered:!0,durationThreshold:0}))};var fd=10,Lg=0,hv=()=>dd()-Lg,nc=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Lg=dd(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(hv()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let n=this._longestInteractionList.at(-1),r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<fd||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.
490interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>fd){let o=this._longestInteractionList.splice(fd);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}};var rc=e=>{let t=F.requestIdleCallback||F.setTimeout;F.document?.visibilityState==="hidden"?e():(e=$o(e),en("visibilitychange",e,{once:!0,capture:!0}),en("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),qr("visibilitychange",e,{capture:!0}),qr("pagehide",e,{capture:!0})}))};var _v=[200,500],gv=40,Pg=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let n=Cn();fr(()=>{Mg();let r=wn("INP"),o,i=Ho(t,nc),s=c=>{rc(()=>{for(let d of c)i._processEntry(d);let u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=tn("event",s,{durationThreshold:t.durationThreshold??gv});o=Nn(e,r,_v,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var oc=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var Sv=[2500,4e3],Ug=(e,t={})=>{fr(()=>{let n=Cn(),r=wn("LCP"),o,i=Ho(t,oc),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(let u of c)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Zt(),0),r.entries=[u],o())},a=tn("largest-contentful-paint",s);if(a){o=Nn(e,r,Sv,t.reportAllChanges);let c=$o(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),u=d=>{d.isTrusted&&(rc(c),qr(d.type,u,{capture:!0}))};for(let d of["keydown","click","visibilitychange"])en(d,u,{capture:!0})}})};var Ev=[800,1800],pd=e=>{F.document?.prerendering?fr(()=>pd(e)):F.document?.readyState!=="complete"?addEventListener("load",()=>pd(e),!0):setTimeout(e)},Dg=(e,t={})=>{let n=wn("TTFB"),r=Nn(e,n,Ev,t.reportAllChanges);pd(()=>{let o=Bn();o&&(n.value=Math.max(o.responseStart-Zt(),0),n.entries=[o],r(!0))})};var ns={},ic={},Bg,Fg,Gg,Hg;function Vr(e,t=!1){return sc("cls",e,Tv,Bg,t)}function Yr(e,t=!1){return sc("lcp",e,yv,Fg,t)}function md(e){return sc("ttfb",e,Iv,Gg)}function rs(e){return sc("inp",e,bv,Hg)}function $t(e,t){return $g(e,t),ic[e]||(Av(e),ic[e]=!0),Wg(e,t)}function os(e,t){let n=ns[e];if(n?.length)for(let r of n)try{r(t)}catch(o){Qt&&_.error(`Error while triggering instrumentation handler. 491Type: ${e} 492Name: ${St(r)} 493Error:`,o)}}function Tv(){return kg(e=>{os("cls",{metric:e}),Bg=e},{reportAllChanges:!0})}
493function yv(){return Ug(e=>{os("lcp",{metric:e}),Fg=e},{reportAllChanges:!0})}function Iv(){return Dg(e=>{os("ttfb",{metric:e}),Gg=e})}function bv(){return Pg(e=>{os("inp",{metric:e}),Hg=e})}function sc(e,t,n,r,o=!1){$g(e,t);let i;return ic[e]||(i=n(),ic[e]=!0),r&&t({metric:r}),Wg(e,t,o?i:void 0)}function Av(e){let t={};e==="event"&&(t.durationThreshold=0),tn(e,n=>{os(e,{entries:n})},t)}function $g(e,t){ns[e]=ns[e]||[],ns[e].push(t)}function Wg(e,t,n){return()=>{n&&n();let r=ns[e];if(!r)return;let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function jg(e){return"duration"in e}var zg=e=>{let t=n=>{(n.type==="pagehide"||F.document?.visibilityState==="hidden")&&e(n)};en("visibilitychange",t,{capture:!0,once:!0}),en("pagehide",t,{capture:!0,once:!0})};function ac(e){return typeof e=="number"&&isFinite(e)}function Fn(e,t,n,o){var r=hn(o,[]);let i=M(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Cr(e,()=>{let s=qe(f({startTime:t},r));return s&&s.end(n),s})}function Wo(e){let t=I();if(!t)return;let{name:n,transaction:r,attributes:o,startTime:i}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=x(),p=l.getUser(),m=p!==void 0?p.email||p.id||p.ip_address:void 0,h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}let g=f({release:s,environment:a,user:m||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":F.navigator?.userAgent,"client.address":c?"{{auto}}":void 0},o);return qe({name:n,attributes:g,startTime:i,experimental:{standalone:!0}})}function Gn(){return F.addEventListener&&F.performance}function Se(e){return e/1e3}function qg(e){let t="unknown",n="unknown",r="";for(let o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function cc(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function uc(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}zg(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s()})}function Vg(e){let t=0,n;if(!cc("layout-shift"))return;let r=Vr(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);uc(e,(o,i)=>{Rv(t,n,i,o),r()})}function Rv(e,t,n,r){Qt&&_.log(`Sending CLS span (${e})`);let o=t?Se((ye()||0)+t.startTime):Q(),i=x().getScopeData().transactionName,s=t?Oe(t.sources[0]?.node):"Layout shift",a={[$]:"auto.http.browser.cls",[le]:"ui.webvital.cls",[Vt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Oe(u.node)});let c=Wo({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("cls",{[En]:"",[Tn]:e}),c.end(o))}function Yg(e){let t=0,n;if(!cc("largest-contentful-paint"))return;let r=Yr(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);uc(e,(o,i)=>{vv(t,n,i,o),r()})}function vv(e,t,n,r){Qt&&_.log(`Sending LCP span (${e})`);let o=Se((ye()||0)+(t?.startTime||0)),i=x().getScopeData().transactionName,s=t?Oe(t.element):"Largest contentful paint",a={[$]:"auto.http.browser.lcp",[le]:"ui.webvital.lcp",[Vt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Oe(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let c=Wo({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[En]:"millisecond",[Tn]:e}),c.end(o))}function nn(e){return e&&((ye()||performance.timeOrigin)+e)/1e3}function is(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=qg(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return ye()||Gn()?.timeOrigin?Nv(E(f({},t),{"http.request.redirect_start":nn(e.redirectStart),"http.request.redirect_end":nn(e.redirectEnd),"http.request.worker_start":nn(e.workerStart),"http.request.fetch_start":nn(e.fetchStart),"http.request.domain_lookup_start":nn(e.domainLookupStart),"http.request.domain_lookup_end":nn(e.domainLookupEnd),"http.request.connect_start":nn(e.connectStart),"http.request.secure_connection_start":nn(e.secureConnectionStart),"http.request.connection_end":nn(e.connectEnd),"http.request.request_start":nn(e.requestStart),"http.request.response_start":nn(e.responseStart),"http.request.response_end":nn(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0})):t}function Nv(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var Cv=2147483647,Jg=0,fn={},Nt,dc;function hd({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Gn();if(r&&ye()){r.mark&&F.performance.mark("sentry-tracing-init");let o=t?Yg(n):xv(),i=kv(),s=e?Vg(n):wv();return()=>{o?.(),i(),s?.()}}return()=>{}}function _d(){$t("longtask",({entries:e})=>{let t=K();if(!t)return;let{op:n,start_timestamp:r}=M(t);for(let o of e){let i=Se(ye()+o.startTime),s=Se(o.duration);n==="navigation"&&r&&i<r||Fn(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[$]:"auto.ui.browser.metrics"}})}})}function gd(){new PerformanceObserver(t=>{let n=K();if(n)for(let r of t.getEntries()){if(!r.scripts[0])continue;let o=Se(ye()+r.startTime),{start_timestamp:i,op:s}=M(n);if(s==="navigation"&&i&&o<i)continue;let a=Se(r.duration),c={[$]:"auto.ui.browser.metrics"}
493,u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:m,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),m&&(c["code.function"]=m),h!==-1&&(c["browser.script.source_char_position"]=h),Fn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Sd(){$t("event",({entries:e})=>{let t=K();if(t){for(let n of e)if(n.name==="click"){let r=Se(ye()+n.startTime),o=Se(n.duration),i={name:Oe(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[$]:"auto.ui.browser.metrics"}},s=hi(n.target);s&&(i.attributes["ui.component_name"]=s),Fn(t,r,r+o,i)}}})}function wv(){return Vr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(fn.cls={value:e.value,unit:""},dc=t)},!0)}function xv(){return Yr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(fn.lcp={value:e.value,unit:"millisecond"},Nt=t)},!0)}function kv(){return md(({metric:e})=>{e.entries[e.entries.length-1]&&(fn.ttfb={value:e.value,unit:"millisecond"})})}function Ed(e,t){let n=Gn(),r=ye();if(!n?.getEntries||!r)return;let o=Se(r),i=n.getEntries(),{op:s,start_timestamp:a}=M(e);i.slice(Jg).forEach(c=>{let u=Se(c.startTime),d=Se(Math.max(0,c.duration));if(!(s==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{Pv(e,c,o);break}case"mark":case"paint":case"measure":{Mv(e,c,u,d,o,t.ignorePerformanceApiSpans);let l=Cn(),p=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&p&&(fn.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&p&&(fn.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{Bv(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),Jg=Math.max(i.length-1,0),Fv(e),s==="pageload"&&($v(fn),t.recordClsOnPageloadSpan||delete fn.cls,t.recordLcpOnPageloadSpan||delete fn.lcp,Object.entries(fn).forEach(([c,u])=>{ia(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Zt()),Gv(e,t)),Nt=void 0,dc=void 0,fn={}}function Ov(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function Mv(e,t,n,r,o,i){if(Ov(t)||["mark","measure"].includes(t.entryType)&&Je(t.name,i))return;let s=Bn(!1),a=Se(s?s.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[$]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),Lv(l,t),c<=d&&Fn(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function Lv(e,t){try{let n=t.detail;if(!n)return;if(typeof n=="object"){for(let[r,o]of Object.entries(n))if(o&<(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(lt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Pv(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{lc(e,t,r,n)}),lc(e,t,"secureConnection",n,"TLS/SSL"),lc(e,t,"fetch",n,"cache"),lc(e,t,"domainLookup",n,"DNS"),Dv(e,t,n)}function lc(e,t,n,r,o=n){let i=Uv(n),s=t[i],a=t[`${n}Start`];!a||!s||Fn(e,r+Se(a),r+Se(s),{op:`browser.${o}`,name:t.name,attributes:f({[$]:"auto.ui.browser.metrics"},n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{})})}function Uv(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Dv(e,t,n){let r=n+Se(t.requestStart),o=n+Se(t.responseEnd),i=n+Se(t.responseStart);t.responseEnd&&(Fn(e,r,o,{op:"browser.request",name:t.name,attributes:{[$]:"auto.ui.browser.metrics"}}),Fn(e,i,o,{op:"browser.response",name:t.name,attributes:{[$]:"auto.ui.browser.metrics"}}))}function Bv(e,t,n,r,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let c={[$]:"auto.resource.browser.metrics"},u=cn(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(F.location.origin),Hv(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let d=f(f({},c),is(t)),l=i+r,p=l+o;Fn(e,l,p,{name:n.replace(F.location.origin,""),op:a,attributes:d})}function Fv(e){let t=F.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),ac(n.rtt)&&(fn["connection.rtt"]={value:n.rtt,unit:"millisecond"})),ac(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),ac(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Gv(e,t){Nt&&t.recordLcpOnPageloadSpan&&(Nt.element&&e.setAttribute("lcp.element",Oe(Nt.element)),Nt.id&&e.setAttribute("lcp.id",Nt.id),Nt.url&&e.setAttribute("lcp.url",Nt.url.trim().slice(0,200)),Nt.loadTime!=null&&e.setAttribute("lcp.loadTime",Nt.loadTime),Nt.renderTime!=null&&e.setAttribute("lcp.renderTime",Nt.renderTime),e.setAttribute("lcp.size",Nt.size)),dc?.sources&&t.recordClsOnPageloadSpan&&dc.sources.forEac
493h((n,r)=>e.setAttribute(`cls.source.${r+1}`,Oe(n.node)))}function Hv(e,t,n){n.forEach(([r,o])=>{let i=e[r];i!=null&&(typeof i=="number"&&i<Cv||typeof i=="string")&&(t[o]=i)})}function $v(e){let t=Bn(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Td(){return Gn()&&ye()?$t("element",Wv):()=>{}}var Wv=({entries:e})=>{let t=K(),n=t?Z(t):void 0,r=n?M(n).description:x().getScopeData().transactionName;e.forEach(o=>{let i=o;if(!i.identifier)return;let s=i.name,a=i.renderTime,c=i.loadTime,[u,d]=c?[Se(c),"load-time"]:a?[Se(a),"render-time"]:[Q(),"entry-emission"],l=s==="image-paint"?Se(Math.max(0,(a??0)-(c??0))):0,p={[$]:"auto.ui.browser.elementtiming",[le]:"ui.elementtiming",[Ie]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":s};rt({name:`element[${i.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},m=>{m.end(u+l)})})};var jv=1e3,Kg,yd,Id;function ss(e){Xe("dom",e),Qe("dom",zv)}function zv(){if(!F.document)return;let e=Be.bind(null,"dom"),t=Xg(e,!0);F.document.addEventListener("click",t,!1),F.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let o=F[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ee(o,"addEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[s]=u[s]||{refCount:0};if(!d.handler){let l=Xg(e);d.handler=l,i.call(this,s,l,c)}d.refCount++}catch{}return i.call(this,s,a,c)}}),Ee(o,"removeEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__||{},d=u[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,c),d.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,c)}}))})}function qv(e){if(e.type!==yd)return!1;try{if(!e.target||e.target._sentryId!==Id)return!1}catch{}return!0}function Vv(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Xg(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Yv(n);if(Vv(n.type,r))return;Te(n,"_sentryCaptured",!0),r&&!r._sentryId&&Te(r,"_sentryId",pe());let o=n.type==="keypress"?"input":n.type;qv(n)||(e({event:n,name:o,global:t}),yd=n.type,Id=r?r._sentryId:void 0),clearTimeout(Kg),Kg=F.setTimeout(()=>{Id=void 0,yd=void 0},jv)}}function Yv(e){try{return e.target}catch{return null}}var fc;function Hn(e){let t="history";Xe(t,e),Qe(t,Jv)}function Jv(){if(F.addEventListener("popstate",()=>{let t=F.location.href,n=fc;if(fc=t,n===t)return;Be("history",{from:n,to:t})}),!Pl())return;function e(t){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let o=fc,i=Kv(String(r));if(fc=i,o===i)return t.apply(this,n);Be("history",{from:o,to:i})}return t.apply(this,n)}}Ee(F.history,"pushState",e),Ee(F.history,"replaceState",e)}function Kv(e){try{return new URL(e,F.location.origin).toString()}catch{return e}}var pc={};function jo(e){let t=pc[e];if(t)return t;let n=F[e];if(Vi(n))return pc[e]=n.bind(F);let r=F.document;if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){Qt&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(pc[e]=n.bind(F))}function bd(e){pc[e]=void 0}function Jr(...e){return jo("setTimeout")(...e)}var mt="__sentry_xhr_v3__";function Kr(e){Xe("xhr",e),Qe("xhr",Xv)}function Xv(){if(!F.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error,i=Q()*1e3,s=ke(r[0])?r[0].toUpperCase():void 0,a=Qv(r[1]);if(!s||!a)return t.apply(n,r);
493n[mt]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let u=n[mt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}let d={endTimestamp:Q()*1e3,startTimestamp:i,xhr:n,virtualError:o};Be("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){let[p,m]=l,h=d[mt];return h&&ke(p)&&ke(m)&&(h.request_headers[p.toLowerCase()]=m),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){let o=n[mt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);let i={startTimestamp:Q()*1e3,xhr:n};return Be("xhr",i),t.apply(n,r)}})}function Qv(e){if(ke(e))return e;try{return e.toString()}catch{}}var Zv=Symbol.for("sentry__originalRequestBody");function mc(e){return new URLSearchParams(e).toString()}function Xr(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[mc(e)];if(!e)return[void 0]}catch(n){return Qt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Qt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function zo(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let n=e[0][Zv];return n!==void 0?n:void 0}}function as(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Qt&&_.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r 494`).reduce((n,r)=>{let[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}var Ad=[],hc=new Map,qo=new Map,eN=60;function vd(){if(Gn()&&ye()){let t=tN();return()=>{t()}}return()=>{}}var Rd={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 tN(){return rs(nN)}var nN=({metric:e})=>{if(e.value==null)return;let t=Se(e.value);if(t>eN)return;let n=e.entries.find(h=>h.duration===e.value&&Rd[h.name]);if(!n)return;let{interactionId:r}=n,o=Rd[n.name],i=Se(ye()+n.startTime),s=K(),a=s?Z(s):void 0,c=r!=null?hc.get(r):void 0,u=c?.span||a,d=u?M(u).description:x().getScopeData().transactionName,l=c?.elementName||Oe(n.target),p={[$]:"auto.http.browser.inp",[le]:`ui.interaction.${o}`,[Vt]:n.duration},m=Wo({name:l,transaction:d,attributes:p,startTime:i});m&&(m.addEvent("inp",{[En]:"millisecond",[Tn]:e.value}),m.end(i+t))};function Nd(){let e=Object.keys(Rd);ur()&&e.forEach(o=>{F.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=Oe(i),a=Math.round(o.timeStamp);if(qo.set(a,s),qo.size>50){let c=qo.keys().next().value;c!==void 0&&qo.delete(c)}}function n(o){let i=Math.round(o.startTime),s=qo.get(i);if(!s)for(let a=-5;a<=5;a++){let c=qo.get(i+a);if(c){s=c;break}}return s||"<unknown>"}let r=({entries:o})=>{let i=K(),s=i&&Z(i);o.forEach(a=>{if(!jg(a))return;let c=a.interactionId;if(c==null||hc.has(c))return;let u=a.target?Oe(a.target):n(a);if(Ad.length>10){let d=Ad.shift();
494hc.delete(d)}Ad.push(c),hc.set(c,{span:s,elementName:u})})};$t("event",r),$t("first-input",r)}var rN=40;function cs(e,t=jo("fetch")){let n=0,r=0;async function o(i){let s=i.body.length;n+=s,r++;let a=f({body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{let c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw bd("fetch"),c}finally{n-=s,r--}}return Ea(e,o,Or(e.bufferSize||rN))}var R=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oN(){let e=I();if(!e){R&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){R&&_.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function iN(){let e=I();if(!e){R&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){R&&_.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}var sN={startProfiler:oN,stopProfiler:iN};var aN=10,cN=20,uN=30,lN=40,dN=50;function Vo(e,t,n,r){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var fN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,pN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mN=/\((\S*)(?::(\d+))(?::(\d+))\)/,hN=/at (.+?) ?\(data:(.+?),/,_N=e=>{let t=e.match(hN);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=fN.exec(e);if(n){let[,o,i,s]=n;return Vo(o,"?",+i,+s)}let r=pN.exec(e);if(r){if(r[2]?.indexOf("eval")===0){let a=mN.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}let[i,s]=tS(r[1]||"?",r[2]);return Vo(s,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Qg=[uN,_N],gN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,SN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,EN=e=>{let t=gN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=SN.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||"?";return[o,r]=tS(o,r),Vo(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Zg=[dN,EN],TN=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,yN=e=>{let t=TN.exec(e);return t?Vo(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},IN=[lN,yN],bN=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,AN=e=>{let t=bN.exec(e);return t?Vo(t[2],t[3]||"?",+t[1]):void 0},RN=[aN,AN],vN=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,NN=e=>{let t=vN.exec(e);return t?Vo(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},CN=[cN,NN],eS=[Qg,Zg],Cd=Ds(...eS),tS=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function wN(e,{metadata:t,tunnel:n,dsn:r}){let o=f(f({event_id:e.event_id,sent_at:new Date().toISOString()},t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:ze(r)}),i=xN(e);return Ue(o,[i])}function xN(e){return[{type:"user_report"},e]}var _c=1024,kN="Breadcrumbs",ON=(e={})=>{let t=f({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:kN,setup(n){t.console&&Pr(PN(n)),t.dom&&ss(LN(n,t.dom)),t.xhr&&Kr(UN(n)),t.fetch&&Hr(DN(n)),t.history&&Hn(BN(n)),t.sentry&&n.on("beforeSendEvent",MN(n))}}},us=ON;function MN(e){return function(n){I()===e&&It({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:gn(n)},{event:n})}}function LN(e,t){return function(r){if(I()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>_c&&(R&&_.warn(`\`dom.maxStringLength\` cannot exceed ${_c}, but a value of ${a} was configured. Sentry will use ${_c} instead.`),a=_c),typeof s=="string"&&(s=[s]);try{let u=r.event,d=FN(u)?u.target:u;o=Oe(d,{keyAttrs:s,maxStringLength:a}),i=hi(d)}catch{o="<unknown>"}if(o.length===0)return;let c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),It(c,{event:r.event,name:r.name,global:r.global})}}function PN(e){return function(n){if(I()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:tr(n.level),message:Ir(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ir(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;It(r,{input:n.args,level:n.level})}}function UN(e){return function(n){if(I()!==e)return;let{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[mt];if(!r||!o||!i)return;let{method:s,url:a,status_code:c,body:u}=i,d={method:s,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:Ga(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),It(p,l)}}function DN(e){return function(n){if(I()!==e)return;let{startTimestamp:r,endTimestamp:o}=n;
494if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),It(a,s)}else{let i=n.response,s=E(f({},n.fetchData),{status_code:i?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;let a={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:s,type:"http",level:Ga(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),It(c,a)}}}function BN(e){return function(n){if(I()!==e)return;let r=n.from,o=n.to,i=cn(C.location.href),s=r?cn(r):void 0,a=cn(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),It({category:"navigation",data:{from:r,to:o}})}}function FN(e){return!!e&&!!e.target}var GN=["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"],HN="BrowserApiErrors",$N=(e={})=>{let t=f({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},e);return{name:HN,setupOnce(){t.setTimeout&&Ee(C,"setTimeout",nS),t.setInterval&&Ee(C,"setInterval",nS),t.requestAnimationFrame&&Ee(C,"requestAnimationFrame",WN),t.XMLHttpRequest&&"XMLHttpRequest"in C&&Ee(XMLHttpRequest.prototype,"send",jN);let n=t.eventTarget;n&&(Array.isArray(n)?n:GN).forEach(o=>zN(o,t))}}},wd=$N;function nS(e){return function(...t){let n=t[0];return t[0]=zr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${St(e)}`}}),e.apply(this,t)}}function WN(e){return function(t){return e.apply(this,[zr(t,{mechanism:{data:{handler:St(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function jN(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Ee(n,o,function(i){let s={mechanism:{data:{handler:St(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Er(i);return a&&(s.mechanism.data.handler=St(a)),zr(i,s)})}),e.apply(this,t)}}function zN(e,t){let r=C[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Ee(r,"addEventListener",function(o){return function(i,s,a){try{qN(s)&&(s.handleEvent=zr(s.handleEvent,{mechanism:{data:{handler:St(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&VN(this,i,s),o.apply(this,[i,zr(s,{mechanism:{data:{handler:St(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ee(r,"removeEventListener",function(o){return function(i,s,a){try{let c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function qN(e){return typeof e.handleEvent=="function"}function VN(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var ls=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof C.document>"u"){R&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ki({ignoreDuration:!0}),_o();let n=se(),r=n.getUser();n.addScopeListener(o=>{let i=o.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(_o(),r=i)}),t==="route"&&Hn(({from:o,to:i})=>{o!==i&&(ki({ignoreDuration:!0}),_o())})}}};var YN="CultureContext",JN=()=>({name:YN,preprocessEvent(e){let t=KN();t&&(e.contexts=E(f({},e.contexts),{culture:f(f({},t),e.contexts?.culture)}))}}),ds=JN;function KN(){try{let e=C.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var XN="GlobalHandlers",QN=(e={})=>{let t=f({onerror:!0,onunhandledrejection:!0}
494,e);return{name:XN,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(ZN(n),rS("onerror")),t.onunhandledrejection&&(eC(n),rS("onunhandledrejection"))}}},fs=QN;function ZN(e){li(t=>{let{stackParser:n,attachStacktrace:r}=oS();if(I()!==e||td())return;let{msg:o,url:i,line:s,column:a,error:c}=t,u=tC(Fo(n,c||o,void 0,r,!1),i,s,a);u.level="error",In(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function eC(e){di(t=>{let{stackParser:n,attachStacktrace:r}=oS();if(I()!==e||td())return;let o=xd(t),i=lt(o)?kd(o):Fo(n,o,void 0,r,!0);i.level="error",In(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function xd(e){if(lt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function kd(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function tC(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=nC(t)??dt();return c.length===0&&c.push({colno:u,filename:l,function:"?",in_app:!0,lineno:d}),e}function rS(e){R&&_.log(`Global Handler attached: ${e}`)}function oS(){return I()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function nC(e){if(!(!ke(e)||e.length===0))return e.startsWith("data:")?`<${Yt(e,!1)}>`:e}var ps=()=>({name:"HttpContext",preprocessEvent(e){if(!C.navigator&&!C.location&&!C.document)return;let t=Zi(),n=f(f({},t.headers),e.request?.headers);e.request=E(f(f({},t),e.request),{headers:n})}});var rC="cause",oC=5,iC="LinkedErrors",sC=(e={})=>{let t=e.limit||oC,n=e.key||rC;return{name:iC,preprocessEvent(r,o,i){let s=i.getOptions();ml(es,s.stackParser,n,t,r,o)}}},ms=sC;var aC="SpotlightBrowser",cC=(e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:aC,setup:()=>{R&&_.log("Using Sidecar URL",t)},processEvent:n=>dC(n)?null:n,afterAllSetup:n=>{uC(n,t)}}};function uC(e,t){let n=jo("fetch"),r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Jn(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(i=>{i.status>=200&&i.status<400&&(r=0)},i=>{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",i)})})}var lC=cC;function dC(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function iS(){return fC()?(R&&We(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function fC(){if(typeof C.window>"u")return!1;let e=C;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let n=dt(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(C===C.top&&r.some(i=>n.startsWith(`${i}://`)))}function sS(e){return[Ao(),bo(),Gi(),wd(),us(),fs(),ms(),Ro(),ps(),ds(),ls()]}function Od(e={}){let t=!e.skipBrowserExtensionCheck&&iS(),n=e.defaultIntegrations==null?sS():e.defaultIntegrations,r=E(f({},e),{enabled:t?!1:e.enabled,stackParser:cu(e.stackParser||Cd),integrations:zu({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||cs});return nl(ts,r)}function pC(){}function mC(e){e()}function gc(e={}){let t=C.document,n=t?.head||t?.body;if(!n){R&&_.error("[showReportDialog] Global document not defined");return}let r=x(),i=I()?.getDsn();if(!i){R&&_.error("[showReportDialog] DSN not configured");return}let s=E(f({},e),{user:f(f({},r.getUser()),e.user),eventId:e.eventId||fa()}),a=C.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Wu(i,s);let{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){let d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{C.removeEventListener("message",d)}};C.addEventListener("message",d)}n.appendChild(a)}var hC=N,_C="ReportingObserver",aS=new WeakMap,gC=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(aS.has(I()))for(let o of r)je(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}da(`${s}: ${a}`)})}return{name:_C,setupOnce(){if(!Ul())return;new hC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){aS.set(r,!0)}}},SC=gC;var EC="HttpClient",TC=(e={})=>{let t=f({failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/]},e);
494return{name:EC,setup(n){wC(n,t),xC(n,t)}}},yC=TC;function IC(e,t,n,r,o){if(lS(e,n.status,n.url)){let i=kC(t,r),s,a,c,u;fS()&&([s,c]=cS("Cookie",i),[a,u]=cS("Set-Cookie",n));let d=dS({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});In(d)}}function cS(e,t){let n=RC(t.headers),r;try{let o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=uS(o))}catch{}return[n,r]}function bC(e,t,n,r,o){if(lS(e,t.status,t.responseURL)){let i,s,a;if(fS()){try{let u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=uS(u))}catch{}try{a=vC(t)}catch{}i=r}let c=dS({url:t.responseURL,method:n,status:t.status,requestHeaders:i,responseHeaders:a,responseCookies:s,error:o,type:"xhr"});In(c)}}function AC(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function uS(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function RC(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function vC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r 495`).reduce((n,r)=>{let[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function NC(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function CC(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function wC(e,t){Yi()&&Hr(n=>{if(I()!==e)return;let{response:r,args:o,error:i,virtualError:s}=n,[a,c]=o;r&&IC(t,a,r,c,i||s)},!1)}function xC(e,t){"XMLHttpRequest"in N&&Kr(n=>{if(I()!==e)return;let{error:r,virtualError:o}=n,i=n.xhr,s=i[mt];if(!s)return;let{method:a,request_headers:c}=s;try{bC(t,i,a,c,r||o)}catch(u){R&&_.warn("Error while extracting response event form XHR response",u)}})}function lS(e,t,n){return CC(e.failedRequestStatusCodes,t)&&NC(e.failedRequestTargets,n)&&!Bi(n,I())}function dS(e){let t=I(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,i={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:AC(e.responseHeaders)}}};return et(i,{type:`auto.http.client.${e.type}`,handled:!1}),i}function kC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function fS(){let e=I();return e?!!e.getOptions().sendDefaultPii:!1}var Md=N,OC=7,MC="ContextLines",LC=(e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:OC;return{name:MC,processEvent(n){return UC(n,t)}}},PC=LC;function UC(e,t){let n=Md.document,r=Md.location&&Lr(Md.location.href);if(!n||!r)return e;let o=e.exception?.values;if(!o?.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(` 496`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>DC(u,s,r,t)))}),e}function DC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Su(t,e,r),e}var BC="GraphQLClient",FC=e=>({name:BC,setup(t){GC(t,e),HC(t,e)}});function GC(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{let i=M(n).data||{};if(!(i[le]==="http.client"))return;let c=i[Au]||i["http.url"],u=i[bu]||i["http.method"];if(!ke(c)||!ke(u))return;let{endpoints:d}=t,l=Je(c,d),p=mS(r);if(l&&p){let m=hS(p);if(m){let h=pS(m);n.updateName(`${u} ${c} (${h})`),Ec(m)&&n.setAttribute("graphql.document",m.query),Tc(m)&&(n.setAttribute("graphql.persisted_query.hash.sha256",m.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",m.extensions.persistedQuery.version))}}})}function HC(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{let{category:o,type:i,data:s}=n;if(i==="http"&&(o==="fetch"||o==="xhr")){let d=s?.url,{endpoints:l}=t,p=Je(d,l),m=mS(r);if(p&&s&&m){let h=hS(m);if(!s.graphql&&h){let g=pS(h);s["graphql.operation"]=g,Ec(h)&&(s["graphql.document"]=h.query),Tc(h)&&(s["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function pS(e){if(Tc(e))return`persisted ${e.operationName}`;if(Ec(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=$C(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function mS(e){let t="xhr"in e,n;if(t){let r=e.xhr[mt];n=r&&Xr(r.body)[0]}else{let r=zo(e.input);n=Xr(r)[0]}return n}function $C(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Sc(e){return typeof e=="object"&&e!==null}function Ec(e){return Sc(e)&&typeof e.query=="string"}
496function Tc(e){return Sc(e)&&typeof e.operationName=="string"&&Sc(e.extensions)&&Sc(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function hS(e){try{let t=JSON.parse(e);return Ec(t)||Tc(t)?t:void 0}catch{return}}var WC=FC;var Ae=N,uf="sentryReplaySession",jC="replay_event",lf="Unable to send Replay",zC=3e5,qC=9e5,VC=5e3,YC=5500,JC=6e4,KC=5e3,XC=3,_S=15e4,yc=5e3,QC=3e3,ZC=300,df=2e7,e0=4999,t0=5e4,gS=36e5,n0=Object.defineProperty,r0=(e,t,n)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SS=(e,t,n)=>r0(e,typeof t!="symbol"?t+"":t,n),He=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(He||{});function o0(e){return e.nodeType===e.ELEMENT_NODE}function gs(e){return e?.host?.shadowRoot===e}function Ss(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function i0(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function s0(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function vc(e){try{let t=e.rules||e.cssRules;return t?i0(Array.from(t,HS).join("")):null}catch{return null}}function a0(e){let t="";for(let n=0;n<e.style.length;n++){let r=e.style,o=r[n],i=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function HS(e){let t;if(u0(e))try{t=vc(e.styleSheet)||s0(e)}catch{}else if(l0(e)){let n=e.cssText,r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=a0(e)),r&&(n=c0(n)),r||o)return n}return t||e.cssText}function c0(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function u0(e){return"styleSheet"in e}function l0(e){return"selectorText"in e}var Nc=class{constructor(){SS(this,"idNodeMap",new Map),SS(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function d0(){return new Nc}function Fc({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ts({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function ti(e){return e.toLowerCase()}function Fd(e){return e.toUpperCase()}var ES="__rrweb_original__";function f0(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){let i=t.getImageData,s=ES in i?i[ES]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function ff(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ti(t):null}function Cc(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function $S(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}var TS={};function WS(e){let t=TS[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return TS[e]=r.bind(window)}function Gd(...e){return WS("setTimeout")(...e)}
496function jS(...e){return WS("clearTimeout")(...e)}function zS(e){try{return e.contentDocument}catch{}}var p0=1,m0=new RegExp("[^a-z0-9-_:]"),ys=-2;function pf(){return p0++}function h0(e){if(e instanceof HTMLFormElement)return"form";let t=ti(e.tagName);return m0.test(t)?"div":t}function _0(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Yo,yS,g0=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,S0=/^(?:[a-z+]+:)?\/\//i,E0=/^www\..*/i,T0=/^(data:)([^,]*),(.*)/i;function y0(e,t){if(!e||t.size===0)return e;try{let n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;let i=o.indexOf(":");if(i===-1){r.push(o);continue}let s=o.slice(0,i).trim();t.has(s)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function wc(e,t){return(e||"").replace(g0,(n,r,o,i,s,a)=>{let c=o||s||a,u=r||i||"";if(!c)return n;if(S0.test(c)||E0.test(c))return`url(${u}${c}${u})`;if(T0.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${_0(t)+c}${u})`;let d=t.split("/"),l=c.split("/");d.pop();for(let p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}var I0=/^[^ \t\n\r\u000c]+/,b0=/^[, \t\n\r\u000c]+/;function A0(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s,a=i.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}let o=[];for(;r(b0),!(n>=t.length);){let i=r(I0);if(i.slice(-1)===",")i=Xo(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Xo(e,i);let a=!1;for(;;){let c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return o.join(", ")}var IS=new WeakMap;function Xo(e,t){return!t||t.trim()===""?t:Gc(e,t)}function R0(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Gc(e,t){let n=IS.get(e);if(n||(n=e.createElement("a"),IS.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function qS(e,t,n,r,o,i,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Xo(e,r);if(n==="xlink:href"&&r[0]!=="#")return Xo(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Xo(e,r);if(n==="srcset")return A0(e,r);if(n==="style"){let a=wc(r,Gc(e));return s&&s.size>0&&(a=y0(a,s)),a}else if(t==="object"&&n==="data")return Xo(e,r);return typeof i=="function"?i(n,r,o):r}function VS(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function v0(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function N0(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Qr(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Qr(e.parentNode,t,n,r+1)}function Qo(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(N0(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function ni(e,t,n,r,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=Qr(s,Qo(r,o)),c<0)return!0;a=Qr(s,Qo(t,n),c>=0?c:1/0)}else{if(a=Qr(s,Qo(t,n)),a<0)return!1;c=Qr(s,Qo(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function C0(e,t,n){let r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){let a=Gd(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{jS(a),o=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return Gd(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function w0(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;let i=Gd(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{jS(i),r=!0,t()})}function x0(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:h={},maskTextFn:g,maskInputFn:S,dataURLOptions:T={},inlineImages:A,recordCanvas:B,keepIframeSrcFn:k,newlyAddedElement:Y=!1,ignoreCSSAttributes:G}=t,y=k0(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:He.Document,childNodes:[],compatMode:e.compatMode}:{type:He.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:He.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return M0(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:h,maskInputFn:S,dataURLOptions:T,inlineImages:A,recordCanvas:B,keepIframeSrcFn:k,newlyAddedElement:Y,rootId:y,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,ignoreCSSAttributes:G});case e.TEXT_NODE:return O0(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:g,maskInputOptions:h,maskInputFn:S,rootId:y});case e.CDATA_SECTION_NODE:return{type:He.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:He.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function k0(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function O0(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName,p=e.textContent,m=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,g=l==="TEXTAREA"?!0:void 0;if(m&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=vc(e.parentNode.sheet))}catch(T){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${T}`,e)}p=wc(p,Gc(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let S=ni(e,r,i,o,s,n);
496if(!m&&!h&&!g&&p&&S&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),g&&p&&(c.textarea||S)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){let T=Fc({type:null,tagName:l,maskInputOptions:c});p=Ts({isMasked:ni(e,r,i,o,s,T),element:e,value:p,maskInputFn:u})}return{type:He.Text,textContent:p||"",isStyle:m,rootId:d}}function M0(e,t){let{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:g,maskTextClass:S,unmaskTextClass:T,maskTextSelector:A,unmaskTextSelector:B,ignoreCSSAttributes:k}=t,Y=v0(e,r,o,i),G=h0(e),y={},O=e.attributes.length;for(let v=0;v<O;v++){let L=e.attributes[v];L.name&&!VS(G,L.name,L.value)&&(y[L.name]=qS(n,G,ti(L.name),L.value,e,c,k))}if(G==="link"&&s){let v=Array.from(n.styleSheets).find(w=>w.href===e.href),L=null;v&&(L=vc(v)),L&&(y.rel=null,y.href=null,y.crossorigin=null,y._cssText=wc(L,v.href))}if(G==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let v=vc(e.sheet);v&&(y._cssText=wc(v,Gc(n)))}if(G==="input"||G==="textarea"||G==="select"||G==="option"){let v=e,L=ff(v),w=Cc(v,Fd(G),L),D=v.checked;if(L!=="submit"&&L!=="button"&&w){let H=ni(v,S,A,T,B,Fc({type:L,tagName:Fd(G),maskInputOptions:a}));y.value=Ts({isMasked:H,element:v,value:w,maskInputFn:u})}D&&(y.checked=D)}if(G==="option"&&(e.selected&&!a.select?y.selected=!0:delete y.selected),G==="canvas"&&p){if(e.__context==="2d")f0(e)||(y.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let v=e.toDataURL(d.type,d.quality),L=n.createElement("canvas");L.width=e.width,L.height=e.height;let w=L.toDataURL(d.type,d.quality);v!==w&&(y.rr_dataURL=v)}}if(G==="img"&&l){Yo||(Yo=n.createElement("canvas"),yS=Yo.getContext("2d"));let v=e,L=v.currentSrc||v.getAttribute("src")||"<unknown-src>",w=v.crossOrigin,D=()=>{v.removeEventListener("load",D);try{Yo.width=v.naturalWidth,Yo.height=v.naturalHeight,yS.drawImage(v,0,0),y.rr_dataURL=Yo.toDataURL(d.type,d.quality)}catch(H){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?D():v.addEventListener("load",D);return}else console.warn(`Cannot inline img src=${L}! Error: ${H}`)}v.crossOrigin==="anonymous"&&(w?y.crossOrigin=w:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?D():v.addEventListener("load",D)}if((G==="audio"||G==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),Y){let{width:v,height:L}=e.getBoundingClientRect();y={class:y.class,rr_width:`${v}px`,rr_height:`${L}px`}}G==="iframe"&&!m(y.src)&&(!Y&&!zS(e)&&(y.rr_src=y.src),delete y.src);let V;try{customElements.get(G)&&(V=!0)}catch{}return{type:He.Element,tagName:G,attributes:y,childNodes:[],isSVG:R0(e)||void 0,needBlock:Y,rootId:g,isCustom:V}}function be(e){return e==null?"":e.toLowerCase()}function L0(e,t){if(t.comment&&e.type===He.Comment)return!0;if(e.type===He.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&$S(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(be(e.attributes.name).match(/^msapplication-tile(image|color)$/)||be(e.attributes.name)==="application-name"||be(e.attributes.rel)==="icon"||be(e.attributes.rel)==="apple-touch-icon"||be(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&be(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(be(e.attributes.property).match(/^(og|twitter|fb):/)||be(e.attributes.name).match(/^(og|twitter):/)||be(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(be(e.attributes.name)==="robots"||be(e.attributes.name)==="googlebot"||be(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;
496if(t.headMetaAuthorship&&(be(e.attributes.name)==="author"||be(e.attributes.name)==="generator"||be(e.attributes.name)==="framework"||be(e.attributes.name)==="publisher"||be(e.attributes.name)==="progid"||be(e.attributes.property).match(/^article:/)||be(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(be(e.attributes.name)==="google-site-verification"||be(e.attributes.name)==="yandex-verification"||be(e.attributes.name)==="csrf-token"||be(e.attributes.name)==="p:domain_verify"||be(e.attributes.name)==="verify-v1"||be(e.attributes.name)==="verification"||be(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Zo(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:h={},maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOMOptions:A,dataURLOptions:B={},inlineImages:k=!1,recordCanvas:Y=!1,onSerialize:G,onIframeLoad:y,iframeLoadTimeout:O=5e3,onBlockedImageLoad:V,onStylesheetLoad:v,stylesheetLoadTimeout:L=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:D=!1,ignoreCSSAttributes:H}=t,{preserveWhiteSpace:oe=!0}=t,ie=x0(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,dataURLOptions:B,inlineImages:k,recordCanvas:Y,keepIframeSrcFn:w,newlyAddedElement:D,ignoreCSSAttributes:H});if(!ie)return console.warn(e,"not serialized"),null;let ae;r.hasNode(e)?ae=r.getId(e):L0(ie,A)||!oe&&ie.type===He.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ae=ys:ae=pf();let P=Object.assign(ie,{id:ae});if(r.add(e,P),ae===ys)return null;G&&G(e);let W=!p;
496if(P.type===He.Element){W=W&&!P.needBlock;let U=e.shadowRoot;U&&Ss(U)&&(P.isShadowHost=!0)}if((P.type===He.Document||P.type===He.Element)&&W){A.headWhitespace&&P.type===He.Element&&P.tagName==="head"&&(oe=!1);let U={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOMOptions:A,dataURLOptions:B,inlineImages:k,recordCanvas:Y,preserveWhiteSpace:oe,onSerialize:G,onIframeLoad:y,iframeLoadTimeout:O,onBlockedImageLoad:V,onStylesheetLoad:v,stylesheetLoadTimeout:L,keepIframeSrcFn:w,ignoreCSSAttributes:H},j=e.childNodes?Array.from(e.childNodes):[];for(let ue of j){let me=Zo(ue,U);me&&P.childNodes.push(me)}if(o0(e)&&e.shadowRoot)for(let ue of Array.from(e.shadowRoot.childNodes)){let me=Zo(ue,U);me&&(Ss(e.shadowRoot)&&(me.isShadow=!0),P.childNodes.push(me))}}if(e.parentNode&&gs(e.parentNode)&&Ss(e.parentNode)&&(P.isShadow=!0),P.type===He.Element&&P.tagName==="iframe"&&!P.needBlock&&C0(e,()=>{let U=zS(e);if(U&&y){let j=Zo(U,{doc:U,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOMOptions:A,dataURLOptions:B,inlineImages:k,recordCanvas:Y,preserveWhiteSpace:oe,onSerialize:G,onIframeLoad:y,iframeLoadTimeout:O,onStylesheetLoad:v,stylesheetLoadTimeout:L,keepIframeSrcFn:w,ignoreCSSAttributes:H});j&&y(e,j)}},O),P.type===He.Element&&P.tagName==="img"&&!e.complete&&P.needBlock){let U=e,j=()=>{if(U.isConnected&&!U.complete&&V)try{let ue=U.getBoundingClientRect();ue.width>0&&ue.height>0&&V(U,P,ue)}catch{}U.removeEventListener("load",j)};U.isConnected&&U.addEventListener("load",j)}return P.type===He.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&$S(P.attributes.href)==="css")&&w0(e,()=>{if(v){let U=Zo(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOMOptions:A,dataURLOptions:B,inlineImages:k,recordCanvas:Y,preserveWhiteSpace:oe,onSerialize:G,onIframeLoad:y,iframeLoadTimeout:O,onStylesheetLoad:v,stylesheetLoadTimeout:L,keepIframeSrcFn:w,ignoreCSSAttributes:H});U&&v(e,U)}},L),P.type===He.Element&&delete P.needBlock,P}function P0(e,t){let{mirror:n=new Nc,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:h=!1,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOM:A=!1,dataURLOptions:B,preserveWhiteSpace:k,onSerialize:Y,onIframeLoad:G,iframeLoadTimeout:y,onBlockedImageLoad:O,onStylesheetLoad:V,stylesheetLoadTimeout:v,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:w=new Set([])}=t||{};return Zo(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:g,maskTextFn:S,maskInputFn:T,slimDOMOptions:A===!0||A==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:A==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:A===!1?{}:A,dataURLOptions:B,inlineImages:p,recordCanvas:m,preserveWhiteSpace:k,onSerialize:Y,onIframeLoad:G,iframeLoadTimeout:y,onBlockedImageLoad:O,onStylesheetLoad:V,stylesheetLoadTimeout:v,keepIframeSrcFn:L,newlyAddedElement:!1,ignoreCSSAttributes:w})}function _t(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Jo=`Please stop import mirror directly. Instead of that,\r
497now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 498or you can use record.mirror to access the mirror instance during recording.`,bS={map:{},getId(){return console.error(Jo),-1},getNode(){return console.error(Jo),null},removeNodeFromMap(){console.error(Jo)},has(){return console.error(Jo),!1},reset(){console.error(Jo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(bS=new Proxy(bS,{get(e,t,n){return t==="map"&&console.error(Jo),Reflect.get(e,t,n)}}));function Is(e,t,n={}){let r=null,o=0;return function(...i){let s=Date.now();!o&&n.leading===!1&&(o=s);let a=t-(s-o),c=this;a<=0||a>t?(r&&(H0(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Hc(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function YS(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){Hc(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>YS(e,t,i||{},!0)}function mf(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var xc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(xc=()=>new Date().getTime());function JS(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function KS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function XS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function QS(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Wt(e,t,n,r,o){if(!e)return!1;let i=QS(e);if(!i)return!1;let s=Qo(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=Qr(i,s),c=-1;return a<0?!1:(r&&(c=Qr(i,Qo(null,r))),a>-1&&c<0?!0:a<c)}function U0(e,t){return t.getId(e)!==-1}function Ld(e,t){return t.getId(e)===ys}function ZS(e,t){if(gs(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ZS(e.parentNode,t):!0:!0}function Hd(e){return!!e.changedTouches}function D0(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function eE(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function tE(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $d(e){return!!e?.shadowRoot}var Wd=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function nE(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function B0(e){let t=e,n;for(;n=nE(t);)t=n;return t}function F0(e){let t=e.ownerDocument;if(!t)return!1;let n=B0(e);return t.contains(n)}function rE(e){let t=e.ownerDocument;return t?t.contains(e)||F0(e):!1}var AS={};function hf(e){let t=AS[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return AS[e]=r.bind(window)}function G0(...e){return hf("requestAnimationFrame")(...e)}
498function Hc(...e){return hf("setTimeout")(...e)}function H0(...e){return hf("clearTimeout")(...e)}var te=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(te||{}),J=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(J||{}),ht=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ht||{}),$n=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))($n||{}),Ko=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ko||{});function _f(e){try{return e.contentDocument}catch{}}function $0(e){try{return e.contentWindow}catch{}}function RS(e){return"__ln"in e}var jd=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&RS(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&RS(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},vS=(e,t)=>`${e}@${t}`,zd=class{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;let t=[],n=new Set,r=new jd,o=c=>{let u=c,d=ys;for(;d===ys;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=c=>{if(!c.parentNode||!rE(c))return;let u=gs(c.parentNode)?this.mirror.getId(nE(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);let l=Zo(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{eE(p,this.mirror)&&!Wt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),tE(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),$d(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,m)=>{Wt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(p,m),p.contentWindow&&this.canvasManager.addWindow(p.contentWindow),this.shadowDomManager.observeAttachShadow(p))},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},onBlockedImageLoad:(p,m,{width:h,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:m.id,attributes:{style:{width:`${h}px`,height:`${g}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)NS(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(let c of this.addedSet)!CS(this.droppedSet,c)&&!NS(this.removes,c,this.mirror)||CS(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let u=this.mirror.getId(s.value.parentNode),d=o(s.value);u!==-1&&d!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){let d=u;if(u=u.previous,d){let l=this.mirror.getId(d.value.parentNode);
498if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{let m=d.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=m.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Ld(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ni(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,QS(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){let s=ff(n),a=n.tagName;o=Cc(n,a,s);let c=Fc({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=ni(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Ts({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!_f(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!VS(n.tagName,r)&&(i.attributes[r]=qS(this.doc,ti(n.tagName),ti(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=gs(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ld(n,this.mirror)||!U0(n,this.mirror)||(this.addedSet.has(n)?(qd(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||ZS(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[vS(r,o)]?qd(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:gs(t.target)&&Ss(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ld(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[vS(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Wt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
498h(r=>this.genAdds(r)),$d(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function qd(e,t){e.delete(t),t.childNodes?.forEach(n=>qd(e,n))}function NS(e,t,n){return e.length===0?!1:W0(e,t,n)}function W0(e,t,n){let r=t.parentNode;for(;r;){let o=n.getId(r);if(e.some(i=>i.id===o))return!0;r=r.parentNode}return!1}function CS(e,t){return e.size===0?!1:oE(e,t)}function oE(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:oE(e,n):!1}var Es;function j0(e){Es=e}function z0(){Es=void 0}var ce=e=>Es?(...n)=>{try{return e(...n)}catch(r){if(Es&&Es(r)===!0)return()=>{};throw r}}:e,ei=[];function Ns(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function iE(e,t){let n=new zd;ei.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);let i=new r(ce(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function q0({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,c=Is(ce(l=>{let p=Date.now()-a;e(s.map(m=>(m.timeOffset-=p,m)),l),s=[],a=null}),i),u=ce(Is(ce(l=>{let p=Ns(l),{clientX:m,clientY:h}=Hd(l)?l.changedTouches[0]:l;a||(a=xc()),s.push({x:m,y:h,id:r.getId(p),timeOffset:xc()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?J.Drag:l instanceof MouseEvent?J.MouseMove:J.TouchMove)}),o,{trailing:!1})),d=[_t("mousemove",u,n),_t("touchmove",u,n),_t("drag",u,n)];return ce(()=>{d.forEach(l=>l())})}function V0({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],u=null,d=l=>p=>{let m=Ns(p);if(Wt(m,r,o,i,!0))return;let h=null,g=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=$n.Mouse;break;case"touch":h=$n.Touch;break;case"pen":h=$n.Pen;break}h===$n.Touch?ht[l]===ht.MouseDown?g="TouchStart":ht[l]===ht.MouseUp&&(g="TouchEnd"):$n.Pen}else Hd(p)&&(h=$n.Touch);h!==null?(u=h,(g.startsWith("Touch")&&h===$n.Touch||g.startsWith("Mouse")&&h===$n.Mouse)&&(h=null)):ht[l]===ht.Click&&(h=u,u=null);let S=Hd(p)?p.changedTouches[0]:p;if(!S)return;let T=n.getId(m),{clientX:A,clientY:B}=S;ce(e)(f({type:ht[g],id:T,x:A,y:B},h!==null&&{pointerType:h}))};return Object.keys(ht).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=ti(l),m=d(l);if(window.PointerEvent)switch(ht[l]){case ht.MouseDown:case ht.MouseUp:p=p.replace("mouse","pointer");break;case ht.TouchStart:case ht.TouchEnd:return}c.push(_t(p,m,t))}),ce(()=>{c.forEach(l=>l())})}function sE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){let a=ce(Is(ce(c=>{let u=Ns(c);if(!u||Wt(u,r,o,i,!0))return;let d=n.getId(u);if(u===t&&t.defaultView){let l=JS(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return _t("scroll",a,t)}function Y0({viewportResizeCb:e},{win:t}){let n=-1,r=-1,o=ce(Is(ce(()=>{let i=KS(),s=XS();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return _t("resize",o,t)}var J0=["INPUT","TEXTAREA","SELECT"],wS=new WeakMap;function K0({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTr
498iggeredOnInput:l,maskTextClass:p,unmaskTextClass:m,maskTextSelector:h,unmaskTextSelector:g}){function S(y){let O=Ns(y),V=y.isTrusted,v=O&&Fd(O.tagName);if(v==="OPTION"&&(O=O.parentElement),!O||!v||J0.indexOf(v)<0||Wt(O,r,o,i,!0))return;let L=O;if(L.classList.contains(s)||a&&L.matches(a))return;let w=ff(O),D=Cc(L,v,w),H=!1,oe=Fc({maskInputOptions:c,tagName:v,type:w}),ie=ni(O,p,h,m,g,oe);(w==="radio"||w==="checkbox")&&(H=O.checked),D=Ts({isMasked:ie,element:O,value:D,maskInputFn:u}),T(O,l?{text:D,isChecked:H,userTriggered:V}:{text:D,isChecked:H});let ae=O.name;w==="radio"&&ae&&H&&t.querySelectorAll(`input[type="radio"][name="${ae}"]`).forEach(P=>{if(P!==O){let W=Ts({isMasked:ie,element:P,value:Cc(P,v,w),maskInputFn:u});T(P,l?{text:W,isChecked:!H,userTriggered:!1}:{text:W,isChecked:!H})}})}function T(y,O){let V=wS.get(y);if(!V||V.text!==O.text||V.isChecked!==O.isChecked){wS.set(y,O);let v=n.getId(y);ce(e)(E(f({},O),{id:v}))}}let B=(d.input==="last"?["change"]:["input","change"]).map(y=>_t(y,ce(S),t)),k=t.defaultView;if(!k)return()=>{B.forEach(y=>y())};let Y=k.Object.getOwnPropertyDescriptor(k.HTMLInputElement.prototype,"value"),G=[[k.HTMLInputElement.prototype,"value"],[k.HTMLInputElement.prototype,"checked"],[k.HTMLSelectElement.prototype,"value"],[k.HTMLTextAreaElement.prototype,"value"],[k.HTMLSelectElement.prototype,"selectedIndex"],[k.HTMLOptionElement.prototype,"selected"]];return Y&&Y.set&&B.push(...G.map(y=>YS(y[0],y[1],{set(){ce(S)({target:this,isTrusted:!1})}},!1,k))),ce(()=>{B.forEach(y=>y())})}function kc(e){let t=[];function n(r,o){if(Ic("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ic("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ic("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ic("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function pr(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function X0({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ce((d,l,p)=>{let[m,h]=p,{id:g,styleId:S}=pr(l,t,n.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,adds:[{rule:m,index:h}]}),d.apply(l,p)})});let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ce((d,l,p)=>{let[m]=p,{id:h,styleId:g}=pr(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,removes:[{index:m}]}),d.apply(l,p)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ce((d,l,p)=>{let[m]=p,{id:h,styleId:g}=pr(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replace:m}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ce((d,l,p)=>{let[m]=p,{id:h,styleId:g}=pr(l,t,n.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,replaceSync:m}),d.apply(l,p)})}));let c={};bc("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(bc("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),bc("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),bc("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:ce((p,m,h)=>{let[g,S]=h,{id:T,styleId:A}=pr(m.parentStyleSheet,t,n.styleMirror);return(T&&T!==-1||A&&A!==-1)&&e({id:T,styleId:A,adds:[{rule:g,index:[...kc(m),S||0]}]}),p.apply(m,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:ce((p,m,h)=>{let[g]=h,{id:S,styleId:T}=pr(m.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||T&&T!==-1)&&e({id:S,styleId:T,removes:[{index:[...kc(m),g]}]}),p.apply(m,h)})})}),ce(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEac
498h(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function aE({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ce(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Q0({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ce((a,c,u)=>{let[d,l,p]=u;if(n.has(d))return i.apply(c,[d,l,p]);let{id:m,styleId:h}=pr(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,set:{property:d,value:l,priority:p},index:kc(c.parentRule)}),a.apply(c,u)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ce((a,c,u)=>{let[d]=u;if(n.has(d))return s.apply(c,[d]);let{id:l,styleId:p}=pr(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:kc(c.parentRule)}),a.apply(c,u)})}),ce(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function Z0({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){let a=ce(u=>Is(ce(d=>{let l=Ns(d);if(!l||Wt(l,t,n,r,!0))return;let{currentTime:p,volume:m,muted:h,playbackRate:g}=l;e({type:u,id:o.getId(l),currentTime:p,volume:m,muted:h,playbackRate:g})}),i.media||500)),c=[_t("play",a(Ko.Play),s),_t("pause",a(Ko.Pause),s),_t("seeked",a(Ko.Seeked),s),_t("volumechange",a(Ko.VolumeChange),s),_t("ratechange",a(Ko.RateChange),s)];return ce(()=>{c.forEach(u=>u())})}function ew({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,d){let l=new i(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};let s=mf(t.fonts,"add",function(a){return function(c){return Hc(ce(()=>{let u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),ce(()=>{r.forEach(a=>a())})}function tw(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,c=ce(()=>{let u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;let d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){let m=u.getRangeAt(p),{startContainer:h,startOffset:g,endContainer:S,endOffset:T}=m;Wt(h,r,o,i,!0)||Wt(S,r,o,i,!0)||d.push({start:n.getId(h),startOffset:g,end:n.getId(S),endOffset:T})}s({ranges:d})});return c(),_t("selectionchange",c)}function nw({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:mf(n.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function rw(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=iE(e,e.doc));let o=q0(e),i=V0(e),s=sE(e),a=Y0(e,{win:n}),c=K0(e),u=Z0(e),d=()=>{},l=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(d=X0(e,{win:n}),l=aE(e,e.doc),p=Q0(e,{win:n}),e.collectFonts&&(m=ew(e)));let h=tw(e),g=nw(e),S=[];for(let T of e.plugins)S.push(T.observer(T.callback,n,T.options));return ce(()=>{ei.forEach(T=>T.reset()),r?.disconnect(),o(),i(),s(),a(),c(),u(),d(),l(),p(),m(),h(),g(),S.forEach(T=>T())})}function Ic(e){return typeof window[e]<"u"}function bc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var bs=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
498,Vd=class{constructor(){this.crossOriginIframeMirror=new bs(pf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Yd=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new bs(pf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let r=_f(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case te.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:te.IncrementalSnapshot,data:{source:J.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case te.Meta:case te.Load:case te.DomContentLoaded:return!1;case te.Plugin:return n;case te.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case te.IncrementalSnapshot:switch(n.data.source){case J.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case J.Drag:case J.TouchMove:case J.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case J.ViewportResize:return!1;case J.MediaInteraction:case J.MouseInteraction:case J.Scroll:case J.CanvasMutation:case J.Input:return this.replaceIds(n.data,t,["id"]),n;case J.StyleSheetRule:case J.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case J.Font:return n;case J.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case J.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==He.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},Jd=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Kd=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Ss(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let r=iE(E(f({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sE(E(f({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),Hc(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(aE({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let n=_f(t),r=$0(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(mf(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&rE(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}
498reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},xS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ow=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(hs=0;hs<xS.length;hs++)ow[xS.charCodeAt(hs)]=hs;var hs,Oc=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},Xd=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Wd,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:HS(a),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Qd=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,G0(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}},Me,Mc;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var pn=d0();function Wn(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:m=null,inlineStylesheet:h=!0,maskAllInputs:g,maskInputOptions:S,slimDOMOptions:T,maskAttributeFn:A,maskInputFn:B,maskTextFn:k,maxCanvasSize:Y=null,packFn:G,sampling:y={},dataURLOptions:O={},mousemoveWait:V,recordDOM:v=!0,recordCanvas:L=!1,recordCrossOriginIframes:w=!1,recordAfter:D=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:H=!1,collectFonts:oe=!1,inlineImages:ie=!1,plugins:ae,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:W=new Set([]),errorHandler:U,onMutation:j,getCanvasManager:ue}=e;j0(U);let me=w?window.parent===window:!0,Re=!1;if(!me)try{window.parent.document&&(Re=!1)}catch{Re=!0}if(me&&!t)throw new Error("emit function is required");if(!me&&!Re)return()=>{};V!==void 0&&y.mousemove===void 0&&(y.mousemove=V),pn.reset();let Ct=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:S!==void 0?S:{},st=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:T==="all",headMetaDescKeywords:T==="all"}:T||{};D0();let gt,De=0,jt=ne=>{for(let ct of ae||[])ct.eventProcessor&&(ne=ct.eventProcessor(ne));return G&&!Re&&(ne=G(ne)),ne};Me=(ne,ct)=>{let re=ne;if(re.timestamp=xc(),ei[0]?.isFrozen()&&re.type!==te.FullSnapshot&&!(re.type===te.IncrementalSnapshot&&re.data.source===J.Mutation)&&ei.forEac
498h(Ye=>Ye.unfreeze()),me)t?.(jt(re),ct);else if(Re){let Ye={type:"rrweb",event:jt(re),origin:window.location.origin,isCheckout:ct};window.parent.postMessage(Ye,"*")}if(re.type===te.FullSnapshot)gt=re,De=0;else if(re.type===te.IncrementalSnapshot){if(re.data.source===J.Mutation&&re.data.isAttachIframe)return;De++;let Ye=r&&De>=r,fe=n&>&&re.timestamp-gt.timestamp>n;(Ye||fe)&&at(!0)}};let wt=ne=>{Me({type:te.IncrementalSnapshot,data:f({source:J.Mutation},ne)})},ci=ne=>Me({type:te.IncrementalSnapshot,data:f({source:J.Scroll},ne)}),Os=ne=>Me({type:te.IncrementalSnapshot,data:f({source:J.CanvasMutation},ne)}),Ms=ne=>Me({type:te.IncrementalSnapshot,data:f({source:J.AdoptedStyleSheet},ne)}),rn=new Xd({mutationCb:wt,adoptedStyleSheetCb:Ms}),de=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Vd:new Yd({mirror:pn,mutationCb:wt,stylesheetManager:rn,recordCrossOriginIframes:w,wrappedEmit:Me});for(let ne of ae||[])ne.getMirror&&ne.getMirror({nodeMirror:pn,crossOriginIframeMirror:de.crossOriginIframeMirror,crossOriginIframeStyleMirror:de.crossOriginIframeStyleMirror});let Ce=new Qd,zt=sw(ue,{mirror:pn,win:window,mutationCb:ne=>Me({type:te.IncrementalSnapshot,data:f({source:J.CanvasMutation},ne)}),recordCanvas:L,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:Y,sampling:y.canvas,dataURLOptions:O,errorHandler:U}),$e=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Jd:new Kd({mutationCb:wt,scrollCb:ci,bypassOptions:{onMutation:j,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskInputOptions:Ct,dataURLOptions:O,maskAttributeFn:A,maskTextFn:k,maskInputFn:B,recordCanvas:L,inlineImages:ie,sampling:y,slimDOMOptions:st,iframeManager:de,stylesheetManager:rn,canvasManager:zt,keepIframeSrcFn:P,processedNodeManager:Ce,ignoreCSSAttributes:W},mirror:pn}),at=(ne=!1)=>{if(!v)return;Me({type:te.Meta,data:{href:window.location.href,width:XS(),height:KS()}},ne),rn.reset(),$e.init(),ei.forEach(re=>re.lock());let ct=P0(document,{mirror:pn,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:h,maskAllInputs:Ct,maskAttributeFn:A,maskInputFn:B,maskTextFn:k,slimDOM:st,dataURLOptions:O,recordCanvas:L,inlineImages:ie,onSerialize:re=>{eE(re,pn)&&de.addIframe(re),tE(re,pn)&&rn.trackLinkElement(re),$d(re)&&$e.addShadowRoot(re.shadowRoot,document)},onIframeLoad:(re,Ye)=>{de.attachIframe(re,Ye),re.contentWindow&&zt.addWindow(re.contentWindow),$e.observeAttachShadow(re)},onStylesheetLoad:(re,Ye)=>{rn.attachLinkElement(re,Ye)},onBlockedImageLoad:(re,Ye,{width:fe,height:ui})=>{wt({adds:[],removes:[],texts:[],attributes:[{id:Ye.id,attributes:{style:{width:`${fe}px`,height:`${ui}px`}}}]})},keepIframeSrcFn:P,ignoreCSSAttributes:W});if(!ct)return console.warn("Failed to snapshot the document");Me({type:te.FullSnapshot,data:{node:ct,initialOffset:JS(window)}}),ei.forEach(re=>re.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&rn.adoptStyleSheets(document.adoptedStyleSheets,pn.getId(document))};Mc=at;try{let ne=[],ct=Ye=>ce(rw)({onMutation:j,mutationCb:wt,mousemoveCb:(fe,ui)=>Me({type:te.IncrementalSnapshot,data:{source:ui,positions:fe}}),mouseInteractionCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.MouseInteraction},fe)}),scrollCb:ci,viewportResizeCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.ViewportResize},fe)}),inputCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.Input},fe)}),mediaInteractionCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.MediaInteraction},fe)}),styleSheetRuleCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.StyleSheetRule},fe)}),styleDeclarationCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.StyleDeclaration},fe)}),canvasMutationCb:Os,fontCb:fe=>Me({type:te.IncrementalSnapshot,data:f({source:J.Font},fe)}),selectionCb:fe=>{Me({type:te.IncrementalSnapshot,data:f({source:J.Selection},fe)})},customElementCb:fe=>{Me({type:te.IncrementalSnapshot,data:f({source:J.CustomElement},fe)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:m,maskInputOptions:Ct,inlineStylesheet:h,sampling:y,recordDOM:v,recordCanvas:L,inlineImages:ie,userTriggeredOnInput:H,collectFonts:oe,doc:Ye,maskAttributeFn:A,maskInputFn:B,maskTextFn:k,keepIframeSrcFn:P,blockSelector:i,unblockSelector:s,slimDOMOptions:st,dataURLOptions:O,mirror:pn,iframeManager:de,stylesheetManager:rn,shadowDomManager:$e,processedNodeManager:Ce,canvasManager:zt,ignoreCSSAttributes:W,plugins:ae?.filter(fe=>fe.observer)?.map(fe=>
498({observer:fe.observer,options:fe.options,callback:ui=>Me({type:te.Plugin,data:{plugin:fe.name,payload:ui}})}))||[]},{});de.addLoadListener(Ye=>{try{ne.push(ct(Ye.contentDocument))}catch(fe){console.warn(fe)}});let re=()=>{at(),ne.push(ct(document))};return document.readyState==="interactive"||document.readyState==="complete"?re():(ne.push(_t("DOMContentLoaded",()=>{Me({type:te.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&re()})),ne.push(_t("load",()=>{Me({type:te.Load,data:{}}),D==="load"&&re()},window))),()=>{ne.forEach(Ye=>Ye()),Ce.destroy(),Mc=void 0,z0()}}catch(ne){console.warn(ne)}}function iw(e){if(!Mc)throw new Error("please take full snapshot after start recording");Mc(e)}Wn.mirror=pn;Wn.takeFullSnapshot=iw;function sw(e,t){try{return e?e(t):new Oc}catch{return console.warn("Unable to initialize CanvasManager"),new Oc}}var kS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(kS||(kS={}));var aw=3,cw=5;function gf(e){return e>9999999999?e:e*1e3}function Pd(e){return e>9999999999?e/1e3:e}function Cs(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:te.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ne(t,10,1e3)}}),t.category==="console")))}var uw="button,a";function cE(e){return e.closest(uw)||e}function uE(e){let t=lE(e);return!t||!(t instanceof Element)?t:cE(t)}function lE(e){return lw(e)?e.target:e}function lw(e){return typeof e=="object"&&!!e&&"target"in e}var mr;function dw(e){return mr||(mr=[],fw()),mr.push(e),()=>{let t=mr?mr.indexOf(e):-1;t>-1&&mr.splice(t,1)}}function fw(){Ee(Ae,"open",function(e){return function(...t){if(mr)try{mr.forEach(n=>n())}catch{}return e.apply(Ae,t)}})}var pw=new Set([J.Mutation,J.StyleSheetRule,J.StyleDeclaration,J.AdoptedStyleSheet,J.CanvasMutation,J.Selection,J.MediaInteraction]);
498function mw(e,t,n){e.handleClick(t,n)}var Zd=class{constructor(t,n,r=Cs){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=dw(()=>{this._lastMutation=OS()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(_w(n,this._ignoreSelector)||!gw(t))return;let r={timestamp:Pd(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Pd(t)}registerScroll(t=Date.now()){this._lastScroll=Pd(t)}registerClick(t){let n=cE(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=OS();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(let r of t){let o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:E(f({},a.data),{url:Ae.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1})};this._addBreadcrumbEvent(n,d);return}if(s>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:E(f({},a.data),{url:Ae.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0})};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Jr(()=>this._checkClicks(),1e3)}},hw=["A","BUTTON","INPUT"];function _w(e,t){return!!(!hw.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function gw(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function OS(){return Date.now()/1e3}function Sw(e,t){try{if(!Ew(t))return;let{source:n}=t.data;if(pw.has(n)&&e.registerMutation(t.timestamp),n===J.Scroll&&e.registerScroll(t.timestamp),Tw(t)){let{type:r,id:o}=t.data,i=Wn.mirror.getNode(o);i instanceof HTMLElement&&r===ht.Click&&e.registerClick(i)}}catch{}}function Ew(e){return e.type===aw}function Tw(e){return e.data.source===J.MouseInteraction}function xn(e){return f({timestamp:Date.now()/1e3,type:"default"},e)}var Sf=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Sf||{}),yw=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Iw(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let n in e)if(yw.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var bw=e=>t=>{if(!e.isEnabled())return;let n=Aw(t);if(!n)return;let r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shift
498Key&&mw(e.clickDetector,n,uE(t.event)),Cs(e,n)};function dE(e,t){let n=Wn.mirror.getId(e),r=n&&Wn.mirror.getNode(n),o=r&&Wn.mirror.getMeta(r),i=o&&vw(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===Sf.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:Iw(i.attributes)}}:{}}}function Aw(e){let{target:t,message:n}=Rw(e);return xn(f({category:`ui.${e.name}`},dE(t,n)))}function Rw(e){let t=e.name==="click",n,r=null;try{r=t?uE(e.event):lE(e.event),n=Oe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function vw(e){return e.type===Sf.Element}function Nw(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=Cw(t);n&&Cs(e,n)}function Cw(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||ww(s)||!i)return null;let a=t||r||o,c=i.length===1;if(!a&&c)return null;let u=Oe(s,{maxStringLength:200})||"<unknown>",d=dE(s,u);return xn({category:"ui.keyDown",message:u,data:E(f({},d.data),{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i})})}function ww(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var xw={resource:Pw,paint:Mw,navigation:Lw};function Ud(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function kw(e){return e.map(Ow).filter(Boolean)}function Ow(e){let t=xw[e.entryType];return t?t(e):null}function ri(e){return((ye()||Ae.performance.timeOrigin)+e)/1e3}function Mw(e){let{duration:t,entryType:n,name:r,startTime:o}=e,i=ri(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Lw(e){let{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:m,transferSize:h,type:g}=e;return o===0?null:{type:`${t}.${g}`,start:ri(m),end:ri(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:p}}}function Pw(e){let{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:ri(i),end:ri(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function Uw(e){let t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Ef(e,"largest-contentful-paint",n)}function Dw(e){return e.sources!==void 0}function Bw(e){let t=[],n=[];for(let r of e.entries)if(Dw(r)){let o=[];for(let i of r.sources)if(i.node){n.push(i.node);let s=Wn.mirror.getId(i.node);s&&o.push(s)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Ef(e,"cumulative-layout-shift",n,t)}function Fw(e){let t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Ef(e,"interaction-to-next-paint",n)}function Ef(e,t,n,r){let o=e.value,i=e.rating,s=ri(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:n?n.map(a=>Wn.mirror.getId(a)):void 0,attributions:r}}}function Gw(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(o=>{r.push($t(o,n))}),r.push(Yr(Ud(Uw,e)),Vr(Ud(Bw,e)),rs(Ud(Fw,e))),()=>{r.forEach(o=>o())}}var z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Hw='
vendor: 10,329 bytes, line 498
498var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
498';function $w(){let e=new Blob([Hw]);return URL.createObjectURL(e)}var MS=["log","warn","error"],Rc="[Replay] ";function Dd(e,t="info"){It({category:"console",data:{logger:"replay"},level:t,message:`${Rc}${e}`},{level:t})}function Ww(){let e=!1,t=!1,n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return z?(MS.forEach(r=>{n[r]=(...o)=>{_[r](Rc,...o),t&&Dd(o.join(""),tr(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(Rc,r),e?X(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Dd(r,"error")},n.infoTick=(...r)=>{_.log(Rc,...r),t&&setTimeout(()=>Dd(r[0]),0)}):MS.forEach(r=>{n[r]=()=>{}}),n}var q=Ww(),As=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${df}.`)}},Lc=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>df)throw new As;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?gf(t):null}},ef=class{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(z&&q.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{z&&q.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){z&&q.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((o,i)=>{let s=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){z&&q.error("Error in compression worker: ",c.response),i(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},tf=class{constructor(t){this._worker=new ef(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=gf(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>df?Promise.reject(new As):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{z&&q.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},nf=class{constructor(t){this._fallback=new Lc,this._compression=new tf(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}
498ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){z&&q.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){z&&q.exception(i,"Failed to add events when switching buffers.")}}};function jw({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=zw(t);if(n)return n}return z&&q.log("Using simple buffer"),new Lc}function zw(e){try{let t=e||qw();if(!t)return;z&&q.log(`Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new nf(n)}catch(t){z&&q.exception(t,"Failed to create compression worker")}}function qw(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?$w():""}function Tf(){try{return"sessionStorage"in Ae&&!!Ae.sessionStorage}catch{return!1}}function Vw(e){Yw(),e.session=void 0}function Yw(){if(Tf())try{Ae.sessionStorage.removeItem(uf)}catch{}}function fE(e){return e===void 0?!1:Math.random()<e}function $c(e){if(Tf())try{Ae.sessionStorage.setItem(uf,JSON.stringify(e))}catch{}}function pE(e){let t=Date.now(),n=e.id||pe(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a,dirty:c}}function Jw(e,t){return fE(e)?"session":t?"buffer":!1}function LS({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let o=Jw(e,t),i=pE({sampled:o,previousSessionId:r});return n&&$c(i),i}function Kw(){if(!Tf())return null;try{let e=Ae.sessionStorage.getItem(uf);if(!e)return null;let t=JSON.parse(e);return z&&q.infoTick("Loading existing session"),pE(t)}catch{return null}}function rf(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function mE(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return rf(e.started,t,r)||rf(e.lastActivity,n,r)}function hE(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!mE(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Bd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let o=r.stickySession&&Kw();return o?hE(o,{sessionIdleExpire:e,maxReplayDuration:t})?(z&&q.infoTick("Session in sessionStorage is expired, creating new one..."),LS(r,{previousSessionId:o.id})):o:(z&&q.infoTick("Creating new session"),LS(r,{previousSessionId:n}))}function Xw(e){return e.type===te.Custom}function yf(e,t,n){return gE(e,t)?(_E(e,t,n),!0):!1}function Qw(e,t,n){return gE(e,t)?_E(e,t,n):Promise.resolve(null)}async function _E(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let i=e.getOptions(),s=Zw(t,i.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(i){let s=i&&i instanceof As,a=s?"addEventSizeExceeded":"addEvent",c=I();if(c){let u=s?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(s&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function gE(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=gf(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(z&&q.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Zw(e,t){try{if(typeof t=="function"&&Xw(e))return t(e)}catch(n){return z&&q.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function If(e){return!e.type}function of(e){return e.type==="transaction"}function ex(e){return e.type==="replay_event"}function PS(e){return e.type==="feedback"}function tx(e){return(t,n)=>{if(!e.isEnabled()||!If(t)&&!of(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(of(t)){nx(e,t);return}rx(e,t)}}}function nx(e,t){let n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function rx(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Jr(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function ox(e){return t=>{!e.isEnabled()||!If(t)||ix(e,t)}}function ix(e,t){let n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let r=xn({category:"replay.hydrate-error",data:{url:dt()}});Cs(e,r)}}function sx(e){let t=I();t&&t.on("beforeAddBreadcrumb",n=>ax(e,n))}function ax(e,t){if(!e.isEnabled()||!SE(t))return;let n=cx(t);n&&Cs(e,n)}function cx(e){return!SE(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?ux(e):xn(e)}function ux(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return xn(e);let n=!1,r=t.map(o=>{if(!o)return o;
498if(typeof o=="string")return o.length>yc?(n=!0,`${o.slice(0,yc)}\u2026`):o;if(typeof o=="object")try{let i=Ne(o,7);return JSON.stringify(i).length>yc?(n=!0,`${JSON.stringify(i,null,2).slice(0,yc)}\u2026`):i}catch{}return o});return xn(E(f({},e),{data:f(E(f({},e.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function SE(e){return!!e.category}function lx(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function EE(){let e=x().getPropagationContext().dsc;e&&delete e.replay_id;let t=K();if(t){let n=Pe(t);delete n.replay_id}}function dx(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:te.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function fx(e,t){return e.recordingMode!=="buffer"||t.message===lf||!t.exception||t.type?!1:fE(e.getOptions().errorSampleRate)}function px(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(ex(t))return delete t.breadcrumbs,t;if(!If(t)&&!of(t)&&!PS(t))return t;if(!e.checkAndHandleExpiredSession())return EE(),t;if(PS(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),dx(e,t),t;if(lx(t,n)&&!e.getOptions()._experiments.captureExceptions)return z&&q.log("Ignoring error from rrweb internals",t),null;let o=fx(e,t);if((o||e.recordingMode==="session")&&(t.tags=E(f({},t.tags),{replayId:e.getSessionId()})),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&$c(s)}return t},{id:"Replay"})}function Wc(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:te.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function mx(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function hx(e){return t=>{if(!e.isEnabled())return;let n=mx(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Wc(e,[n]),!1)))}}function _x(e,t){return z&&e.getOptions()._experiments.traceInternals?!1:Bi(t,I())}function TE(e,t){e.isEnabled()&&t!==null&&(_x(e,t.name)||e.addUpdate(()=>(Wc(e,[t]),!0)))}function jc(e){if(!e)return;let t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=mc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function yE(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Pc(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n=f({},e._meta),r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function IE(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:i,statusCode:s,request:a,response:c}}}function Rs(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function hr(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:o,warnings:i}=gx(n);return r.body=o,i?.length&&(r._meta={warnings:i}),r}function sf(e,t){return Object.entries(e).reduce((n,[r,o])=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=o),n},{})}function gx(e){if(!e||typeof e!="string")return{body:e};let t=e.length>_S,n=Sx(e);if(t){let r=e.slice(0,_S);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Sx(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Uc(e,t){let n=Ex(e);return Je(n,t)}function Ex(e,t=Ae.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ae.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}
498async function Tx(e,t,n){try{let r=await Ix(e,t,n),o=IE("resource.fetch",r);TE(n.replay,o)}catch(r){z&&q.exception(r,"Failed to capture fetch breadcrumb")}}function yx(e,t){let{input:n,response:r}=t,o=n?zo(n):void 0,i=jc(o),s=r?yE(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function Ix(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Uc(s,n.networkDetailAllowUrls)&&!Uc(s,n.networkDetailDenyUrls),p=l?bx(n,t.input,u):Rs(u),m=await Ax(l,n,t.response,d);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:p,response:m}}function bx({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let o=n?Nx(n,t):{};if(!e)return hr(o,r,void 0);let i=zo(n),[s,a]=Xr(i,q),c=hr(o,r,s);return a?Pc(c,a):c}async function Ax(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Rs(o);let i=r?bE(r.headers,n):{};if(!r||!t&&o!==void 0)return hr(i,o,void 0);let[s,a]=await vx(r),c=Rx(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Pc(c,a):c}function Rx(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{let i=e?.length&&n===void 0?jc(e):n;return r?t?hr(o,i,e):hr(o,i,void 0):Rs(i)}catch(i){return z&&q.exception(i,"Failed to serialize response body"),hr(o,n,void 0)}}async function vx(e){let t=Cx(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await wx(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(z&&q.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(z&&q.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function bE(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Nx(e,t){return e.length===1&&typeof e[0]!="string"?US(e[0],t):e.length===2?US(e[1],t):{}}function US(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?bE(n,t):Array.isArray(n)?{}:sf(n,t):{}}function Cx(e){try{return e.clone()}catch(t){z&&q.exception(t,"Failed to clone response body")}}function wx(e){return new Promise((t,n)=>{let r=Jr(()=>n(new Error("Timeout while trying to read response body")),500);xx(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function xx(e){return await e.text()}async function kx(e,t,n){try{let r=Mx(e,t,n),o=IE("resource.xhr",r);TE(n.replay,o)}catch(r){z&&q.exception(r,"Failed to capture xhr breadcrumb")}}function Ox(e,t){let{xhr:n,input:r}=t;if(!n)return;let o=jc(r),i=n.getResponseHeader("content-length")?yE(n.getResponseHeader("content-length")):Ux(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function Mx(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Uc(c,n.networkDetailAllowUrls)||Uc(c,n.networkDetailDenyUrls)){let G=Rs(l),y=Rs(p);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:G,response:y}}let m=a[mt],h=m?sf(m.request_headers,n.networkRequestHeaders):{},g=sf(as(a),n.networkResponseHeaders),[S,T]=n.networkCaptureBodies?Xr(s,q):[void 0],[A,B]=n.networkCaptureBodies?Lx(a):[void 0],k=hr(h,l,S),Y=hr(g,p,A);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:T?Pc(k,T):k,response:B?Pc(Y,B):Y}}function Lx(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Px(e.response,e.responseType)}catch(n){t.push(n)}return z&&q.warn("Failed to get xhr response body",...t),[void 0]}function Px(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return z&&q.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return z&&q.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ux(e,t){try{let n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return jc(n)}catch{return}}function Dx(e){let t=I();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>Bx(a,c,u))}catch{}}
498function Bx(e,t,n){if(t.data)try{Fx(t)&&Hx(n)&&(Ox(t,n),kx(t,n,e)),Gx(t)&&$x(n)&&(yx(t,n),Tx(t,n,e))}catch(r){z&&q.exception(r,"Error when enriching network breadcrumb")}}function Fx(e){return e.category==="xhr"}function Gx(e){return e.category==="fetch"}function Hx(e){return e?.xhr}function $x(e){return e?.response}function Wx(e){let t=I();ss(bw(e)),Hn(hx(e)),sx(e),Dx(e);let n=px(e);ma(n),t&&(t.on("beforeSendEvent",ox(e)),t.on("afterSendEvent",tx(e)),t.on("createDsc",r=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{let i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function jx(e){try{return Promise.all(Wc(e,[zx(Ae.performance.memory)]))}catch{return[]}}function zx(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function qx(e,t,n){return dl(e,t,E(f({},n),{setTimeoutImpl:Jr}))}var Ac=N.navigator;function Vx(){return/iPhone|iPad|iPod/i.test(Ac?.userAgent??"")||/Macintosh/i.test(Ac?.userAgent??"")&&Ac?.maxTouchPoints&&Ac?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Yx(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){z&&q.warn("Received replay event after session expired.");return}let o=r||!t;t=!0,e.clickDetector&&Sw(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!yf(e,n,o))return!0;if(!o)return!1;let i=e.session;if(Kx(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(z&&q.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&$c(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Jx(e){let t=e.getOptions();return{type:te.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Kx(e,t){!t||e.session?.segmentId!==0||yf(e,Jx(e),!1)}function Xx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Qx(e,t,n,r){return Ue(vi(e,Kn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Zx({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)} 499`;if(typeof e=="string")n=`${r}${e}`;else{let i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function ek({client:e,scope:t,replayId:n,event:r}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit("preprocessEvent",r,i);let s=await xi(e.getOptions(),r,i,t,e,se());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return s.sdk=E(f({},s.sdk),{name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d}),s}async function tk({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){let s=Zx({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=I(),p=x(),m=l?.getTransport(),h=l?.getDsn();if(!l||!m||!h||!i.sampled)return Promise.resolve({});let g={type:jC,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},S=await ek({scope:p,client:l,replayId:t,event:g});if(!S)return l.recordDroppedEvent("event_processor","replay"),z&&q.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete S.sdkProcessingMetadata;let T=Qx(S,s,h,l.getOptions().tunnel),A;try{A=await m.send(T)}catch(k){let Y=new Error(lf);try{Y.cause=k}catch{}throw Y}let B=Pi({},A);if(Li(B,"replay"))throw new vs(B);if(typeof A.statusCode=="number"&&(A.statusCode<200||A.statusCode>=300))throw new Dc(A.statusCode);return A}
499var Dc=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},vs=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},Bc=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function AE(e,t={count:0,interval:KC}){let{recordingData:n,onError:r}=e;if(n.length)try{return await tk(e),!0}catch(o){if(o instanceof Dc||o instanceof vs)throw o;if(ho("Replays",{_retryCount:t.count}),r&&r(o),t.count>=XC){let i=new Error(`${lf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Jr(async()=>{try{await AE(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var RE="__THROTTLED",nk="__SKIPPED";function rk(e,t,n){let r=new Map,o=a=>{let c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0),s=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){let d=s;return s=!0,d?nk:RE}s=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var af=class{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:zC,sessionIdleExpire:qC},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=qx(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=rk((s,a)=>Qw(this,s,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(QC,r),timeout:r,scrollTimeout:ZC,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Zd(this,i)),z){let s=t._experiments;q.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Ae.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=xn({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=xn({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{Nw(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){z&&q.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){z&&q.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",z&&q.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){z&&q.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){z&&q.log("Buffering is in progress, call `flush()` to save the replay");return}z&&q.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Bd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){z&&q.log("Buffering is in progress, call `flush()` to save the replay");return}z&&q.infoTick("Starting replay in buffer mode");let t=Bd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Wn(f(E(f(E(f(f({},this._recordingOptions),this.recordingMode==="buffer"?{checkoutEveryNms:JC}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:Yx(this)}),Vx()),{onMutation:this._onMutationHandler.bind(this)}),t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}))}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{z&&q.log(`Stopping Replay${n?` triggered by ${n}`:""}`),EE(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Vw(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),z&&q.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),z&&q.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();z&&q.log("Converting buffer to session"),await this.flushImmediate();let r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){let n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}
499checkAndHandleExpiredSession(){if(this._lastActivity&&rf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${Ae.location.pathname}${Ae.location.hash}${Ae.location.search}`,n=`${Ae.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){let r=this._throttledAddEvent(t,n);if(r===RE){let o=xn({category:"replay.throttled"});this.addUpdate(()=>!yf(this,{type:cw,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastActiveSpan||K(),n=t&&Z(t),o=(n&&M(n).data||{})[Ie];if(!(!n||!o||!["route","custom"].includes(o)))return M(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=jw({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Bd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;let t=this.session;return hE(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Ae.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ae.addEventListener("blur",this._handleWindowBlur),Ae.addEventListener("focus",this._handleWindowFocus),Ae.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Wx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Gw(this)}_removeListeners(){try{Ae.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ae.removeEventListener("blur",this._handleWindowBlur),Ae.removeEventListener("focus",this._handleWindowFocus),Ae.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||mE(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){z&&q.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:te.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=kw(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Wc(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
499_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){z&&q.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await jx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Bc;let r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await AE({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});let r=I();if(r){let o;n instanceof vs?o="ratelimit_backoff":n instanceof Bc?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){z&&q.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){z&&q.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&z&&q.log("Flushing initial segment without checkout.");let c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&$c(this.session)}_onMutationHandler(t){let{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{let c=Xx(a.target),u=n.join(",");return c?.matches(u)}))return!1;let r=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&r>o;if(r>i||s){let a=xn({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function _s(e,t){return[...e,...t].join(",")}function ok({mask:e,unmask:t,block:n,unblock:r,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=_s(e,[".sentry-mask","[data-sentry-mask]"]),a=_s(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:_s(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:_s(r,[]),ignoreSelector:_s(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function ik({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}var DS='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',sk=["content-length","content-type","accept"],ak=Symbol.for("sentry__originalRequestBody"),BS=!1,FS=!1;function ck(){if(typeof Request>"u"||FS)return;let e=Request;try{let t=function(n,r){let o=new e(n,r);return r?.body!=null&&(o[ak]=r.body),o};t.prototype=e.prototype,N.Request=t,FS=!0}catch{}}var uk=e=>new cf(e),cf=class{constructor({flushMinDelay:t=VC,flushMaxDelay:n=YC,minReplayDuration:r=e0,maxReplayDuration:o=gS,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:T=[],networkCaptureBodies:A=!0,networkRequestHeaders:B=[],networkResponseHeaders:k=[],mask:Y=[],maskAttributes:G=["title","placeholder","aria-label"],unmask:y=[],block:O=[],unblock:V=[],ignore:v=[],maskFn:L,beforeAddRecordingEvent:w,beforeErrorSampling:D,onError:H,attachRawBodyFromRequest:oe=!1}={}){this.name="Replay";let ie=ok({mask:Y,unmask:y,block:O,unblock:V,ignore:v});if(this._recordingOptions=E(f({maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:L,maskInputFn:L,maskAttributeFn:(ae,P,W)=>ik({maskAttributes:G,maskAllText:u,privacyOptions:ie,key:ae,value:P,el:W})},ie),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ae=>{try{ae.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes}),this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,t0),maxReplayDuration:Math.min(o,gS),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:h,slowClickIgnoreSelectors:g,networkDetailAllowUrls:S,networkDetailDenyUrls:T,networkCaptureBodies:A,networkRequestHeaders:GS(B),networkResponseHeaders:GS(k),beforeAddRecordingEvent:w,beforeErrorSampling:D,onError:H,attachRawBodyFromRequest:oe,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${DS}`:DS,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ur()
499)throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return BS}set _isInitialized(t){BS=t}afterAllSetup(t){!ur()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&ck(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let n=lk(this._initialOptions,t);this._replay=new af({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};function lk(e,t){let n=t.getOptions(),r=f({sessionSampleRate:0,errorSampleRate:0},e),o=Mt(n.replaysSessionSampleRate),i=Mt(n.replaysOnErrorSampleRate);return o==null&&i==null&&We(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),i!=null&&(r.errorSampleRate=i),r}function GS(e){return[...sk,...e.map(t=>t.toLowerCase())]}function dk(){return I()?.getIntegrationByName("Replay")}var fk=Object.defineProperty,pk=(e,t,n)=>t in e?fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vE=(e,t,n)=>pk(e,typeof t!="symbol"?t+"":t,n),Af=class{constructor(){vE(this,"idNodeMap",new Map),vE(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function mk(){return new Af}function hk(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Rf(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Rf(e.parentNode,t,n,r+1)}function NE(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(hk(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var oi=`Please stop import mirror directly. Instead of that,\r 500now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 501or you can use record.mirror to access the mirror instance during recording.`,CE={map:{},getId(){return console.error(oi),-1},getNode(){return console.error(oi),null},removeNodeFromMap(){console.error(oi)},has(){return console.error(oi),!1},reset(){console.error(oi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(CE=new Proxy(CE,{get(e,t,n){return t==="map"&&console.error(oi),Reflect.get(e,t,n)}}));function Nf(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){UE(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Nf(e,t,i||{},!0)}function Cf(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function _k(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Yc(e,t,n,r,o){if(!e)return!1;let i=_k(e);if(!i)return!1;let s=NE(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=Rf(i,s),c=-1;return a<0?!1:(r&&(c=Rf(i,NE(null,r))),a>-1&&c<0?!0:a<c)}var wE={};function PE(e){let t=wE[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return wE[e]=r.bind(window)}function Zr(...e){return PE("requestAnimationFrame")(...e)}
501function UE(...e){return PE("setTimeout")(...e)}var si=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(si||{}),qc;function gk(e){qc=e}var bf=e=>qc?(...n)=>{try{return e(...n)}catch(r){if(qc&&qc(r)===!0)return()=>{};throw r}}:e,ii="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sk=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ws=0;ws<ii.length;ws++)Sk[ii.charCodeAt(ws)]=ws;var ws,Ek=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=ii[t[n]>>2],o+=ii[(t[n]&3)<<4|t[n+1]>>4],o+=ii[(t[n+1]&15)<<2|t[n+2]>>6],o+=ii[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},xE=new Map;function Tk(e,t){let n=xE.get(e);return n||(n=new Map,xE.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var DE=(e,t,n)=>{if(!e||!(FE(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=Tk(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Vc(e,t,n){if(e instanceof Array)return e.map(r=>Vc(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=Ek(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Vc(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Vc(e.data,t,n),e.width,e.height]};if(FE(e,t)||typeof e=="object"){let r=e.constructor.name,o=DE(e,t,n);return{rr_type:r,index:o}}}}return e}var BE=(e,t,n)=>e.map(r=>Vc(r,t,n)),FE=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function yk(e,t,n,r,o){let i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=Cf(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Yc(this.canvas,n,r,o,!0)||UE(()=>{let l=BE(d,t,this);e(this.canvas,{type:si["2D"],property:a,args:l})},0),u.apply(this,d)}});i.push(c)}catch{let c=Nf(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:si["2D"],property:a,args:[u],setter:!0})}});i.push(c)}return()=>{i.forEach(a=>a())}}function Ik(e){return e==="experimental-webgl"?"webgl":e}function kE(e,t,n,r,o){let i=[];try{let s=Cf(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Yc(this,t,n,r,!0)){let d=Ik(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){let l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function OE(e,t,n,r,o,i,s,a){let c=[],u=Object.getOwnPropertyNames(e);for(let d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;let l=Cf(e,d,function(p){return function(...m){let h=p.apply(this,m);if(DE(h,a,this),"tagName"in this.canvas&&!Yc(this.canvas,r,o,i,!0)){let g=BE(m,a,this),S={type:t,property:d,args:g};n(this.canvas,S)}return h}});c.push(l)}catch{let l=Nf(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function bk(e,t,n,r,o,i){let s=[];return s.push(...OE(t.WebGLRenderingContext.prototype,si.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...OE(t.WebGL2RenderingContext.prototype,si.WebGL2,e,n,r,o,i,t)),()=>
501{s.forEach(a=>a())}}var Ak='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Rk(){let e=new Blob([Ak]);return URL.createObjectURL(e)}var vf=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};let{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:i,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&gk(s),(i&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&bf(()=>{i&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){let{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:i,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}bf(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,o,i),s&&typeof n=="number"){let c=kE(t,r,o,i,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Zr(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){let t=new Worker(Rk());return t.onmessage=n=>{let r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;let{base64:i,type:s,width:a,height:c}=r;this.mutationCb({id:o,type:si["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;let n=r=>{this.takeSnapshot(r,!1),t=Zr(n)};t=Zr(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){let i=kE(t,n,r,o,!1),s=yk(this.processMutation.bind(this),t,n,r,o),a=bk(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{i(),s(),a()})}getCanvasElements(t,n,r){let o=[],i=s=>{s.querySelectorAll("canvas").forEach(a=>{Yc(a,t,n,r,!0)||o.push(a)})};for(let s of this.windows){let a=s.deref(),c;try{c=a&&a.document}catch{}c&&i(c)}for(let s of this.shadowDoms){let a=s.deref();a&&i(a)}return o}takeSnapshot(t,n,r){let{sampling:o,blockClass:i,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(i,s,a)).forEac
501h(h=>{let g=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(g))){if(this.snapshotInProgressMap.set(g,!0),!n&&["webgl","webgl2"].includes(h.__context)){let S=h.getContext(h.__context);S?.getContextAttributes()?.preserveDrawingBuffer===!1&&S.clear(S.COLOR_BUFFER_BIT)}createImageBitmap(h).then(S=>{this.worker?.postMessage({id:g,bitmap:S,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[S])}).catch(S=>{bf(()=>{throw this.snapshotInProgressMap.delete(g),S})()})}}),!0)}startPendingCanvasMutationFlusher(){Zr(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,Zr(t)};Zr(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Zr(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(s=>{let u=s,{type:a}=u;return hn(u,["type"])}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}mk();var ME;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ME||(ME={}));var LE={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},vk="ReplayCanvas",zc=1280,Nk=(e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,zc):zc,n?Math.min(n,zc):zc]},o,i,s=new Promise(a=>i=a);return{name:vk,getOptions(){let{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return f({enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:d=>{let l=new vf(E(f({},d),{enableManualSnapshot:c,maxCanvasSize:u,errorHandler:p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}}}));return o=l,i(l),l}},LE[a]||LE.medium)},async snapshot(a,c){(o||await s).snapshot(a,c)}}},Ck=Nk;function GE(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function wf(e){try{return new URL(e,C.location.origin).href}catch{return}}function HE(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function xf(e){try{return new Headers(e)}catch{return}}var $E=new WeakMap,kf=new Map,Jc={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Of(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}=f(f({},Jc),t),d=typeof i=="function"?i:h=>!0,l=h=>wk(h,a),p={},m=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(g=>{if(g.op==="http.client"){let S=kf.get(g.span_id);S&&(g.timestamp=S/1e3,kf.delete(g.span_id))}}),h)),o&&Dl(h=>{if(h.response){let g=$E.get(h.response);g&&h.endTimestamp&&kf.set(g,h.endTimestamp)}}),Hr(h=>{let g=gl(h,d,l,p,{propagateTraceparent:m,onRequestSpanEnd:u});if(h.response&&h.fetchData.__span&&$E.set(h.response,h.fetchData.__span),g){let S=wf(h.fetchData.url),T=S?cn(S).host:void 0;g.setAttributes({"http.url":S?Yt(S):void 0,"server.address":T}),s&&WE(g),c?.(g,{headers:h.headers})}})),r&&Kr(h=>{let g=xk(h,d,l,p,m,u);g&&(s&&WE(g),c?.(g,{headers:xf(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}function WE(e){let{url:t}=M(e).data;if(!t||typeof t!="string")return;let n=$t("resource",({entries:r})=>{r.forEach(o=>{HE(o)&&o.name.endsWith(t)&&(e.setAttributes(is(o)),setTimeout(n))})})}function wk(e,t){let n=dt();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}let i=r.origin===o;return t?Je(r.toString(),t)||i&&Je(r.pathname,t):i}else{let r=!!e.match(/^\/(?!\/)/);return t?Je(e,t):r}}function xk(e,t,n,r,o,i){let s=e.xhr,a=s?.[mt];if(!s||s.__sentry_own_request__||!a)return;let{url:c,method:u}=a,d=Le()&&t(c);if(e.endTimestamp){let T=s.__sentry_xhr_span_id__;if(!T)return;let A=r[T];A&&(d&&a.status_code!==void 0&&(Mn(A,a.status_code),A.end(),i?.(A,{headers:xf(as(s)),error:e.error})),delete r[T]);return}let l=wf(c),p=l?cn(l):cn(c),m=Yt(Lr(c)),h=!!K(),g=d&&h?qe({name:`${u} ${m}`,attributes:f(f({url:Yt(c),type:"xhr","http.method":u,"http.url":l?Yt(l):void 0,"server.address":p?.host,[$]:"auto.http.browser",[le]:"http.client"},p?.search&&{"http.query":p?.search}),p?.hash&&{"http.fragment":p?.hash})}):new nt;s.__sentry_xhr_span_id__=g.spanContext().spanId,r[s.__sentry_xhr_span_id__]=g,n(c)&&kk(s,Le()&&h?g:void 0,o);let S=I();return S&&S.emit("beforeOutgoingRequestSpan",g,e),g}function kk(e,t,n){let{"sentry-trace":r,baggage:o,traceparent:i}=Io({span:t,propagateTraceparent:n});r&&Ok(e,r,o,i)}function Ok(e,t,n,r){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){let i=o?.baggage;(!i||!GE(i))&&e.setRequestHeader("baggage",n)}}catch{}}function jE(){C.document?C.document.addEventListener("visibilitychange",()=>{let e=K();if(!e)return;let t=Z(e);if(C.document.hidden&&t){let n="cancelled",{op:r,status:o}=M(t);R&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):R&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var Mk=3600,zE="sentry_previous_trace",Lk="sentry.previous_trace";function qE(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t==="session-storage",o=r?Dk():void 0;e.on("spanStart",s=>{if(Z(s)!==s)return;let a=x().getPropagationContext();o=Pk(o,s,a),r&&Uk(o)});let i=!0;n&&e.on("beforeSampling",s=>{if(!o)return;let a=x(),c=a.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}a.setPropagationContext(E(f({}
501,c),{dsc:E(f({},c.dsc),{sample_rate:String(o.sampleRate),sampled:String(Mf(o.spanContext))}),sampleRand:o.sampleRand})),s.parentSampled=Mf(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes=E(f({},s.spanAttributes),{[Si]:o.sampleRate})})}function Pk(e,t,n){let r=M(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[qn])}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Mk&&(R&&_.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify(f({op:r.op},t.spanContext()))}\``),t.addLink({context:s,attributes:{[Ru]:"previous_trace"}}),t.setAttribute(Lk,`${s.traceId}-${s.spanId}-${Mf(s)?1:0}`)),i)}function Uk(e){try{C.sessionStorage.setItem(zE,JSON.stringify(e))}catch(t){R&&_.warn("Could not store previous trace in sessionStorage",t)}}function Dk(){try{let e=C.sessionStorage?.getItem(zE);return JSON.parse(e)}catch{return}}function Mf(e){return e.traceFlags===1}var Bk="BrowserTracing",Fk=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Gk(){let e=C.navigator;return e?.userAgent?Fk.test(e.userAgent):!1}var Hk=f(E(f({},mo),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{}}),Jc),Lf=(e={})=>{let t={name:void 0,source:void 0},n=C.document,{enableInp:r,enableElementTiming:o,enableLongTask:i,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:S,trackFetchStreamPerformance:T,shouldCreateSpanForRequest:A,enableHTTPTimings:B,ignoreResourceSpans:k,ignorePerformanceApiSpans:Y,instrumentPageLoad:G,instrumentNavigation:y,detectRedirects:O,linkPreviousTrace:V,consistentTraceSampling:v,enableReportPageLoaded:L,onRequestSpanStart:w,onRequestSpanEnd:D}=f(f({},Hk),e),H=Gk(),oe,ie,ae;function P(W,U,j=!0){let ue=U.op==="pageload",me=U.name,Re=d?d(U):U,Ct=Re.attributes||{};if(me!==Re.name&&(Ct[Ie]="custom",Re.attributes=Ct),!j){let De=Ot();qe(E(f({},Re),{startTime:De})).end(De);return}t.name=Re.name,t.source=Ct[Ie];let st=ua(Re,{idleTimeout:l,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:ue,beforeSpanEnd:De=>{oe?.(),Ed(De,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:k,ignorePerformanceApiSpans:Y}),JE(W,void 0);let jt=x(),wt=jt.getPropagationContext();jt.setPropagationContext(E(f({},wt),{traceId:st.spanContext().traceId,sampled:Lt(st),dsc:Pe(De)})),ue&&(ae=void 0)},trimIdleSpanEndTimestamp:!L});ue&&L&&(ae=st),JE(W,st);function gt(){n&&["interactive","complete"].includes(n.readyState)&&W.emit("idleSpanEnableAutoFinish",st)}ue&&!L&&n&&(n.addEventListener("readystatechange",()=>{gt()}),gt())}return{name:Bk,setup(W){if(H){R&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(ta(),oe=hd({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:W}),r&&vd(),o&&Td(),s&&N.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?gd():i&&_d(),a&&Sd(),O&&n){let j=()=>{ie=Q()};addEventListener("click",j,{capture:!0}),addEventListener("keydown",j,{capture:!0,passive:!0})}function U(){let j=xs(W);j&&!M(j).timestamp&&(R&&_.log(`[Tracing] Finishing current active span with op: ${M(j).op}`),j.setAttribute(Vn,"cancelled"),j.end())}W.on("startNavigationSpan",(j,ue)=>{if(I()!==W)return;if(ue?.isRedirect){R&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),P(W,f({op:"navigation.redirect"},j),!1);return}ie=void 0,U(),se().setPropagationContext({traceId:Ke(),sampleRand:Math.random(),propagationSpanId:Le()?void 0:tt()});let me=x();me.setPropagationContext({traceId:Ke(),sampleRand:Math.random(),propagationSpanId:Le()?void 0:tt()}),me.setSDKProcessingMetadata({normalizedRequest:void 0}),P(W,E(f({op:"navigation"},j),{parentSpan:null,forceTransaction:!0}))}),W.on("startPageLoadSpan",(j,ue={})=>
501{if(I()!==W)return;U();let me=ue.sentryTrace||VE("sentry-trace")||YE("sentry-trace"),Re=ue.baggage||VE("baggage")||YE("baggage"),Ct=yi(me,Re),st=x();st.setPropagationContext(Ct),Le()||(st.getPropagationContext().propagationSpanId=tt()),st.setSDKProcessingMetadata({normalizedRequest:Zi()}),P(W,f({op:"pageload"},j))}),W.on("endPageloadSpan",()=>{L&&ae&&(ae.setAttribute(Vn,"reportPageLoaded"),ae.end())})},afterAllSetup(W){if(H)return;let U=dt();if(V!=="off"&&qE(W,{linkPreviousTrace:V,consistentTraceSampling:v}),C.location){if(G){let j=ye();XE(W,{name:C.location.pathname,startTime:j?j/1e3:void 0,attributes:{[Ie]:"url",[$]:"auto.pageload.browser"}})}y&&Hn(({to:j,from:ue})=>{if(ue===void 0&&U?.indexOf(j)!==-1){U=void 0;return}U=void 0;let me=Mr(j),Re=xs(W),Ct=Re&&O&&Wk(Re,ie);Kc(W,{name:me?.pathname||C.location.pathname,attributes:{[Ie]:"url",[$]:"auto.navigation.browser"}},{url:j,isRedirect:Ct})})}h&&jE(),a&&$k(W,l,p,m,t),r&&Nd(),Of(W,{traceFetch:g,traceXHR:S,trackFetchStreamPerformance:T,tracePropagationTargets:W.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:A,enableHTTPTimings:B,onRequestSpanStart:w,onRequestSpanEnd:D})}}};function XE(e,t,n){e.emit("startPageLoadSpan",t,n),x().setTransactionName(t.name);let r=xs(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Kc(e,t,n){let{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=x();return i.setTransactionName(t.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:E(f({},Zi()),{url:r})}),xs(e)}function VE(e){return C.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function YE(e){return C.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function $k(e,t,n,r,o){let i=C.document,s,a=()=>{let c="ui.action.click",u=xs(e);if(u){let d=M(u).op;if(["navigation","pageload"].includes(d)){R&&_.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Vn,"interactionInterrupted"),s.end(),s=void 0),!o.name){R&&_.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=ua({name:o.name,op:c,attributes:{[Ie]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}var QE="_sentry_idleSpan";function xs(e){return e[QE]}function JE(e,t){Te(e,QE,t)}var KE=1.5;function Wk(e,t){let n=M(e),r=Ot(),o=n.start_timestamp;return!(r-o>KE||t&&r-t<=KE)}function jk(e=I()){e?.emit("endPageloadSpan")}function zk(e){let t=K();if(t===e)return;let n=x();e.end=new Proxy(e.end,{apply(r,o,i){return ft(n,t),Reflect.apply(r,o,i)}}),ft(n,e)}function ai(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function qk(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=ai(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function Pf(e){return ai(e.getAllKeys())}function Vk(e,t,n){return e(r=>Pf(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),ai(r.transaction)}))}function Yk(e,t,n){return e(r=>Pf(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),ai(r.transaction)}))}function Jk(e){return e(t=>Pf(t).then(n=>{let r=n[0];if(r!=null)return ai(t.get(r)).then(o=>(t.delete(r),ai(t.transaction).then(()=>o)))}))}function Kk(e){let t;function n(){return t==null&&(t=qk(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{let o=Jn(r);await Vk(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{let o=Jn(r);await Yk(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let r=await Jk(n());if(r)return Mu(r)}catch{}}}}function Xk(e){return t=>{let n=e(E(f({},t),{createStore:Kk}));return C.addEventListener("online",async r=>{await n.flush()}),n}}function Qk(e=cs){return Xk(sl(e))}var ZE=1e6,Zk="window"in N&&N.window===N&&typeof importScripts>"u",_r=String(0),Xc=Zk?"main":"worker",Qc=C.navigator,tT="",nT="",rT="",Uf=Qc?.userAgent||"",oT="",eO=Qc?.language||Qc?.languages?.[0]||"";function tO(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var eT=Qc?.userAgentData;tO(eT)&&eT.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(tT=e.platform||"",rT=e.architecture||"",oT=e.model||"",nT=e.platformVersion||"",e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];Uf=`${t.brand} ${t.version}`}}).catch(e=>{});function nO(e){return!("thread_metadata"in e)}function rO(e){return nO(e)?aO(e):e}function oO(e){let t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&R&&_.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function iO(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=oO(r),i=rO(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Q()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Q()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Ln,runtime:{name:"javascript",version:C.navigator.userAgent},os:{name:tT,version:nT,build_number:Uf},device:{locale:eO,model:oT,manufacturer:Uf,architecture:rT,is_emulator:!1},debug_meta:{images:uT(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||pe(),trace_id:o,active_thread_id:_r,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function iT(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=sO(e),o=t.getOptions(),i=t.getSdkMetadata?.()?.sdk;return{chunk_id:pe(),client_sdk:{name:i?.name??"sentry.javascript.browser",version:i?.version??"0.0.0"},profiler_id:n||pe(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:uT(e.resources)},profile:r}}function sT(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};let t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}
501:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function sO(e){let t=[];for(let a=0;a<e.frames.length;a++){let c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}let n=[];for(let a=0;a<e.stacks.length;a++){let c=e.stacks[a];if(!c)continue;let u=[],d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}let r=ye(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,i=o-(r||o),s=[];for(let a=0;a<e.samples.length;a++){let c=e.samples[a];if(!c)continue;let u=(o+(c.timestamp-i))/1e3;s[a]={stack_id:c.stackId??0,thread_id:_r,timestamp:u}}return{frames:t,stacks:n,samples:s,thread_metadata:{[_r]:{name:Xc}}}}function Zc(e){return M(e).op==="pageload"}function aO(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[_r]:{name:Xc}}},o=e.samples[0];if(!o)return r;let i=o.timestamp,s=ye(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-i)*ZE).toFixed(0),stack_id:t,thread_id:_r};return}let l=e.stacks[u.stackId],p=[];for(;l;){p.push(l.frameId);let h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}let m={elapsed_since_start_ns:((u.timestamp+c-i)*ZE).toFixed(0),stack_id:n,thread_id:_r};r.stacks[n]=p,r.samples[d]=m,n++}),r}function aT(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function cT(e){let t=[];return Pt(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function uT(e){let r=I()?.getOptions()?.stackParser;return r?$u(r,e):[]}function lT(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(R&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(R&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function cO(e){return e.samples.length<2?(R&&_.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(R&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}var Df=!1,Bf=3e4;function uO(e){return typeof e=="function"}function eu(){let e=C.Profiler;if(!uO(e)){R&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(Bf/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{R&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),Df=!0}}function Ff(e){if(Df)return R&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return R&&_.log("[Profiling] Discarding profile because root span was not sampled."),!1;let n=I()?.getOptions();if(!n)return R&&_.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return lT(r)?r?(r===!0?!0:Math.random()<r)?!0:(R&&_.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(R&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(R&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function dT(e){if(Df)return R&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return R&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return lT(t)?t?Math.random()<=t:(R&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(R&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function ks(e){return typeof e.profilesSampleRate<"u"}function fT(e,t,n,r){return cO(n)?iO(e,t,n,r):null}var eo=new Map;function pT(){return eo.size}function mT(e){let t=eo.get(e);return t&&eo.delete(e),t}function hT(e,t){if(eo.set(e,t),eo.size>30){let n=eo.keys().next().value;n!==void 0&&eo.delete(n)}}function _T(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace?.trace_id&&(e.contexts.trace=E(f({},e.contexts.trace),{data:E(f({},e.contexts.trace.data??{}),{"thread.id":_r,"thread.name":Xc})})),e.spans?.forEach(t=>{t.data=E(f({},t.data||{}),{"thread.id":_r,"thread.name":Xc})})),e}function Gf(e){let t;Zc(e)&&(t=Q()*1e3);let n=eu();if(!n)return;R&&_.log(`[Profiling] started profiling span: ${M(e).description}`);let r=pe(),o=null;x().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n){if(o){R&&_.log("[Profiling] profile for:",M(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(s&&(C.clearTimeout(s),s=void 0),R&&_.log(`[Profiling] stopped profiling of span: ${M(e).description}`),!u){R&&_.log(`[Profiling] profiler returned null profile for: ${M(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,hT(r,u)}).catch(u=>{R&&_.log("[Profiling] error while stopping profiler:",u)})}}let s=C.setTimeout(()=>{R&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",M(e).description),i()},Bf),a=e.end.bind(e);function c(){return e?(i().then(()=>{a()},()=>{a()}),e):a()}e.end=c}var lO=6e4,dO=3e5,tu=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){let n=t.getOptions().profileLifecycle,r=dT(t.getOptions());R&&_.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||R&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=pe(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}
501start(){if(this._lifecycleMode==="trace"){R&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){R&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){R&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){R&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){R&&_.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;let n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);let r=this._activeRootSpanIds.size;r===1&&(R&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,R&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Sn().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){R&&_.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{R&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&Sn().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){R&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Z(n))return;if(!n.isRecording()){R&&_.log("[Profiling] Discarding profile because root span was not sampled.");return}let r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);let o=this._activeRootSpanIds.size;o===1&&(R&&_.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;let r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);let o=this._activeRootSpanIds.size;R&&_.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{R&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,Sn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);let n=setTimeout(()=>this._onRootSpanTimeout(t),dO);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let t=eu();if(!t){R&&_.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{R&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},lO))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(R&&_.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let t=this._profiler;if(this._profiler=void 0,!!t)try{let n=await t.stop(),r=iT(n,this._client,this._profilerId),o=sT(r);
501if("reason"in o){R&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),R&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){R&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){let n=this._client,r=Kn(n.getSdkMetadata?.()),o=n.getDsn(),i=n.getOptions().tunnel,s=Ue(f(f({event_id:pe(),sent_at:new Date().toISOString()},r&&{sdk:r}),!!i&&o&&{dsn:ze(o)}),[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,a=>{R&&_.error("Error while sending profile chunk envelope:",a)})}};var fO="BrowserProfiling",pO=()=>({name:fO,setup(e){let t=e.getOptions(),n=new tu;if(!ks(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),ks(t)&&!t.profilesSampleRate){R&&_.log("[Profiling] Profiling disabled, no profiling options found.");return}let r=K(),o=r&&Z(r);if(ks(t)&&t.profileSessionSampleRate!==void 0&&R&&_.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),ks(t))o&&Zc(o)&&Ff(o)&&Gf(o),e.on("spanStart",i=>{i===Z(i)&&Ff(i)&&Gf(i)}),e.on("beforeEnvelope",i=>{if(!pT())return;let s=cT(i);if(!s.length)return;let a=[];for(let c of s){let u=c?.contexts,d=u?.profile?.profile_id,l=u?.profile?.start_timestamp;if(typeof d!="string"){R&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){R&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;let p=mT(d);if(!p){R&&_.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}let m=fT(d,l,p,c);m&&a.push(m)}aT(i,a)});else{let i=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),i==="manual")n.initialize(e);else if(i==="trace"){if(!Le(t)){R&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),C.setTimeout(()=>{let s=K(),a=s&&Z(s);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return _T(e)}}),mO=pO;var hO=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Ut(e)}});function _O(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{bt(e,t.value),At(e,t.value)}}}var gO=()=>({name:"OpenFeature",processEvent(e,t,n){return Ut(e)}}),Hf=class{after(t,n){bt(n.flagKey,n.value),At(n.flagKey,n.value)}error(t,n,r){bt(t.flagKey,t.defaultValue),At(t.flagKey,t.defaultValue)}};var SO=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){let t=e.prototype;Ee(t,"isEnabled",EO)},processEvent(t,n,r){return Ut(t)}});function EO(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(bt(n,r),At(n,r)):R&&_.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var TO=({growthbookClass:e})=>_l({growthbookClass:e});var yO=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{bt(n.gate.name,n.gate.value),At(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Ut(t)}});async function IO(){let e=I();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";let r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await ca(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}var bO="WebWorker",AO=({worker:e})=>({name:bO,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>gT(t))},addWorker:t=>gT(t)});function gT(e){e.addEventListener("message",t=>{if(NO(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(R&&_.log("Sentry debugId web worker message received",t.data),C._sentryDebugIds=f(f({},t.data._sentryDebugIds),C._sentryDebugIds)),t.data._sentryModuleMetadata&&(R&&_.log("Sentry module metadata web worker message received",t.data),C._sentryModuleMetadata=f(f({},t.data._sentryModuleMetadata),C._sentryModuleMetadata)),t.data._sentryWasmImages){R&&_.log("Sentry WASM images web worker message received",t.data);let n=C._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>we(o)&&typeof o.code_file=="string"&&!n.some(i=>i.code_file===o.code_file));C._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(R&&_.log("Sentry worker rejection message received",t.data._sentryWorkerError),RO(t.data._sentryWorkerError))}})}function RO(e){let t=I();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,i=lt(o)?kd(o):Fo(n,o,void 0,r,!0);i.level="error",e.filename&&(i.contexts=E(f({},i.contexts),{worker:{filename:e.filename}})),In(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),R&&_.log("Captured worker unhandled rejection",o)}function vO({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{let r={reason:xd(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}
501),R&&_.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),R&&_.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function NO(e){if(!we(e)||e._sentryMessage!==!0)return!1;let t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(we(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(we(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!we(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(i=>we(i)&&typeof i.code_file=="string")))}var ST=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__;function wO(e={}){return[Ao(),bo(),Gi(),us(),fs(),ms(),Ro(),ps(),ds(),ls()]}function hz(e){let t=f({defaultIntegrations:wO()},e);return Fi(t,"angular"),xO(),Od(t)}function xO(){let t=nu?.major&&parseInt(nu.major,10);t&&(t<14&&ST&&_.warn(`This Sentry SDK does not officially support Angular ${t}.`,"This SDK only supports Angular 14 and above.","If you're using lower Angular versions, check the Angular Version Compatibility table in our docs: https://docs.sentry.io/platforms/javascript/guides/angular/#angular-version-compatibility.","Otherwise, please consider upgrading your Angular version."),ho("angular",{version:t}))}var kO=typeof Zone<"u"&&Zone.root?.run;function mn(e){return kO?Zone.root.run(e):e()}function OO(e){return e?.ngOriginalError?e.ngOriginalError:e}function MO(e){return ET(e.error)?e.error:typeof ErrorEvent<"u"&&e.error instanceof ErrorEvent&&e.error.message?e.error.message:typeof e.error=="string"?`Server returned code ${e.status} with body "${e.error}"`:e.message}function ET(e){if(e instanceof Error)return!0;if(e===null||typeof e!="object")return!1;let t=e;return ke(t.name)&&ke(t.message)&&(t.stack===void 0||ke(t.stack))}var LO=(()=>{class e{constructor(n){this._options=f({logErrors:!0},n)}ngOnDestroy(){this._removeAfterSendEventListener&&this._removeAfterSendEventListener()}handleError(n){let r=this._extractError(n)||"Handled unknown error",o=mn(()=>X(r,{mechanism:{type:"auto.function.angular.error_handler",handled:!1}}));if(this._options.logErrors&&We(()=>console.error(r)),this._options.showDialog){let i=I();i&&!this._removeAfterSendEventListener?this._removeAfterSendEventListener=i.on("afterSendEvent",s=>{!s.type&&s.event_id&&mn(()=>{gc(E(f({},this._options.dialogOptions),{eventId:s.event_id}))})}):i||mn(()=>{gc(E(f({},this._options.dialogOptions),{eventId:o}))})}}_extractError(n){if(this._options.extractor){let r=this._defaultExtractor.bind(this);return this._options.extractor(n,r)}return this._defaultExtractor(n)}_defaultExtractor(n){let r=OO(n);return r instanceof Jf?MO(r):typeof r=="string"||ET(r)?r:null}}return e.\u0275fac=function(n){return new(n||e)(ou("errorHandlerOptions"))},e.\u0275prov=ru({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function _z(e){return new LO(e)}var PO="ui.angular.routing",TT="ui.angular.init",UO="ui.angular",yT;function gz(e={}){return e.instrumentNavigation!==!1&&(yT=!0),Lf(E(f({},e),{instrumentNavigation:!1}))}function DO(e,t){let n=t&&M(t).data||{};t&&n[Ie]==="url"&&(t.updateName(e),t.setAttribute(Ie,"route"),t.setAttribute($,`auto.${M(t).op}.angular`))}var Sz=(()=>{class e{constructor(n){this._router=n,this.navStart$=this._router.events.pipe(Ls(r=>r instanceof Kf),Ps(r=>{if(!yT){ST&&_.error("Angular integration has tracing enabled, but Tracing integration is not configured");return}this._routingSpan&&(this._routingSpan.end(),this._routingSpan=null);let o=I(),i=Lr(r.url);if(o){this._isPageloadOngoing()?this._pageloadOngoing=!1:mn(()=>{Kc(o,{name:i,attributes:{[$]:"auto.navigation.angular",[Ie]:"url"}})}),this._routingSpan=mn(()=>qe({name:`${r.url}`,op:PO,attributes:f({[$]:"auto.ui.angular",[Ie]:"url",url:i},r.navigationTrigger&&{navigationTrigger:r.navigationTrigger})}))||null;return}})),this.resEnd$=this._router.events.pipe(Ls(r=>r instanceof ep),Ps(r=>{let o=BO(r.state.root);o&&x().setTransactionName(o);let i=K(),s=i&&Z(i);DO(o,s)})),this.navEnd$=this._router.events.pipe(Ls(r=>r instanceof Xf||r instanceof Qf||r instanceof Zf),Ps(()=>{this._routingSpan&&(mn(()=>{this._routingSpan.end()}),this._routingSpan=null)})),this._routingSpan=null,this._pageloadOngoing=!0,this._subscription=new Wf,this._subscription.add(this.navStart$.subscribe()),this._subscription.add(this.resEnd$.subscribe()),this._subscription.add(this.navEnd$.subscribe())}ngOnDestroy(){this._subscription.unsubscribe()}_isPageloadOngoing(){if(!this._pageloadOngoing)return!1;let n=K();if(!n)return this._pageloadOngoing=!1,!1;let r=Z(n);return this._pageloadOngoing=M(r).op==="pageload",this._pageloadOngoing}}return e.\u0275fac=function(n){return new(n||e)(ou(tp))},e.\u0275prov=ru({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ez=(()=>{class e{constructor(n){this._host=n}ngOnInit(){this.componentName||(this.componentName=this._host.nativeElement.tagName.toLowerCase()),K()&&(this._tracingSpan=mn(()=>qe({name:`<${this.componentName}>`,op:TT,attributes:{[$]:"auto.ui.angular.trace_directive"}})))}ngAfterViewInit(){let n=this._tracingSpan;n&&mn(()=>n.end())}}return e.\u0275fac=function(n){return new(n||e)(qf(zf))},e.\u0275dir=Yf({type:e,selectors:[["","trace",""]],inputs:{componentName:[0,"trace","componentName"]},standalone:!1}),e})(),Tz=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Vf({type:e}),e.\u0275inj=jf({}),e})();function yz(e){let t;return n=>{let r=n.prototype.ngOnInit;n.prototype.ngOnInit=function(...i){if(t=mn(()=>qe({onlyIfParent:!0,name:`<${e?.name||"unnamed"}>`,op:TT,attributes:{[$]:"auto.ui.angular.trace_class_decorator"}})),r)return r.apply(this,i)};let o=n.prototype.ngAfterViewInit;n.prototype.ngAfterViewInit=function(...i){if(t&&mn(()=>t.end()),o)return o.apply(this,i)}}}function Iz(e){return(t,n,r)=>{let o=r.value;return r.value=function(...i){let s=Q();if(mn(()=>{qe({onlyIfParent:!0,name:`<${e?.name?e.name:"unnamed"}>`,op:`${UO}.${String(n)}`,startTime:s,attributes:{[$]:"auto.ui.angular.trace_method_decorator"}}).end(s)}),o)return o.apply(this,i)},r}}function BO(e){let t=[],n=e?.firstChild;for(;n;
501){let o=n?.routeConfig&&n.routeConfig.path;if(o==null)break;t.push(o),n=n.firstChild}let r=t.filter(o=>o).join("/");return r?`/${r}/`:"/"}export{ts as BrowserClient,Di as MULTIPLEXED_TRANSPORT_EXTRA_KEY,Hf as OpenFeatureIntegrationHook,xt as SDK_VERSION,le as SEMANTIC_ATTRIBUTE_SENTRY_OP,$ as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,qn as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,Ie as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,pt as Scope,LO as SentryErrorHandler,yz as TraceClass,Ez as TraceDirective,Iz as TraceMethod,Tz as TraceModule,Sz as TraceService,C as WINDOW,It as addBreadcrumb,ma as addEventProcessor,Mi as addIntegration,us as breadcrumbsIntegration,wd as browserApiErrorsIntegration,mO as browserProfilingIntegration,ls as browserSessionIntegration,gz as browserTracingIntegration,_O as buildLaunchDarklyFlagUsedHandler,Qm as captureConsoleIntegration,In as captureEvent,X as captureException,xa as captureFeedback,da as captureMessage,_o as captureSession,Qg as chromeStackLineParser,fm as close,yh as consoleLoggingIntegration,PC as contextLinesIntegration,Jp as continueTrace,Ih as createConsolaReporter,_z as createErrorHandler,F_ as createLangChainCallbackHandler,Ea as createTransport,wN as createUserFeedbackEnvelope,ds as cultureContextIntegration,Ro as dedupeIntegration,Jc as defaultRequestInstrumentationOptions,eS as defaultStackLineParsers,Cd as defaultStackParser,IO as diagnoseSdkConnectivity,ha as endSession,fl as eventFiltersIntegration,sd as eventFromException,ad as eventFromMessage,es as exceptionFromError,nh as extraErrorDataIntegration,gh as featureFlagsIntegration,QR as feedbackAsyncIntegration,vg as feedbackIntegration,vg as feedbackSyncIntegration,dm as flush,pC as forceLoad,bo as functionToStringIntegration,Zg as geckoStackLineParser,K as getActiveSpan,I as getClient,x as getCurrentScope,wO as getDefaultIntegrations,lR as getFeedback,Sn as getGlobalScope,se as getIsolationScope,dk as getReplay,Z as getRootSpan,Yn as getSpanDescendants,Nu as getSpanStatusFromHttpCode,Io as getTraceData,fs as globalHandlersIntegration,WC as graphqlClientIntegration,TO as growthbookIntegration,yC as httpClientIntegration,ps as httpContextIntegration,Ao as inboundFiltersIntegration,hz as init,b_ as instrumentAnthropicAiClient,O_ as instrumentGoogleGenAIClient,W_ as instrumentLangGraph,f_ as instrumentOpenAiClient,Of as instrumentOutgoingRequests,hl as instrumentSupabaseClient,pa as isEnabled,pm as isInitialized,fa as lastEventId,hO as launchDarklyIntegration,nd as lazyLoadIntegration,ms as linkedErrorsIntegration,Sl as logger,Qk as makeBrowserOfflineTransport,cs as makeFetchTransport,Hm as makeMultiplexedTransport,Tl as metrics,Xm as moduleMetadataIntegration,mC as onLoad,gO as openFeatureIntegration,RN as opera10StackLineParser,CN as opera11StackLineParser,cl as parameterize,ta as registerSpanErrorInstrumentation,vO as registerWebWorker,Ck as replayCanvasIntegration,uk as replayIntegration,jk as reportPageLoaded,SC as reportingObserverIntegration,ch as rewriteFramesIntegration,dg as sendFeedback,zk as setActiveSpanInBrowser,ho as setContext,lm as setConversationId,rl as setCurrentClient,sm as setExtra,im as setExtras,Mn as setHttpStatus,ia as setMeasurement,cm as setTag,am as setTags,um as setUser,gc as showReportDialog,Dp as spanToBaggageHeader,M as spanToJSON,Xs as spanToTraceHeader,lC as spotlightBrowserIntegration,Kc as startBrowserTracingNavigationSpan,XE as startBrowserTracingPageLoadSpan,qe as startInactiveSpan,Uu as startNewTrace,ki as startSession,rt as startSpan,yt as startSpanManual,yO as statsigIntegration,dh as supabaseIntegration,ca as suppressTracing,mh as thirdPartyErrorFilterIntegration,sN as uiProfiler,SO as unleashIntegration,Op as updateSpanName,AO as webWorkerIntegration,IN as winjsStackLineParser,Cr as withActiveSpan,Iu as withIsolationScope,je as withScope,fh as zodErrorsIntegration}; 502 503//# debugId=1fdeca3b-12fd-5ce2-9c6c-28861f5d614c
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.